Version 0.3.2.0
svn merge -r 17322:17651 https://dart.googlecode.com/svn/branches/bleeding_edge trunk
svn merge -c 17656 https://dart.googlecode.com/svn/branches/bleeding_edge trunk
git-svn-id: http://dart.googlecode.com/svn/trunk@17657 260f80e4-7a28-3924-810f-c04153c831b5
diff --git a/.gitignore b/.gitignore
index 72b2e8c..894d9fa 100644
--- a/.gitignore
+++ b/.gitignore
@@ -26,11 +26,13 @@
/*.vcxproj
/*.vcxproj.filters
/*.vcxproj.user
-/*.xcodeproj
# End generated ignores. The following are hand-added because the svn:ignore
# stuff doesn't handle them well.
+# Gyp generated files
+*.xcodeproj
+
# Dart Editor config files - also in all subdirectories.
.children
.project
@@ -45,8 +47,9 @@
# From the Mac OS X Finder
.DS_Store
-# Pub generated "packages" directories
+# Pub generated "packages" directories and files
packages
+pubspec.lock
# Vim temporary swap files.
*.swp
diff --git a/compiler/java/com/google/dart/compiler/CommandLineOptions.java b/compiler/java/com/google/dart/compiler/CommandLineOptions.java
index 440b7bb..6d11bbc 100644
--- a/compiler/java/com/google/dart/compiler/CommandLineOptions.java
+++ b/compiler/java/com/google/dart/compiler/CommandLineOptions.java
@@ -35,6 +35,10 @@
@Option(name = "--error_format",
usage = "Format errors as normal or machine")
private String errorFormat = "";
+
+ @Option(name = "--extended-exit-code",
+ usage = "0 - clean; 1 - has warnings; 2 - has errors")
+ private boolean extendedExitCode = false;
@Option(name = "--enable_type_checks",
usage = "Generate runtime type checks")
@@ -149,6 +153,10 @@
public File getDartSdkPath() {
return dartSdkPath;
}
+
+ public boolean extendedExitCode() {
+ return extendedExitCode;
+ }
/**
* Returns whether warnings from SDK files should be suppressed.
diff --git a/compiler/java/com/google/dart/compiler/DartCompiler.java b/compiler/java/com/google/dart/compiler/DartCompiler.java
index 98493b2..08ccaa1 100644
--- a/compiler/java/com/google/dart/compiler/DartCompiler.java
+++ b/compiler/java/com/google/dart/compiler/DartCompiler.java
@@ -75,6 +75,26 @@
*/
public class DartCompiler {
+ static final int RESULT_OK = 0;
+ static final int RESULT_WARNINGS = 1;
+ static final int RESULT_ERRORS = 2;
+ static final int RESULT_OTHER = 127;
+
+ static class Result {
+ final int code;
+ final String message;
+ public Result(int code, String message) {
+ this.code = code;
+ this.message = message;
+ }
+ Result merge(Result other) {
+ if (other.code > code) {
+ return other;
+ }
+ return this;
+ }
+ }
+
public static final String EXTENSION_DEPS = "deps";
public static final String EXTENSION_LOG = "log";
public static final String EXTENSION_TIMESTAMP = "timestamp";
@@ -1006,11 +1026,15 @@
Tracer.init();
CompilerOptions topCompilerOptions = processCommandLineOptions(topArgs);
- boolean result = false;
+ Result result = null;
try {
+ // configure UTF-8 output
+ System.setOut(new PrintStream(System.out, true, "UTF-8"));
+ System.setErr(new PrintStream(System.err, true, "UTF-8"));
+
if (topCompilerOptions.showVersion()) {
showVersion(topCompilerOptions);
- System.exit(0);
+ System.exit(RESULT_OK);
}
if (topCompilerOptions.shouldBatch()) {
if (topArgs.length > 1) {
@@ -1018,7 +1042,7 @@
}
result = UnitTestBatchRunner.runAsBatch(topArgs, new Invocation() {
@Override
- public boolean invoke(String[] lineArgs) throws Throwable {
+ public Result invoke(String[] lineArgs) throws Throwable {
List<String> allArgs = new ArrayList<String>();
for (String arg: topArgs) {
if (!arg.equals("-batch")) {
@@ -1044,31 +1068,41 @@
t.printStackTrace();
crash();
}
- if (!result) {
- System.exit(1);
+ // exit
+ {
+ int exitCode = result.code;
+ if (!topCompilerOptions.extendedExitCode()) {
+ if (exitCode == RESULT_ERRORS) {
+ exitCode = 1;
+ } else {
+ exitCode = 0;
+ }
+ }
+ System.exit(exitCode);
}
}
/**
* Invoke the compiler to build single application.
- *
+ *
* @param compilerOptions parsed command line arguments
- *
- * @return <code> true</code> on success, <code>false</code> on failure.
+ * @return the result as integer when <code>0</code> means clean; <code>1</code> there were
+ * warnings; <code>2</code> there were errors; <code>127</code> other problems or
+ * exceptions.
*/
- public static boolean compilerMain(CompilerOptions compilerOptions) throws IOException {
+ public static Result compilerMain(CompilerOptions compilerOptions) throws IOException {
List<String> sourceFiles = compilerOptions.getSourceFiles();
if (sourceFiles.size() == 0) {
System.err.println("dart_analyzer: no source files were specified.");
showUsage(null, System.err);
- return false;
+ return new Result(RESULT_OTHER, null);
}
File sourceFile = new File(sourceFiles.get(0));
if (!sourceFile.exists()) {
System.err.println("dart_analyzer: file not found: " + sourceFile);
showUsage(null, System.err);
- return false;
+ return new Result(RESULT_OTHER, null);
}
CompilerConfiguration config = new DefaultCompilerConfiguration(compilerOptions);
@@ -1081,15 +1115,14 @@
*
* @param sourceFile file passed on the command line to build
* @param config compiler configuration built from parsed command line options
- *
- * @return <code> true</code> on success, <code>false</code> on failure.
*/
- public static boolean compilerMain(File sourceFile, CompilerConfiguration config)
+ public static Result compilerMain(File sourceFile, CompilerConfiguration config)
throws IOException {
- String errorMessage = compileApp(sourceFile, config);
+ Result result = compileApp(sourceFile, config);
+ String errorMessage = result.message;
if (errorMessage != null) {
System.err.println(errorMessage);
- return false;
+ return result;
}
TraceEvent logEvent = Tracer.canTrace() ? Tracer.start(DartEventType.WRITE_METRICS) : null;
@@ -1098,7 +1131,7 @@
} finally {
Tracer.end(logEvent);
}
- return true;
+ return result;
}
public static void crash() {
@@ -1128,8 +1161,12 @@
* Treats the <code>sourceFile</code> as the top level library and generates compiled output by
* linking the dart source in this file with all libraries referenced with <code>#import</code>
* statements.
+ *
+ * @return the result as integer when <code>0</code> means clean; <code>1</code> there were
+ * warnings; <code>2</code> there were errors; <code>127</code> other problems or
+ * exceptions.
*/
- public static String compileApp(File sourceFile, CompilerConfiguration config) throws IOException {
+ public static Result compileApp(File sourceFile, CompilerConfiguration config) throws IOException {
TraceEvent logEvent =
Tracer.canTrace() ? Tracer.start(DartEventType.COMPILE_APP, "src", sourceFile.toString())
: null;
@@ -1156,8 +1193,7 @@
} else {
listener = new DefaultDartCompilerListener(config.printErrorFormat());
}
- String errorString = compileLib(lib, config, provider, listener);
- return errorString;
+ return compileLib(lib, config, provider, listener);
} finally {
Tracer.end(logEvent);
}
@@ -1172,7 +1208,7 @@
* @param provider A mechanism for specifying where code should be generated
* @param listener An object notified when compilation errors occur
*/
- public static String compileLib(LibrarySource lib, CompilerConfiguration config,
+ public static Result compileLib(LibrarySource lib, CompilerConfiguration config,
DartArtifactProvider provider, DartCompilerListener listener) throws IOException {
return compileLib(lib, Collections.<LibrarySource>emptyList(), config, provider, listener);
}
@@ -1181,7 +1217,7 @@
* Same method as above, but also takes a list of libraries that should be
* implicitly imported by all libraries. These libraries are provided by the embedder.
*/
- public static String compileLib(LibrarySource lib,
+ public static Result compileLib(LibrarySource lib,
List<LibrarySource> embeddedLibraries,
CompilerConfiguration config,
DartArtifactProvider provider,
@@ -1197,8 +1233,8 @@
errorCount += context.getWarningCount();
}
if (errorCount > 0) {
- return "Compilation failed with " + errorCount
- + (errorCount == 1 ? " problem." : " problems.");
+ return new Result(RESULT_ERRORS, "Compilation failed with " + errorCount
+ + (errorCount == 1 ? " problem." : " problems."));
}
if (!context.getFilesHaveChanged()) {
return null;
@@ -1216,7 +1252,13 @@
Closeables.close(writer, threw);
}
}
- return null;
+ {
+ int resultCode = RESULT_OK;
+ if (context.getWarningCount() != 0) {
+ resultCode = RESULT_WARNINGS;
+ }
+ return new Result(resultCode, null);
+ }
}
/**
diff --git a/compiler/java/com/google/dart/compiler/DartCompilerMainContext.java b/compiler/java/com/google/dart/compiler/DartCompilerMainContext.java
index 642b359..ea3ea09 100644
--- a/compiler/java/com/google/dart/compiler/DartCompilerMainContext.java
+++ b/compiler/java/com/google/dart/compiler/DartCompilerMainContext.java
@@ -89,7 +89,8 @@
// Increment counters.
if (event.getErrorCode().getSubSystem() == SubSystem.STATIC_TYPE) {
incrementTypeErrorCount();
- } else if (event.getErrorCode().getErrorSeverity() == ErrorSeverity.ERROR) {
+ }
+ if (event.getErrorCode().getErrorSeverity() == ErrorSeverity.ERROR) {
incrementErrorCount();
} else if (event.getErrorCode().getErrorSeverity() == ErrorSeverity.WARNING) {
incrementWarningCount();
diff --git a/compiler/java/com/google/dart/compiler/UnitTestBatchRunner.java b/compiler/java/com/google/dart/compiler/UnitTestBatchRunner.java
index ce63509..bbabf4a 100644
--- a/compiler/java/com/google/dart/compiler/UnitTestBatchRunner.java
+++ b/compiler/java/com/google/dart/compiler/UnitTestBatchRunner.java
@@ -5,6 +5,8 @@
package com.google.dart.compiler;
+import com.google.dart.compiler.DartCompiler.Result;
+
import java.io.BufferedReader;
import java.io.InputStreamReader;
@@ -16,7 +18,7 @@
public class UnitTestBatchRunner {
public interface Invocation {
- public boolean invoke (String[] args) throws Throwable;
+ public Result invoke (String[] args) throws Throwable;
}
/**
@@ -25,7 +27,7 @@
*
* @param batchArgs command line arguments forwarded from main().
*/
- public static boolean runAsBatch(String[] batchArgs, Invocation toolInvocation) throws Throwable {
+ public static Result runAsBatch(String[] batchArgs, Invocation toolInvocation) throws Throwable {
System.out.println(">>> BATCH START");
// Read command lines in from stdin and create a new compiler for each one.
@@ -34,23 +36,23 @@
long startTime = System.currentTimeMillis();
int testsFailed = 0;
int totalTests = 0;
- boolean batchResult = true;
+ Result batchResult = new Result(DartCompiler.RESULT_OK, null);
try {
String line;
for (; (line = cmdlineReader.readLine()) != null; totalTests++) {
long testStart = System.currentTimeMillis();
- // TODO(zundel): These are shell script cmdlines: be smarter about
- // quoted strings.
+ // TODO(zundel): These are shell script cmdlines: be smarter about quoted strings.
String[] args = line.trim().split("\\s+");
- boolean result = toolInvocation.invoke(args);
- if (!result) {
+ Result result = toolInvocation.invoke(args);
+ boolean resultPass = result.code < DartCompiler.RESULT_ERRORS;
+ if (resultPass) {
testsFailed++;
}
- batchResult &= result;
+ batchResult = batchResult.merge(result);
// Write stderr end token and flush.
System.err.println(">>> EOF STDERR");
System.err.flush();
- System.out.println(">>> TEST " + (result ? "PASS" : "FAIL") + " "
+ System.out.println(">>> TEST " + (resultPass ? "PASS" : "FAIL") + " "
+ (System.currentTimeMillis() - testStart) + "ms");
System.out.flush();
}
diff --git a/compiler/java/com/google/dart/compiler/ast/ASTNodes.java b/compiler/java/com/google/dart/compiler/ast/ASTNodes.java
index 82bc855..88a322f 100644
--- a/compiler/java/com/google/dart/compiler/ast/ASTNodes.java
+++ b/compiler/java/com/google/dart/compiler/ast/ASTNodes.java
@@ -29,6 +29,7 @@
import java.util.Collections;
import java.util.List;
+import java.util.concurrent.atomic.AtomicBoolean;
/**
* Defines utility methods that operate on nodes in a Dart AST structure (instances of
@@ -1429,5 +1430,20 @@
return (DartIdentifier) constructor;
}
}
+
+ /**
+ * @return <code>true</code> if given {@link DartNode} has {@link DartSuperExpression}.
+ */
+ public static boolean hasSuperInvocation(DartNode node) {
+ final AtomicBoolean result = new AtomicBoolean();
+ node.accept(new ASTVisitor<Void>() {
+ @Override
+ public Void visitSuperExpression(DartSuperExpression node) {
+ result.set(true);
+ return null;
+ }
+ });
+ return result.get();
+ }
}
diff --git a/compiler/java/com/google/dart/compiler/parser/DartParser.java b/compiler/java/com/google/dart/compiler/parser/DartParser.java
index 7ff83e9..771199d 100644
--- a/compiler/java/com/google/dart/compiler/parser/DartParser.java
+++ b/compiler/java/com/google/dart/compiler/parser/DartParser.java
@@ -469,9 +469,11 @@
public LibraryUnit preProcessLibraryDirectives(LibrarySource source) {
beginCompilationUnit();
LibraryUnit libUnit = new LibraryUnit(source);
+ parseMetadata();
if (peekPseudoKeyword(0, LIBRARY_KEYWORD)) {
DartLibraryDirective libraryDirective = parseLibraryDirective();
libUnit.setName(libraryDirective.getLibraryName());
+ parseMetadata();
}
while (peekPseudoKeyword(0, IMPORT_KEYWORD) || peekPseudoKeyword(0, EXPORT_KEYWORD)) {
if (peekPseudoKeyword(0, IMPORT_KEYWORD)) {
@@ -486,6 +488,7 @@
importPath.setSourceInfo(exportDirective.getSourceInfo());
libUnit.addExportPath(importPath);
}
+ parseMetadata();
}
while (peekPseudoKeyword(0, PART_KEYWORD)) {
if (peekPseudoKeyword(1, OF_KEYWORD)) {
@@ -496,6 +499,7 @@
sourcePath.setSourceInfo(sourceDirective.getSourceInfo());
libUnit.addSourcePath(sourcePath);
}
+ parseMetadata();
}
//
// The code below is obsolete. We do not make any effort to find duplications between the old
@@ -505,6 +509,7 @@
beginLibraryDirective();
DartLibraryDirective libDirective = done(parseObsoleteLibraryDirective());
libUnit.setName(libDirective.getLibraryName());
+ parseMetadata();
}
while (peek(0) == Token.IMPORT) {
beginImportDirective();
@@ -518,6 +523,7 @@
}
importPath.setSourceInfo(importDirective.getSourceInfo());
libUnit.addImportPath(importPath);
+ parseMetadata();
}
while (peek(0) == Token.SOURCE) {
beginSourceDirective();
@@ -525,9 +531,11 @@
LibraryNode sourcePath = new LibraryNode(sourceDirective.getSourceUri().getValue());
sourcePath.setSourceInfo(sourceDirective.getSourceInfo());
libUnit.addSourcePath(sourcePath);
+ parseMetadata();
}
while (peek(0) == Token.RESOURCE) {
parseResourceDirective();
+ parseMetadata();
}
while (peek(0) == Token.NATIVE) {
beginNativeDirective();
@@ -535,6 +543,7 @@
LibraryNode nativePath = new LibraryNode(nativeDirective.getNativeUri().getValue());
nativePath.setSourceInfo(nativeDirective.getSourceInfo());
libUnit.addNativePath(nativePath);
+ parseMetadata();
}
// add ourselves to the list of sources, so inline dart code will be parsed
@@ -1246,11 +1255,6 @@
private DartClassTypeAlias parseClassTypeAlias() {
beginClassTypeInterface();
- Modifiers modifiers = Modifiers.NONE;
- if (optionalPseudoKeyword(ABSTRACT_KEYWORD)) {
- modifiers = modifiers.makeAbstract();
- }
-
DartIdentifier name = parseIdentifier();
if (PSEUDO_KEYWORDS_SET.contains(name.getName())) {
reportError(name, ParserErrorCode.BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME);
@@ -1259,6 +1263,11 @@
expect(Token.ASSIGN);
+ Modifiers modifiers = Modifiers.NONE;
+ if (optionalPseudoKeyword(ABSTRACT_KEYWORD)) {
+ modifiers = modifiers.makeAbstract();
+ }
+
DartTypeNode superType = parseTypeAnnotation();
List<DartTypeNode> mixins = null;
@@ -5040,6 +5049,8 @@
boolean warnedUnreachable = false;
while (true) {
switch (peek(0)) {
+ case CLASS:
+ // exit loop to report error condition
case CASE:
case DEFAULT:
case RBRACE:
diff --git a/compiler/java/com/google/dart/compiler/resolver/ClassElement.java b/compiler/java/com/google/dart/compiler/resolver/ClassElement.java
index 4676671..e219536 100644
--- a/compiler/java/com/google/dart/compiler/resolver/ClassElement.java
+++ b/compiler/java/com/google/dart/compiler/resolver/ClassElement.java
@@ -57,4 +57,6 @@
int getOpenBraceOffset();
int getCloseBraceOffset();
+
+ boolean hasSuperInvocation();
}
diff --git a/compiler/java/com/google/dart/compiler/resolver/ClassElementImplementation.java b/compiler/java/com/google/dart/compiler/resolver/ClassElementImplementation.java
index 65aa644..37dad0a 100644
--- a/compiler/java/com/google/dart/compiler/resolver/ClassElementImplementation.java
+++ b/compiler/java/com/google/dart/compiler/resolver/ClassElementImplementation.java
@@ -5,6 +5,7 @@
package com.google.dart.compiler.resolver;
import com.google.common.collect.Lists;
+import com.google.dart.compiler.ast.ASTNodes;
import com.google.dart.compiler.ast.DartClass;
import com.google.dart.compiler.ast.DartClassTypeAlias;
import com.google.dart.compiler.ast.DartDeclaration;
@@ -43,6 +44,7 @@
private List<Element> unimplementedMembers;
private final int openBraceOffset;
private final int closeBraceOffset;
+ private final boolean hasSuperInvocation;
// declared volatile for thread-safety
@SuppressWarnings("unused")
@@ -73,6 +75,7 @@
declarationNameWithTypeParameter = createDeclarationName(node.getName(), node.getTypeParameters());
openBraceOffset = node.getOpenBraceOffset();
closeBraceOffset = node.getCloseBraceOffset();
+ hasSuperInvocation = ASTNodes.hasSuperInvocation(node);
} else {
isInterface = false;
metadata = DartObsoleteMetadata.EMPTY;
@@ -81,6 +84,7 @@
declarationNameWithTypeParameter = "";
openBraceOffset = -1;
closeBraceOffset = -1;
+ hasSuperInvocation = false;
}
}
@@ -97,6 +101,7 @@
declarationNameWithTypeParameter = createDeclarationName(node.getName(), node.getTypeParameters());
openBraceOffset = -1;
closeBraceOffset = -1;
+ hasSuperInvocation = false;
} else {
isInterface = false;
metadata = DartObsoleteMetadata.EMPTY;
@@ -105,6 +110,7 @@
declarationNameWithTypeParameter = "";
openBraceOffset = -1;
closeBraceOffset = -1;
+ hasSuperInvocation = false;
}
}
@@ -449,4 +455,9 @@
public int getCloseBraceOffset() {
return closeBraceOffset;
}
+
+ @Override
+ public boolean hasSuperInvocation() {
+ return hasSuperInvocation;
+ }
}
diff --git a/compiler/java/com/google/dart/compiler/resolver/ClassElementUnion.java b/compiler/java/com/google/dart/compiler/resolver/ClassElementUnion.java
index 145205f..59e5fad 100644
--- a/compiler/java/com/google/dart/compiler/resolver/ClassElementUnion.java
+++ b/compiler/java/com/google/dart/compiler/resolver/ClassElementUnion.java
@@ -203,4 +203,9 @@
public int getCloseBraceOffset() {
return -1;
}
+
+ @Override
+ public boolean hasSuperInvocation() {
+ return false;
+ }
}
diff --git a/compiler/java/com/google/dart/compiler/resolver/DynamicElementImplementation.java b/compiler/java/com/google/dart/compiler/resolver/DynamicElementImplementation.java
index 93c31a2..3950e85 100644
--- a/compiler/java/com/google/dart/compiler/resolver/DynamicElementImplementation.java
+++ b/compiler/java/com/google/dart/compiler/resolver/DynamicElementImplementation.java
@@ -322,4 +322,9 @@
public int getCloseBraceOffset() {
return -1;
}
+
+ @Override
+ public boolean hasSuperInvocation() {
+ return false;
+ }
}
diff --git a/compiler/java/com/google/dart/compiler/resolver/Elements.java b/compiler/java/com/google/dart/compiler/resolver/Elements.java
index e5d1d1a..36d41c6 100644
--- a/compiler/java/com/google/dart/compiler/resolver/Elements.java
+++ b/compiler/java/com/google/dart/compiler/resolver/Elements.java
@@ -971,16 +971,6 @@
MethodElement method = (MethodElement) element;
return !method.hasBody();
}
- if (ElementKind.of(element) == ElementKind.FIELD) {
- FieldElement field = (FieldElement) element;
- if (isAbstractElement(field.getGetter())) {
- return true;
- }
- if (isAbstractElement(field.getSetter())) {
- return true;
- }
- return false;
- }
return false;
}
diff --git a/compiler/java/com/google/dart/compiler/resolver/ResolutionContext.java b/compiler/java/com/google/dart/compiler/resolver/ResolutionContext.java
index 03e72ff..7889732 100644
--- a/compiler/java/com/google/dart/compiler/resolver/ResolutionContext.java
+++ b/compiler/java/com/google/dart/compiler/resolver/ResolutionContext.java
@@ -314,13 +314,16 @@
* Interpret this node as a name reference,
*/
Element resolveName(DartNode node) {
- if (Elements.isIdentifierName(node, "void")) {
- return typeProvider.getVoidType().getElement();
+ Element result = node.accept(new Selector());
+ if (result == null) {
+ if (Elements.isIdentifierName(node, "void")) {
+ return typeProvider.getVoidType().getElement();
+ }
+ if (Elements.isIdentifierName(node, "dynamic")) {
+ return typeProvider.getDynamicType().getElement();
+ }
}
- if (Elements.isIdentifierName(node, "dynamic")) {
- return typeProvider.getDynamicType().getElement();
- }
- return node.accept(new Selector());
+ return result;
}
MethodElement declareFunction(DartFunctionExpression node) {
diff --git a/compiler/java/com/google/dart/compiler/resolver/Resolver.java b/compiler/java/com/google/dart/compiler/resolver/Resolver.java
index f40cb66..f85ccd5 100644
--- a/compiler/java/com/google/dart/compiler/resolver/Resolver.java
+++ b/compiler/java/com/google/dart/compiler/resolver/Resolver.java
@@ -372,6 +372,8 @@
}
onError(errorTarget, ResolverErrorCode.CYCLIC_CLASS, e.getElement().getName());
}
+ checkMixinNoConstructors(cls.getMixins());
+ checkMixinNoSuperInvocations(cls.getMixins());
return classElement;
}
@@ -487,12 +489,51 @@
}
}
+ // check mixins
+ checkMixinNoConstructors(cls.getMixins());
+ checkMixinNoSuperInvocations(cls.getMixins());
+
context = previousContext;
currentHolder = previousHolder;
enclosingElement = previousEnclosingElement;
return classElement;
}
+ /**
+ * Checks that the types of the given mixin type node don't have explicit constructors.
+ */
+ private void checkMixinNoConstructors(List<DartTypeNode> mixins) {
+ for (DartTypeNode mixNode : mixins) {
+ if (mixNode.getType() instanceof InterfaceType) {
+ InterfaceType mixType = (InterfaceType) mixNode.getType();
+ for (ConstructorElement constructor : mixType.getElement().getConstructors()) {
+ if (!constructor.getModifiers().isFactory()) {
+ topLevelContext.onError(mixNode, ResolverErrorCode.CANNOT_MIXIN_CLASS_WITH_CONSTRUCTOR);
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Checks that the types of the given mixin type node don't have super invocations.
+ */
+ private void checkMixinNoSuperInvocations(List<DartTypeNode> mixins) {
+ for (DartTypeNode mixNode : mixins) {
+ if (mixNode.getType() instanceof InterfaceType) {
+ InterfaceType mixType = (InterfaceType) mixNode.getType();
+ if (mixType.getElement() instanceof ClassElement) {
+ ClassElement mixElement = (ClassElement) mixType.getElement();
+ if (mixElement.hasSuperInvocation()) {
+ topLevelContext.onError(mixNode, ResolverErrorCode.CANNOT_MIXIN_CLASS_WITH_SUPER);
+ break;
+ }
+ }
+ }
+ }
+ }
+
private void constVerifyMembers(Iterable<? extends Element> members, ClassElement originalClass,
ClassElement currentClass) {
for (Element element : members) {
@@ -1395,13 +1436,18 @@
String name, Element element) {
switch (element.getKind()) {
case FIELD:
- if (!Elements.isStaticContext(element) && !element.getModifiers().isConstant()) {
- if (inInstanceVariableInitializer) {
- onError(x, ResolverErrorCode.CANNOT_USE_INSTANCE_FIELD_IN_INSTANCE_FIELD_INITIALIZER);
+ if (!Elements.isStaticContext(element)) {
+ if (!element.getModifiers().isConstant()) {
+ if (inInstanceVariableInitializer) {
+ onError(x, ResolverErrorCode.CANNOT_USE_INSTANCE_FIELD_IN_INSTANCE_FIELD_INITIALIZER);
+ }
}
- }
- if (ASTNodes.isStaticContext(x) && !Elements.isStaticContext(element)) {
- onError(x, ResolverErrorCode.ILLEGAL_FIELD_ACCESS_FROM_STATIC, name);
+ if (ASTNodes.isStaticContext(x)) {
+ onError(x, ResolverErrorCode.ILLEGAL_FIELD_ACCESS_FROM_STATIC, name);
+ }
+ if (ASTNodes.isFactoryContext(x)) {
+ onError(x, ResolverErrorCode.ILLEGAL_FIELD_ACCESS_FROM_FACTORY, name);
+ }
}
if (isIllegalPrivateAccess(x, enclosingElement, element, x.getName())) {
return null;
@@ -2220,9 +2266,9 @@
private ConstructorElement checkIsConstructor(DartNewExpression node, Element element) {
if (!ElementKind.of(element).equals(ElementKind.CONSTRUCTOR)) {
- ResolverErrorCode errorCode = node.isConst()
+ ErrorCode errorCode = node.isConst()
? ResolverErrorCode.NEW_EXPRESSION_NOT_CONST_CONSTRUCTOR
- : ResolverErrorCode.NEW_EXPRESSION_NOT_CONSTRUCTOR;
+ : TypeErrorCode.NEW_EXPRESSION_NOT_CONSTRUCTOR;
onError(ASTNodes.getConstructorNameNode(node), errorCode);
return null;
}
diff --git a/compiler/java/com/google/dart/compiler/resolver/ResolverErrorCode.java b/compiler/java/com/google/dart/compiler/resolver/ResolverErrorCode.java
index b77604c..093334d 100644
--- a/compiler/java/com/google/dart/compiler/resolver/ResolverErrorCode.java
+++ b/compiler/java/com/google/dart/compiler/resolver/ResolverErrorCode.java
@@ -32,6 +32,8 @@
"Cannot declare a non-factory named constructor of another class."),
CANNOT_HIDE_IMPORT_PREFIX("Cannot hide import prefix '%s'"),
CANNOT_INIT_STATIC_FIELD_IN_INITIALIZER("Cannot initialize a static field in an initializer list"),
+ CANNOT_MIXIN_CLASS_WITH_CONSTRUCTOR("Cannot use class with constructor as a mixin."),
+ CANNOT_MIXIN_CLASS_WITH_SUPER("Cannot use class with super invocation as a mixin."),
CANNOT_OVERRIDE_INSTANCE_MEMBER("static member cannot override instance member %s of %s"),
CANNOT_OVERRIDE_METHOD_NUM_REQUIRED_PARAMS(
"cannot override method %s from %s, wrong number of required parameters"),
@@ -129,6 +131,7 @@
ILLEGAL_ACCESS_TO_PRIVATE(ErrorSeverity.WARNING, "'%s' is private and not defined in this library"),
// TODO(zundel): error message needs JUnit test - how to test #imports in junit?
ILLEGAL_ACCESS_TO_PRIVATE_MEMBER("ErrorSeverity.WARNING, \"%s\" refers to \"%s\" which is in a different library"),
+ ILLEGAL_FIELD_ACCESS_FROM_FACTORY("Illegal access of instance field %s from factory"),
ILLEGAL_FIELD_ACCESS_FROM_STATIC("Illegal access of instance field %s from static scope"),
ILLEGAL_METHOD_ACCESS_FROM_STATIC("Illegal access of instance method %s from static scope"),
INITIALIZER_ONLY_IN_GENERATIVE_CONSTRUCTOR("Initializers are allowed only in non-redirecting generative constructors"),
@@ -162,8 +165,6 @@
METHOD_MUST_HAVE_BODY(ErrorSeverity.WARNING, "Method must have a body in a non-abstract class"),
NAMED_PARAMETERS_CANNOT_START_WITH_UNDER("Named parameters cannot start with an '_' character"),
NEW_EXPRESSION_CANT_USE_TYPE_VAR(ErrorSeverity.WARNING, "New expression cannot be invoked on type variable"),
- NEW_EXPRESSION_NOT_CONSTRUCTOR(
- ErrorSeverity.WARNING, "New expression does not resolve to a constructor"),
NEW_EXPRESSION_NOT_CONST_CONSTRUCTOR("New expression does not resolve to a const constructor"),
NO_SUCH_TYPE("no such type \"%s\""),
NO_SUCH_TYPE_CONSTRUCTOR("no such type \"%s\" in constructor"),
@@ -178,6 +179,7 @@
// TODO(zundel): error message needs JUnit test (reachable code?)
NOT_AN_INSTANCE_FIELD("%s is not an instance field"),
NOT_GENERATIVE_SUPER_CONSTRUCTOR("Constructor '%s' in class '%s' is not generative."),
+ ONLY_OBJECT_MIXIN_SUPERCLASS("Only Object is allowed to be a superclass of a mixin."),
OPTIONAL_PARAMETERS_CANNOT_START_WITH_UNDER("Optional parameters cannot start with an '_' character"),
PARAMETER_INIT_OUTSIDE_CONSTRUCTOR("Parameter initializers can only be used in constructors"),
SUPER_METHOD_INVOCATION_IN_CONSTRUCTOR_INITIALIZER(
diff --git a/compiler/java/com/google/dart/compiler/resolver/SupertypeResolver.java b/compiler/java/com/google/dart/compiler/resolver/SupertypeResolver.java
index ed9505e..6f13767 100644
--- a/compiler/java/com/google/dart/compiler/resolver/SupertypeResolver.java
+++ b/compiler/java/com/google/dart/compiler/resolver/SupertypeResolver.java
@@ -177,6 +177,10 @@
topLevelContext.onError(mixNode, ResolverErrorCode.SUPER_CLASS_IN_WITH);
continue;
}
+ if (!Objects.equal(mixType.getElement().getSupertype(), typeProvider.getObjectType())) {
+ topLevelContext.onError(mixNode, ResolverErrorCode.ONLY_OBJECT_MIXIN_SUPERCLASS);
+ continue;
+ }
seenMixin.add(mixType);
// OK, add
Elements.addMixin(classElement, mixType);
diff --git a/compiler/java/com/google/dart/compiler/resolver/TypeErrorCode.java b/compiler/java/com/google/dart/compiler/resolver/TypeErrorCode.java
index 2559923..20c4aa6 100644
--- a/compiler/java/com/google/dart/compiler/resolver/TypeErrorCode.java
+++ b/compiler/java/com/google/dart/compiler/resolver/TypeErrorCode.java
@@ -17,7 +17,7 @@
CANNOT_OVERRIDE_TYPED_MEMBER("cannot override %s of %s because %s is not assignable to %s"),
CANNOT_OVERRIDE_METHOD_DEFAULT_VALUE("cannot override method '%s', default value doesn't match '%s'"),
CANNOT_OVERRIDE_METHOD_NOT_SUBTYPE("cannot override %s of %s because %s is not a subtype of %s"),
- CONTRETE_CLASS_WITH_UNIMPLEMENTED_MEMBERS("Concrete class %s has unimplemented member(s) %s"),
+ CONCRETE_CLASS_WITH_UNIMPLEMENTED_MEMBERS("Concrete class %s has unimplemented member(s) %s"),
CYCLIC_REFERENCE_TO_TYPE_VARIABLE(
"Invalid type expression, cyclic reference to type variable '%s'"),
DEPRECATED_ELEMENT(ErrorSeverity.INFO, "%s is deprecated"),
@@ -49,6 +49,7 @@
MEMBER_IS_A_CONSTRUCTOR("%s is a constructor in %s"),
MISSING_ARGUMENT("missing argument of type %s"),
MISSING_RETURN_VALUE("no return value; expected a value of type %s"),
+ NEW_EXPRESSION_NOT_CONSTRUCTOR("New expression does not resolve to a constructor"),
NO_SUCH_NAMED_PARAMETER("no such named parameter \"%s\" defined"),
NO_SUCH_TYPE("no such type \"%s\"", true),
NOT_A_FUNCTION_TYPE("\"%s\" is not a function type"),
diff --git a/compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java b/compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java
index d70e077..cd9238e 100644
--- a/compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java
+++ b/compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java
@@ -1614,7 +1614,7 @@
if (!node.getModifiers().isAbstract() && !unimplementedMembers.isEmpty() &&
(reportNoMemberWhenHasInterceptor || !Elements.handlesNoSuchMethod(type))) {
StringBuilder sb = getUnimplementedMembersMessage(element, unimplementedMembers);
- onError(node.getName(), TypeErrorCode.CONTRETE_CLASS_WITH_UNIMPLEMENTED_MEMBERS,
+ onError(node.getName(), TypeErrorCode.CONCRETE_CLASS_WITH_UNIMPLEMENTED_MEMBERS,
node.getName(), sb.toString());
}
}
@@ -2192,7 +2192,7 @@
}
private void analyzeFactory(DartMethodDefinition node, DartExpression name,
- final ConstructorElement methodElement) {
+ final ConstructorElement constructorElement) {
ASTVisitor<Void> visitor = new ASTVisitor<Void>() {
@Override
public Void visitParameterizedTypeNode(DartParameterizedTypeNode node) {
@@ -2213,12 +2213,11 @@
};
name.accept(visitor);
// redirecting factory constructor
- if (methodElement instanceof ConstructorElement) {
- ConstructorElement constructorElement = (ConstructorElement) methodElement;
+ {
ConstructorElement targetElement = constructorElement.getRedirectingFactoryConstructor();
if (targetElement != null) {
ClassElement targetEnclosingClass = (ClassElement) targetElement.getEnclosingElement();
- Type sourceMethodType = methodElement.getType();
+ Type sourceMethodType = constructorElement.getType();
Type targetMethodType = targetElement.getType();
InterfaceType targetClassType = (InterfaceType) node.getRedirectedTypeName().getType();
targetMethodType = targetMethodType.subst(targetClassType.getArguments(),
@@ -2384,11 +2383,16 @@
}
// Do not visit the name, it may not have been resolved.
String name = node.getPropertyName();
- InterfaceType.Member member = cls.lookupMember(name);
- if (member == null || ASTNodes.inSetterContext(node)) {
- InterfaceType.Member member2 = cls.lookupMember("setter " + name);
- if (member2 != null && (member == null || member2.getHolder() == member.getHolder() || types.isSubtype(member2.getHolder(), member.getHolder()))) {
- member = member2;
+ InterfaceType.Member member;
+ if (ASTNodes.inSetterContext(node)) {
+ member = cls.lookupMember("setter " + name);
+ if (member == null) {
+ member = cls.lookupMember(name);
+ }
+ } else {
+ member = cls.lookupMember(name);
+ if (member == null) {
+ member = cls.lookupMember("setter " + name);
}
}
// is "receiver" is inferred, attempt to find member in one of the subtypes
@@ -2437,55 +2441,40 @@
case FIELD:
FieldElement fieldElement = (FieldElement) element;
Modifiers fieldModifiers = fieldElement.getModifiers();
- MethodElement getter = fieldElement.getGetter();
- MethodElement setter = fieldElement.getSetter();
+
+ // Prepare getter/setter members.
+ Member getterMember;
+ Member setterMember;
+ {
+ getterMember = cls.lookupMember(name);
+ if (getterMember == null && TypeQuality.of(cls) == TypeQuality.INFERRED) {
+ getterMember = cls.lookupSubTypeMember(name);
+ }
+ }
+ {
+ setterMember = cls.lookupMember("setter " + name);
+ if (setterMember == null) {
+ setterMember = cls.lookupMember(name);
+ }
+ }
boolean inSetterContext = ASTNodes.inSetterContext(node);
boolean inGetterContext = ASTNodes.inGetterContext(node);
- ClassElement enclosingClass = null;
- if (fieldElement.getEnclosingElement() instanceof ClassElement) {
- enclosingClass = (ClassElement) fieldElement.getEnclosingElement();
- }
// Implicit field declared as "final".
if (!fieldModifiers.isAbstractField() && fieldModifiers.isFinal() && inSetterContext) {
return typeError(node.getName(), TypeErrorCode.FIELD_IS_FINAL, node.getName());
}
- // Check for cases when property has no setter or getter.
- if (fieldModifiers.isAbstractField() && enclosingClass != null) {
- // Check for using field without setter in some assignment variant.
- if (inSetterContext) {
- if (setter == null) {
- setter = Elements.lookupFieldElementSetter(enclosingClass, name);
- if (setter == null) {
- setter = Elements.lookupFieldElementSetter(enclosingClass, "setter " + name);
- }
- if (setter == null) {
- return typeError(node.getName(), TypeErrorCode.FIELD_HAS_NO_SETTER, node.getName());
- }
- }
- }
- // Check for using field without getter in other operation that assignment.
- if (inGetterContext) {
- if (getter == null) {
- getter = Elements.lookupFieldElementGetter(enclosingClass, name);
- if (getter == null) {
- return typeError(node.getName(), TypeErrorCode.FIELD_HAS_NO_GETTER, node.getName());
- }
- }
- }
- }
-
Type result = member.getType();
if (fieldModifiers.isAbstractField()) {
if (inSetterContext) {
- result = member.getSetterType();
+ result = setterMember != null ? setterMember.getSetterType() : null;
if (result == null) {
return typeError(node.getName(), TypeErrorCode.FIELD_HAS_NO_SETTER, node.getName());
}
}
if (inGetterContext) {
- result = member.getGetterType();
+ result = getterMember != null ? getterMember.getGetterType() : null;
if (result == null) {
return typeError(node.getName(), TypeErrorCode.FIELD_HAS_NO_GETTER, node.getName());
}
@@ -2818,7 +2807,11 @@
// A subtype of interface Function.
return dynamicType;
} else if (name == null || currentClass == null) {
- return typeError(diagnosticNode, TypeErrorCode.NOT_A_FUNCTION_TYPE, type);
+ if (reportNoMemberWhenHasInterceptor || !(type instanceof InterfaceType)
+ || !Elements.handlesNoSuchMethod((InterfaceType) type)) {
+ return typeError(diagnosticNode, TypeErrorCode.NOT_A_FUNCTION_TYPE, type);
+ }
+ return dynamicType;
} else {
return typeError(diagnosticNode, TypeErrorCode.NOT_A_METHOD_IN, name, currentClass);
}
@@ -3217,16 +3210,7 @@
while (supertype != null) {
ClassElement superclass = supertype.getElement();
for (Element member : superclass.getMembers()) {
- String name = member.getName();
- if (!Elements.isAbstractElement(member)) {
- superMembers.removeAll(name);
- }
- if (member instanceof FieldElement) {
- FieldElement field = (FieldElement) member;
- if (field.getSetter() != null) {
- superMembers.removeAll("setter " + name);
- }
- }
+ removeSuperMemberIfNotAbstract(member);
}
supertype = supertype.getElement().getSupertype();
}
@@ -3237,16 +3221,7 @@
for (InterfaceType mixType : currentClass.getElement().getMixins()) {
ClassElement mixElement = mixType.getElement();
for (Element member : mixElement.getMembers()) {
- String name = member.getName();
- if (!Elements.isAbstractElement(member)) {
- superMembers.removeAll(name);
- }
- if (member instanceof FieldElement) {
- FieldElement field = (FieldElement) member;
- if (field.getSetter() != null) {
- superMembers.removeAll("setter " + name);
- }
- }
+ removeSuperMemberIfNotAbstract(member);
}
}
@@ -3270,7 +3245,17 @@
// add abstract members of current class
for (Element member : currentClass.getElement().getMembers()) {
- if (Elements.isAbstractElement(member)) {
+ if (ElementKind.of(member) == ElementKind.FIELD && member.getModifiers().isAbstractField()) {
+ FieldElement field = (FieldElement) member;
+ MethodElement getter = field.getGetter();
+ MethodElement setter = field.getSetter();
+ if (getter != null && Elements.isAbstractElement(getter)) {
+ unimplementedElements.add(getter);
+ }
+ if (setter != null && Elements.isAbstractElement(setter)) {
+ unimplementedElements.add(setter);
+ }
+ } else if (Elements.isAbstractElement(member)) {
unimplementedElements.add(member);
}
}
@@ -3278,6 +3263,27 @@
return null;
}
+ private void removeSuperMemberIfNotAbstract(Element member) {
+ String name = member.getName();
+ if (ElementKind.of(member) == ElementKind.FIELD && member.getModifiers().isAbstractField()) {
+ FieldElement field = (FieldElement) member;
+ MethodElement getter = field.getGetter();
+ MethodElement setter = field.getSetter();
+ if (getter != null && !Elements.isAbstractElement(getter)) {
+ superMembers.removeAll(name);
+ }
+ if (setter != null && !Elements.isAbstractElement(setter)) {
+ if (!name.startsWith("setter ")) {
+ superMembers.removeAll("setter " + name);
+ } else {
+ superMembers.removeAll(name);
+ }
+ }
+ } else if (!Elements.isAbstractElement(member)) {
+ superMembers.removeAll(name);
+ }
+ }
+
@Override
public Void visitFieldDefinition(DartFieldDefinition node) {
this.visit(node.getFields());
diff --git a/compiler/java/com/google/dart/compiler/type/Types.java b/compiler/java/com/google/dart/compiler/type/Types.java
index 14faa69..44f401e 100644
--- a/compiler/java/com/google/dart/compiler/type/Types.java
+++ b/compiler/java/com/google/dart/compiler/type/Types.java
@@ -748,7 +748,7 @@
}
Set<Class<?>> interfaceSet = getAllImplementedInterfaces(type.getClass());
if (!interfaceSet.isEmpty()) {
- Class<?>[] interfaces = (Class[]) interfaceSet.toArray(new Class[interfaceSet.size()]);
+ Class<?>[] interfaces = interfaceSet.toArray(new Class[interfaceSet.size()]);
return makeInferred(type, interfaces, quality);
}
return type;
diff --git a/compiler/javatests/com/google/dart/compiler/end2end/inc/IncrementalCompilation2Test.java b/compiler/javatests/com/google/dart/compiler/end2end/inc/IncrementalCompilation2Test.java
index 87a941c..a106aa8 100644
--- a/compiler/javatests/com/google/dart/compiler/end2end/inc/IncrementalCompilation2Test.java
+++ b/compiler/javatests/com/google/dart/compiler/end2end/inc/IncrementalCompilation2Test.java
@@ -695,7 +695,7 @@
compile();
assertErrors(errors);
}
-
+
/**
* Checks that it is not an error to use a multi-line string literal as a URI in a part directive.
* Even with leading whitespace since it's getting trimmed. Even with Windows \r\n style.
@@ -722,7 +722,7 @@
compile();
assertErrors(errors);
}
-
+
/**
* Checks that it is a compile-time error when the library being exported does not have a library
* definition.
@@ -741,7 +741,7 @@
errors,
errEx(APP, DartCompilerErrorCode.MISSING_LIBRARY_DIRECTIVE_EXPORT, 3, 1, 16));
}
-
+
/**
* Enabled in 0.13
*/
@@ -764,7 +764,7 @@
compile();
assertErrors(errors);
}
-
+
/**
* It is neither an error nor a warning if N is introduced by two or more imports but never
* referred to.
@@ -784,7 +784,7 @@
compile();
assertErrors(errors);
}
-
+
public void test_importConflict_used_asTypeAnnotation() throws Exception {
prepare_importConflictAB();
appSource.setContent(
@@ -827,7 +827,7 @@
errors,
errEx(APP, ResolverErrorCode.DUPLICATE_IMPORTED_NAME, 5, 17, 4));
}
-
+
public void test_importConflict_used_notTypeAnnotation_2() throws Exception {
prepare_importConflictAB();
appSource.setContent(
@@ -869,7 +869,7 @@
compile();
assertErrors(errors);
}
-
+
public void test_importConflict_used_inCommentRef() throws Exception {
prepare_importConflictAB();
appSource.setContent(
@@ -916,7 +916,7 @@
""));
compile();
assertErrors(errors, errEx(APP, ResolverErrorCode.DUPLICATE_EXPORTED_NAME, 4, 1, 16));
- }
+ }
private void prepare_importConflictAB() {
appSource.setContent(
@@ -983,7 +983,7 @@
// Check that errors where reported (and in correct time).
assertErrors(errors, errEx(DartCompilerErrorCode.MISSING_SOURCE, 3, 1, 23));
}
-
+
public void test_reportMissingSource_withSchema_file() throws Exception {
URI uri = new URI("file:noSuchSource.dart");
Source source = new UrlSource(uri) {
@@ -995,7 +995,7 @@
// should not cause exception
assertFalse(source.exists());
}
-
+
public void test_reportMissingSource_withSchema_dart() throws Exception {
URI uri = new URI("dart:noSuchSource");
Source source = new UrlSource(uri, new PackageLibraryManager()) {
@@ -1087,7 +1087,7 @@
errors,
errEx(ResolverErrorCode.ILLEGAL_ACCESS_TO_PRIVATE, 5, 5, 14));
}
-
+
/**
* <p>
* http://code.google.com/p/dart/issues/detail?id=4072
@@ -1119,7 +1119,7 @@
errors,
errEx(TypeErrorCode.ILLEGAL_ACCESS_TO_PRIVATE, 6, 5, 16));
}
-
+
/**
* <p>
* http://code.google.com/p/dart/issues/detail?id=3266
@@ -1182,7 +1182,7 @@
compile();
assertErrors(errors);
}
-
+
/**
* <p>
* http://code.google.com/p/dart/issues/detail?id=3340
@@ -1235,7 +1235,7 @@
compile();
assertErrors(errors, errEx(TypeErrorCode.NO_SUCH_TYPE, 7, 3, 10));
}
-
+
public void test_newLibrarySyntax_hide() throws Exception {
appSource.setContent(
"A.dart",
@@ -1308,7 +1308,7 @@
assertTrue(errors.toString().contains("libB.TypeAC"));
assertTrue(errors.toString().contains("libB.TypeBB"));
}
-
+
public void test_newLibrarySyntax_export2() throws Exception {
appSource.setContent(
"A.dart",
@@ -1382,7 +1382,7 @@
compile();
assertErrors(errors);
}
-
+
public void test_newLibrarySyntax_export4() throws Exception {
appSource.setContent(
"p1.dart",
@@ -1417,7 +1417,7 @@
compile();
assertErrors(errors);
}
-
+
public void test_newLibrarySyntax_export_hide() throws Exception {
appSource.setContent(
"A.dart",
@@ -1463,7 +1463,7 @@
assertTrue(errors.toString().contains("libB.TypeAC"));
assertTrue(errors.toString().contains("libB.TypeBB"));
}
-
+
public void test_newLibrarySyntax_noExport() throws Exception {
appSource.setContent(
"A.dart",
@@ -1512,6 +1512,40 @@
/**
* <p>
+ * http://code.google.com/p/dart/issues/detail?id=7598
+ */
+ public void test_newLibrarySyntax_export_withMetadata() throws Exception {
+ appSource.setContent(
+ "A.dart",
+ makeCode(
+ "// filler filler filler filler filler filler filler filler filler filler filler",
+ "library test.A;",
+ "var a = 0;",
+ ""));
+ appSource.setContent(
+ "B.dart",
+ makeCode(
+ "// filler filler filler filler filler filler filler filler filler filler filler",
+ "library test.B;",
+ "@meta export 'A.dart';",
+ "const meta = 'meta!';",
+ ""));
+ appSource.setContent(
+ APP,
+ makeCode(
+ "// filler filler filler filler filler filler filler filler filler filler filler",
+ "library test.app;",
+ "import 'B.dart';",
+ "main() {",
+ " print(a);",
+ "}",
+ ""));
+ compile();
+ assertErrors(errors);
+ }
+
+ /**
+ * <p>
* http://code.google.com/p/dart/issues/detail?id=4238
*/
public void test_typesPropagation_html_query() throws Exception {
@@ -1623,7 +1657,7 @@
compile();
assertEquals(0, errors.size());
}
-
+
public void test_implicitlyImportCore() throws Exception {
appSource.setContent(
APP,
@@ -1681,7 +1715,7 @@
compile();
assertErrors(errors, errEx(DartCompilerErrorCode.ILLEGAL_DIRECTIVES_IN_SOURCED_UNIT, 2, 1, 10));
}
-
+
/**
* Part should have one and only one directive - "part of".
*/
@@ -1704,7 +1738,7 @@
compile();
assertErrors(errors, errEx(DartCompilerErrorCode.ILLEGAL_DIRECTIVES_IN_SOURCED_UNIT, 2, 1, 20));
}
-
+
/**
* Part should have one and only one directive - "part of".
*/
@@ -1725,7 +1759,7 @@
compile();
assertErrors(errors, errEx(DartCompilerErrorCode.MISSING_PART_OF_DIRECTIVE, -1, -1, 0));
}
-
+
/**
* Part should have one and only one directive - "part of".
*/
@@ -1770,7 +1804,7 @@
compile();
assertErrors(errors);
}
-
+
/**
* <p>
* http://code.google.com/p/dart/issues/detail?id=6077
@@ -1807,6 +1841,10 @@
@Override
public void onError(DartCompilationError event) {
+ // ignore deprecated
+ if (event.getErrorCode() == TypeErrorCode.DEPRECATED_ELEMENT) {
+ return;
+ }
// Remember errors only between unitAboutToCompile/unitCompiled.
Source source = event.getSource();
if (source != null && compilingUris.contains(source.getUri())) {
diff --git a/compiler/javatests/com/google/dart/compiler/parser/SyntaxTest.java b/compiler/javatests/com/google/dart/compiler/parser/SyntaxTest.java
index 3a72c7a6..d86da20 100644
--- a/compiler/javatests/com/google/dart/compiler/parser/SyntaxTest.java
+++ b/compiler/javatests/com/google/dart/compiler/parser/SyntaxTest.java
@@ -14,6 +14,7 @@
import com.google.dart.compiler.ast.DartBooleanLiteral;
import com.google.dart.compiler.ast.DartCascadeExpression;
import com.google.dart.compiler.ast.DartClass;
+import com.google.dart.compiler.ast.DartClassTypeAlias;
import com.google.dart.compiler.ast.DartComment;
import com.google.dart.compiler.ast.DartExprStmt;
import com.google.dart.compiler.ast.DartExpression;
@@ -115,6 +116,33 @@
assertEquals("D", mixins.get(1).toString());
}
+ public void test_parseTypedefMixin() throws Exception {
+ parseUnit(
+ "test.dart",
+ Joiner.on("\n").join(
+ "// filler filler filler filler filler filler filler filler filler filler",
+ "typedef C = A with B;",
+ ""));
+ DartClassTypeAlias typedef = findNode(DartClassTypeAlias.class, "typedef C");
+ assertEquals("A", typedef.getSuperclass().toString());
+ {
+ NodeList<DartTypeNode> mixins = typedef.getMixins();
+ assertEquals(1, mixins.size());
+ assertEquals("B", mixins.get(0).toString());
+ }
+ }
+
+ public void test_parseTypedefMixin_abstract() throws Exception {
+ parseUnit(
+ "test.dart",
+ Joiner.on("\n").join(
+ "// filler filler filler filler filler filler filler filler filler filler",
+ "typedef C = abstract A with B;",
+ ""));
+ DartClassTypeAlias typedef = findNode(DartClassTypeAlias.class, "typedef C");
+ assertTrue(typedef.getModifiers().isAbstract());
+ }
+
/**
* <p>
* http://code.google.com/p/dart/issues/detail?id=6881
@@ -193,6 +221,27 @@
}
/**
+ * There was bug that class instead of case in switch caused infinite parsing loop.
+ * <p>
+ * http://code.google.com/p/dart/issues/detail?id=7999
+ */
+ public void test_switch_class_inCase() {
+ DartParserRunner runner = parseSource(Joiner.on("\n").join(
+ "// filler filler filler filler filler filler filler filler filler filler",
+ "void main() {",
+ " print((e) {",
+ " switch (e) {",
+ " case 'Up': cursor.(); break;",
+ " class LoopClass { var myData; }",
+ " case 'Down':",
+ " }",
+ " }); ",
+ "}",
+ ""));
+ assertTrue(runner.getErrorCount() > 0);
+ }
+
+ /**
* There was bug that handling missing identifier (method name) after "cursor." in switch caused
* infinite parsing loop.
* <p>
diff --git a/compiler/javatests/com/google/dart/compiler/resolver/NegativeResolverTest.java b/compiler/javatests/com/google/dart/compiler/resolver/NegativeResolverTest.java
index 9333042..5e171c6 100644
--- a/compiler/javatests/com/google/dart/compiler/resolver/NegativeResolverTest.java
+++ b/compiler/javatests/com/google/dart/compiler/resolver/NegativeResolverTest.java
@@ -1181,4 +1181,23 @@
""),
errEx(ResolverErrorCode.ILLEGAL_FIELD_ACCESS_FROM_STATIC, 5, 12, 5));
}
+
+ /**
+ * <p>
+ * http://code.google.com/p/dart/issues/detail?id=7633
+ */
+ public void test_accessInstanceField_fromConstFactory() throws Exception {
+ checkSourceErrors(
+ makeCode(
+ "// filler filler filler filler filler filler filler filler filler filler",
+ "class A {",
+ " var foo;",
+ " factory A() {",
+ " var v = foo;",
+ " return null;",
+ " }",
+ "}",
+ ""),
+ errEx(ResolverErrorCode.ILLEGAL_FIELD_ACCESS_FROM_FACTORY, 5, 13, 3));
+ }
}
diff --git a/compiler/javatests/com/google/dart/compiler/resolver/ResolverCompilerTest.java b/compiler/javatests/com/google/dart/compiler/resolver/ResolverCompilerTest.java
index 1c71828..b60d8b4 100644
--- a/compiler/javatests/com/google/dart/compiler/resolver/ResolverCompilerTest.java
+++ b/compiler/javatests/com/google/dart/compiler/resolver/ResolverCompilerTest.java
@@ -216,7 +216,7 @@
"}");
assertErrors(
libraryResult.getErrors(),
- errEx(ResolverErrorCode.NEW_EXPRESSION_NOT_CONSTRUCTOR, 5, 11, 3));
+ errEx(TypeErrorCode.NEW_EXPRESSION_NOT_CONSTRUCTOR, 5, 11, 3));
DartUnit unit = libraryResult.getLibraryUnitResult().getUnits().iterator().next();
DartNewExpression newExpression = findNodeBySource(unit, "new A.foo()");
ConstructorElement constructorElement = newExpression.getElement();
diff --git a/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java b/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java
index 0da5e8d..f058ab1 100644
--- a/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java
+++ b/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java
@@ -596,7 +596,7 @@
"}");
assertErrors(
libraryResult.getErrors(),
- errEx(TypeErrorCode.CONTRETE_CLASS_WITH_UNIMPLEMENTED_MEMBERS, 8, 7, 1));
+ errEx(TypeErrorCode.CONCRETE_CLASS_WITH_UNIMPLEMENTED_MEMBERS, 8, 7, 1));
{
DartCompilationError typeError = libraryResult.getErrors().get(0);
String message = typeError.getMessage();
@@ -626,7 +626,7 @@
"}");
assertErrors(
libraryResult.getErrors(),
- errEx(TypeErrorCode.CONTRETE_CLASS_WITH_UNIMPLEMENTED_MEMBERS, 4, 7, 1));
+ errEx(TypeErrorCode.CONCRETE_CLASS_WITH_UNIMPLEMENTED_MEMBERS, 4, 7, 1));
{
DartCompilationError typeError = libraryResult.getErrors().get(0);
String message = typeError.getMessage();
@@ -651,7 +651,7 @@
"}");
assertErrors(
libraryResult.getErrors(),
- errEx(TypeErrorCode.CONTRETE_CLASS_WITH_UNIMPLEMENTED_MEMBERS, 1, 7, 1));
+ errEx(TypeErrorCode.CONCRETE_CLASS_WITH_UNIMPLEMENTED_MEMBERS, 1, 7, 1));
{
DartCompilationError typeError = libraryResult.getErrors().get(0);
String message = typeError.getMessage();
@@ -680,7 +680,7 @@
"}");
assertErrors(
libraryResult.getErrors(),
- errEx(TypeErrorCode.CONTRETE_CLASS_WITH_UNIMPLEMENTED_MEMBERS, 1, 7, 1));
+ errEx(TypeErrorCode.CONCRETE_CLASS_WITH_UNIMPLEMENTED_MEMBERS, 1, 7, 1));
}
// disable warnings if has "noSuchMethod"
{
@@ -715,7 +715,7 @@
"}");
assertErrors(
libraryResult.getErrors(),
- errEx(TypeErrorCode.CONTRETE_CLASS_WITH_UNIMPLEMENTED_MEMBERS, 1, 7, 1));
+ errEx(TypeErrorCode.CONCRETE_CLASS_WITH_UNIMPLEMENTED_MEMBERS, 1, 7, 1));
}
public void test_warnAbstract_onConcreteClassDeclaration_hasUnimplemented_mixin() throws Exception {
@@ -729,7 +729,26 @@
"");
assertErrors(
result.getErrors(),
- errEx(TypeErrorCode.CONTRETE_CLASS_WITH_UNIMPLEMENTED_MEMBERS, 5, 7, 1));
+ errEx(TypeErrorCode.CONCRETE_CLASS_WITH_UNIMPLEMENTED_MEMBERS, 5, 7, 1));
+ }
+
+ /**
+ * Class "B" has implementation for "bVal" and "bVal=", so we don't need any warning.
+ * <p>
+ * http://code.google.com/p/dart/issues/detail?id=7605
+ */
+ public void test_warnAbstract_onConcreteClassDeclaration_inheritedGetter_abstractGetter() throws Exception {
+ AnalyzeLibraryResult result = analyzeLibrary(
+ "// filler filler filler filler filler filler filler filler filler filler",
+ "abstract class A {",
+ " get bVal {}",
+ " set bVal(var val);",
+ "}",
+ "class B extends A {",
+ " set bVal(var val) {}",
+ "}",
+ "");
+ assertErrors(result.getErrors());
}
/**
@@ -770,7 +789,7 @@
"}");
assertErrors(
libraryResult.getErrors(),
- errEx(TypeErrorCode.CONTRETE_CLASS_WITH_UNIMPLEMENTED_MEMBERS, 5, 7, 1));
+ errEx(TypeErrorCode.CONCRETE_CLASS_WITH_UNIMPLEMENTED_MEMBERS, 5, 7, 1));
}
/**
@@ -1860,6 +1879,28 @@
"}");
assertErrors(result.getErrors());
}
+
+ /**
+ * <p>
+ * http://code.google.com/p/dart/issues/detail?id=7597
+ */
+ public void test_setterIsNotOverriddenByMethod() throws Exception {
+ AnalyzeLibraryResult result =
+ analyzeLibrary(
+ "// filler filler filler filler filler filler filler filler filler filler",
+ "class A {",
+ " set foo(var v) {}",
+ "}",
+ "class C extends A {",
+ " foo(value) {}",
+ "}",
+ "main() {",
+ " C c = new C();",
+ " c.foo(1);",
+ " c.foo = 1;",
+ "}");
+ assertErrors(result.getErrors());
+ }
public void test_setterGetterAssignable1() throws Exception {
@@ -3496,6 +3537,23 @@
}
/**
+ * <p>
+ * http://code.google.com/p/dart/issues/detail?id=7980
+ */
+ public void test_whenVariableNamedDynamic() throws Exception {
+ AnalyzeLibraryResult libraryResult = analyzeLibrary(
+ "// filler filler filler filler filler filler filler filler filler filler",
+ "main() {",
+ " var dynamic = 42;",
+ " new List<dynamic>();",
+ "}",
+ "");
+ assertErrors(
+ libraryResult.getErrors(),
+ errEx(TypeErrorCode.NOT_A_TYPE, 4, 12, 7));
+ }
+
+ /**
* It is a static warning if the return type of the user-declared operator == is explicitly
* declared and not bool.
*/
@@ -4814,10 +4872,10 @@
"}");
assertErrors(
libraryResult.getErrors(),
- errEx(ResolverErrorCode.NEW_EXPRESSION_NOT_CONSTRUCTOR, 5, 9, 17),
+ errEx(TypeErrorCode.NEW_EXPRESSION_NOT_CONSTRUCTOR, 5, 9, 17),
errEx(TypeErrorCode.NO_SUCH_TYPE, 6, 7, 1),
errEx(TypeErrorCode.NO_SUCH_TYPE, 7, 7, 1),
- errEx(ResolverErrorCode.NEW_EXPRESSION_NOT_CONSTRUCTOR, 7, 9, 17));
+ errEx(TypeErrorCode.NEW_EXPRESSION_NOT_CONSTRUCTOR, 7, 9, 17));
}
/**
@@ -5350,6 +5408,50 @@
}
/**
+ * Don't report "is not a function type" if class implements "noSuchMethod" method.
+ */
+ public void test_dontReport_ifHas_noSuchMember_isNotFunction() throws Exception {
+ String[] lines = {
+ "// filler filler filler filler filler filler filler filler filler filler",
+ "class A {",
+ " noSuchMethod(InvocationMirror invocation) {}",
+ "}",
+ "class B extends A {}",
+ "class C {}",
+ "main() {",
+ " A a = new A();",
+ " B b = new B();",
+ " C c = new C();",
+ " a();",
+ " b();",
+ " c();",
+ "}",
+ ""};
+ // report by default
+ {
+ AnalyzeLibraryResult result = analyzeLibrary(lines);
+ assertErrors(
+ result.getErrors(),
+ errEx(TypeErrorCode.NOT_A_FUNCTION_TYPE, 11, 3, 1),
+ errEx(TypeErrorCode.NOT_A_FUNCTION_TYPE, 12, 3, 1),
+ errEx(TypeErrorCode.NOT_A_FUNCTION_TYPE, 13, 3, 1));
+ }
+ // don't report
+ {
+ compilerConfiguration = new DefaultCompilerConfiguration(new CompilerOptions() {
+ @Override
+ public boolean reportNoMemberWhenHasInterceptor() {
+ return false;
+ }
+ });
+ AnalyzeLibraryResult result = analyzeLibrary(lines);
+ assertErrors(
+ result.getErrors(),
+ errEx(TypeErrorCode.NOT_A_FUNCTION_TYPE, 13, 3, 1));
+ }
+ }
+
+ /**
* <p>
* http://code.google.com/p/dart/issues/detail?id=5084
*/
@@ -6201,7 +6303,62 @@
assertErrors(result.getErrors());
}
- public void test_mixin_dontAddSupertypes() throws Exception {
+ /**
+ * <p>
+ * http://code.google.com/p/dart/issues/detail?id=8022
+ */
+ public void test_mixin_notObjectSuperclass() throws Exception {
+ AnalyzeLibraryResult result = analyzeLibrary(
+ "// filler filler filler filler filler filler filler filler filler filler",
+ "class A {}",
+ "class B extends A {}",
+ "typedef C = Object with B;",
+ "class D extends Object with B {}",
+ "");
+ assertErrors(
+ result.getErrors(),
+ errEx(ResolverErrorCode.ONLY_OBJECT_MIXIN_SUPERCLASS, 4, 25, 1),
+ errEx(ResolverErrorCode.ONLY_OBJECT_MIXIN_SUPERCLASS, 5, 29, 1));
+ }
+
+ /**
+ * <p>
+ * http://code.google.com/p/dart/issues/detail?id=8025
+ */
+ public void test_mixin_withConstructor() throws Exception {
+ AnalyzeLibraryResult result = analyzeLibrary(
+ "// filler filler filler filler filler filler filler filler filler filler",
+ "class M { M(); }",
+ "typedef A = Object with M;",
+ "class B extends Object with M {}",
+ "");
+ assertErrors(
+ result.getErrors(),
+ errEx(ResolverErrorCode.CANNOT_MIXIN_CLASS_WITH_CONSTRUCTOR, 3, 25, 1),
+ errEx(ResolverErrorCode.CANNOT_MIXIN_CLASS_WITH_CONSTRUCTOR, 4, 29, 1));
+ }
+
+ /**
+ * <p>
+ * http://code.google.com/p/dart/issues/detail?id=8059
+ */
+ public void test_mixin_withSuperInvocation() throws Exception {
+ AnalyzeLibraryResult result = analyzeLibrary(
+ "// filler filler filler filler filler filler filler filler filler filler",
+ "class M { foo() => super.toString(); }",
+ "typedef A = Object with M;",
+ "class B extends Object with M {}",
+ "");
+ assertErrors(
+ result.getErrors(),
+ errEx(ResolverErrorCode.CANNOT_MIXIN_CLASS_WITH_SUPER, 3, 25, 1),
+ errEx(ResolverErrorCode.CANNOT_MIXIN_CLASS_WITH_SUPER, 4, 29, 1));
+ }
+
+ /**
+ * 20130122. Currently it is not allowed to have mixin with superclass other than Object.
+ */
+ public void _test_mixin_dontAddSupertypes() throws Exception {
AnalyzeLibraryResult result = analyzeLibrary(
"// filler filler filler filler filler filler filler filler filler filler",
"class A {",
@@ -6251,7 +6408,10 @@
errEx(TypeErrorCode.INTERFACE_HAS_NO_METHOD_NAMED, 15, 5, 7));
}
- public void test_mixin_dontAddSupertypes3() throws Exception {
+ /**
+ * 20130122. Currently it is not allowed to have mixin with superclass other than Object.
+ */
+ public void _test_mixin_dontAddSupertypes3() throws Exception {
AnalyzeLibraryResult result = analyzeLibrary(
"// filler filler filler filler filler filler filler filler filler filler",
"class A {",
@@ -6267,10 +6427,13 @@
"");
assertErrors(
result.getErrors(),
- errEx(TypeErrorCode.CONTRETE_CLASS_WITH_UNIMPLEMENTED_MEMBERS, 10, 7, 1));
+ errEx(TypeErrorCode.CONCRETE_CLASS_WITH_UNIMPLEMENTED_MEMBERS, 10, 7, 1));
}
- public void test_mixin_dontLookSupertype_getter() throws Exception {
+ /**
+ * 20130122. Currently it is not allowed to have mixin with superclass other than Object.
+ */
+ public void _test_mixin_dontLookSupertype_getter() throws Exception {
AnalyzeLibraryResult result = analyzeLibrary(
"// filler filler filler filler filler filler filler filler filler filler",
"class A {",
@@ -6292,7 +6455,10 @@
errEx(TypeErrorCode.NOT_A_MEMBER_OF, 13, 11, 2));
}
- public void test_mixin_dontLookSupertype_setter() throws Exception {
+ /**
+ * 20130122. Currently it is not allowed to have mixin with superclass other than Object.
+ */
+ public void _test_mixin_dontLookSupertype_setter() throws Exception {
AnalyzeLibraryResult result = analyzeLibrary(
"// filler filler filler filler filler filler filler filler filler filler",
"class A {",
diff --git a/dart.gyp b/dart.gyp
index 4978590..d206fcc 100644
--- a/dart.gyp
+++ b/dart.gyp
@@ -116,20 +116,11 @@
{
'target_name': 'samples',
'type': 'none',
+ 'dependencies': [
+ 'samples/openglui/openglui.gyp:openglui_sample',
+ ],
'conditions': [
- ['OS=="android"', {
- 'dependencies': [
- 'samples/android_sample/android_sample.gyp:android_sample',
- ],
- },
- ],
- ['OS=="win"', {
- 'dependencies': [
- 'samples/sample_extension/sample_extension.gyp:sample_extension',
- ],
- },
- ],
- ['OS=="mac" or OS=="linux"', {
+ ['OS!="android"', {
'dependencies': [
'samples/sample_extension/sample_extension.gyp:sample_extension',
],
diff --git a/pkg/analyzer-experimental/bin/analyzer.dart b/pkg/analyzer-experimental/bin/analyzer.dart
new file mode 100644
index 0000000..6ccf8ab
--- /dev/null
+++ b/pkg/analyzer-experimental/bin/analyzer.dart
@@ -0,0 +1,46 @@
+#!/usr/bin/env dart
+
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/** The entry point for the analyzer. */
+library analyzer;
+
+//import 'dart:async';
+import 'dart:io';
+
+import 'package:analyzer-experimental/options.dart';
+
+// Exit status codes.
+const OK_EXIT = 0;
+const ERROR_EXIT = 1;
+
+void main() {
+ run(new Options().arguments).then((result) {
+ exit(result.error ? ERROR_EXIT : OK_EXIT);
+ });
+}
+
+/** The result of an analysis. */
+class AnalysisResult {
+ final bool error;
+ AnalysisResult.forFailure() : error = true;
+ AnalysisResult.forSuccess() : error = false;
+}
+
+
+/**
+ * Runs the dart analyzer with the command-line options in [args].
+ * See [CommandLineOptions] for a list of valid arguments.
+ */
+Future<AnalysisResult> run(List<String> args) {
+
+ var options = CommandLineOptions.parse(args);
+ if (options == null) {
+ return new Future.immediate(new AnalysisResult.forFailure());
+ }
+
+ //TODO(pquitslund): call out to analyzer...
+
+}
\ No newline at end of file
diff --git a/pkg/analyzer-experimental/lib/analyzer.dart b/pkg/analyzer-experimental/lib/analyzer.dart
new file mode 100644
index 0000000..8df6d94
--- /dev/null
+++ b/pkg/analyzer-experimental/lib/analyzer.dart
@@ -0,0 +1,4 @@
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
diff --git a/pkg/analyzer-experimental/lib/options.dart b/pkg/analyzer-experimental/lib/options.dart
new file mode 100644
index 0000000..c480a34
--- /dev/null
+++ b/pkg/analyzer-experimental/lib/options.dart
@@ -0,0 +1,195 @@
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library options;
+
+import 'package:args/args.dart';
+
+import 'dart:io';
+
+
+const _BINARY_NAME = 'analyzer';
+const _SDK_ENV = 'com.google.dart.sdk';
+final _DEFAULT_SDK_LOCATION = Platform.environment[_SDK_ENV];
+
+/**
+ * Analyzer commandline configuration options.
+ */
+class CommandLineOptions {
+
+ /** Batch mode (for unit testing) */
+ final bool shouldBatch;
+
+ /** Whether to use machine format for error display */
+ final bool machineFormat;
+
+ /** Whether to ignore unrecognized flags */
+ final bool ignoreUnrecognizedFlags;
+
+ /** Whether to print metrics */
+ final bool showMetrics;
+
+ /** Whether to treat warnings as fatal */
+ final bool warningsAreFatal;
+
+ /** The path to the dart SDK */
+ final String dartSdkPath;
+
+ /** The source files to analyze */
+ final List<String> sourceFiles;
+
+ /**
+ * Initialize options from the given parsed [args].
+ */
+ CommandLineOptions._fromArgs(ArgResults args)
+ : shouldBatch = args['batch'],
+ machineFormat = args['machine_format'],
+ ignoreUnrecognizedFlags = args['ignore_unrecognized_flags'],
+ showMetrics = args['metrics'],
+ warningsAreFatal = args['fatal_warnings'],
+ dartSdkPath = args['dart_sdk'],
+ sourceFiles = args.rest;
+
+ /**
+ * Parse [args] into [CommandLineOptions] describing the specified
+ * analyzer options. In case of a format error, [null] is returned.
+ */
+ factory CommandLineOptions.parse(List<String> args) {
+
+ var parser = new _CommandLineParser()
+ ..addFlag('batch', abbr: 'b', help: 'Run in batch mode',
+ defaultsTo: false, negatable: false)
+ ..addOption('dart_sdk', help: 'Specify path to the Dart sdk',
+ defaultsTo: _DEFAULT_SDK_LOCATION)
+ ..addFlag('machine_format', help: 'Specify whether errors '
+ 'should be in machine format',
+ defaultsTo: false, negatable: false)
+ ..addFlag('ignore_unrecognized_flags',
+ help: 'Ignore unrecognized command line flags',
+ defaultsTo: false, negatable: false)
+ ..addFlag('fatal_warnings', help: 'Treat non-type warnings as fatal',
+ defaultsTo: false, negatable: false)
+ ..addFlag('metrics', help: 'Print metrics',
+ defaultsTo: false, negatable: false)
+ ..addFlag('help', abbr: 'h', help: 'Display this help message',
+ defaultsTo: false, negatable: false);
+
+ try {
+ var results = parser.parse(args);
+ if (results['help'] || results.rest.length == 0) {
+ _showUsage(parser);
+ return null;
+ }
+ return new CommandLineOptions._fromArgs(results);
+ } on FormatException catch (e) {
+ print(e.message);
+ _showUsage(parser);
+ return null;
+ }
+
+ }
+
+ static _showUsage(parser) {
+ print('Usage: ${_BINARY_NAME} [options...] '
+ '<libraries to analyze...>');
+ print(parser.getUsage());
+ }
+
+}
+
+/**
+ * Commandline argument parser.
+ *
+ * TODO(pquitslund): when the args package supports ignoring unrecognized
+ * options/flags, this class can be replaced with a simple [ArgParser] instance.
+ */
+class _CommandLineParser {
+
+ final List<String> _knownFlags;
+ final ArgParser _parser;
+
+ /** Creates a new command line parser */
+ _CommandLineParser()
+ : _knownFlags = <String>[],
+ _parser = new ArgParser();
+
+
+ /**
+ * Defines a flag.
+ *
+ * See [ArgParser.addFlag()].
+ */
+ void addFlag(String name, {String abbr, String help, bool defaultsTo: false,
+ bool negatable: true, void callback(bool value)}) {
+ _knownFlags.add(name);
+ _parser.addFlag(name, abbr: abbr, help: help, defaultsTo: defaultsTo,
+ negatable: negatable, callback: callback);
+ }
+
+ /**
+ * Defines a value-taking option.
+ *
+ * See [ArgParser.addOption()].
+ */
+ void addOption(String name, {String abbr, String help, List<String> allowed,
+ Map<String, String> allowedHelp, String defaultsTo,
+ void callback(value), bool allowMultiple: false}) {
+ _parser.addOption(name, abbr: abbr, help: help, allowed: allowed,
+ allowedHelp: allowedHelp, defaultsTo: defaultsTo, callback: callback,
+ allowMultiple: allowMultiple);
+ }
+
+
+ /**
+ * Generates a string displaying usage information for the defined options.
+ *
+ * See [ArgParser.getUsage()].
+ */
+ String getUsage() => _parser.getUsage();
+
+ /**
+ * Parses [args], a list of command-line arguments, matches them against the
+ * flags and options defined by this parser, and returns the result.
+ *
+ * See [ArgParser].
+ */
+ ArgResults parse(List<String> args) => _parser.parse(_filterUnknowns(args));
+
+ List<String> _filterUnknowns(args) {
+
+ // Only filter args if the ignore flag is specified.
+ if (!args.contains('--ignore_unrecognized_flags')) {
+ return args;
+ }
+
+ // Filter all unrecognized flags and options.
+ var filtered = <String>[];
+ for (var i=0; i < args.length; ++i) {
+ var arg = args[i];
+ if (arg.startsWith('--') && arg.length > 2) {
+ if (!_knownFlags.contains(arg.substring(2))) {
+ //"eat" params by advancing to the next flag/option
+ i = _getNextFlagIndex(args, i);
+ } else {
+ filtered.add(arg);
+ }
+ } else {
+ filtered.add(arg);
+ }
+ }
+
+ return filtered;
+ }
+
+ _getNextFlagIndex(args, i) {
+ for ( ; i < args.length; ++i) {
+ if (args[i].startsWith('--')) {
+ return i;
+ }
+ }
+ return i;
+ }
+
+}
+
diff --git a/pkg/analyzer-experimental/pubspec.yaml b/pkg/analyzer-experimental/pubspec.yaml
new file mode 100644
index 0000000..7882f67
--- /dev/null
+++ b/pkg/analyzer-experimental/pubspec.yaml
@@ -0,0 +1,8 @@
+name: analyzer-experimental
+author: "Dart Team <misc@dartlang.org>"
+homepage: http://www.dartlang.org
+description: Experimental static analyzer for Dart.
+
+dependencies:
+ args: any
+ unittest: any
\ No newline at end of file
diff --git a/pkg/analyzer-experimental/test/options_test.dart b/pkg/analyzer-experimental/test/options_test.dart
new file mode 100644
index 0000000..075f60f
--- /dev/null
+++ b/pkg/analyzer-experimental/test/options_test.dart
@@ -0,0 +1,43 @@
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library options_test;
+
+import 'package:unittest/unittest.dart';
+import 'package:analyzer-experimental/options.dart';
+
+main() {
+
+ group('AnalyzerOptions.parse()', () {
+
+ test('defaults', () {
+ CommandLineOptions options = new CommandLineOptions.parse(['foo.dart']);
+ expect(options, isNotNull);
+ expect(options.shouldBatch, isFalse);
+ expect(options.machineFormat, isFalse);
+ expect(options.ignoreUnrecognizedFlags, isFalse);
+ expect(options.showMetrics, isFalse);
+ expect(options.warningsAreFatal, isFalse);
+ expect(options.dartSdkPath, isNull);
+ expect(options.sourceFiles, equals(['foo.dart']));
+
+ });
+
+ test('notice unrecognized flags', () {
+ CommandLineOptions options = new CommandLineOptions.parse(['--bar', '--baz',
+ 'foo.dart']);
+ expect(options, isNull);
+ });
+
+ test('ignore unrecognized flags', () {
+ CommandLineOptions options = new CommandLineOptions.parse([
+ '--ignore_unrecognized_flags', '--bar', '--baz', 'foo.dart']);
+ expect(options, isNotNull);
+ expect(options.sourceFiles, equals(['foo.dart']));
+ });
+
+ });
+
+}
+
diff --git a/pkg/http/lib/src/base_client.dart b/pkg/http/lib/src/base_client.dart
index 7eb972f..cda7b0d 100644
--- a/pkg/http/lib/src/base_client.dart
+++ b/pkg/http/lib/src/base_client.dart
@@ -110,7 +110,7 @@
// Wrap everything in a Future block so that synchronous validation errors
// are passed asynchronously through the Future chain.
return async.then((_) {
- if (url is String) url = new Uri.fromString(url);
+ if (url is String) url = Uri.parse(url);
var request = new Request(method, url);
if (headers != null) mapAddAll(request.headers, headers);
diff --git a/pkg/http/lib/src/base_request.dart b/pkg/http/lib/src/base_request.dart
index aec4cff..943f1f6 100644
--- a/pkg/http/lib/src/base_request.dart
+++ b/pkg/http/lib/src/base_request.dart
@@ -82,7 +82,7 @@
/// Creates a new HTTP request.
BaseRequest(this.method, this.url)
- : headers = <String>{};
+ : headers = {};
/// Finalizes the HTTP request in preparation for it being sent. This freezes
/// all mutable fields and returns a single-subscription [ByteStream] that
diff --git a/pkg/http/lib/src/base_response.dart b/pkg/http/lib/src/base_response.dart
index 8b7da0c..42d38ad 100644
--- a/pkg/http/lib/src/base_response.dart
+++ b/pkg/http/lib/src/base_response.dart
@@ -43,7 +43,7 @@
this.statusCode,
this.contentLength,
{this.request,
- this.headers: const <String>{},
+ this.headers: const {},
this.isRedirect: false,
this.persistentConnection: true,
this.reasonPhrase});
diff --git a/pkg/http/lib/src/io_client.dart b/pkg/http/lib/src/io_client.dart
index 31391fc..1a432d6 100644
--- a/pkg/http/lib/src/io_client.dart
+++ b/pkg/http/lib/src/io_client.dart
@@ -56,7 +56,7 @@
};
connection.onResponse = (response) {
- var headers = <String>{};
+ var headers = {};
response.headers.forEach((key, value) => headers[key] = value);
if (completed) return;
diff --git a/pkg/http/lib/src/multipart_request.dart b/pkg/http/lib/src/multipart_request.dart
index b5ca43c..9bb1c46 100644
--- a/pkg/http/lib/src/multipart_request.dart
+++ b/pkg/http/lib/src/multipart_request.dart
@@ -23,7 +23,7 @@
/// `multipart/form-data` and the Content-Transfer-Encoding header to `binary`.
/// These values will override any values set by the user.
///
-/// var uri = new Uri.fromString("http://pub.dartlang.org/packages/create");
+/// var uri = Uri.parse("http://pub.dartlang.org/packages/create");
/// var request = new http.MultipartRequest("POST", url);
/// request.fields['user'] = 'nweiz@google.com';
/// request.files.add(new http.MultipartFile.fromFile(
@@ -82,7 +82,7 @@
/// Creates a new [MultipartRequest].
MultipartRequest(String method, Uri url)
: super(method, url),
- fields = <String>{},
+ fields = {},
_files = new CollectionSink<MultipartFile>(<MultipartFile>[]);
/// Freezes all mutable fields and returns a single-subscription [ByteStream]
diff --git a/pkg/http/lib/src/response.dart b/pkg/http/lib/src/response.dart
index 1808414..b6d910e 100644
--- a/pkg/http/lib/src/response.dart
+++ b/pkg/http/lib/src/response.dart
@@ -31,7 +31,7 @@
String body,
int statusCode,
{BaseRequest request,
- Map<String, String> headers: const <String>{},
+ Map<String, String> headers: const {},
bool isRedirect: false,
bool persistentConnection: true,
String reasonPhrase})
@@ -49,7 +49,7 @@
List<int> bodyBytes,
int statusCode,
{BaseRequest request,
- Map<String, String> headers: const <String>{},
+ Map<String, String> headers: const {},
bool isRedirect: false,
bool persistentConnection: true,
String reasonPhrase})
diff --git a/pkg/http/lib/src/streamed_response.dart b/pkg/http/lib/src/streamed_response.dart
index 17752de..c365c19 100644
--- a/pkg/http/lib/src/streamed_response.dart
+++ b/pkg/http/lib/src/streamed_response.dart
@@ -26,7 +26,7 @@
int statusCode,
int contentLength,
{BaseRequest request,
- Map<String, String> headers: const <String>{},
+ Map<String, String> headers: const {},
bool isRedirect: false,
bool persistentConnection: true,
String reasonPhrase})
diff --git a/pkg/http/lib/src/utils.dart b/pkg/http/lib/src/utils.dart
index 1449080..e1b952e 100644
--- a/pkg/http/lib/src/utils.dart
+++ b/pkg/http/lib/src/utils.dart
@@ -19,7 +19,7 @@
/// queryToMap("foo=bar&baz=bang&qux");
/// //=> {"foo": "bar", "baz": "bang", "qux": ""}
Map<String, String> queryToMap(String queryList) {
- var map = <String>{};
+ var map = {};
for (var pair in queryList.split("&")) {
var split = split1(pair, "=");
if (split.isEmpty) continue;
diff --git a/pkg/http/test/client_test.dart b/pkg/http/test/client_test.dart
index 1fab06b..e29cef5 100644
--- a/pkg/http/test/client_test.dart
+++ b/pkg/http/test/client_test.dart
@@ -42,7 +42,7 @@
test('#send with an invalid URL', () {
var client = new http.Client();
- var url = new Uri.fromString('http://http.invalid');
+ var url = Uri.parse('http://http.invalid');
var request = new http.StreamedRequest("POST", url);
request.headers[HttpHeaders.CONTENT_TYPE] =
'application/json; charset=utf-8';
diff --git a/pkg/http/test/mock_client_test.dart b/pkg/http/test/mock_client_test.dart
index 1ffc373..59be93f 100644
--- a/pkg/http/test/mock_client_test.dart
+++ b/pkg/http/test/mock_client_test.dart
@@ -45,7 +45,7 @@
});
});
- var uri = new Uri.fromString("http://example.com/foo");
+ var uri = Uri.parse("http://example.com/foo");
var request = new http.Request("POST", uri);
request.body = "hello, world";
var future = client.send(request)
diff --git a/pkg/http/test/utils.dart b/pkg/http/test/utils.dart
index 66ab824..5fc267e 100644
--- a/pkg/http/test/utils.dart
+++ b/pkg/http/test/utils.dart
@@ -17,10 +17,10 @@
HttpServer _server;
/// The URL for the current server instance.
-Uri get serverUrl => new Uri.fromString('http://localhost:${_server.port}');
+Uri get serverUrl => Uri.parse('http://localhost:${_server.port}');
/// A dummy URL for constructing requests that won't be sent.
-Uri get dummyUrl => new Uri.fromString('http://dartlang.org/');
+Uri get dummyUrl => Uri.parse('http://dartlang.org/');
/// Starts a new HTTP server.
void startServer() {
@@ -35,7 +35,7 @@
_server.addRequestHandler((request) => request.path == '/loop',
(request, response) {
- var n = int.parse(new Uri.fromString(request.uri).query);
+ var n = int.parse(Uri.parse(request.uri).query);
response.statusCode = 302;
response.headers.set('location',
serverUrl.resolve('/loop?${n + 1}').toString());
@@ -70,7 +70,7 @@
var content = {
'method': request.method,
'path': request.path,
- 'headers': <String>{}
+ 'headers': {}
};
if (requestBody != null) content['body'] = requestBody;
request.headers.forEach((name, values) {
diff --git a/pkg/intl/example/basic/basic_example.dart b/pkg/intl/example/basic/basic_example.dart
index e8e99d6..0ac9c20 100644
--- a/pkg/intl/example/basic/basic_example.dart
+++ b/pkg/intl/example/basic/basic_example.dart
@@ -46,7 +46,7 @@
// futures have completed. We are passed the collection of futures, but we
// don't need to use them, so ignore the parameter.
runProgram(List<Future> _) {
- var aDate = new Date.fromMillisecondsSinceEpoch(0, isUtc: true);
+ var aDate = new DateTime.fromMillisecondsSinceEpoch(0, isUtc: true);
var de = new Intl('de_DE');
var th = new Intl('th_TH');
// This defines a message that can be internationalized. It is written as a
diff --git a/pkg/intl/lib/date_format.dart b/pkg/intl/lib/date_format.dart
index e4a2d65..4c9ee28 100644
--- a/pkg/intl/lib/date_format.dart
+++ b/pkg/intl/lib/date_format.dart
@@ -172,7 +172,7 @@
* DateFormat must interpret the abbreviated year relative to some
* century. It does this by adjusting dates to be within 80 years before and 20
* years after the time the parse function is called. For example, using a
- * pattern of "MM/dd/yy" and a DateTimeParse instance created on Jan 1, 1997,
+ * pattern of "MM/dd/yy" and a DateParse instance created on Jan 1, 1997,
* the string "01/11/12" would be interpreted as Jan 11, 2012 while the string
* "05/04/64" would be interpreted as May 4, 1964. During parsing, only
* strings consisting of exactly two digits, as defined by {@link
@@ -222,7 +222,7 @@
* Return a string representing [date] formatted according to our locale
* and internal format.
*/
- String format(Date date) {
+ String format(DateTime date) {
// TODO(efortuna): read optional TimeZone argument (or similar)?
var result = new StringBuffer();
_formatFields.forEach((field) => result.add(field.format(date)));
@@ -232,9 +232,9 @@
/**
* Returns a date string indicating how long ago (3 hours, 2 minutes)
* something has happened or how long in the future something will happen
- * given a [reference] Date relative to the current time.
+ * given a [reference] DateTime relative to the current time.
*/
- String formatDuration(Date reference) {
+ String formatDuration(DateTime reference) {
return '';
}
@@ -243,7 +243,7 @@
* in the future (positive [duration]) some time is with respect to a
* reference [date].
*/
- String formatDurationFrom(Duration duration, Date date) {
+ String formatDurationFrom(Duration duration, DateTime date) {
return '';
}
@@ -251,7 +251,7 @@
* Given user input, attempt to parse the [inputString] into the anticipated
* format, treating it as being in the local timezone.
*/
- Date parse(String inputString, [utc = false]) {
+ DateTime parse(String inputString, [utc = false]) {
// TODO(alanknight): The Closure code refers to special parsing of numeric
// values with no delimiters, which we currently don't do. Should we?
var dateFields = new _DateBuilder();
@@ -266,7 +266,7 @@
* Given user input, attempt to parse the [inputString] into the anticipated
* format, treating it as being in UTC.
*/
- Date parseUTC(String inputString) {
+ DateTime parseUTC(String inputString) {
return parse(inputString, true);
}
diff --git a/pkg/intl/lib/intl.dart b/pkg/intl/lib/intl.dart
index 9214b66..18af6a7 100644
--- a/pkg/intl/lib/intl.dart
+++ b/pkg/intl/lib/intl.dart
@@ -45,7 +45,7 @@
* "Today's date is $date",
* desc: 'Indicate the current date',
* examples: {'date' : 'June 8, 2012'});
- * print(today(new Date.now());
+ * print(today(new DateTime.now());
*
* msg({num_people, place}) => Intl.message(
* '''I see ${Intl.plural(num_people,
@@ -59,7 +59,7 @@
* produce "I see 2 other people in Athens." as output in the default locale.
*
* To use a locale other than the default, use the `withLocale` function.
- * var todayString = new DateFormat("pt_BR").format(new Date.now());
+ * var todayString = new DateFormat("pt_BR").format(new DateTime.now());
* print(withLocale("pt_BR", () => today(todayString));
*
* See `tests/message_format_test.dart` for more examples.
diff --git a/pkg/intl/lib/intl_standalone.dart b/pkg/intl/lib/intl_standalone.dart
index cce7722..fc22cf9 100644
--- a/pkg/intl/lib/intl_standalone.dart
+++ b/pkg/intl/lib/intl_standalone.dart
@@ -52,7 +52,7 @@
* Regular expression to match the expected output of systeminfo on
* Windows. e.g. System Locale:<tab>en_US;English (United States)
*/
-RegExp _sysInfoRegex = new RegExp(r"System Locale:\s+(\w\w-\w+);");
+RegExp sysInfoRegex = new RegExp(r"System Locale:\s+((\w\w;)|(\w\w-\w+;))");
/**
* Regular expression to match the expected output of reading the defaults
@@ -62,7 +62,7 @@
* "pt-PT",
* ...
*/
-RegExp _appleDefaultsRegex = new RegExp(r'(\w\w_\w+)');
+RegExp _appleDefaultsRegex = new RegExp(r'((\w\w)_\w+)');
/**
* Check to see if we have a "LANG" environment variable we can use and return
@@ -90,7 +90,7 @@
*/
Future _getWindowsSystemInfo() {
var p = Process.run('systeminfo', []);
- var myResult = p.then((result) => _checkResult(result, _sysInfoRegex));
+ var myResult = p.then((result) => _checkResult(result, sysInfoRegex));
return myResult;
}
diff --git a/pkg/intl/lib/src/date_format_field.dart b/pkg/intl/lib/src/date_format_field.dart
index 7e210a3..1d37490 100644
--- a/pkg/intl/lib/src/date_format_field.dart
+++ b/pkg/intl/lib/src/date_format_field.dart
@@ -30,7 +30,7 @@
String toString() => pattern;
/** Format date according to our specification and return the result. */
- String format(Date date) {
+ String format(DateTime date) {
// Default implementation in the superclass, works for both types of
// literal patterns, and is overridden by _DateFormatPatternField.
return pattern;
@@ -108,7 +108,7 @@
_DateFormatPatternField(pattern, parent): super(pattern, parent);
/** Format date according to our specification and return the result. */
- String format(Date date) {
+ String format(DateTime date) {
return formatField(date);
}
@@ -152,7 +152,7 @@
}
/** Formatting logic if we are of type FIELD */
- String formatField(Date date) {
+ String formatField(DateTime date) {
switch (pattern[0]) {
case 'a': return formatAmPm(date);
case 'c': return formatStandaloneDay(date);
@@ -180,13 +180,13 @@
/** Return the symbols for our current locale. */
DateSymbols get symbols => dateTimeSymbols[parent.locale];
- formatEra(Date date) {
+ formatEra(DateTime date) {
var era = date.year > 0 ? 1 : 0;
return width >= 4 ? symbols.ERANAMES[era] :
symbols.ERAS[era];
}
- formatYear(Date date) {
+ formatYear(DateTime date) {
// TODO(alanknight): Proper handling of years <= 0
var year = date.year;
if (year < 0) {
@@ -229,7 +229,7 @@
return longestResult;
}
- String formatMonth(Date date) {
+ String formatMonth(DateTime date) {
switch (width) {
case 5: return symbols.NARROWMONTHS[date.month-1];
case 4: return symbols.MONTHS[date.month-1];
@@ -250,11 +250,11 @@
dateFields.month = parseEnumeratedString(input, possibilities) + 1;
}
- String format24Hours(Date date) {
+ String format24Hours(DateTime date) {
return padTo(width, date.hour);
}
- String formatFractionalSeconds(Date date) {
+ String formatFractionalSeconds(DateTime date) {
// Always print at least 3 digits. If the width is greater, append 0s
var basic = padTo(3, date.millisecond);
if (width - 3 > 0) {
@@ -265,7 +265,7 @@
}
}
- String formatAmPm(Date date) {
+ String formatAmPm(DateTime date) {
var hours = date.hour;
var index = (date.hour >= 12) && (date.hour < 24) ? 1 : 0;
var ampm = symbols.AMPMS;
@@ -278,7 +278,7 @@
if (ampm == 1) dateFields.pm = true;
}
- String format1To12Hours(Date date) {
+ String format1To12Hours(DateTime date) {
var hours = date.hour;
if (date.hour > 12) hours = hours - 12;
if (hours == 0) hours = 12;
@@ -290,15 +290,15 @@
if (dateFields.hour == 12) dateFields.hour = 0;
}
- String format0To11Hours(Date date) {
+ String format0To11Hours(DateTime date) {
return padTo(width, date.hour % 12);
}
- String format0To23Hours(Date date) {
+ String format0To23Hours(DateTime date) {
return padTo(width, date.hour);
}
- String formatStandaloneDay(Date date) {
+ String formatStandaloneDay(DateTime date) {
switch (width) {
case 5: return symbols.STANDALONENARROWWEEKDAYS[date.weekday % 7];
case 4: return symbols.STANDALONEWEEKDAYS[date.weekday % 7];
@@ -320,7 +320,7 @@
parseEnumeratedString(input, possibilities);
}
- String formatStandaloneMonth(Date date) {
+ String formatStandaloneMonth(DateTime date) {
switch (width) {
case 5:
return symbols.STANDALONENARROWMONTHS[date.month-1];
@@ -344,7 +344,7 @@
dateFields.month = parseEnumeratedString(input, possibilities) + 1;
}
- String formatQuarter(Date date) {
+ String formatQuarter(DateTime date) {
var quarter = (date.month / 3).truncate().toInt();
if (width < 4) {
return symbols.SHORTQUARTERS[quarter];
@@ -352,11 +352,11 @@
return symbols.QUARTERS[quarter];
}
}
- String formatDayOfMonth(Date date) {
+ String formatDayOfMonth(DateTime date) {
return padTo(width, date.day);
}
- String formatDayOfWeek(Date date) {
+ String formatDayOfWeek(DateTime date) {
// Note that Dart's weekday returns 1 for Monday and 7 for Sunday.
return (width >= 4 ? symbols.WEEKDAYS :
symbols.SHORTWEEKDAYS)[(date.weekday) % 7];
@@ -368,24 +368,24 @@
parseEnumeratedString(input, possibilities);
}
- String formatMinutes(Date date) {
+ String formatMinutes(DateTime date) {
return padTo(width, date.minute);
}
- String formatSeconds(Date date) {
+ String formatSeconds(DateTime date) {
return padTo(width, date.second);
}
- String formatTimeZoneId(Date date) {
+ String formatTimeZoneId(DateTime date) {
// TODO(alanknight): implement time zone support
throw new UnimplementedError();
}
- String formatTimeZone(Date date) {
+ String formatTimeZone(DateTime date) {
throw new UnimplementedError();
}
- String formatTimeZoneRFC(Date date) {
+ String formatTimeZoneRFC(DateTime date) {
throw new UnimplementedError();
}
diff --git a/pkg/intl/lib/src/date_format_helpers.dart b/pkg/intl/lib/src/date_format_helpers.dart
index e47c2cb..a10b274 100644
--- a/pkg/intl/lib/src/date_format_helpers.dart
+++ b/pkg/intl/lib/src/date_format_helpers.dart
@@ -36,11 +36,11 @@
* Return a date built using our values. If no date portion is set,
* use the "Epoch" of January 1, 1970.
*/
- Date asDate() {
+ DateTime asDate() {
// TODO(alanknight): Validate the date, especially for things which
// can crash the VM, e.g. large month values.
if (utc) {
- return new Date.utc(
+ return new DateTime.utc(
year,
month,
day,
@@ -49,7 +49,7 @@
second,
fractionalSecond);
} else {
- return new Date(
+ return new DateTime(
year,
month,
day,
diff --git a/pkg/intl/test/date_time_format_test_core.dart b/pkg/intl/test/date_time_format_test_core.dart
index 71bbf84..94f9bcf 100644
--- a/pkg/intl/test/date_time_format_test_core.dart
+++ b/pkg/intl/test/date_time_format_test_core.dart
@@ -126,7 +126,7 @@
* expected result of formatting [date] according to that format in
* [locale].
*/
-testLocale(String localeName, Map expectedResults, Date date) {
+testLocale(String localeName, Map expectedResults, DateTime date) {
var intl = new Intl(localeName);
for(int i=0; i<formatsToTest.length; i++) {
var skeleton = formatsToTest[i];
@@ -137,7 +137,7 @@
}
}
-testRoundTripParsing(String localeName, Date date) {
+testRoundTripParsing(String localeName, DateTime date) {
// In order to test parsing, we can't just read back the date, because
// printing in most formats loses information. But we can test that
// what we parsed back prints the same as what we originally printed.
@@ -201,7 +201,7 @@
// very likely aren't).
runDateTests([List<String> subset]) {
test('Multiple patterns', () {
- var date = new Date.now();
+ var date = new DateTime.now();
var multiple1 = new DateFormat.yMd().add_jms();
var multiple2 = new DateFormat("yMd").add_jms();
var separate1 = new DateFormat.yMd();
@@ -229,7 +229,7 @@
});
test('Test ALL the supported formats on representative locales', () {
- var aDate = new Date(2012, 1, 27, 20, 58, 59, 0);
+ var aDate = new DateTime(2012, 1, 27, 20, 58, 59, 0);
testLocale("en_US", English, aDate);
if (subset.length > 1) {
// Don't run if we have just one locale, so some of these won't be there.
@@ -247,11 +247,11 @@
var locales = subset == null ? allLocales() : subset;
for (var locale in locales) {
for (var month in months) {
- var aDate = new Date(2012, month, 27, 13, 58, 59, 012);
+ var aDate = new DateTime(2012, month, 27, 13, 58, 59, 012);
testRoundTripParsing(locale, aDate);
}
for (var hour in hours) {
- var aDate = new Date(2012, 1, 27, hour, 58, 59, 123);
+ var aDate = new DateTime(2012, 1, 27, hour, 58, 59, 123);
testRoundTripParsing(locale, aDate);
}
}
@@ -277,7 +277,7 @@
test('Test malformed locales', () {
// Don't run if we have just one locale, which may not include these.
if (subset.length <= 1) return;
- var aDate = new Date(2012, 1, 27, 20, 58, 59, 0);
+ var aDate = new DateTime(2012, 1, 27, 20, 58, 59, 0);
// Austrian is a useful test locale here because it differs slightly
// from the generic "de" locale so we can tell the difference between
// correcting to "de_AT" and falling back to just "de".
@@ -293,7 +293,7 @@
var instanceJP = intl.date('jms');
var instanceUS = intl.date('jms', 'en_US');
var blank = intl.date('jms');
- var date = new Date(2012, 1, 27, 20, 58, 59, 0);
+ var date = new DateTime(2012, 1, 27, 20, 58, 59, 0);
expect(instanceJP.format(date), equals("20:58:59"));
expect(instanceUS.format(date), equals("8:58:59 PM"));
expect(blank.format(date), equals("20:58:59"));
@@ -302,7 +302,7 @@
test('Test explicit format string', () {
// Don't run if we have just one locale, which may not include these.
if (subset.length <= 1) return;
- var aDate = new Date(2012, 1, 27, 20, 58, 59, 0);
+ var aDate = new DateTime(2012, 1, 27, 20, 58, 59, 0);
// An explicit format that doesn't conform to any skeleton
var us = new DateFormat(r'yy //// :D \\\\ dd:ss ^&@ M');
expect(us.format(aDate), equals(r"12 //// :D \\\\ 27:59 ^&@ 1"));
@@ -326,8 +326,8 @@
});
test('Test fractional seconds padding', () {
- var one = new Date(2012, 1, 27, 20, 58, 59, 1);
- var oneHundred = new Date(2012, 1, 27, 20, 58, 59, 100);
+ var one = new DateTime(2012, 1, 27, 20, 58, 59, 1);
+ var oneHundred = new DateTime(2012, 1, 27, 20, 58, 59, 100);
var fractional = new DateFormat('hh:mm:ss.SSS', 'en_US');
expect(fractional.format(one), equals('08:58:59.001'));
expect(fractional.format(oneHundred), equals('08:58:59.100'));
@@ -337,8 +337,8 @@
});
test('Test parseUTC', () {
- var local = new Date(2012, 1, 27, 20, 58, 59, 1);
- var utc = new Date.utc(2012, 1, 27, 20, 58, 59, 1);
+ var local = new DateTime(2012, 1, 27, 20, 58, 59, 1);
+ var utc = new DateTime.utc(2012, 1, 27, 20, 58, 59, 1);
// Getting the offset as a duration via difference() would be simpler,
// but doesn't work on dart2js in checked mode. See issue 4437.
var offset = utc.millisecondsSinceEpoch - local.millisecondsSinceEpoch;
@@ -354,7 +354,7 @@
});
test('Test default format', () {
- var someDate = new Date(2012, 1, 27, 20, 58, 59, 1);
+ var someDate = new DateTime(2012, 1, 27, 20, 58, 59, 1);
var emptyFormat = new DateFormat(null, "en_US");
var knownDefault = new DateFormat.yMMMMd("en_US").add_jms();
var result = emptyFormat.format(someDate);
diff --git a/pkg/intl/test/find_default_locale_standalone_test.dart b/pkg/intl/test/find_default_locale_standalone_test.dart
index b27b578..50167c6 100644
--- a/pkg/intl/test/find_default_locale_standalone_test.dart
+++ b/pkg/intl/test/find_default_locale_standalone_test.dart
@@ -17,6 +17,12 @@
var callback = expectAsync1(verifyLocale);
findSystemLocale().then(callback);
});
+
+ test("Test windows regex", () {
+ expect(sysInfoRegex.hasMatch("System Locale: en-US;blah blah"), isTrue);
+ expect(sysInfoRegex.hasMatch("System Locale: ru;sdfadsf"), isTrue);
+ expect(sysInfoRegex.hasMatch("System Locale: ru;"), isTrue);
+ });
}
verifyLocale(_) {
diff --git a/pkg/logging/lib/logging.dart b/pkg/logging/lib/logging.dart
index 3713175..5e0a239 100644
--- a/pkg/logging/lib/logging.dart
+++ b/pkg/logging/lib/logging.dart
@@ -313,7 +313,7 @@
final String loggerName;
/** Time when this record was created. */
- final Date time;
+ final DateTime time;
/** Unique sequence number greater than all log records created before it. */
final int sequenceNumber;
@@ -329,6 +329,6 @@
LogRecord(
this.level, this.message, this.loggerName,
[time, this.exception, this.exceptionText]) :
- this.time = (time == null) ? new Date.now() : time,
+ this.time = (time == null) ? new DateTime.now() : time,
this.sequenceNumber = LogRecord._nextNumber++;
}
diff --git a/pkg/oauth2/lib/oauth2.dart b/pkg/oauth2/lib/oauth2.dart
index cc0bb99..4dfaadd 100644
--- a/pkg/oauth2/lib/oauth2.dart
+++ b/pkg/oauth2/lib/oauth2.dart
@@ -28,9 +28,9 @@
/// // server. They're usually included in the server's documentation of its
/// // OAuth2 API.
/// final authorizationEndpoint =
-/// new Uri.fromString("http://example.com/oauth2/authorization");
+/// Uri.parse("http://example.com/oauth2/authorization");
/// final tokenEndpoint =
-/// new Uri.fromString("http://example.com/oauth2/token");
+/// Uri.parse("http://example.com/oauth2/token");
///
/// // The authorization server will issue each client a separate client
/// // identifier and secret, which allows the server to tell which client
@@ -48,7 +48,7 @@
/// // will redirect the resource owner here once they've authorized the
/// // client. The redirection will include the authorization code in the
/// // query parameters.
-/// final redirectUrl = new Uri.fromString(
+/// final redirectUrl = Uri.parse(
/// "http://my-site.com/oauth2-redirect");
///
/// var credentialsFile = new File("~/.myapp/credentials.json");
diff --git a/pkg/oauth2/lib/src/authorization_code_grant.dart b/pkg/oauth2/lib/src/authorization_code_grant.dart
index 5e9cbd2..b361f21 100644
--- a/pkg/oauth2/lib/src/authorization_code_grant.dart
+++ b/pkg/oauth2/lib/src/authorization_code_grant.dart
@@ -185,7 +185,7 @@
if (parameters.containsKey('error')) {
var description = parameters['error_description'];
var uriString = parameters['error_uri'];
- var uri = uriString == null ? null : new Uri.fromString(uriString);
+ var uri = uriString == null ? null : Uri.parse(uriString);
throw new AuthorizationException(parameters['error'], description, uri);
} else if (!parameters.containsKey('code')) {
throw new FormatException('Invalid OAuth response for '
@@ -229,7 +229,7 @@
/// This works just like [handleAuthorizationCode], except it doesn't validate
/// the state beforehand.
Future<Client> _handleAuthorizationCode(String authorizationCode) {
- var startTime = new Date.now();
+ var startTime = new DateTime.now();
return _httpClient.post(this.tokenEndpoint, fields: {
"grant_type": "authorization_code",
"code": authorizationCode,
diff --git a/pkg/oauth2/lib/src/credentials.dart b/pkg/oauth2/lib/src/credentials.dart
index 12a0be8..17cd410 100644
--- a/pkg/oauth2/lib/src/credentials.dart
+++ b/pkg/oauth2/lib/src/credentials.dart
@@ -44,13 +44,13 @@
/// The date at which these credentials will expire. This is likely to be a
/// few seconds earlier than the server's idea of the expiration date.
- final Date expiration;
+ final DateTime expiration;
/// Whether or not these credentials have expired. Note that it's possible the
/// credentials will expire shortly after this is called. However, since the
/// client's expiration date is kept a few seconds earlier than the server's,
/// there should be enough leeway to rely on this.
- bool get isExpired => expiration != null && new Date.now() > expiration;
+ bool get isExpired => expiration != null && new DateTime.now() > expiration;
/// Whether it's possible to refresh these credentials.
bool get canRefresh => refreshToken != null && tokenEndpoint != null;
@@ -105,13 +105,13 @@
var tokenEndpoint = parsed['tokenEndpoint'];
if (tokenEndpoint != null) {
- tokenEndpoint = new Uri.fromString(tokenEndpoint);
+ tokenEndpoint = Uri.parse(tokenEndpoint);
}
var expiration = parsed['expiration'];
if (expiration != null) {
validate(expiration is int,
'field "expiration" was not an int, was "$expiration"');
- expiration = new Date.fromMillisecondsSinceEpoch(expiration);
+ expiration = new DateTime.fromMillisecondsSinceEpoch(expiration);
}
return new Credentials(
@@ -152,7 +152,7 @@
if (scopes == null) scopes = <String>[];
if (httpClient == null) httpClient = new http.Client();
- var startTime = new Date.now();
+ var startTime = new DateTime.now();
return async.then((_) {
if (refreshToken == null) {
throw new StateError("Can't refresh credentials without a refresh "
diff --git a/pkg/oauth2/lib/src/handle_access_token_response.dart b/pkg/oauth2/lib/src/handle_access_token_response.dart
index b80532d..6443247 100644
--- a/pkg/oauth2/lib/src/handle_access_token_response.dart
+++ b/pkg/oauth2/lib/src/handle_access_token_response.dart
@@ -24,7 +24,7 @@
Credentials handleAccessTokenResponse(
http.Response response,
Uri tokenEndpoint,
- Date startTime,
+ DateTime startTime,
List<String> scopes) {
if (response.statusCode != 200) _handleErrorResponse(response, tokenEndpoint);
@@ -130,7 +130,7 @@
var description = parameters['error_description'];
var uriString = parameters['error_uri'];
- var uri = uriString == null ? null : new Uri.fromString(uriString);
+ var uri = uriString == null ? null : Uri.parse(uriString);
throw new AuthorizationException(parameters['error'], description, uri);
}
diff --git a/pkg/oauth2/lib/src/utils.dart b/pkg/oauth2/lib/src/utils.dart
index eb57e56..85a9f67 100644
--- a/pkg/oauth2/lib/src/utils.dart
+++ b/pkg/oauth2/lib/src/utils.dart
@@ -20,7 +20,7 @@
/// Convert a URL query string (or `application/x-www-form-urlencoded` body)
/// into a [Map] from parameter names to values.
Map<String, String> queryToMap(String queryList) {
- var map = <String>{};
+ var map = {};
for (var pair in queryList.split("&")) {
var split = split1(pair, "=");
if (split.isEmpty) continue;
diff --git a/pkg/oauth2/test/authorization_code_grant_test.dart b/pkg/oauth2/test/authorization_code_grant_test.dart
index 7614bcd..0bc3433 100644
--- a/pkg/oauth2/test/authorization_code_grant_test.dart
+++ b/pkg/oauth2/test/authorization_code_grant_test.dart
@@ -15,7 +15,7 @@
import '../lib/oauth2.dart' as oauth2;
import 'utils.dart';
-final redirectUrl = new Uri.fromString('http://example.com/redirect');
+final redirectUrl = Uri.parse('http://example.com/redirect');
ExpectClient client;
@@ -26,8 +26,8 @@
grant = new oauth2.AuthorizationCodeGrant(
'identifier',
'secret',
- new Uri.fromString('https://example.com/authorization'),
- new Uri.fromString('https://example.com/token'),
+ Uri.parse('https://example.com/authorization'),
+ Uri.parse('https://example.com/token'),
httpClient: client);
}
@@ -75,8 +75,8 @@
grant = new oauth2.AuthorizationCodeGrant(
'identifier',
'secret',
- new Uri.fromString('https://example.com/authorization?query=value'),
- new Uri.fromString('https://example.com/token'),
+ Uri.parse('https://example.com/authorization?query=value'),
+ Uri.parse('https://example.com/token'),
httpClient: client);
var authorizationUrl = grant.getAuthorizationUrl(redirectUrl);
diff --git a/pkg/oauth2/test/client_test.dart b/pkg/oauth2/test/client_test.dart
index 6ad7e48..b875de9 100644
--- a/pkg/oauth2/test/client_test.dart
+++ b/pkg/oauth2/test/client_test.dart
@@ -14,9 +14,9 @@
import '../lib/oauth2.dart' as oauth2;
import 'utils.dart';
-final Uri requestUri = new Uri.fromString("http://example.com/resource");
+final Uri requestUri = Uri.parse("http://example.com/resource");
-final Uri tokenEndpoint = new Uri.fromString('http://example.com/token');
+final Uri tokenEndpoint = Uri.parse('http://example.com/token');
ExpectClient httpClient;
@@ -35,7 +35,7 @@
setUp(createHttpClient);
test("that can't be refreshed throws an ExpirationException on send", () {
- var expiration = new Date.now().subtract(new Duration(hours: 1));
+ var expiration = new DateTime.now().subtract(new Duration(hours: 1));
var credentials = new oauth2.Credentials(
'access token', null, null, [], expiration);
var client = new oauth2.Client('identifier', 'secret', credentials,
@@ -47,7 +47,7 @@
test("that can be refreshed refreshes the credentials and sends the "
"request", () {
- var expiration = new Date.now().subtract(new Duration(hours: 1));
+ var expiration = new DateTime.now().subtract(new Duration(hours: 1));
var credentials = new oauth2.Credentials(
'access token', 'refresh token', tokenEndpoint, [], expiration);
var client = new oauth2.Client('identifier', 'secret', credentials,
diff --git a/pkg/oauth2/test/credentials_test.dart b/pkg/oauth2/test/credentials_test.dart
index 57e31a1..e6ad2a9 100644
--- a/pkg/oauth2/test/credentials_test.dart
+++ b/pkg/oauth2/test/credentials_test.dart
@@ -14,7 +14,7 @@
import '../lib/oauth2.dart' as oauth2;
import 'utils.dart';
-final Uri tokenEndpoint = new Uri.fromString('http://example.com/token');
+final Uri tokenEndpoint = Uri.parse('http://example.com/token');
ExpectClient httpClient;
@@ -27,14 +27,14 @@
});
test('is not expired if the expiration is in the future', () {
- var expiration = new Date.now().add(new Duration(hours: 1));
+ var expiration = new DateTime.now().add(new Duration(hours: 1));
var credentials = new oauth2.Credentials(
'access token', null, null, null, expiration);
expect(credentials.isExpired, isFalse);
});
test('is expired if the expiration is in the past', () {
- var expiration = new Date.now().subtract(new Duration(hours: 1));
+ var expiration = new DateTime.now().subtract(new Duration(hours: 1));
var credentials = new oauth2.Credentials(
'access token', null, null, null, expiration);
expect(credentials.isExpired, isTrue);
@@ -124,7 +124,7 @@
new oauth2.Credentials.fromJson(JSON.stringify(map));
test("should load the same credentials from toJson", () {
- var expiration = new Date.now().subtract(new Duration(hours: 1));
+ var expiration = new DateTime.now().subtract(new Duration(hours: 1));
var credentials = new oauth2.Credentials(
'access token', 'refresh token', tokenEndpoint, ['scope1', 'scope2'],
expiration);
diff --git a/pkg/oauth2/test/handle_access_token_response_test.dart b/pkg/oauth2/test/handle_access_token_response_test.dart
index 48465f2..3e95ddc 100644
--- a/pkg/oauth2/test/handle_access_token_response_test.dart
+++ b/pkg/oauth2/test/handle_access_token_response_test.dart
@@ -14,9 +14,9 @@
import '../lib/src/handle_access_token_response.dart';
import 'utils.dart';
-final Uri tokenEndpoint = new Uri.fromString("https://example.com/token");
+final Uri tokenEndpoint = Uri.parse("https://example.com/token");
-final Date startTime = new Date.now();
+final DateTime startTime = new DateTime.now();
oauth2.Credentials handle(http.Response response) =>
handleAccessTokenResponse(response, tokenEndpoint, startTime, ["scope"]);
diff --git a/pkg/oauth2/test/utils.dart b/pkg/oauth2/test/utils.dart
index cf5bff2..2b6c1a7 100644
--- a/pkg/oauth2/test/utils.dart
+++ b/pkg/oauth2/test/utils.dart
@@ -5,6 +5,7 @@
library utils;
import 'dart:async';
+import 'dart:collection' show Queue;
import '../../unittest/lib/unittest.dart';
import '../../http/lib/http.dart' as http;
diff --git a/pkg/path/README.md b/pkg/path/README.md
new file mode 100644
index 0000000..66f40b1
--- /dev/null
+++ b/pkg/path/README.md
@@ -0,0 +1,312 @@
+A comprehensive, cross-platform path manipulation library for Dart.
+
+The pathos library provides common operations for manipulating file paths:
+joining, splitting, normalizing, etc.
+
+We've tried very hard to make this library do the "right" thing on whatever
+platform you run it on. When you use the top-level functions, it will assume
+the host OS's path style and work with that. If you want to specifically work
+with paths of a specific style, you can construct a `path.Builder` for that
+style.
+
+## Using
+
+The path library was designed to be imported with a prefix, though you don't
+have to if you don't want to:
+
+ import 'package:pathos/path.dart' as path;
+
+## Top-level functions
+
+The most common way to use the library is through the top-level functions.
+These manipulate path strings based on your current working directory and the
+path style (POSIX or Windows) of the host operating system.
+
+### String get current
+
+Gets the path to the current working directory.
+
+### String get separator
+
+Gets the path separator for the current platform. On Mac and Linux, this
+is `/`. On Windows, it's `\`.
+
+### String absolute(String path)
+
+Converts [path] to an absolute path by resolving it relative to the current
+working directory. If [path] is already an absolute path, just returns it.
+
+ path.absolute('foo/bar.txt'); // -> /your/current/dir/foo/bar.txt
+
+### String basename(String path)
+
+Gets the part of [path] after the last separator.
+
+ path.basename('path/to/foo.dart'); // -> 'foo.dart'
+ path.basename('path/to'); // -> 'to'
+
+Trailing separators are ignored.
+
+ builder.basename('path/to/'); // -> 'to'
+
+### String basenameWithoutExtension(String path)
+
+Gets the part of [path] after the last separator, and without any trailing
+file extension.
+
+ path.basenameWithoutExtension('path/to/foo.dart'); // -> 'foo'
+
+Trailing separators are ignored.
+
+ builder.basenameWithoutExtension('path/to/foo.dart/'); // -> 'foo'
+
+### String dirname(String path)
+
+Gets the part of [path] before the last separator.
+
+ path.dirname('path/to/foo.dart'); // -> 'path/to'
+ path.dirname('path/to'); // -> 'to'
+
+Trailing separators are ignored.
+
+ builder.dirname('path/to/'); // -> 'path'
+
+### String extension(String path)
+
+Gets the file extension of [path]: the portion of [basename] from the last
+`.` to the end (including the `.` itself).
+
+ path.extension('path/to/foo.dart'); // -> '.dart'
+ path.extension('path/to/foo'); // -> ''
+ path.extension('path.to/foo'); // -> ''
+ path.extension('path/to/foo.dart.js'); // -> '.js'
+
+If the file name starts with a `.`, then that is not considered the
+extension:
+
+ path.extension('~/.bashrc'); // -> ''
+ path.extension('~/.notes.txt'); // -> '.txt'
+
+### String rootPrefix(String path)
+
+Returns the root of [path], if it's absolute, or the empty string if it's
+relative.
+
+ // Unix
+ path.rootPrefix('path/to/foo'); // -> ''
+ path.rootPrefix('/path/to/foo'); // -> '/'
+
+ // Windows
+ path.rootPrefix(r'path\to\foo'); // -> ''
+ path.rootPrefix(r'C:\path\to\foo'); // -> r'C:\'
+
+### bool isAbsolute(String path)
+
+Returns `true` if [path] is an absolute path and `false` if it is a
+relative path. On POSIX systems, absolute paths start with a `/` (forward
+slash). On Windows, an absolute path starts with `\\`, or a drive letter
+followed by `:/` or `:\`.
+
+### bool isRelative(String path)
+
+Returns `true` if [path] is a relative path and `false` if it is absolute.
+On POSIX systems, absolute paths start with a `/` (forward slash). On
+Windows, an absolute path starts with `\\`, or a drive letter followed by
+`:/` or `:\`.
+
+### String join(String part1, [String part2, String part3, ...])
+
+Joins the given path parts into a single path using the current platform's
+[separator]. Example:
+
+ path.join('path', 'to', 'foo'); // -> 'path/to/foo'
+
+If any part ends in a path separator, then a redundant separator will not
+be added:
+
+ path.join('path/', 'to', 'foo'); // -> 'path/to/foo
+
+If a part is an absolute path, then anything before that will be ignored:
+
+ path.join('path', '/to', 'foo'); // -> '/to/foo'
+
+### List<String> split(String path)
+
+Splits [path] into its components using the current platform's [separator].
+
+ path.split('path/to/foo'); // -> ['path', 'to', 'foo']
+
+The path will *not* be normalized before splitting.
+
+ path.split('path/../foo'); // -> ['path', '..', 'foo']
+
+If [path] is absolute, the root directory will be the first element in the
+array. Example:
+
+ // Unix
+ path.split('/path/to/foo'); // -> ['/', 'path', 'to', 'foo']
+
+ // Windows
+ path.split(r'C:\path\to\foo'); // -> [r'C:\', 'path', 'to', 'foo']
+
+### String normalize(String path)
+
+Normalizes [path], simplifying it by handling `..`, and `.`, and
+removing redundant path separators whenever possible.
+
+ path.normalize('path/./to/..//file.text'); // -> 'path/file.txt'
+String normalize(String path) => _builder.normalize(path);
+
+### String relative(String path, {String from})
+
+Attempts to convert [path] to an equivalent relative path from the current
+directory.
+
+ // Given current directory is /root/path:
+ path.relative('/root/path/a/b.dart'); // -> 'a/b.dart'
+ path.relative('/root/other.dart'); // -> '../other.dart'
+
+If the [from] argument is passed, [path] is made relative to that instead.
+
+ path.relative('/root/path/a/b.dart',
+ from: '/root/path'); // -> 'a/b.dart'
+ path.relative('/root/other.dart',
+ from: '/root/path'); // -> '../other.dart'
+
+Since there is no relative path from one drive letter to another on Windows,
+this will return an absolute path in that case.
+
+ path.relative(r'D:\other', from: r'C:\home'); // -> 'D:\other'
+
+### String withoutExtension(String path)
+
+Removes a trailing extension from the last part of [path].
+
+ withoutExtension('path/to/foo.dart'); // -> 'path/to/foo'
+
+## The path.Builder class
+
+In addition to the functions, path exposes a `path.Builder` class. This lets
+you configure the root directory and path style that paths are built using
+explicitly instead of assuming the current working directory and host OS's path
+style.
+
+You won't often use this, but it can be useful if you do a lot of path
+manipulation relative to some root directory.
+
+ var builder = new path.Builder(root: '/other/root');
+ builder.relative('/other/root/foo.txt'); // -> 'foo.txt'
+
+It exposes the same methods and getters as the top-level functions, with the
+addition of:
+
+### new Builder({Style style, String root})
+
+Creates a new path builder for the given style and root directory.
+
+If [style] is omitted, it uses the host operating system's path style. If
+[root] is omitted, it defaults to the current working directory. If [root]
+is relative, it is considered relative to the current working directory.
+
+### Style style
+
+The style of path that this builder works with.
+
+### String root
+
+The root directory that relative paths will be relative to.
+
+### String get separator
+
+Gets the path separator for the builder's [style]. On Mac and Linux,
+this is `/`. On Windows, it's `\`.
+
+### String rootPrefix(String path)
+
+Returns the root of [path], if it's absolute, or an empty string if it's
+relative.
+
+ // Unix
+ builder.rootPrefix('path/to/foo'); // -> ''
+ builder.rootPrefix('/path/to/foo'); // -> '/'
+
+ // Windows
+ builder.rootPrefix(r'path\to\foo'); // -> ''
+ builder.rootPrefix(r'C:\path\to\foo'); // -> r'C:\'
+
+### String resolve(String part1, [String part2, String part3, ...])
+
+Creates a new path by appending the given path parts to the [root].
+Equivalent to [join()] with [root] as the first argument. Example:
+
+ var builder = new Builder(root: 'root');
+ builder.resolve('path', 'to', 'foo'); // -> 'root/path/to/foo'
+
+## The path.Style class
+
+The path library can work with two different "flavors" of path: POSIX and
+Windows. The differences between these are encapsulated by the `path.Style`
+enum class. There are two instances of it:
+
+### path.Style.posix
+
+POSIX-style paths use "/" (forward slash) as separators. Absolute paths
+start with "/". Used by UNIX, Linux, Mac OS X, and others.
+
+### path.Style.windows
+
+Windows paths use "\" (backslash) as separators. Absolute paths start with
+a drive letter followed by a colon (example, "C:") or two backslashes
+("\\") for UNC paths.
+
+## FAQ
+
+### Where can I use this?
+
+Currently, Dart has no way of encapsulating configuration-specific code.
+Ideally, this library would be able to import dart:io when that's available or
+dart:html when that is. That would let it seamlessly work on both.
+
+Until then, this only works on the standalone VM. It's API is not coupled to
+dart:io, but it uses it internally to determine the current working directory.
+
+### Why doesn't this make paths first-class objects?
+
+When you have path *objects*, then every API that takes a path has to decide if
+it accepts strings, path objects, or both.
+
+ * Accepting strings is the most convenient, but then it seems weird to have
+ these path objects that aren't actually accepted by anything that needs a
+ path. Once you've created a path, you have to always call `.toString()` on
+ it before you can do anything useful with it.
+
+ * Requiring objects forces users to wrap path strings in these objects, which
+ is tedious. It also means coupling that API to whatever library defines this
+ path class. If there are multiple "path" libraries that each define their
+ own path types, then any library that works with paths has to pick which one
+ it uses.
+
+ * Taking both means you can't type your API. That defeats the purpose of
+ having a path type: why have a type if your APIs can't annotate that they
+ use it?
+
+Given that, we've decided this library should simply treat paths as strings.
+
+### How cross-platform is this?
+
+We believe this library handles most of the corner cases of Windows paths
+(POSIX paths are generally pretty straightforward):
+
+ * It understands that *both* "/" and "\" are valid path separators, not just
+ "\".
+
+ * It can accurately tell if a path is absolute based on drive-letters or UNC
+ prefix.
+
+ * It understands that "/foo" is not an absolute path on Windows.
+
+ * It knows that "C:\foo\one.txt" and "c:/foo\two.txt" are two files in the
+ same directory.
+
+If you find a problem, surprise or something that's unclear, please don't
+hesitate to [file a bug](http://dartbug.com/new) and let us know.
diff --git a/pkg/path/lib/path.dart b/pkg/path/lib/path.dart
index f27d558..854d4da 100644
--- a/pkg/path/lib/path.dart
+++ b/pkg/path/lib/path.dart
@@ -31,7 +31,7 @@
///
/// Trailing separators are ignored.
///
-/// builder.dirname('path/to/'); // -> 'to'
+/// builder.basename('path/to/'); // -> 'to'
String basename(String path) => _builder.basename(path);
/// Gets the part of [path] after the last separator, and without any trailing
@@ -41,7 +41,7 @@
///
/// Trailing separators are ignored.
///
-/// builder.dirname('path/to/foo.dart/'); // -> 'foo'
+/// builder.basenameWithoutExtension('path/to/foo.dart/'); // -> 'foo'
String basenameWithoutExtension(String path) =>
_builder.basenameWithoutExtension(path);
@@ -163,6 +163,29 @@
/// withoutExtension('path/to/foo.dart'); // -> 'path/to/foo'
String withoutExtension(String path) => _builder.withoutExtension(path);
+/// Validates that there are no non-null arguments following a null one and
+/// throws an appropriate [ArgumentError] on failure.
+_validateArgList(String method, List<String> args) {
+ for (var i = 1; i < args.length; i++) {
+ // Ignore nulls hanging off the end.
+ if (args[i] == null || args[i - 1] != null) continue;
+
+ var numArgs;
+ for (numArgs = args.length; numArgs >= 1; numArgs--) {
+ if (args[numArgs - 1] != null) break;
+ }
+
+ // Show the arguments.
+ var message = new StringBuffer();
+ message.add("$method(");
+ message.add(args.take(numArgs)
+ .mappedBy((arg) => arg == null ? "null" : '"$arg"')
+ .join(", "));
+ message.add("): part ${i - 1} was null, but part $i was not.");
+ throw new ArgumentError(message.toString());
+ }
+}
+
/// An instantiable class for manipulating paths. Unlike the top-level
/// functions, this lets you explicitly select what platform the paths will use.
class Builder {
@@ -302,12 +325,7 @@
var needsSeparator = false;
var parts = [part1, part2, part3, part4, part5, part6, part7, part8];
- for (var i = 1; i < parts.length; i++) {
- if (parts[i] != null && parts[i - 1] == null) {
- throw new ArgumentError("join(): part ${i - 1} was null, but part $i "
- "was not.");
- }
- }
+ _validateArgList("join", parts);
for (var part in parts) {
if (part == null) continue;
@@ -380,12 +398,6 @@
/// builder.resolve('path', 'to', 'foo'); // -> 'root/path/to/foo'
String resolve(String part1, [String part2, String part3, String part4,
String part5, String part6, String part7]) {
- if (!?part2) return join(root, part1);
- if (!?part3) return join(root, part1, part2);
- if (!?part4) return join(root, part1, part2, part3);
- if (!?part5) return join(root, part1, part2, part3, part4);
- if (!?part6) return join(root, part1, part2, part3, part4, part5);
- if (!?part7) return join(root, part1, part2, part3, part4, part5, part6);
return join(root, part1, part2, part3, part4, part5, part6, part7);
}
diff --git a/pkg/pkg.status b/pkg/pkg.status
index 1a0ad8a..bc2bd16 100644
--- a/pkg/pkg.status
+++ b/pkg/pkg.status
@@ -26,6 +26,7 @@
intl/test/date_time_format_file_even_test: Skip
intl/test/date_time_format_file_odd_test: Skip
intl/test/find_default_locale_standalone_test: Skip
+analyzer-experimental/test/options_test: Skip # Imports dart:io.
[ $runtime == opera && $compiler == dart2js ]
intl/test/find_default_locale_browser_test: Fail
@@ -36,7 +37,7 @@
intl/test/find_default_locale_browser_test: Skip
intl/test/date_time_format_http_request_test: Skip
-[ $runtime == vm && $system == windows ]
+[ $runtime == vm && $system == windows ]
intl/test/find_default_locale_standalone_test: Pass, Fail # Issue 7722
# Skip http request tests on Dartium while resolving an odd
@@ -64,3 +65,15 @@
[ $compiler == none && $runtime == drt ]
dartdoc/test/dartdoc_test: Skip # See dartbug.com/4541.
+
+[ $arch == arm ]
+*: Skip
+
+[ $arch == simarm ]
+*: Skip
+
+[ $arch == mips ]
+*: Skip
+
+[ $arch == simmips ]
+*: Skip
diff --git a/pkg/serialization/lib/serialization.dart b/pkg/serialization/lib/serialization.dart
index 7225476..8a95659 100644
--- a/pkg/serialization/lib/serialization.dart
+++ b/pkg/serialization/lib/serialization.dart
@@ -183,6 +183,7 @@
import 'src/serialization_helpers.dart';
import 'dart:async';
import 'dart:json' as json;
+import 'dart:collection' show Queue;
part 'src/reader_writer.dart';
part 'src/serialization_rule.dart';
diff --git a/pkg/serialization/lib/src/serialization_rule.dart b/pkg/serialization/lib/src/serialization_rule.dart
index 49cd82a..b040796 100644
--- a/pkg/serialization/lib/src/serialization_rule.dart
+++ b/pkg/serialization/lib/src/serialization_rule.dart
@@ -456,4 +456,5 @@
removeRange(x, y) => _throw();
insertRange(x, y, [z]) => _throw();
void set length(x) => _throw();
+ List get reversed => _throw();
}
diff --git a/pkg/serialization/test/serialization_test.dart b/pkg/serialization/test/serialization_test.dart
index c7879eb..73e2e13 100644
--- a/pkg/serialization/test/serialization_test.dart
+++ b/pkg/serialization/test/serialization_test.dart
@@ -129,7 +129,7 @@
});
test('date', () {
- var date = new Date.now();
+ var date = new DateTime.now();
var s = new Serialization()
..addRuleFor(date,
constructorFields : ["year", "month", "day", "hour", "minute",
diff --git a/pkg/unittest/lib/compact_vm_config.dart b/pkg/unittest/lib/compact_vm_config.dart
index 0b64cfd..cb21d4d 100644
--- a/pkg/unittest/lib/compact_vm_config.dart
+++ b/pkg/unittest/lib/compact_vm_config.dart
@@ -20,7 +20,7 @@
const int MAX_LINE = 80;
class CompactVMConfiguration extends VMConfiguration {
- Date _start;
+ DateTime _start;
int _pass = 0;
int _fail = 0;
@@ -30,7 +30,7 @@
void onStart() {
super.onStart();
- _start = new Date.now();
+ _start = new DateTime.now();
}
void onTestStart(TestCase test) {
@@ -84,9 +84,9 @@
final int _nonVisiblePrefix = 1 + _GREEN.length + _NONE.length;
- void _progressLine(Date startTime, int passed, int failed, String message,
+ void _progressLine(DateTime startTime, int passed, int failed, String message,
[String color = _NONE]) {
- var duration = (new Date.now()).difference(startTime);
+ var duration = (new DateTime.now()).difference(startTime);
var buffer = new StringBuffer();
// \r moves back to the beginnig of the current line.
buffer.add('\r${_timeString(duration)} ');
diff --git a/pkg/unittest/lib/html_enhanced_config.dart b/pkg/unittest/lib/html_enhanced_config.dart
index 4efe11e..92ad206 100644
--- a/pkg/unittest/lib/html_enhanced_config.dart
+++ b/pkg/unittest/lib/html_enhanced_config.dart
@@ -10,6 +10,7 @@
*/
library unittest_html_enhanced_config;
+import 'dart:collection' show LinkedHashMap;
import 'dart:html';
import 'unittest.dart';
diff --git a/pkg/unittest/lib/html_layout_config.dart b/pkg/unittest/lib/html_layout_config.dart
index 8d8f578..8a2e1bd 100644
--- a/pkg/unittest/lib/html_layout_config.dart
+++ b/pkg/unittest/lib/html_layout_config.dart
@@ -71,10 +71,10 @@
Window parentWindow;
/** The time at which tests start. */
- Map<int,Date> _testStarts;
+ Map<int,DateTime> _testStarts;
ChildHtmlConfiguration() :
- _testStarts = new Map<int,Date>();
+ _testStarts = new Map<int,DateTime>();
/** Don't start running tests automatically. */
get autoStart => false;
@@ -111,7 +111,7 @@
/** Record the start time of the test. */
void onTestStart(TestCase testCase) {
super.onTestStart(testCase);
- _testStarts[testCase.id]= new Date.now();
+ _testStarts[testCase.id]= new DateTime.now();
}
/**
@@ -124,7 +124,7 @@
if (testCase == null) {
elapsed = -1;
} else {
- Date end = new Date.now();
+ DateTime end = new DateTime.now();
elapsed = end.difference(_testStarts[testCase.id]).inMilliseconds;
}
parentWindow.postMessage(
@@ -138,7 +138,7 @@
*/
void onTestResult(TestCase testCase) {
super.onTestResult(testCase);
- Date end = new Date.now();
+ DateTime end = new DateTime.now();
int elapsed = end.difference(_testStarts[testCase.id]).inMilliseconds;
if (testCase.stackTrace != null) {
parentWindow.postMessage(
@@ -164,7 +164,7 @@
class ParentHtmlConfiguration extends Configuration {
get autoStart => false;
get name => 'ParentHtmlConfiguration';
- Map<int,Date> _testStarts;
+ Map<int,DateTime> _testStarts;
// TODO(rnystrom): Get rid of this if we get canonical closures for methods.
EventListener _onErrorClosure;
@@ -186,7 +186,7 @@
Function _messageHandler;
ParentHtmlConfiguration() :
- _testStarts = new Map<int,Date>();
+ _testStarts = new Map<int,DateTime>();
// We need to block until the test is done, so we make a
// dummy async callback that we will use to flag completion.
@@ -255,7 +255,7 @@
void onTestStart(TestCase testCase) {
var id = testCase.id;
- _testStarts[testCase.id]= new Date.now();
+ _testStarts[testCase.id]= new DateTime.now();
super.onTestStart(testCase);
_stack = null;
}
diff --git a/pkg/unittest/lib/interactive_html_config.dart b/pkg/unittest/lib/interactive_html_config.dart
index 37beabf..3971a9f 100644
--- a/pkg/unittest/lib/interactive_html_config.dart
+++ b/pkg/unittest/lib/interactive_html_config.dart
@@ -85,10 +85,10 @@
Window parentWindow;
/** The time at which tests start. */
- Map<int,Date> _testStarts;
+ Map<int,DateTime> _testStarts;
ChildInteractiveHtmlConfiguration() :
- _testStarts = new Map<int,Date>();
+ _testStarts = new Map<int,DateTime>();
/** Don't start running tests automatically. */
get autoStart => false;
@@ -124,7 +124,7 @@
/** Record the start time of the test. */
void onTestStart(TestCase testCase) {
super.onTestStart(testCase);
- _testStarts[testCase.id]= new Date.now();
+ _testStarts[testCase.id]= new DateTime.now();
}
/**
@@ -137,7 +137,7 @@
if (testCase == null) {
elapsed = -1;
} else {
- Date end = new Date.now();
+ DateTime end = new DateTime.now();
elapsed = end.difference(_testStarts[testCase.id]).inMilliseconds;
}
parentWindow.postMessage(
@@ -151,7 +151,7 @@
*/
void onTestResult(TestCase testCase) {
super.onTestResult(testCase);
- Date end = new Date.now();
+ DateTime end = new DateTime.now();
int elapsed = end.difference(_testStarts[testCase.id]).inMilliseconds;
if (testCase.stackTrace != null) {
parentWindow.postMessage(
@@ -174,7 +174,7 @@
* in new functions that create child IFrames and run the real tests.
*/
class ParentInteractiveHtmlConfiguration extends HtmlConfiguration {
- Map<int,Date> _testStarts;
+ Map<int,DateTime> _testStarts;
/** The stack that was posted back from the child, if any. */
@@ -195,7 +195,7 @@
Function _messageHandler;
ParentInteractiveHtmlConfiguration() :
- _testStarts = new Map<int,Date>();
+ _testStarts = new Map<int,DateTime>();
// We need to block until the test is done, so we make a
// dummy async callback that we will use to flag completion.
@@ -278,7 +278,7 @@
void onTestStart(TestCase testCase) {
var id = testCase.id;
- _testStarts[testCase.id]= new Date.now();
+ _testStarts[testCase.id]= new DateTime.now();
super.onTestStart(testCase);
_stack = null;
// Convert the group name to a DOM id.
diff --git a/pkg/unittest/lib/mock.dart b/pkg/unittest/lib/mock.dart
index d1a98d7..ce65249 100644
--- a/pkg/unittest/lib/mock.dart
+++ b/pkg/unittest/lib/mock.dart
@@ -365,7 +365,7 @@
*/
class LogEntry {
/** The time of the event. */
- Date time;
+ DateTime time;
/** The mock object name, if any. */
final String mockName;
@@ -384,12 +384,12 @@
LogEntry(this.mockName, this.methodName,
this.args, this.action, [this.value]) {
- time = new Date.now();
+ time = new DateTime.now();
}
String _pad2(int val) => (val >= 10 ? '$val' : '0$val');
- String toString([Date baseTime]) {
+ String toString([DateTime baseTime]) {
Description d = new StringDescription();
if (baseTime == null) {
// Show absolute time.
@@ -565,7 +565,7 @@
* then each entry is prefixed with the offset from that time in
* milliseconds; otherwise the time of day is used.
*/
- String toString([Date baseTime]) {
+ String toString([DateTime baseTime]) {
String s = '';
for (var e in logs) {
s = '$s${e.toString(baseTime)}\n';
@@ -663,7 +663,7 @@
* the entries that happened up to [when]; otherwise a new
* list is created.
*/
- LogEntryList after(Date when, [bool inPlace = false]) =>
+ LogEntryList after(DateTime when, [bool inPlace = false]) =>
_tail((e) => e.time > when, inPlace, 'after $when', logs.length);
/**
@@ -672,7 +672,7 @@
* removing the entries that happened before [when]; otherwise
* a new list is created.
*/
- LogEntryList from(Date when, [bool inPlace = false]) =>
+ LogEntryList from(DateTime when, [bool inPlace = false]) =>
_tail((e) => e.time >= when, inPlace, 'from $when', logs.length);
/**
@@ -681,7 +681,7 @@
* the entries that happened after [when]; otherwise a new
* list is created.
*/
- LogEntryList until(Date when, [bool inPlace = false]) =>
+ LogEntryList until(DateTime when, [bool inPlace = false]) =>
_head((e) => e.time > when, inPlace, 'until $when', logs.length);
/**
@@ -690,7 +690,7 @@
* the entries that happened from [when] onwards; otherwise a new
* list is created.
*/
- LogEntryList before(Date when, [bool inPlace = false]) =>
+ LogEntryList before(DateTime when, [bool inPlace = false]) =>
_head((e) => e.time >= when, inPlace, 'before $when', logs.length);
/**
@@ -700,7 +700,7 @@
* list is created. If [logEntry] is null the current time is used.
*/
LogEntryList afterEntry(LogEntry logEntry, [bool inPlace = false]) =>
- after(logEntry == null ? new Date.now() : logEntry.time);
+ after(logEntry == null ? new DateTime.now() : logEntry.time);
/**
* Returns log events that happened from [logEntry]'s time onwards.
@@ -709,7 +709,7 @@
* a new list is created. If [logEntry] is null the current time is used.
*/
LogEntryList fromEntry(LogEntry logEntry, [bool inPlace = false]) =>
- from(logEntry == null ? new Date.now() : logEntry.time);
+ from(logEntry == null ? new DateTime.now() : logEntry.time);
/**
* Returns log events that happened until [logEntry]'s time. If
@@ -719,7 +719,7 @@
*/
LogEntryList untilEntry(LogEntry logEntry, [bool inPlace = false]) =>
until(logEntry == null ?
- new Date.fromMillisecondsSinceEpoch(0) : logEntry.time);
+ new DateTime.fromMillisecondsSinceEpoch(0) : logEntry.time);
/**
* Returns log events that happened before [logEntry]'s time. If
@@ -729,7 +729,7 @@
*/
LogEntryList beforeEntry(LogEntry logEntry, [bool inPlace = false]) =>
before(logEntry == null ?
- new Date.fromMillisecondsSinceEpoch(0) : logEntry.time);
+ new DateTime.fromMillisecondsSinceEpoch(0) : logEntry.time);
/**
* Returns log events that happened after the first event in [segment].
diff --git a/pkg/unittest/lib/src/test_case.dart b/pkg/unittest/lib/src/test_case.dart
index 0b13cb1..d791d37 100644
--- a/pkg/unittest/lib/src/test_case.dart
+++ b/pkg/unittest/lib/src/test_case.dart
@@ -53,7 +53,7 @@
/** The group (or groups) under which this test is running. */
final String currentGroup;
- Date startTime;
+ DateTime startTime;
Duration runningTime;
@@ -78,7 +78,7 @@
_setUp();
}
_config.onTestStart(this);
- startTime = new Date.now();
+ startTime = new DateTime.now();
runningTime = null;
test();
}
@@ -88,7 +88,7 @@
if (runningTime == null) {
// TODO(gram): currently the duration measurement code is blocked
// by issue 4437. When that is fixed replace the line below with:
- // runningTime = new Date.now().difference(startTime);
+ // runningTime = new DateTime.now().difference(startTime);
runningTime = new Duration(milliseconds: 0);
}
if (!_doneTeardown) {
diff --git a/pkg/unittest/test/mock_test.dart b/pkg/unittest/test/mock_test.dart
index 4989a66..181a08a 100644
--- a/pkg/unittest/test/mock_test.dart
+++ b/pkg/unittest/test/mock_test.dart
@@ -24,7 +24,7 @@
makeTestLogEntry(String methodName, List args, int time,
[String mockName]) {
LogEntry e = new LogEntry(mockName, methodName, args, Action.IGNORE);
- e.time = new Date.fromMillisecondsSinceEpoch(time, isUtc: true);
+ e.time = new DateTime.fromMillisecondsSinceEpoch(time, isUtc: true);
return e;
}
@@ -220,11 +220,11 @@
test('Mocking: from,after,before,until', () {
LogEntryList logList = makeTestLog();
LogEntryList log2;
- Date t0 = new Date.fromMillisecondsSinceEpoch(0, isUtc: true);
- Date t1000 = new Date.fromMillisecondsSinceEpoch(1000, isUtc: true);
- Date t2000 = new Date.fromMillisecondsSinceEpoch(2000, isUtc: true);
- Date t3000 = new Date.fromMillisecondsSinceEpoch(3000, isUtc: true);
- Date t4000 = new Date.fromMillisecondsSinceEpoch(4000, isUtc: true);
+ DateTime t0 = new DateTime.fromMillisecondsSinceEpoch(0, isUtc: true);
+ DateTime t1000 = new DateTime.fromMillisecondsSinceEpoch(1000, isUtc: true);
+ DateTime t2000 = new DateTime.fromMillisecondsSinceEpoch(2000, isUtc: true);
+ DateTime t3000 = new DateTime.fromMillisecondsSinceEpoch(3000, isUtc: true);
+ DateTime t4000 = new DateTime.fromMillisecondsSinceEpoch(4000, isUtc: true);
log2 = logList.before(t0);
expect(log2.logs, hasLength(0));
@@ -306,11 +306,11 @@
});
test('Mocking: inplace from,after,before,until', () {
- Date t0 = new Date.fromMillisecondsSinceEpoch(0, isUtc: true);
- Date t1000 = new Date.fromMillisecondsSinceEpoch(1000, isUtc: true);
- Date t2000 = new Date.fromMillisecondsSinceEpoch(2000, isUtc: true);
- Date t3000 = new Date.fromMillisecondsSinceEpoch(3000, isUtc: true);
- Date t4000 = new Date.fromMillisecondsSinceEpoch(4000, isUtc: true);
+ DateTime t0 = new DateTime.fromMillisecondsSinceEpoch(0, isUtc: true);
+ DateTime t1000 = new DateTime.fromMillisecondsSinceEpoch(1000, isUtc: true);
+ DateTime t2000 = new DateTime.fromMillisecondsSinceEpoch(2000, isUtc: true);
+ DateTime t3000 = new DateTime.fromMillisecondsSinceEpoch(3000, isUtc: true);
+ DateTime t4000 = new DateTime.fromMillisecondsSinceEpoch(4000, isUtc: true);
LogEntryList logList = makeTestLog().before(t0, true);
expect(logList.logs, hasLength(0));
diff --git a/runtime/bin/builtin.dart b/runtime/bin/builtin.dart
index f84a50f..5eb32ad 100644
--- a/runtime/bin/builtin.dart
+++ b/runtime/bin/builtin.dart
@@ -68,10 +68,10 @@
}
String _resolveUri(String base, String userString) {
- var baseUri = new Uri.fromString(base);
+ var baseUri = Uri.parse(base);
_logResolution("# Resolving: $userString from $base");
- var uri = new Uri.fromString(userString);
+ var uri = Uri.parse(userString);
var resolved;
if ('dart-ext' == uri.scheme) {
// Relative URIs with scheme dart-ext should be resolved as if with no
@@ -94,7 +94,7 @@
String _filePathFromUri(String userUri, bool isWindows) {
- var uri = new Uri.fromString(userUri);
+ var uri = Uri.parse(userUri);
_logResolution("# Getting file path from: $uri");
var path;
diff --git a/runtime/bin/dartutils.cc b/runtime/bin/dartutils.cc
index d3fb037..5269d6d 100644
--- a/runtime/bin/dartutils.cc
+++ b/runtime/bin/dartutils.cc
@@ -306,23 +306,27 @@
return ResolveUri(library_url, url, builtin_lib);
}
if (is_dart_scheme_url) {
- ASSERT(tag == kImportTag);
- // Handle imports of other built-in libraries present in the SDK.
- Builtin::BuiltinLibraryId id;
- if (DartUtils::IsDartCryptoLibURL(url_string)) {
- id = Builtin::kCryptoLibrary;
- } else if (DartUtils::IsDartIOLibURL(url_string)) {
- id = Builtin::kIOLibrary;
- } else if (DartUtils::IsDartJsonLibURL(url_string)) {
- id = Builtin::kJsonLibrary;
- } else if (DartUtils::IsDartUriLibURL(url_string)) {
- id = Builtin::kUriLibrary;
- } else if (DartUtils::IsDartUtfLibURL(url_string)) {
- id = Builtin::kUtfLibrary;
+ if (tag == kImportTag) {
+ // Handle imports of other built-in libraries present in the SDK.
+ Builtin::BuiltinLibraryId id;
+ if (DartUtils::IsDartCryptoLibURL(url_string)) {
+ id = Builtin::kCryptoLibrary;
+ } else if (DartUtils::IsDartIOLibURL(url_string)) {
+ id = Builtin::kIOLibrary;
+ } else if (DartUtils::IsDartJsonLibURL(url_string)) {
+ id = Builtin::kJsonLibrary;
+ } else if (DartUtils::IsDartUriLibURL(url_string)) {
+ id = Builtin::kUriLibrary;
+ } else if (DartUtils::IsDartUtfLibURL(url_string)) {
+ id = Builtin::kUtfLibrary;
+ } else {
+ return Dart_Error("Do not know how to load '%s'", url_string);
+ }
+ return Builtin::LoadAndCheckLibrary(id);
} else {
- return Dart_Error("Do not know how to load '%s'", url_string);
+ ASSERT(tag == kSourceTag);
+ return Dart_Error("Unable to load source '%s' ", url_string);
}
- return Builtin::LoadAndCheckLibrary(id);
} else {
// Get the file path out of the url.
Dart_Handle builtin_lib =
diff --git a/runtime/bin/dbg_connection.cc b/runtime/bin/dbg_connection.cc
index b6f261f..25d465d 100644
--- a/runtime/bin/dbg_connection.cc
+++ b/runtime/bin/dbg_connection.cc
@@ -140,7 +140,7 @@
static bool IsValidJSON(const char* msg) {
dart::JSONReader r(msg);
- return r.EndOfObject() != NULL;
+ return r.CheckMessage();
}
diff --git a/runtime/bin/dbg_message.cc b/runtime/bin/dbg_message.cc
index 112cf96..0097225 100644
--- a/runtime/bin/dbg_message.cc
+++ b/runtime/bin/dbg_message.cc
@@ -105,7 +105,31 @@
}
-static void FormatEncodedString(dart::TextBuffer* buf, Dart_Handle str) {
+static void FormatEncodedCharsTrunc(dart::TextBuffer* buf,
+ Dart_Handle str,
+ intptr_t max_chars) {
+ intptr_t str_len = 0;
+ Dart_Handle res = Dart_StringLength(str, &str_len);
+ ASSERT_NOT_ERROR(res);
+ intptr_t num_chars = (str_len > max_chars) ? max_chars : str_len;
+ uint16_t* codepoints =
+ reinterpret_cast<uint16_t*>(malloc(num_chars * sizeof(uint16_t)));
+ ASSERT(codepoints != NULL);
+ intptr_t actual_len = num_chars;
+ res = Dart_StringToUTF16(str, codepoints, &actual_len);
+ ASSERT_NOT_ERROR(res);
+ ASSERT(num_chars == actual_len);
+ for (int i = 0; i < num_chars; i++) {
+ buf->AddEscapedChar(codepoints[i]);
+ }
+ if (str_len > max_chars) {
+ buf->Printf("...");
+ }
+ free(codepoints);
+}
+
+
+static void FormatEncodedChars(dart::TextBuffer* buf, Dart_Handle str) {
intptr_t str_len = 0;
Dart_Handle res = Dart_StringLength(str, &str_len);
ASSERT_NOT_ERROR(res);
@@ -116,51 +140,71 @@
res = Dart_StringToUTF16(str, codepoints, &actual_len);
ASSERT_NOT_ERROR(res);
ASSERT(str_len == actual_len);
- buf->AddChar('\"');
for (int i = 0; i < str_len; i++) {
buf->AddEscapedChar(codepoints[i]);
}
- buf->AddChar('\"');
free(codepoints);
}
-static void FormatErrorMsg(dart::TextBuffer* buf, Dart_Handle err) {
- ASSERT(Dart_IsError(err));
- const char* msg = Dart_GetError(err);
- Dart_Handle str = Dart_NewStringFromCString(msg);
- FormatEncodedString(buf, str);
+static void FormatEncodedString(dart::TextBuffer* buf, Dart_Handle str) {
+ buf->AddChar('\"');
+ FormatEncodedChars(buf, str);
+ buf->AddChar('\"');
}
-static void FormatTextualValue(dart::TextBuffer* buf, Dart_Handle object) {
- Dart_Handle text;
- if (Dart_IsNull(object)) {
- text = Dart_Null();
- } else {
- Dart_ExceptionPauseInfo savedState = Dart_GetExceptionPauseInfo();
+static void FormatTextualValue(dart::TextBuffer* buf,
+ Dart_Handle object,
+ intptr_t max_chars);
- // TODO(hausner): Check whether recursive/reentrant pauses on exceptions
- // should be prevented in Debugger::SignalExceptionThrown() instead.
- if (savedState != kNoPauseOnExceptions) {
- Dart_Handle res = Dart_SetExceptionPauseInfo(kNoPauseOnExceptions);
- ASSERT_NOT_ERROR(res);
+
+static void FormatTextualListValue(dart::TextBuffer* buf,
+ Dart_Handle list,
+ intptr_t max_chars) {
+ intptr_t len = 0;
+ Dart_Handle res = Dart_ListLength(list, &len);
+ ASSERT_NOT_ERROR(res);
+ const intptr_t initial_buffer_length = buf->length();
+ // Maximum number of characters we print for array elements.
+ const intptr_t max_buffer_length = initial_buffer_length + max_chars;
+ buf->Printf("[");
+ for (int i = 0; i < len; i++) {
+ if (i > 0) {
+ buf->Printf(", ");
}
-
- text = Dart_ToString(object);
-
- if (savedState != kNoPauseOnExceptions) {
- Dart_Handle res = Dart_SetExceptionPauseInfo(savedState);
- ASSERT_NOT_ERROR(res);
+ Dart_Handle elem = Dart_ListGetAt(list, i);
+ const intptr_t max_element_chars = 50;
+ FormatTextualValue(buf, elem, max_element_chars);
+ if (buf->length() > max_buffer_length) {
+ buf->Printf(", ...");
+ break;
}
}
- buf->Printf("\"text\":");
- if (Dart_IsNull(text)) {
+ buf->Printf("]");
+}
+
+
+static void FormatTextualValue(dart::TextBuffer* buf,
+ Dart_Handle object,
+ intptr_t max_chars) {
+ if (Dart_IsList(object)) {
+ FormatTextualListValue(buf, object, max_chars);
+ } else if (Dart_IsNull(object)) {
buf->Printf("null");
- } else if (Dart_IsError(text)) {
- FormatErrorMsg(buf, text);
+ } else if (Dart_IsString(object)) {
+ buf->Printf("\\\"");
+ FormatEncodedCharsTrunc(buf, object, max_chars);
+ buf->Printf("\\\"");
} else {
- FormatEncodedString(buf, text);
+ Dart_Handle text = Dart_ToString(object);
+ if (Dart_IsNull(text)) {
+ buf->Printf("null");
+ } else if (Dart_IsError(text)) {
+ buf->Printf("#ERROR");
+ } else {
+ FormatEncodedCharsTrunc(buf, text, max_chars);
+ }
}
}
@@ -180,7 +224,10 @@
} else {
buf->Printf("\"kind\":\"object\",");
}
- FormatTextualValue(buf, object);
+ buf->Printf("\"text\":\"");
+ const intptr_t max_chars = 250;
+ FormatTextualValue(buf, object, max_chars);
+ buf->Printf("\"");
}
diff --git a/runtime/bin/io.dart b/runtime/bin/io.dart
index 8feca0e..9faff4e 100644
--- a/runtime/bin/io.dart
+++ b/runtime/bin/io.dart
@@ -8,6 +8,7 @@
#library("dart:io");
#import("dart:async");
+#import("dart:collection");
#import("dart:crypto");
#import("dart:isolate");
#import("dart:math");
diff --git a/runtime/bin/main.cc b/runtime/bin/main.cc
index 35e68e3..1adb208 100644
--- a/runtime/bin/main.cc
+++ b/runtime/bin/main.cc
@@ -545,9 +545,7 @@
function_name = DartUtils::NewString(dot + 1);
}
free(bpt_function);
- Dart_Breakpoint bpt;
- result = Dart_SetBreakpointAtEntry(
- library, class_name, function_name, &bpt);
+ result = Dart_OneTimeBreakAtEntry(library, class_name, function_name);
}
return result;
}
diff --git a/runtime/bin/secure_socket.cc b/runtime/bin/secure_socket.cc
index dfa46fd..603a4c0 100644
--- a/runtime/bin/secure_socket.cc
+++ b/runtime/bin/secure_socket.cc
@@ -244,7 +244,7 @@
Dart_Handle end_epoch_ms_int = Dart_NewInteger(end_epoch_ms);
Dart_Handle date_class =
- DartUtils::GetDartClass(DartUtils::kCoreLibURL, "Date");
+ DartUtils::GetDartClass(DartUtils::kCoreLibURL, "DateTime");
Dart_Handle from_milliseconds =
DartUtils::NewString("fromMillisecondsSinceEpoch");
diff --git a/runtime/include/dart_debugger_api.h b/runtime/include/dart_debugger_api.h
index f21485f..09033c6 100755
--- a/runtime/include/dart_debugger_api.h
+++ b/runtime/include/dart_debugger_api.h
@@ -222,9 +222,9 @@
/**
- * Sets a breakpoint at the entry of the given function. If class_name
- * is the empty string, looks for a library function with the given
- * name.
+ * Sets a one-time breakpoint at the entry of the given function.
+ * If class_name is the empty string, looks for a library function
+ * with the given name.
*
* Requires there to be a current isolate.
*
@@ -241,6 +241,21 @@
/**
+ * Sets a breakpoint at the entry of the given function. If class_name
+ * is the empty string, looks for a library function with the given
+ * name.
+ *
+ * Requires there to be a current isolate.
+ *
+ * \return A handle to the True object if no error occurs.
+ */
+DART_EXPORT Dart_Handle Dart_OneTimeBreakAtEntry(
+ Dart_Handle library,
+ Dart_Handle class_name,
+ Dart_Handle function_name);
+
+
+/**
* DEPRECATED -- use Dart_RemoveBreakpoint instead.
*
* Deletes the given \breakpoint.
diff --git a/runtime/lib/array.dart b/runtime/lib/array.dart
index d7fac3a..e7c4bee 100644
--- a/runtime/lib/array.dart
+++ b/runtime/lib/array.dart
@@ -154,6 +154,8 @@
return this.length == 0;
}
+ List<E> get reversed => new ReversedListView<E>(this, 0, null);
+
void sort([int compare(E a, E b)]) {
IterableMixinWorkaround.sortList(this, compare);
}
@@ -382,6 +384,8 @@
return this.length == 0;
}
+ List<E> get reversed => new ReversedListView<E>(this, 0, null);
+
void sort([int compare(E a, E b)]) {
throw new UnsupportedError(
"Cannot modify an immutable array");
diff --git a/runtime/lib/byte_array.cc b/runtime/lib/byte_array.cc
index f34c56b..361c883 100644
--- a/runtime/lib/byte_array.cc
+++ b/runtime/lib/byte_array.cc
@@ -22,7 +22,7 @@
if (!Utils::RangeCheck(index, num_bytes, array.ByteLength())) {
const String& error = String::Handle(String::NewFormatted(
"index (%"Pd") must be in the range [0..%"Pd")",
- index, (array.ByteLength() / num_bytes)));
+ (index / num_bytes), (array.ByteLength() / num_bytes)));
const Array& args = Array::Handle(Array::New(1));
args.SetAt(0, error);
Exceptions::ThrowByType(Exceptions::kRange, args);
@@ -86,6 +86,23 @@
return Integer::New(index.Value() + sizeof(ValueT));
+#define SCALED_UNALIGNED_GETTER(ArrayT, ObjectT, ValueT) \
+ GETTER_ARGUMENTS(ArrayT, ValueT); \
+ RangeCheck(array, index.Value() * sizeof(ValueT), sizeof(ValueT)); \
+ ValueT result; \
+ ByteArray::Copy(&result, array, \
+ index.Value() * sizeof(ValueT), sizeof(ValueT)); \
+ return ObjectT::New(result);
+
+
+#define SCALED_UNALIGNED_SETTER(ArrayT, ObjectT, Getter, ValueT) \
+ SETTER_ARGUMENTS(ArrayT, ObjectT, ValueT); \
+ RangeCheck(array, index.Value() * sizeof(ValueT), sizeof(ValueT)); \
+ ValueT src = value_object.Getter(); \
+ ByteArray::Copy(array, index.Value() * sizeof(ValueT), &src, sizeof(ValueT));\
+ return Integer::New(index.Value() + sizeof(ValueT));
+
+
#define UINT64_TO_INTEGER(value, integer) \
if (value > static_cast<uint64_t>(Mint::kMaxValue)) { \
result = BigintOperations::NewFromUint64(value); \
@@ -118,8 +135,7 @@
#define INTEGER_TO_UINT64(integer, uint64) \
if (integer.IsBigint()) { \
- Bigint& bigint = Bigint::Handle(); \
- bigint |= integer.raw(); \
+ const Bigint& bigint = Bigint::Cast(integer); \
ASSERT(BigintOperations::FitsIntoUint64(bigint)); \
value = BigintOperations::AbsToUint64(bigint); \
} else { \
@@ -286,7 +302,7 @@
}
-DEFINE_NATIVE_ENTRY(Int8Array_newTransferable, 1) {
+DEFINE_NATIVE_ENTRY(Int8List_newTransferable, 1) {
GET_NON_NULL_NATIVE_ARGUMENT(Smi, length, arguments->NativeArgAt(0));
intptr_t len = length.Value();
LengthCheck(len, Int8Array::kMaxElements);
@@ -320,7 +336,7 @@
}
-DEFINE_NATIVE_ENTRY(Uint8Array_newTransferable, 1) {
+DEFINE_NATIVE_ENTRY(Uint8List_newTransferable, 1) {
GET_NON_NULL_NATIVE_ARGUMENT(Smi, length, arguments->NativeArgAt(0));
intptr_t len = length.Value();
LengthCheck(len, Uint8Array::kMaxElements);
@@ -354,7 +370,7 @@
}
-DEFINE_NATIVE_ENTRY(Uint8ClampedArray_newTransferable, 1) {
+DEFINE_NATIVE_ENTRY(Uint8ClampedList_newTransferable, 1) {
GET_NON_NULL_NATIVE_ARGUMENT(Smi, length, arguments->NativeArgAt(0));
intptr_t len = length.Value();
LengthCheck(len, Uint8ClampedArray::kMaxElements);
@@ -388,7 +404,7 @@
}
-DEFINE_NATIVE_ENTRY(Int16Array_newTransferable, 1) {
+DEFINE_NATIVE_ENTRY(Int16List_newTransferable, 1) {
GET_NON_NULL_NATIVE_ARGUMENT(Smi, length, arguments->NativeArgAt(0));
intptr_t len = length.Value();
LengthCheck(len, Int16Array::kMaxElements);
@@ -422,7 +438,7 @@
}
-DEFINE_NATIVE_ENTRY(Uint16Array_newTransferable, 1) {
+DEFINE_NATIVE_ENTRY(Uint16List_newTransferable, 1) {
GET_NON_NULL_NATIVE_ARGUMENT(Smi, length, arguments->NativeArgAt(0));
intptr_t len = length.Value();
LengthCheck(len, Uint16Array::kMaxElements);
@@ -456,7 +472,7 @@
}
-DEFINE_NATIVE_ENTRY(Int32Array_newTransferable, 1) {
+DEFINE_NATIVE_ENTRY(Int32List_newTransferable, 1) {
GET_NON_NULL_NATIVE_ARGUMENT(Smi, length, arguments->NativeArgAt(0));
intptr_t len = length.Value();
LengthCheck(len, Int32Array::kMaxElements);
@@ -490,7 +506,7 @@
}
-DEFINE_NATIVE_ENTRY(Uint32Array_newTransferable, 1) {
+DEFINE_NATIVE_ENTRY(Uint32List_newTransferable, 1) {
GET_NON_NULL_NATIVE_ARGUMENT(Smi, length, arguments->NativeArgAt(0));
intptr_t len = length.Value();
LengthCheck(len, Uint32Array::kMaxElements);
@@ -524,7 +540,7 @@
}
-DEFINE_NATIVE_ENTRY(Int64Array_newTransferable, 1) {
+DEFINE_NATIVE_ENTRY(Int64List_newTransferable, 1) {
GET_NON_NULL_NATIVE_ARGUMENT(Smi, length, arguments->NativeArgAt(0));
intptr_t len = length.Value();
LengthCheck(len, Int64Array::kMaxElements);
@@ -558,7 +574,7 @@
}
-DEFINE_NATIVE_ENTRY(Uint64Array_newTransferable, 1) {
+DEFINE_NATIVE_ENTRY(Uint64List_newTransferable, 1) {
GET_NON_NULL_NATIVE_ARGUMENT(Smi, length, arguments->NativeArgAt(0));
intptr_t len = length.Value();
LengthCheck(len, Uint64Array::kMaxElements);
@@ -592,7 +608,7 @@
}
-DEFINE_NATIVE_ENTRY(Float32Array_newTransferable, 1) {
+DEFINE_NATIVE_ENTRY(Float32List_newTransferable, 1) {
GET_NON_NULL_NATIVE_ARGUMENT(Smi, length, arguments->NativeArgAt(0));
intptr_t len = length.Value();
LengthCheck(len, Float32Array::kMaxElements);
@@ -626,7 +642,7 @@
}
-DEFINE_NATIVE_ENTRY(Float64Array_newTransferable, 1) {
+DEFINE_NATIVE_ENTRY(Float64List_newTransferable, 1) {
GET_NON_NULL_NATIVE_ARGUMENT(Smi, length, arguments->NativeArgAt(0));
intptr_t len = length.Value();
LengthCheck(len, Float64Array::kMaxElements);
@@ -665,24 +681,24 @@
// ExternalUint8Array
DEFINE_NATIVE_ENTRY(ExternalUint8Array_getIndexed, 2) {
- UNALIGNED_GETTER(ExternalUint8Array, Smi, uint8_t);
+ SCALED_UNALIGNED_GETTER(ExternalUint8Array, Smi, uint8_t);
}
DEFINE_NATIVE_ENTRY(ExternalUint8Array_setIndexed, 3) {
- UNALIGNED_SETTER(ExternalUint8Array, Smi, Value, uint8_t);
+ SCALED_UNALIGNED_SETTER(ExternalUint8Array, Smi, Value, uint8_t);
}
// ExternalUint8ClampedArray
DEFINE_NATIVE_ENTRY(ExternalUint8ClampedArray_getIndexed, 2) {
- UNALIGNED_GETTER(ExternalUint8ClampedArray, Smi, uint8_t);
+ SCALED_UNALIGNED_GETTER(ExternalUint8ClampedArray, Smi, uint8_t);
}
DEFINE_NATIVE_ENTRY(ExternalUint8ClampedArray_setIndexed, 3) {
- UNALIGNED_SETTER(ExternalUint8ClampedArray, Smi, Value, uint8_t);
+ SCALED_UNALIGNED_SETTER(ExternalUint8ClampedArray, Smi, Value, uint8_t);
}
@@ -701,12 +717,12 @@
// ExternalUint16Array
DEFINE_NATIVE_ENTRY(ExternalUint16Array_getIndexed, 2) {
- UNALIGNED_GETTER(ExternalUint16Array, Smi, uint16_t);
+ SCALED_UNALIGNED_GETTER(ExternalUint16Array, Smi, uint16_t);
}
DEFINE_NATIVE_ENTRY(ExternalUint16Array_setIndexed, 3) {
- UNALIGNED_SETTER(ExternalUint16Array, Smi, Value, uint16_t);
+ SCALED_UNALIGNED_SETTER(ExternalUint16Array, Smi, Value, uint16_t);
}
@@ -725,12 +741,12 @@
// ExternalUint32Array
DEFINE_NATIVE_ENTRY(ExternalUint32Array_getIndexed, 2) {
- UNALIGNED_GETTER(ExternalUint32Array, Integer, uint32_t);
+ SCALED_UNALIGNED_GETTER(ExternalUint32Array, Integer, uint32_t);
}
DEFINE_NATIVE_ENTRY(ExternalUint32Array_setIndexed, 3) {
- UNALIGNED_SETTER(ExternalUint32Array, Integer, AsInt64Value, uint32_t);
+ SCALED_UNALIGNED_SETTER(ExternalUint32Array, Integer, AsInt64Value, uint32_t);
}
diff --git a/runtime/lib/byte_array.dart b/runtime/lib/byte_array.dart
index 941d818..9794eba4c 100644
--- a/runtime/lib/byte_array.dart
+++ b/runtime/lib/byte_array.dart
@@ -8,13 +8,16 @@
}
/* patch */ factory Int8List.transferable(int length) {
- return new _Int8Array.transferable(length);
+ return _newTransferable(length);
}
/* patch */ factory Int8List.view(ByteArray array,
[int start = 0, int length]) {
return new _Int8ArrayView(array, start, length);
}
+
+ static _ExternalInt8Array _newTransferable(int length)
+ native "Int8List_newTransferable";
}
@@ -24,13 +27,16 @@
}
/* patch */ factory Uint8List.transferable(int length) {
- return new _Uint8Array.transferable(length);
+ return _newTransferable(length);
}
/* patch */ factory Uint8List.view(ByteArray array,
[int start = 0, int length]) {
return new _Uint8ArrayView(array, start, length);
}
+
+ static _ExternalUint8Array _newTransferable(int length)
+ native "Uint8List_newTransferable";
}
@@ -40,13 +46,16 @@
}
/* patch */ factory Uint8ClampedList.transferable(int length) {
- return new _Uint8ClampedArray.transferable(length);
+ return _newTransferable(length);
}
/* patch */ factory Uint8ClampedList.view(ByteArray array,
[int start = 0, int length]) {
return new _Uint8ClampedArrayView(array, start, length);
}
+
+ static _ExternalUint8ClampedArray _newTransferable(int length)
+ native "Uint8ClampedList_newTransferable";
}
@@ -56,13 +65,16 @@
}
/* patch */ factory Int16List.transferable(int length) {
- return new _Int16Array.transferable(length);
+ return _newTransferable(length);
}
/* patch */ factory Int16List.view(ByteArray array,
[int start = 0, int length]) {
return new _Int16ArrayView(array, start, length);
}
+
+ static _ExternalInt16Array _newTransferable(int length)
+ native "Int16List_newTransferable";
}
@@ -72,13 +84,16 @@
}
/* patch */ factory Uint16List.transferable(int length) {
- return new _Uint16Array.transferable(length);
+ return _newTransferable(length);
}
/* patch */ factory Uint16List.view(ByteArray array,
[int start = 0, int length]) {
return new _Uint16ArrayView(array, start, length);
}
+
+ static _ExternalUint16Array _newTransferable(int length)
+ native "Uint16List_newTransferable";
}
@@ -88,13 +103,16 @@
}
/* patch */ factory Int32List.transferable(int length) {
- return new _Int32Array.transferable(length);
+ return _newTransferable(length);
}
/* patch */ factory Int32List.view(ByteArray array,
[int start = 0, int length]) {
return new _Int32ArrayView(array, start, length);
}
+
+ static _ExternalInt32Array _newTransferable(int length)
+ native "Int32List_newTransferable";
}
@@ -104,13 +122,16 @@
}
/* patch */ factory Uint32List.transferable(int length) {
- return new _Uint32Array.transferable(length);
+ return _newTransferable(length);
}
/* patch */ factory Uint32List.view(ByteArray array,
[int start = 0, int length]) {
return new _Uint32ArrayView(array, start, length);
}
+
+ static _ExternalUint32Array _newTransferable(int length)
+ native "Uint32List_newTransferable";
}
@@ -120,13 +141,16 @@
}
/* patch */ factory Int64List.transferable(int length) {
- return new _Int64Array.transferable(length);
+ return _newTransferable(length);
}
/* patch */ factory Int64List.view(ByteArray array,
[int start = 0, int length]) {
return new _Int64ArrayView(array, start, length);
}
+
+ static _ExternalInt64Array _newTransferable(int length)
+ native "Int64List_newTransferable";
}
@@ -136,13 +160,16 @@
}
/* patch */ factory Uint64List.transferable(int length) {
- return new _Uint64Array.transferable(length);
+ return _newTransferable(length);
}
/* patch */ factory Uint64List.view(ByteArray array,
[int start = 0, int length]) {
return new _Uint64ArrayView(array, start, length);
}
+
+ static _ExternalUint64Array _newTransferable(int length)
+ native "Uint64List_newTransferable";
}
@@ -152,13 +179,16 @@
}
/* patch */ factory Float32List.transferable(int length) {
- return new _Float32Array.transferable(length);
+ return _newTransferable(length);
}
/* patch */ factory Float32List.view(ByteArray array,
[int start = 0, int length]) {
return new _Float32ArrayView(array, start, length);
}
+
+ static _ExternalFloat32Array _newTransferable(int length)
+ native "Float32List_newTransferable";
}
@@ -168,13 +198,16 @@
}
/* patch */ factory Float64List.transferable(int length) {
- return new _Float64Array.transferable(length);
+ return _newTransferable(length);
}
/* patch */ factory Float64List.view(ByteArray array,
[int start = 0, int length]) {
return new _Float64ArrayView(array, start, length);
}
+
+ static _ExternalFloat64Array _newTransferable(int length)
+ native "Float64List_newTransferable";
}
@@ -497,10 +530,6 @@
return _new(length);
}
- factory _Int8Array.transferable(int length) {
- return _newTransferable(length);
- }
-
factory _Int8Array.view(ByteArray array, [int start = 0, int length]) {
if (length == null) {
length = array.lengthInBytes();
@@ -553,8 +582,6 @@
static const int _BYTES_PER_ELEMENT = 1;
static _Int8Array _new(int length) native "Int8Array_new";
- static _Int8Array _newTransferable(int length)
- native "Int8Array_newTransferable";
int _getIndexed(int index) native "Int8Array_getIndexed";
int _setIndexed(int index, int value) native "Int8Array_setIndexed";
@@ -566,10 +593,6 @@
return _new(length);
}
- factory _Uint8Array.transferable(int length) {
- return _newTransferable(length);
- }
-
factory _Uint8Array.view(ByteArray array, [int start = 0, int length]) {
if (length == null) {
length = array.lengthInBytes();
@@ -623,8 +646,6 @@
static const int _BYTES_PER_ELEMENT = 1;
static _Uint8Array _new(int length) native "Uint8Array_new";
- static _Uint8Array _newTransferable(int length)
- native "Uint8Array_newTransferable";
int _getIndexed(int index) native "Uint8Array_getIndexed";
int _setIndexed(int index, int value) native "Uint8Array_setIndexed";
@@ -636,10 +657,6 @@
return _new(length);
}
- factory _Uint8ClampedArray.transferable(int length) {
- return _newTransferable(length);
- }
-
factory _Uint8ClampedArray.view(ByteArray array,
[int start = 0, int length]) {
if (length == null) {
@@ -694,8 +711,6 @@
static const int _BYTES_PER_ELEMENT = 1;
static _Uint8ClampedArray _new(int length) native "Uint8ClampedArray_new";
- static _Uint8ClampedArray _newTransferable(int length)
- native "Uint8ClampedArray_newTransferable";
int _getIndexed(int index) native "Uint8ClampedArray_getIndexed";
int _setIndexed(int index, int value) native "Uint8ClampedArray_setIndexed";
@@ -707,10 +722,6 @@
return _new(length);
}
- factory _Int16Array.transferable(int length) {
- return _newTransferable(length);
- }
-
factory _Int16Array.view(ByteArray array, [int start = 0, int length]) {
if (length == null) {
length = (array.lengthInBytes() - start) ~/ _BYTES_PER_ELEMENT;
@@ -763,8 +774,6 @@
static const int _BYTES_PER_ELEMENT = 2;
static _Int16Array _new(int length) native "Int16Array_new";
- static _Int16Array _newTransferable(int length)
- native "Int16Array_newTransferable";
int _getIndexed(int index) native "Int16Array_getIndexed";
int _setIndexed(int index, int value) native "Int16Array_setIndexed";
@@ -776,10 +785,6 @@
return _new(length);
}
- factory _Uint16Array.transferable(int length) {
- return _newTransferable(length);
- }
-
factory _Uint16Array.view(ByteArray array, [int start = 0, int length]) {
if (length == null) {
length = (array.lengthInBytes() - start) ~/ _BYTES_PER_ELEMENT;
@@ -832,8 +837,6 @@
static const int _BYTES_PER_ELEMENT = 2;
static _Uint16Array _new(int length) native "Uint16Array_new";
- static _Uint16Array _newTransferable(int length)
- native "Uint16Array_newTransferable";
int _getIndexed(int index) native "Uint16Array_getIndexed";
int _setIndexed(int index, int value) native "Uint16Array_setIndexed";
@@ -845,10 +848,6 @@
return _new(length);
}
- factory _Int32Array.transferable(int length) {
- return _newTransferable(length);
- }
-
factory _Int32Array.view(ByteArray array, [int start = 0, int length]) {
if (length == null) {
length = (array.lengthInBytes() - start) ~/ _BYTES_PER_ELEMENT;
@@ -901,8 +900,6 @@
static const int _BYTES_PER_ELEMENT = 4;
static _Int32Array _new(int length) native "Int32Array_new";
- static _Int32Array _newTransferable(int length)
- native "Int32Array_newTransferable";
int _getIndexed(int index) native "Int32Array_getIndexed";
@@ -915,10 +912,6 @@
return _new(length);
}
- factory _Uint32Array.transferable(int length) {
- return _newTransferable(length);
- }
-
factory _Uint32Array.view(ByteArray array, [int start = 0, int length]) {
if (length == null) {
length = (array.lengthInBytes() - start) ~/ _BYTES_PER_ELEMENT;
@@ -971,8 +964,6 @@
static const int _BYTES_PER_ELEMENT = 4;
static _Uint32Array _new(int length) native "Uint32Array_new";
- static _Uint32Array _newTransferable(int length)
- native "Uint32Array_newTransferable";
int _getIndexed(int index) native "Uint32Array_getIndexed";
int _setIndexed(int index, int value) native "Uint32Array_setIndexed";
@@ -984,10 +975,6 @@
return _new(length);
}
- factory _Int64Array.transferable(int length) {
- return _newTransferable(length);
- }
-
factory _Int64Array.view(ByteArray array, [int start = 0, int length]) {
if (length == null) {
length = (array.lengthInBytes() - start) ~/ _BYTES_PER_ELEMENT;
@@ -1040,8 +1027,6 @@
static const int _BYTES_PER_ELEMENT = 8;
static _Int64Array _new(int length) native "Int64Array_new";
- static _Int64Array _newTransferable(int length)
- native "Int64Array_newTransferable";
int _getIndexed(int index) native "Int64Array_getIndexed";
int _setIndexed(int index, int value) native "Int64Array_setIndexed";
@@ -1053,10 +1038,6 @@
return _new(length);
}
- factory _Uint64Array.transferable(int length) {
- return _newTransferable(length);
- }
-
factory _Uint64Array.view(ByteArray array, [int start = 0, int length]) {
if (length == null) {
length = (array.lengthInBytes() - start) ~/ _BYTES_PER_ELEMENT;
@@ -1109,8 +1090,6 @@
static const int _BYTES_PER_ELEMENT = 8;
static _Uint64Array _new(int length) native "Uint64Array_new";
- static _Uint64Array _newTransferable(int length)
- native "Uint64Array_newTransferable";
int _getIndexed(int index) native "Uint64Array_getIndexed";
int _setIndexed(int index, int value) native "Uint64Array_setIndexed";
@@ -1122,10 +1101,6 @@
return _new(length);
}
- factory _Float32Array.transferable(int length) {
- return _newTransferable(length);
- }
-
factory _Float32Array.view(ByteArray array, [int start = 0, int length]) {
if (length == null) {
length = (array.lengthInBytes() - start) ~/ _BYTES_PER_ELEMENT;
@@ -1178,8 +1153,6 @@
static const int _BYTES_PER_ELEMENT = 4;
static _Float32Array _new(int length) native "Float32Array_new";
- static _Float32Array _newTransferable(int length)
- native "Float32Array_newTransferable";
double _getIndexed(int index) native "Float32Array_getIndexed";
int _setIndexed(int index, double value) native "Float32Array_setIndexed";
@@ -1191,10 +1164,6 @@
return _new(length);
}
- factory _Float64Array.transferable(int length) {
- return _newTransferable(length);
- }
-
factory _Float64Array.view(ByteArray array, [int start = 0, int length]) {
if (length == null) {
length = (array.lengthInBytes() - start) ~/ _BYTES_PER_ELEMENT;
@@ -1247,8 +1216,6 @@
static const int _BYTES_PER_ELEMENT = 8;
static _Float64Array _new(int length) native "Float64Array_new";
- static _Float64Array _newTransferable(int length)
- native "Float64Array_newTransferable";
double _getIndexed(int index) native "Float64Array_getIndexed";
int _setIndexed(int index, double value) native "Float64Array_setIndexed";
diff --git a/runtime/lib/date_patch.dart b/runtime/lib/date_patch.dart
index 349245e..750b60d 100644
--- a/runtime/lib/date_patch.dart
+++ b/runtime/lib/date_patch.dart
@@ -3,16 +3,16 @@
// BSD-style license that can be found in the LICENSE file.
// Dart core library.
-// VM implementation of _DateImpl.
-patch class _DateImpl {
- /* patch */ _DateImpl(int year,
- int month,
- int day,
- int hour,
- int minute,
- int second,
- int millisecond,
- bool isUtc)
+// VM implementation of DateTime.
+patch class DateTime {
+ /* patch */ DateTime._internal(int year,
+ int month,
+ int day,
+ int hour,
+ int minute,
+ int second,
+ int millisecond,
+ bool isUtc)
: this.isUtc = isUtc,
this.millisecondsSinceEpoch = _brokenDownDateToMillisecondsSinceEpoch(
year, month, day, hour, minute, second, millisecond, isUtc) {
@@ -20,7 +20,7 @@
if (isUtc == null) throw new ArgumentError();
}
- /* patch */ _DateImpl.now()
+ /* patch */ DateTime._now()
: isUtc = false,
millisecondsSinceEpoch = _getCurrentMs() {
}
@@ -75,8 +75,8 @@
int daysSince1970 =
_flooredDivision(_localDateInUtcMs, Duration.MILLISECONDS_PER_DAY);
// 1970-1-1 was a Thursday.
- return ((daysSince1970 + Date.THU - Date.MON) % Date.DAYS_IN_WEEK) +
- Date.MON;
+ return ((daysSince1970 + DateTime.THU - DateTime.MON) % DateTime.DAYS_IN_WEEK) +
+ DateTime.MON;
}
@@ -140,10 +140,10 @@
* as [this].
*
* Say [:t:] is the result of this function, then
- * * [:this.year == new Date.fromMillisecondsSinceEpoch(t, true).year:],
- * * [:this.month == new Date.fromMillisecondsSinceEpoch(t, true).month:],
- * * [:this.day == new Date.fromMillisecondsSinceEpoch(t, true).day:],
- * * [:this.hour == new Date.fromMillisecondsSinceEpoch(t, true).hour:],
+ * * [:this.year == new DateTime.fromMillisecondsSinceEpoch(t, true).year:],
+ * * [:this.month == new DateTime.fromMillisecondsSinceEpoch(t, true).month:],
+ * * [:this.day == new DateTime.fromMillisecondsSinceEpoch(t, true).day:],
+ * * [:this.hour == new DateTime.fromMillisecondsSinceEpoch(t, true).hour:],
* * ...
*
* Daylight savings is computed as if the date was computed in [1970..2037].
diff --git a/runtime/lib/growable_array.dart b/runtime/lib/growable_array.dart
index ce650cc..39e35fd 100644
--- a/runtime/lib/growable_array.dart
+++ b/runtime/lib/growable_array.dart
@@ -24,18 +24,29 @@
void remove(Object element) {
for (int i = 0; i < this.length; i++) {
if (this[i] == element) {
- int newLength = this.length - 1;
- Arrays.copy(this,
- index + 1,
- this,
- index,
- newLength - index);
- this.length = newLength;
+ removeAt(i);
return;
}
}
}
+ void removeAll(Iterable elements) {
+ IterableMixinWorkaround.removeAllList(this, elements);
+ }
+
+ void retainAll(Iterable elements) {
+ IterableMixinWorkaround.retainAll(this, elements);
+ }
+
+ void removeMatching(bool test(E element)) {
+ IterableMixinWorkaround.removeMatchingList(this, test);
+ }
+
+ void retainMatching(bool test(T element)) {
+ IterableMixinWorkaround.removeMatchingList(this,
+ (T element) => !test(element));
+ }
+
void setRange(int start, int length, List<T> from, [int startFrom = 0]) {
if (length < 0) {
throw new ArgumentError("negative length $length");
@@ -291,6 +302,8 @@
this.length = 0;
}
+ List<T> get reversed => new ReversedListView<T>(this, 0, null);
+
void sort([int compare(T a, T b)]) {
IterableMixinWorkaround.sortList(this, compare);
}
diff --git a/runtime/lib/integers.cc b/runtime/lib/integers.cc
index 87fdff4..c0eb573 100644
--- a/runtime/lib/integers.cc
+++ b/runtime/lib/integers.cc
@@ -22,14 +22,12 @@
// when it could have been a Smi.
static bool CheckInteger(const Integer& i) {
if (i.IsBigint()) {
- Bigint& bigint = Bigint::Handle();
- bigint |= i.raw();
+ const Bigint& bigint = Bigint::Cast(i);
return !BigintOperations::FitsIntoSmi(bigint) &&
!BigintOperations::FitsIntoMint(bigint);
}
if (i.IsMint()) {
- Mint& mint = Mint::Handle();
- mint |= i.raw();
+ const Mint& mint = Mint::Cast(i);
return !Smi::IsValid64(mint.value());
}
return true;
@@ -217,8 +215,7 @@
Exceptions::ThrowByType(Exceptions::kArgument, args);
}
if (value.IsSmi()) {
- Smi& smi_value = Smi::Handle();
- smi_value |= value.raw();
+ const Smi& smi_value = Smi::Cast(value);
return smi_value.ShiftOp(kind, amount);
}
Bigint& big_value = Bigint::Handle();
@@ -240,7 +237,7 @@
}
} else {
ASSERT(value.IsBigint());
- big_value |= value.raw();
+ big_value = Bigint::Cast(value).raw();
}
switch (kind) {
case Token::kSHL:
diff --git a/runtime/lib/isolate.cc b/runtime/lib/isolate.cc
index ede0fc3..7ed2000 100644
--- a/runtime/lib/isolate.cc
+++ b/runtime/lib/isolate.cc
@@ -44,9 +44,7 @@
static void StoreError(Isolate* isolate, const Object& obj) {
ASSERT(obj.IsError());
- Error& error = Error::Handle();
- error |= obj.raw();
- isolate->object_store()->set_sticky_error(error);
+ isolate->object_store()->set_sticky_error(Error::Cast(obj));
}
@@ -191,9 +189,7 @@
uri.ToCString(), error_obj.ToErrorCString());
return false;
} else if (obj.IsString()) {
- String& string_obj = String::Handle();
- string_obj |= obj.raw();
- *canonical_uri = zone->MakeCopyOfString(string_obj.ToCString());
+ *canonical_uri = zone->MakeCopyOfString(String::Cast(obj).ToCString());
return true;
} else {
*error = zone->PrintToString("Unable to canonicalize uri '%s': "
@@ -377,7 +373,7 @@
}
ASSERT(result.IsFunction());
Function& func = Function::Handle(isolate);
- func |= result.raw();
+ func ^= result.raw();
result = DartEntry::InvokeStatic(func, Object::empty_array());
if (result.IsError()) {
StoreError(isolate, result);
@@ -422,7 +418,7 @@
bool throw_exception = false;
Function& func = Function::Handle();
if (closure.IsClosure()) {
- func |= Closure::function(closure);
+ func = Closure::function(closure);
const Class& cls = Class::Handle(func.Owner());
if (!func.IsClosureFunction() || !func.is_static() || !cls.IsTopLevel()) {
throw_exception = true;
@@ -440,7 +436,7 @@
GET_NATIVE_ARGUMENT(Instance, callback, arguments->NativeArgAt(1));
Function& callback_func = Function::Handle();
if (callback.IsClosure()) {
- callback_func |= Closure::function(callback);
+ callback_func = Closure::function(callback);
const Class& cls = Class::Handle(callback_func.Owner());
if (!callback_func.IsClosureFunction() || !callback_func.is_static() ||
!cls.IsTopLevel()) {
diff --git a/runtime/lib/lib_sources.gypi b/runtime/lib/lib_sources.gypi
index b6f0032..18b74fe 100644
--- a/runtime/lib/lib_sources.gypi
+++ b/runtime/lib/lib_sources.gypi
@@ -45,8 +45,8 @@
'string.cc',
'string_base.dart',
'string_patch.dart',
+ 'string_buffer_patch.dart',
'type_patch.dart',
- 'string_patch.dart',
'weak_property.dart',
'weak_property.cc',
],
diff --git a/runtime/lib/math_patch.dart b/runtime/lib/math_patch.dart
index 4168db3..fa9dc7e 100644
--- a/runtime/lib/math_patch.dart
+++ b/runtime/lib/math_patch.dart
@@ -111,7 +111,7 @@
static int _nextSeed() {
if (_prng == null) {
// TODO(iposva): Use system to get a random seed.
- _prng = new Random(new Date.now().millisecondsSinceEpoch);
+ _prng = new Random(new DateTime.now().millisecondsSinceEpoch);
}
// Trigger the PRNG once to change the internal state.
return _prng._nextInt32();
diff --git a/runtime/lib/string.cc b/runtime/lib/string.cc
index 54d1017..d17b9134 100644
--- a/runtime/lib/string.cc
+++ b/runtime/lib/string.cc
@@ -123,8 +123,7 @@
static int32_t StringValueAt(const String& str, const Integer& index) {
if (index.IsSmi()) {
- Smi& smi = Smi::Handle();
- smi |= index.raw();
+ const Smi& smi = Smi::Cast(index);
int32_t index = smi.Value();
if ((index < 0) || (index >= str.Length())) {
const Array& args = Array::Handle(Array::New(1));
diff --git a/runtime/lib/string_buffer_patch.dart b/runtime/lib/string_buffer_patch.dart
new file mode 100644
index 0000000..841fc4f
--- /dev/null
+++ b/runtime/lib/string_buffer_patch.dart
@@ -0,0 +1,66 @@
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+patch /* abstract */ class StringBuffer {
+ /* patch */ factory StringBuffer([Object content = ""])
+ => new _StringBufferImpl(content);
+}
+
+class _StringBufferImpl implements StringBuffer {
+
+ List<String> _buffer;
+ int _length;
+
+ /// Creates the string buffer with an initial content.
+ _StringBufferImpl(Object content) {
+ clear();
+ add(content);
+ }
+
+ /// Returns the length of the buffer.
+ int get length => _length;
+
+ bool get isEmpty => _length == 0;
+
+ /// Adds [obj] to the buffer.
+ void add(Object obj) {
+ // TODO(srdjan): The following four lines could be replaced by
+ // '$obj', but apparently this is too slow on the Dart VM.
+ String str = obj.toString();
+ if (str is !String) {
+ throw new ArgumentError('toString() did not return a string');
+ }
+ if (str.isEmpty) return;
+ _buffer.add(str);
+ _length += str.length;
+ }
+
+ /// Adds all items in [objects] to the buffer.
+ void addAll(Iterable objects) {
+ for (Object obj in objects) add(obj);
+ }
+
+ /// Adds the string representation of [charCode] to the buffer.
+ void addCharCode(int charCode) {
+ add(new String.fromCharCodes([charCode]));
+ }
+
+ /// Clears the string buffer.
+ void clear() {
+ _buffer = new List<String>();
+ _length = 0;
+ }
+
+ /// Returns the contents of buffer as a concatenated string.
+ String toString() {
+ if (_buffer.length == 0) return "";
+ if (_buffer.length == 1) return _buffer[0];
+ String result = Strings.concatAll(_buffer);
+ _buffer.clear();
+ _buffer.add(result);
+ // Since we track the length at each add operation, there is no
+ // need to update it in this function.
+ return result;
+ }
+}
diff --git a/runtime/platform/json.cc b/runtime/platform/json.cc
index 4716a72..7236e74 100644
--- a/runtime/platform/json.cc
+++ b/runtime/platform/json.cc
@@ -202,6 +202,7 @@
Set(json_object);
}
+
void JSONReader::Set(const char* json_object) {
scanner_.SetText(json_object);
json_object_ = json_object;
@@ -209,6 +210,93 @@
}
+bool JSONReader::CheckMessage() {
+ scanner_.SetText(json_object_);
+ scanner_.Scan();
+ CheckObject();
+ return true;
+}
+
+
+void JSONReader::CheckValue() {
+ switch (scanner_.CurrentToken()) {
+ case JSONScanner::TokenLBrace:
+ CheckObject();
+ break;
+ case JSONScanner::TokenLBrack:
+ CheckArray();
+ break;
+ case JSONScanner::TokenString: {
+ // Check the encoding.
+ const char* s = ValueChars();
+ int remaining = ValueLen();
+ while (remaining > 0) {
+ if ((*s == '\n') || (*s == '\t')) {
+ OS::Print("Un-escaped character in JSON string: '%s'\n",
+ ValueChars());
+ ASSERT(!"illegal character in JSON string value");
+ }
+ s++;
+ remaining--;
+ }
+ scanner_.Scan();
+ break;
+ }
+ case JSONScanner::TokenInteger:
+ case JSONScanner::TokenTrue:
+ case JSONScanner::TokenFalse:
+ case JSONScanner::TokenNull:
+ scanner_.Scan();
+ break;
+ default:
+ OS::Print("Malformed JSON: expected a value but got '%s'\n",
+ scanner_.TokenChars());
+ ASSERT(!"illegal JSON value found");
+ }
+}
+
+#define CHECK_TOKEN(token) \
+ if (scanner_.CurrentToken() != token) { \
+ OS::Print("Malformed JSON: expected %s but got '%s'\n", \
+ #token, scanner_.TokenChars()); \
+ } \
+ ASSERT(scanner_.CurrentToken() == token);
+
+void JSONReader::CheckArray() {
+ CHECK_TOKEN(JSONScanner::TokenLBrack);
+ scanner_.Scan();
+ while (scanner_.CurrentToken() != JSONScanner::TokenRBrack) {
+ CheckValue();
+ if (scanner_.CurrentToken() != JSONScanner::TokenComma) {
+ break;
+ }
+ scanner_.Scan();
+ }
+ CHECK_TOKEN(JSONScanner::TokenRBrack);
+ scanner_.Scan();
+}
+
+
+void JSONReader::CheckObject() {
+ CHECK_TOKEN(JSONScanner::TokenLBrace);
+ scanner_.Scan();
+ while (scanner_.CurrentToken() == JSONScanner::TokenString) {
+ scanner_.Scan();
+ CHECK_TOKEN(JSONScanner::TokenColon);
+ scanner_.Scan();
+ CheckValue();
+ if (scanner_.CurrentToken() != JSONScanner::TokenComma) {
+ break;
+ }
+ scanner_.Scan();
+ }
+ CHECK_TOKEN(JSONScanner::TokenRBrace);
+ scanner_.Scan();
+}
+
+#undef CHECK_TOKEN
+
+
bool JSONReader::Seek(const char* name) {
error_ = false;
scanner_.SetText(json_object_);
diff --git a/runtime/platform/json.h b/runtime/platform/json.h
index 0da90b8..f2e0752 100644
--- a/runtime/platform/json.h
+++ b/runtime/platform/json.h
@@ -102,7 +102,14 @@
return scanner_.CurrentToken() == JSONScanner::TokenNull;
}
+ // Debugging method to check for validity of a JSON message.
+ bool CheckMessage();
+
private:
+ void CheckObject();
+ void CheckArray();
+ void CheckValue();
+
JSONScanner scanner_;
const char* json_object_;
bool error_;
diff --git a/runtime/tests/vm/vm.status b/runtime/tests/vm/vm.status
index 2444f50..c88b455 100644
--- a/runtime/tests/vm/vm.status
+++ b/runtime/tests/vm/vm.status
@@ -24,6 +24,7 @@
[ $system == windows ]
cc/Dart2JSCompileAll: Skip
+cc/ExternalizeConstantStrings: Skip
[ $runtime == drt ]
dart/isolate_mirror_local_test: Skip
@@ -40,14 +41,47 @@
[ $runtime == ff || $runtime == ie9 ]
dart/inline_stack_frame_test: Skip
+[ $runtime == safari ]
+dart/inline_stack_frame_test: Fail # Issue: 7414
+
[ $compiler == dart2dart ]
# Skip until we stabilize language tests.
*: Skip
[ $arch == arm ]
-dart/*: Skip
+*: Skip
[ $arch == simarm ]
+# Tests needing an assembler.
+cc/Call: Skip
+cc/CallLeafRuntimeStubCode: Skip
+cc/CallRuntimeStubCode: Skip
+cc/Dart2JSCompileAll: Skip
+cc/FrameLookup: Skip
+cc/IcDataAccess: Skip
+cc/Jump: Skip
+cc/PatchStaticCall: Skip
+cc/Simple: Skip
+cc/UseDartApi: Skip
+# Tests needing Dart execution.
+dart/*: Skip
+
+[ $arch == mips ]
+*: Skip
+
+[ $arch == simmips ]
+# Tests needing an assembler.
+cc/Call: Skip
+cc/CallLeafRuntimeStubCode: Skip
+cc/CallRuntimeStubCode: Skip
+cc/Dart2JSCompileAll: Skip
+cc/FrameLookup: Skip
+cc/IcDataAccess: Skip
+cc/Jump: Skip
+cc/PatchStaticCall: Skip
+cc/Simple: Skip
+cc/UseDartApi: Skip
+# Tests needing Dart execution.
dart/*: Skip
# TODO(ajohnsen): Fix this as part of library changes.
diff --git a/runtime/tools/gyp/runtime-configurations.gypi b/runtime/tools/gyp/runtime-configurations.gypi
index 7cb0a21..96ce6aa 100644
--- a/runtime/tools/gyp/runtime-configurations.gypi
+++ b/runtime/tools/gyp/runtime-configurations.gypi
@@ -88,7 +88,6 @@
'abstract': 1,
'xcode_settings': {
'ARCHS': [ 'i386' ],
- 'GCC_OPTIMIZATION_LEVEL': '3',
},
},
diff --git a/runtime/vm/assembler_arm_test.cc b/runtime/vm/assembler_arm_test.cc
new file mode 100644
index 0000000..856f212
--- /dev/null
+++ b/runtime/vm/assembler_arm_test.cc
@@ -0,0 +1,30 @@
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+#include "vm/globals.h"
+#if defined(TARGET_ARCH_ARM)
+
+#include "vm/assembler.h"
+#include "vm/os.h"
+#include "vm/unit_test.h"
+#include "vm/virtual_memory.h"
+
+namespace dart {
+
+#define __ assembler->
+
+
+ASSEMBLER_TEST_GENERATE(Simple, assembler) {
+ UNIMPLEMENTED();
+}
+
+
+ASSEMBLER_TEST_RUN(Simple, entry) {
+ typedef int (*SimpleCode)();
+ EXPECT_EQ(42, reinterpret_cast<SimpleCode>(entry)());
+}
+
+} // namespace dart
+
+#endif // defined TARGET_ARCH_ARM
diff --git a/runtime/vm/assembler_ia32.cc b/runtime/vm/assembler_ia32.cc
index 271d43c..ec581e9 100644
--- a/runtime/vm/assembler_ia32.cc
+++ b/runtime/vm/assembler_ia32.cc
@@ -1810,7 +1810,7 @@
void Assembler::EnterCallRuntimeFrame(intptr_t frame_space) {
- enter(Immediate(0));
+ EnterFrame(0);
// Preserve volatile CPU registers.
for (intptr_t i = 0; i < kNumberOfVolatileCpuRegisters; i++) {
diff --git a/runtime/vm/assembler_mips_test.cc b/runtime/vm/assembler_mips_test.cc
new file mode 100644
index 0000000..7321a8b
--- /dev/null
+++ b/runtime/vm/assembler_mips_test.cc
@@ -0,0 +1,30 @@
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+#include "vm/globals.h"
+#if defined(TARGET_ARCH_MIPS)
+
+#include "vm/assembler.h"
+#include "vm/os.h"
+#include "vm/unit_test.h"
+#include "vm/virtual_memory.h"
+
+namespace dart {
+
+#define __ assembler->
+
+
+ASSEMBLER_TEST_GENERATE(Simple, assembler) {
+ UNIMPLEMENTED();
+}
+
+
+ASSEMBLER_TEST_RUN(Simple, entry) {
+ typedef int (*SimpleCode)();
+ EXPECT_EQ(42, reinterpret_cast<SimpleCode>(entry)());
+}
+
+} // namespace dart
+
+#endif // defined TARGET_ARCH_MIPS
diff --git a/runtime/vm/assembler_x64.cc b/runtime/vm/assembler_x64.cc
index b244172..9e5dcbb 100644
--- a/runtime/vm/assembler_x64.cc
+++ b/runtime/vm/assembler_x64.cc
@@ -1917,7 +1917,7 @@
void Assembler::EnterCallRuntimeFrame(intptr_t frame_space) {
- enter(Immediate(0));
+ EnterFrame(0);
// Preserve volatile CPU registers.
for (intptr_t i = 0; i < kNumberOfVolatileCpuRegisters; i++) {
diff --git a/runtime/vm/ast.cc b/runtime/vm/ast.cc
index 7c98741..dbe70d9 100644
--- a/runtime/vm/ast.cc
+++ b/runtime/vm/ast.cc
@@ -93,9 +93,8 @@
const Double& dbl = Double::Cast(literal());
// Preserve negative zero.
double new_value = (dbl.value() == 0.0) ? -0.0 : (0.0 - dbl.value());
- Double& double_instance =
- Double::ZoneHandle(Double::New(new_value, Heap::kOld));
- double_instance |= double_instance.Canonicalize();
+ const Double& double_instance =
+ Double::ZoneHandle(Double::NewCanonical(new_value));
return new LiteralNode(this->token_pos(), double_instance);
}
}
diff --git a/runtime/vm/bigint_operations.cc b/runtime/vm/bigint_operations.cc
index 2b34ef4..0e5e7c9 100644
--- a/runtime/vm/bigint_operations.cc
+++ b/runtime/vm/bigint_operations.cc
@@ -184,15 +184,15 @@
ASSERT(('0' <= c) && (c <= '9'));
digit = digit * 10 + c - '0';
}
- result |= MultiplyWithDigit(result, kTenMultiplier);
+ result = MultiplyWithDigit(result, kTenMultiplier);
if (digit != 0) {
increment.SetChunkAt(0, digit);
- result |= Add(result, increment);
+ result = Add(result, increment);
}
}
Clamp(result);
if ((space == Heap::kOld) && !result.IsOld()) {
- result |= Object::Clone(result, Heap::kOld);
+ result ^= Object::Clone(result, Heap::kOld);
}
return result.raw();
}
@@ -1480,13 +1480,13 @@
int comp = UnsignedCompare(a, b);
if (comp < 0) {
- (*quotient) |= Zero();
- (*remainder) |= Copy(a); // TODO(floitsch): can we reuse the input?
+ (*quotient) = Zero();
+ (*remainder) = Copy(a); // TODO(floitsch): can we reuse the input?
return;
} else if (comp == 0) {
- (*quotient) |= One();
+ (*quotient) = One();
quotient->SetSign(a.IsNegative() != b.IsNegative());
- (*remainder) |= Zero();
+ (*remainder) = Zero();
return;
}
@@ -1521,7 +1521,7 @@
ASSERT(divisor_length == divisor.Length());
intptr_t quotient_length = dividend_length - divisor_length + 1;
- *quotient |= Bigint::Allocate(quotient_length);
+ *quotient = Bigint::Allocate(quotient_length);
quotient->SetSign(a.IsNegative() != b.IsNegative());
intptr_t quotient_pos = dividend_length - divisor_length;
@@ -1536,7 +1536,7 @@
Chunk first_quotient_digit = 0;
while (UnsignedCompare(dividend, shifted_divisor) >= 0) {
first_quotient_digit++;
- dividend |= Subtract(dividend, shifted_divisor);
+ dividend = Subtract(dividend, shifted_divisor);
}
quotient->SetChunkAt(quotient_pos--, first_quotient_digit);
@@ -1609,7 +1609,7 @@
target.SetChunkAt(2, dividend_digit);
do {
quotient_digit = (quotient_digit - 1) & kDigitMask;
- estimation_product |= MultiplyWithDigit(short_divisor, quotient_digit);
+ estimation_product = MultiplyWithDigit(short_divisor, quotient_digit);
} while (UnsignedCompareNonClamped(estimation_product, target) > 0);
// At this point the quotient_digit is fairly accurate.
// At the worst it is off by one.
@@ -1617,15 +1617,15 @@
// subtract the divisor another time.
// Let t = i - divisor_length.
// dividend -= (quotient_digit * divisor) << (t * kDigitBitSize);
- shifted_divisor |= MultiplyWithDigit(divisor, quotient_digit);
- shifted_divisor |= DigitsShiftLeft(shifted_divisor, i - divisor_length);
+ shifted_divisor = MultiplyWithDigit(divisor, quotient_digit);
+ shifted_divisor = DigitsShiftLeft(shifted_divisor, i - divisor_length);
dividend = Subtract(dividend, shifted_divisor);
if (dividend.IsNegative()) {
// The estimation was still too big.
quotient_digit--;
// TODO(floitsch): allocate space for the shifted_divisor once and reuse
// it at every iteration.
- shifted_divisor |= DigitsShiftLeft(divisor, i - divisor_length);
+ shifted_divisor = DigitsShiftLeft(divisor, i - divisor_length);
// TODO(floitsch): reuse the space of the previous dividend.
dividend = Add(dividend, shifted_divisor);
}
@@ -1633,7 +1633,7 @@
}
ASSERT(quotient_pos == -1);
Clamp(*quotient);
- *remainder |= ShiftRight(dividend, normalization_shift);
+ *remainder = ShiftRight(dividend, normalization_shift);
remainder->SetSign(a.IsNegative());
}
diff --git a/runtime/vm/bootstrap_natives.cc b/runtime/vm/bootstrap_natives.cc
index 164b33d..3b65e03 100644
--- a/runtime/vm/bootstrap_natives.cc
+++ b/runtime/vm/bootstrap_natives.cc
@@ -41,7 +41,7 @@
int num_entries = sizeof(BootStrapEntries) / sizeof(struct NativeEntries);
for (int i = 0; i < num_entries; i++) {
struct NativeEntries* entry = &(BootStrapEntries[i]);
- if (!strncmp(function_name, entry->name_, strlen(entry->name_)) &&
+ if ((strcmp(function_name, entry->name_) == 0) &&
(entry->argument_count_ == argument_count)) {
return reinterpret_cast<Dart_NativeFunction>(entry->function_);
}
diff --git a/runtime/vm/bootstrap_natives.h b/runtime/vm/bootstrap_natives.h
index b601a1c..bcff2ab 100644
--- a/runtime/vm/bootstrap_natives.h
+++ b/runtime/vm/bootstrap_natives.h
@@ -131,47 +131,47 @@
V(ByteArray_setFloat64, 3) \
V(ByteArray_setRange, 5) \
V(Int8Array_new, 1) \
- V(Int8Array_newTransferable, 1) \
+ V(Int8List_newTransferable, 1) \
V(Int8Array_getIndexed, 2) \
V(Int8Array_setIndexed, 3) \
V(Uint8Array_new, 1) \
- V(Uint8Array_newTransferable, 1) \
+ V(Uint8List_newTransferable, 1) \
V(Uint8Array_getIndexed, 2) \
V(Uint8Array_setIndexed, 3) \
V(Uint8ClampedArray_new, 1) \
- V(Uint8ClampedArray_newTransferable, 1) \
+ V(Uint8ClampedList_newTransferable, 1) \
V(Uint8ClampedArray_getIndexed, 2) \
V(Uint8ClampedArray_setIndexed, 3) \
V(Int16Array_new, 1) \
- V(Int16Array_newTransferable, 1) \
+ V(Int16List_newTransferable, 1) \
V(Int16Array_getIndexed, 2) \
V(Int16Array_setIndexed, 3) \
V(Uint16Array_new, 1) \
- V(Uint16Array_newTransferable, 1) \
+ V(Uint16List_newTransferable, 1) \
V(Uint16Array_getIndexed, 2) \
V(Uint16Array_setIndexed, 3) \
V(Int32Array_new, 1) \
- V(Int32Array_newTransferable, 1) \
+ V(Int32List_newTransferable, 1) \
V(Int32Array_getIndexed, 2) \
V(Int32Array_setIndexed, 3) \
V(Uint32Array_new, 1) \
- V(Uint32Array_newTransferable, 1) \
+ V(Uint32List_newTransferable, 1) \
V(Uint32Array_getIndexed, 2) \
V(Uint32Array_setIndexed, 3) \
V(Int64Array_new, 1) \
- V(Int64Array_newTransferable, 1) \
+ V(Int64List_newTransferable, 1) \
V(Int64Array_getIndexed, 2) \
V(Int64Array_setIndexed, 3) \
V(Uint64Array_new, 1) \
- V(Uint64Array_newTransferable, 1) \
+ V(Uint64List_newTransferable, 1) \
V(Uint64Array_getIndexed, 2) \
V(Uint64Array_setIndexed, 3) \
V(Float32Array_new, 1) \
- V(Float32Array_newTransferable, 1) \
+ V(Float32List_newTransferable, 1) \
V(Float32Array_getIndexed, 2) \
V(Float32Array_setIndexed, 3) \
V(Float64Array_new, 1) \
- V(Float64Array_newTransferable, 1) \
+ V(Float64List_newTransferable, 1) \
V(Float64Array_getIndexed, 2) \
V(Float64Array_setIndexed, 3) \
V(ExternalInt8Array_getIndexed, 2) \
diff --git a/runtime/vm/cha.cc b/runtime/vm/cha.cc
index 794dc7a..01aabcc 100644
--- a/runtime/vm/cha.cc
+++ b/runtime/vm/cha.cc
@@ -49,7 +49,7 @@
}
Class& direct_subclass = Class::Handle();
for (intptr_t i = 0; i < cls_direct_subclasses.Length(); i++) {
- direct_subclass |= cls_direct_subclasses.At(i);
+ direct_subclass ^= cls_direct_subclasses.At(i);
intptr_t direct_subclass_id = direct_subclass.id();
if (!ContainsCid(cids, direct_subclass_id)) {
cids->Add(direct_subclass_id);
@@ -78,7 +78,7 @@
}
Class& direct_subclass = Class::Handle();
for (intptr_t i = 0; i < cls_direct_subclasses.Length(); i++) {
- direct_subclass |= cls_direct_subclasses.At(i);
+ direct_subclass ^= cls_direct_subclasses.At(i);
if (direct_subclass.LookupDynamicFunction(function_name) !=
Function::null()) {
return true;
diff --git a/runtime/vm/class_finalizer.cc b/runtime/vm/class_finalizer.cc
index 09e5cf5..f1f9301 100644
--- a/runtime/vm/class_finalizer.cc
+++ b/runtime/vm/class_finalizer.cc
@@ -54,7 +54,7 @@
array = cls.functions();
intptr_t num_functions = array.IsNull() ? 0 : array.Length();
for (intptr_t f = 0; f < num_functions; f++) {
- function |= array.At(f);
+ function ^= array.At(f);
ASSERT(!function.IsNull());
if (function.HasOptimizedCode()) {
function.SwitchToUnoptimizedCode();
@@ -94,7 +94,7 @@
Class& cls = Class::Handle();
Type& super_type = Type::Handle();
for (intptr_t i = 0; i < pending_classes.Length(); i++) {
- cls |= pending_classes.At(i);
+ cls ^= pending_classes.At(i);
ASSERT(!cls.is_finalized());
super_type ^= cls.super_type();
if (!super_type.IsNull()) {
@@ -138,7 +138,7 @@
Class& cls = Class::Handle();
// First resolve all superclasses.
for (intptr_t i = 0; i < class_array.Length(); i++) {
- cls |= class_array.At(i);
+ cls ^= class_array.At(i);
if (FLAG_trace_class_finalization) {
OS::Print("Resolving super and interfaces: %s\n", cls.ToCString());
}
@@ -147,12 +147,12 @@
}
// Finalize all classes.
for (intptr_t i = 0; i < class_array.Length(); i++) {
- cls |= class_array.At(i);
+ cls ^= class_array.At(i);
FinalizeClass(cls);
}
if (FLAG_print_classes) {
for (intptr_t i = 0; i < class_array.Length(); i++) {
- cls |= class_array.At(i);
+ cls ^= class_array.At(i);
PrintClassInformation(cls);
}
}
@@ -270,7 +270,7 @@
GrowableObjectArray::Handle(object_store->pending_classes());
for (intptr_t i = 0; i < class_array.Length(); i++) {
// TODO(iposva): Add real checks.
- cls |= class_array.At(i);
+ cls ^= class_array.At(i);
if (cls.is_finalized() || cls.is_prefinalized()) {
// Pre-finalized bootstrap classes must not define any fields.
ASSERT(!cls.HasInstanceFields());
@@ -969,7 +969,7 @@
Class& super_class = Class::Handle();
intptr_t num_fields = array.Length();
for (intptr_t i = 0; i < num_fields; i++) {
- field |= array.At(i);
+ field ^= array.At(i);
type = field.type();
ResolveType(cls, type, kCanonicalize);
type = FinalizeType(cls, type, kCanonicalize);
@@ -1025,7 +1025,7 @@
intptr_t num_functions = array.Length();
String& function_name = String::Handle();
for (intptr_t i = 0; i < num_functions; i++) {
- function |= array.At(i);
+ function ^= array.At(i);
ResolveAndFinalizeSignature(cls, function);
function_name = function.name();
if (function.is_static()) {
@@ -1049,7 +1049,7 @@
}
} else {
for (int i = 0; i < interfaces.Length(); i++) {
- super_class |= interfaces.At(i);
+ super_class ^= interfaces.At(i);
overridden_function = super_class.LookupDynamicFunction(function_name);
if (!overridden_function.IsNull() &&
!function.HasCompatibleParametersWith(overridden_function)) {
@@ -1422,7 +1422,7 @@
intptr_t len = fields_array.Length();
Field& field = Field::Handle();
for (intptr_t i = 0; i < len; i++) {
- field |= fields_array.At(i);
+ field ^= fields_array.At(i);
if (!field.is_static() && !field.is_final()) {
const String& class_name = String::Handle(cls.Name());
const String& field_name = String::Handle(field.name());
@@ -1469,14 +1469,14 @@
Function& function = Function::Handle();
intptr_t len = functions_array.Length();
for (intptr_t i = 0; i < len; i++) {
- function |= functions_array.At(i);
+ function ^= functions_array.At(i);
OS::Print(" %s\n", function.ToCString());
}
const Array& fields_array = Array::Handle(cls.fields());
Field& field = Field::Handle();
len = fields_array.Length();
for (intptr_t i = 0; i < len; i++) {
- field |= fields_array.At(i);
+ field ^= fields_array.At(i);
OS::Print(" %s\n", field.ToCString());
}
}
diff --git a/runtime/vm/code_descriptors.cc b/runtime/vm/code_descriptors.cc
index b934b28..7ad06c1 100644
--- a/runtime/vm/code_descriptors.cc
+++ b/runtime/vm/code_descriptors.cc
@@ -79,7 +79,7 @@
RawStackmap* StackmapTableBuilder::MapAt(int index) const {
Stackmap& map = Stackmap::Handle();
- map |= list_.At(index);
+ map ^= list_.At(index);
return map.raw();
}
diff --git a/runtime/vm/code_descriptors_test.cc b/runtime/vm/code_descriptors_test.cc
index d14efaf..261b0dd 100644
--- a/runtime/vm/code_descriptors_test.cc
+++ b/runtime/vm/code_descriptors_test.cc
@@ -146,28 +146,28 @@
EXPECT_EQ(4, stack_map_list.Length());
// Validate the first stack map entry.
- stack_map |= stack_map_list.At(0);
+ stack_map ^= stack_map_list.At(0);
EXPECT_EQ(kStackSlotCount, stack_map.Length());
for (intptr_t i = 0; i < kStackSlotCount; ++i) {
EXPECT_EQ(expectation0[i], stack_map.IsObject(i));
}
// Validate the second stack map entry.
- stack_map |= stack_map_list.At(1);
+ stack_map ^= stack_map_list.At(1);
EXPECT_EQ(kStackSlotCount, stack_map.Length());
for (intptr_t i = 0; i < kStackSlotCount; ++i) {
EXPECT_EQ(expectation1[i], stack_map.IsObject(i));
}
// Validate the third stack map entry.
- stack_map |= stack_map_list.At(2);
+ stack_map ^= stack_map_list.At(2);
EXPECT_EQ(kStackSlotCount, stack_map.Length());
for (intptr_t i = 0; i < kStackSlotCount; ++i) {
EXPECT_EQ(expectation2[i], stack_map.IsObject(i));
}
// Validate the fourth stack map entry.
- stack_map |= stack_map_list.At(3);
+ stack_map ^= stack_map_list.At(3);
EXPECT_EQ(kStackSlotCount, stack_map.Length());
for (intptr_t i = 0; i < kStackSlotCount; ++i) {
EXPECT_EQ(expectation3[i], stack_map.IsObject(i));
diff --git a/runtime/vm/code_generator_test.cc b/runtime/vm/code_generator_test.cc
index 31cf02d..f2b4c62 100644
--- a/runtime/vm/code_generator_test.cc
+++ b/runtime/vm/code_generator_test.cc
@@ -553,7 +553,7 @@
// App lib is the last one that was loaded.
intptr_t num_libs = libs.Length();
Library& app_lib = Library::Handle();
- app_lib |= libs.At(num_libs - 1);
+ app_lib ^= libs.At(num_libs - 1);
ASSERT(!app_lib.IsNull());
const Class& cls = Class::Handle(
app_lib.LookupClass(String::Handle(Symbols::New("A"))));
diff --git a/runtime/vm/code_observers.cc b/runtime/vm/code_observers.cc
index ef84ceb..1e8835a 100644
--- a/runtime/vm/code_observers.cc
+++ b/runtime/vm/code_observers.cc
@@ -49,7 +49,7 @@
for (intptr_t i = 0; i < observers_length_; i++) {
delete observers_[i];
}
- delete[] observers_;
+ free(observers_);
}
diff --git a/runtime/vm/code_patcher_arm_test.cc b/runtime/vm/code_patcher_arm_test.cc
new file mode 100644
index 0000000..fc73e85
--- /dev/null
+++ b/runtime/vm/code_patcher_arm_test.cc
@@ -0,0 +1,64 @@
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+#include "vm/globals.h"
+#if defined(TARGET_ARCH_ARM)
+
+#include "vm/assembler.h"
+#include "vm/code_generator.h"
+#include "vm/code_patcher.h"
+#include "vm/dart_entry.h"
+#include "vm/instructions.h"
+#include "vm/native_entry.h"
+#include "vm/native_entry_test.h"
+#include "vm/stub_code.h"
+#include "vm/symbols.h"
+#include "vm/unit_test.h"
+
+namespace dart {
+
+CODEGEN_TEST_GENERATE(NativePatchStaticCall, test) {
+ SequenceNode* node_seq = test->node_sequence();
+ const String& native_name =
+ String::ZoneHandle(Symbols::New("TestStaticCallPatching"));
+ NativeFunction native_function =
+ reinterpret_cast<NativeFunction>(TestStaticCallPatching);
+ test->function().set_is_native(true);
+ node_seq->Add(new ReturnNode(Scanner::kDummyTokenIndex,
+ new NativeBodyNode(Scanner::kDummyTokenIndex,
+ test->function(),
+ native_name,
+ native_function)));
+}
+
+CODEGEN_TEST2_GENERATE(PatchStaticCall, function, test) {
+ SequenceNode* node_seq = test->node_sequence();
+ ArgumentListNode* arguments = new ArgumentListNode(Scanner::kDummyTokenIndex);
+ node_seq->Add(new ReturnNode(Scanner::kDummyTokenIndex,
+ new StaticCallNode(Scanner::kDummyTokenIndex,
+ function, arguments)));
+}
+
+CODEGEN_TEST2_RUN(PatchStaticCall, NativePatchStaticCall, Instance::null());
+
+#define __ assembler->
+
+ASSEMBLER_TEST_GENERATE(IcDataAccess, assembler) {
+ UNIMPLEMENTED();
+}
+
+
+ASSEMBLER_TEST_RUN(IcDataAccess, entry) {
+ uword return_address = entry + CodePatcher::InstanceCallSizeInBytes();
+ ICData& ic_data = ICData::Handle();
+ CodePatcher::GetInstanceCallAt(return_address, &ic_data, NULL);
+ EXPECT_STREQ("targetFunction",
+ String::Handle(ic_data.target_name()).ToCString());
+ EXPECT_EQ(1, ic_data.num_args_tested());
+ EXPECT_EQ(0, ic_data.NumberOfChecks());
+}
+
+} // namespace dart
+
+#endif // TARGET_ARCH_ARM
diff --git a/runtime/vm/code_patcher_ia32.cc b/runtime/vm/code_patcher_ia32.cc
index c6ae59d..1209cbe 100644
--- a/runtime/vm/code_patcher_ia32.cc
+++ b/runtime/vm/code_patcher_ia32.cc
@@ -179,7 +179,7 @@
Array* arguments_descriptor) {
InstanceCall call(return_address);
if (ic_data != NULL) {
- *ic_data |= call.ic_data();
+ *ic_data ^= call.ic_data();
}
if (arguments_descriptor != NULL) {
*arguments_descriptor ^= call.arguments_descriptor();
diff --git a/runtime/vm/code_patcher_mips_test.cc b/runtime/vm/code_patcher_mips_test.cc
new file mode 100644
index 0000000..91cf209
--- /dev/null
+++ b/runtime/vm/code_patcher_mips_test.cc
@@ -0,0 +1,64 @@
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+#include "vm/globals.h"
+#if defined(TARGET_ARCH_MIPS)
+
+#include "vm/assembler.h"
+#include "vm/code_generator.h"
+#include "vm/code_patcher.h"
+#include "vm/dart_entry.h"
+#include "vm/instructions.h"
+#include "vm/native_entry.h"
+#include "vm/native_entry_test.h"
+#include "vm/stub_code.h"
+#include "vm/symbols.h"
+#include "vm/unit_test.h"
+
+namespace dart {
+
+CODEGEN_TEST_GENERATE(NativePatchStaticCall, test) {
+ SequenceNode* node_seq = test->node_sequence();
+ const String& native_name =
+ String::ZoneHandle(Symbols::New("TestStaticCallPatching"));
+ NativeFunction native_function =
+ reinterpret_cast<NativeFunction>(TestStaticCallPatching);
+ test->function().set_is_native(true);
+ node_seq->Add(new ReturnNode(Scanner::kDummyTokenIndex,
+ new NativeBodyNode(Scanner::kDummyTokenIndex,
+ test->function(),
+ native_name,
+ native_function)));
+}
+
+CODEGEN_TEST2_GENERATE(PatchStaticCall, function, test) {
+ SequenceNode* node_seq = test->node_sequence();
+ ArgumentListNode* arguments = new ArgumentListNode(Scanner::kDummyTokenIndex);
+ node_seq->Add(new ReturnNode(Scanner::kDummyTokenIndex,
+ new StaticCallNode(Scanner::kDummyTokenIndex,
+ function, arguments)));
+}
+
+CODEGEN_TEST2_RUN(PatchStaticCall, NativePatchStaticCall, Instance::null());
+
+#define __ assembler->
+
+ASSEMBLER_TEST_GENERATE(IcDataAccess, assembler) {
+ UNIMPLEMENTED();
+}
+
+
+ASSEMBLER_TEST_RUN(IcDataAccess, entry) {
+ uword return_address = entry + CodePatcher::InstanceCallSizeInBytes();
+ ICData& ic_data = ICData::Handle();
+ CodePatcher::GetInstanceCallAt(return_address, &ic_data, NULL);
+ EXPECT_STREQ("targetFunction",
+ String::Handle(ic_data.target_name()).ToCString());
+ EXPECT_EQ(1, ic_data.num_args_tested());
+ EXPECT_EQ(0, ic_data.NumberOfChecks());
+}
+
+} // namespace dart
+
+#endif // TARGET_ARCH_MIPS
diff --git a/runtime/vm/code_patcher_x64.cc b/runtime/vm/code_patcher_x64.cc
index aa34870..ab3312e 100644
--- a/runtime/vm/code_patcher_x64.cc
+++ b/runtime/vm/code_patcher_x64.cc
@@ -154,7 +154,7 @@
Array* arguments_descriptor) {
InstanceCall call(return_address);
if (ic_data != NULL) {
- *ic_data |= call.ic_data();
+ *ic_data ^= call.ic_data();
}
if (arguments_descriptor != NULL) {
*arguments_descriptor ^= call.arguments_descriptor();
diff --git a/runtime/vm/compiler.cc b/runtime/vm/compiler.cc
index c5b865b..e0324f0 100644
--- a/runtime/vm/compiler.cc
+++ b/runtime/vm/compiler.cc
@@ -150,7 +150,7 @@
// Build the flow graph.
FlowGraphBuilder builder(parsed_function, NULL); // NULL = not inlining.
- flow_graph = builder.BuildGraph(0); // The initial loop depth is zero.
+ flow_graph = builder.BuildGraph();
}
if (optimized) {
@@ -211,19 +211,21 @@
// Do optimizations that depend on the propagated type information.
optimizer.Canonicalize();
- // Unbox doubles.
flow_graph->ComputeUseLists();
- optimizer.SelectRepresentations();
- if (FLAG_constant_propagation ||
- FLAG_common_subexpression_elimination) {
- flow_graph->ComputeUseLists();
- }
if (FLAG_constant_propagation) {
ConstantPropagator::Optimize(flow_graph);
// A canonicalization pass to remove e.g. smi checks on smi constants.
optimizer.Canonicalize();
}
+
+ // Unbox doubles. Performed after constant propagation to minimize
+ // interference from phis merging double values and tagged
+ // values comming from dead paths.
+ flow_graph->ComputeUseLists();
+ optimizer.SelectRepresentations();
+ flow_graph->ComputeUseLists();
+
if (FLAG_common_subexpression_elimination) {
if (DominatorBasedCSE::Optimize(flow_graph)) {
// Do another round of CSE to take secondary effects into account:
@@ -383,7 +385,7 @@
const Array& stackmap_table = Array::Handle(code.stackmaps());
Stackmap& map = Stackmap::Handle();
for (intptr_t i = 0; i < stackmap_table.Length(); ++i) {
- map |= stackmap_table.At(i);
+ map ^= stackmap_table.At(i);
OS::Print("%s\n", map.ToCString());
}
}
@@ -433,9 +435,9 @@
Code& code = Code::Handle();
for (intptr_t i = 0; i < table.Length();
i += Code::kSCallTableEntryLength) {
- offset |= table.At(i + Code::kSCallTableOffsetEntry);
- function |= table.At(i + Code::kSCallTableFunctionEntry);
- code |= table.At(i + Code::kSCallTableCodeEntry);
+ offset ^= table.At(i + Code::kSCallTableOffsetEntry);
+ function ^= table.At(i + Code::kSCallTableFunctionEntry);
+ code ^= table.At(i + Code::kSCallTableCodeEntry);
OS::Print(" 0x%"Px": %s, %p\n",
start + offset.Value(),
function.ToFullyQualifiedCString(),
@@ -571,7 +573,7 @@
return error.raw();
}
for (int i = 0; i < functions.Length(); i++) {
- func |= functions.At(i);
+ func ^= functions.At(i);
ASSERT(!func.IsNull());
if (!func.HasCode() &&
!func.is_abstract() &&
diff --git a/runtime/vm/constants_arm.h b/runtime/vm/constants_arm.h
index f3a7cc1..aca46da 100644
--- a/runtime/vm/constants_arm.h
+++ b/runtime/vm/constants_arm.h
@@ -138,6 +138,11 @@
const Register FPREG = FP;
+// Exception object is passed in this register to the catch handlers when an
+// exception is thrown.
+const Register kExceptionObjectReg = R0; // Unimplemented.
+
+
// Values for the condition field as defined in section A3.2.
enum Condition {
kNoCondition = -1,
@@ -160,6 +165,331 @@
kMaxCondition = 16,
};
+
+// Opcodes for Data-processing instructions (instructions with a type 0 and 1)
+// as defined in section A3.4
+enum Opcode {
+ kNoOperand = -1,
+ AND = 0, // Logical AND
+ EOR = 1, // Logical Exclusive OR
+ SUB = 2, // Subtract
+ RSB = 3, // Reverse Subtract
+ ADD = 4, // Add
+ ADC = 5, // Add with Carry
+ SBC = 6, // Subtract with Carry
+ RSC = 7, // Reverse Subtract with Carry
+ TST = 8, // Test
+ TEQ = 9, // Test Equivalence
+ CMP = 10, // Compare
+ CMN = 11, // Compare Negated
+ ORR = 12, // Logical (inclusive) OR
+ MOV = 13, // Move
+ BIC = 14, // Bit Clear
+ MVN = 15, // Move Not
+ kMaxOperand = 16
+};
+
+
+// Shifter types for Data-processing operands as defined in section A5.1.2.
+enum Shift {
+ kNoShift = -1,
+ LSL = 0, // Logical shift left
+ LSR = 1, // Logical shift right
+ ASR = 2, // Arithmetic shift right
+ ROR = 3, // Rotate right
+ kMaxShift = 4
+};
+
+
+// Special Supervisor Call 24-bit codes used in the presence of the ARM
+// simulator for redirection, breakpoints, stop messages, and spill markers.
+// See /usr/include/asm/unistd.h
+const uint32_t kRedirectionSvcCode = 0x90001f; // unused syscall, was sys_stty
+const uint32_t kBreakpointSvcCode = 0x900020; // unused syscall, was sys_gtty
+const uint32_t kStopMessageSvcCode = 0x9f0001; // __ARM_NR_breakpoint
+const uint32_t kSpillMarkerSvcBase = 0x9f0100; // unused ARM private syscall
+const uint32_t kWordSpillMarkerSvcCode = kSpillMarkerSvcBase + 1;
+const uint32_t kDWordSpillMarkerSvcCode = kSpillMarkerSvcBase + 2;
+
+
+// Constants used for the decoding or encoding of the individual fields of
+// instructions. Based on the "Figure 3-1 ARM instruction set summary".
+enum InstructionFields {
+ kConditionShift = 28,
+ kConditionBits = 4,
+ kTypeShift = 25,
+ kTypeBits = 3,
+ kLinkShift = 24,
+ kLinkBits = 1,
+ kUShift = 23,
+ kUBits = 1,
+ kOpcodeShift = 21,
+ kOpcodeBits = 4,
+ kSShift = 20,
+ kSBits = 1,
+ kRnShift = 16,
+ kRnBits = 4,
+ kRdShift = 12,
+ kRdBits = 4,
+ kRsShift = 8,
+ kRsBits = 4,
+ kRmShift = 0,
+ kRmBits = 4,
+
+ // Immediate instruction fields encoding.
+ kRotateShift = 8,
+ kRotateBits = 4,
+ kImmed8Shift = 0,
+ kImmed8Bits = 8,
+
+ // Shift instruction register fields encodings.
+ kShiftImmShift = 7,
+ kShiftRegisterShift = 8,
+ kShiftImmBits = 5,
+ kShiftShift = 5,
+ kShiftBits = 2,
+
+ // Load/store instruction offset field encoding.
+ kOffset12Shift = 0,
+ kOffset12Bits = 12,
+ kOffset12Mask = 0x00000fff,
+
+ // Mul instruction register fields encodings.
+ kMulRdShift = 16,
+ kMulRdBits = 4,
+ kMulRnShift = 12,
+ kMulRnBits = 4,
+
+ kBranchOffsetMask = 0x00ffffff
+};
+
+
+// The class Instr enables access to individual fields defined in the ARM
+// architecture instruction set encoding as described in figure A3-1.
+//
+// Example: Test whether the instruction at ptr sets the condition code bits.
+//
+// bool InstructionSetsConditionCodes(byte* ptr) {
+// Instr* instr = Instr::At(ptr);
+// int type = instr->TypeField();
+// return ((type == 0) || (type == 1)) && instr->HasS();
+// }
+//
+class Instr {
+ public:
+ enum {
+ kInstrSize = 4,
+ kInstrSizeLog2 = 2,
+ kPCReadOffset = 8
+ };
+
+ static const int kBreakPointInstructionSize = kInstrSize;
+ bool IsBreakPoint() {
+ return IsBkpt();
+ }
+
+ // Get the raw instruction bits.
+ inline int32_t InstructionBits() const {
+ return *reinterpret_cast<const int32_t*>(this);
+ }
+
+ // Set the raw instruction bits to value.
+ inline void SetInstructionBits(int32_t value) {
+ *reinterpret_cast<int32_t*>(this) = value;
+ }
+
+ // Read one particular bit out of the instruction bits.
+ inline int Bit(int nr) const {
+ return (InstructionBits() >> nr) & 1;
+ }
+
+ // Read a bit field out of the instruction bits.
+ inline int Bits(int shift, int count) const {
+ return (InstructionBits() >> shift) & ((1 << count) - 1);
+ }
+
+
+ // Accessors for the different named fields used in the ARM encoding.
+ // The naming of these accessor corresponds to figure A3-1.
+ // Generally applicable fields
+ inline Condition ConditionField() const {
+ return static_cast<Condition>(Bits(kConditionShift, kConditionBits));
+ }
+ inline int TypeField() const { return Bits(kTypeShift, kTypeBits); }
+
+ inline Register RnField() const { return static_cast<Register>(
+ Bits(kRnShift, kRnBits)); }
+ inline Register RdField() const { return static_cast<Register>(
+ Bits(kRdShift, kRdBits)); }
+
+ // Fields used in Data processing instructions
+ inline Opcode OpcodeField() const {
+ return static_cast<Opcode>(Bits(kOpcodeShift, kOpcodeBits));
+ }
+ inline int SField() const { return Bits(kSShift, kSBits); }
+ // with register
+ inline Register RmField() const {
+ return static_cast<Register>(Bits(kRmShift, kRmBits));
+ }
+ inline Shift ShiftField() const { return static_cast<Shift>(
+ Bits(kShiftShift, kShiftBits)); }
+ inline int RegShiftField() const { return Bit(4); }
+ inline Register RsField() const {
+ return static_cast<Register>(Bits(kRsShift, kRsBits));
+ }
+ inline int ShiftAmountField() const { return Bits(kShiftImmShift,
+ kShiftImmBits); }
+ // with immediate
+ inline int RotateField() const { return Bits(kRotateShift, kRotateBits); }
+ inline int Immed8Field() const { return Bits(kImmed8Shift, kImmed8Bits); }
+
+ // Fields used in Load/Store instructions
+ inline int PUField() const { return Bits(23, 2); }
+ inline int BField() const { return Bit(22); }
+ inline int WField() const { return Bit(21); }
+ inline int LField() const { return Bit(20); }
+ // with register uses same fields as Data processing instructions above
+ // with immediate
+ inline int Offset12Field() const { return Bits(kOffset12Shift,
+ kOffset12Bits); }
+ // multiple
+ inline int RlistField() const { return Bits(0, 16); }
+ // extra loads and stores
+ inline int SignField() const { return Bit(6); }
+ inline int HField() const { return Bit(5); }
+ inline int ImmedHField() const { return Bits(8, 4); }
+ inline int ImmedLField() const { return Bits(0, 4); }
+
+ // Fields used in Branch instructions
+ inline int LinkField() const { return Bits(kLinkShift, kLinkBits); }
+ inline int SImmed24Field() const { return ((InstructionBits() << 8) >> 8); }
+
+ // Fields used in Supervisor Call instructions
+ inline uint32_t SvcField() const { return Bits(0, 24); }
+
+ // Field used in Breakpoint instruction
+ inline uint16_t BkptField() const {
+ return ((Bits(8, 12) << 4) | Bits(0, 4));
+ }
+
+ // Field used in 16-bit immediate move instructions
+ inline uint16_t MovwField() const {
+ return ((Bits(16, 4) << 12) | Bits(0, 12));
+ }
+
+ // Field used in VFP float immediate move instruction
+ inline float ImmFloatField() const {
+ uint32_t imm32 = (Bit(19) << 31) | (((1 << 5) - Bit(18)) << 25) |
+ (Bits(16, 2) << 23) | (Bits(0, 4) << 19);
+ return bit_cast<float, uint32_t>(imm32);
+ }
+
+ // Field used in VFP double immediate move instruction
+ inline double ImmDoubleField() const {
+ uint64_t imm64 = (Bit(19)*(1LL << 63)) | (((1LL << 8) - Bit(18)) << 54) |
+ (Bits(16, 2)*(1LL << 52)) | (Bits(0, 4)*(1LL << 48));
+ return bit_cast<double, uint64_t>(imm64);
+ }
+
+ // Test for data processing instructions of type 0 or 1.
+ // See "ARM Architecture Reference Manual ARMv7-A and ARMv7-R edition",
+ // section A5.1 "ARM instruction set encoding".
+ inline bool IsDataProcessing() const {
+ ASSERT(ConditionField() != kSpecialCondition);
+ ASSERT(Bits(26, 2) == 0); // Type 0 or 1.
+ return ((Bits(20, 5) & 0x19) != 0x10) &&
+ ((Bit(25) == 1) || // Data processing immediate.
+ (Bit(4) == 0) || // Data processing register.
+ (Bit(7) == 0)); // Data processing register-shifted register.
+ }
+
+ // Tests for special encodings of type 0 instructions (extra loads and stores,
+ // as well as multiplications, synchronization primitives, and miscellaneous).
+ // Can only be called for a type 0 or 1 instruction.
+ inline bool IsMiscellaneous() const {
+ ASSERT(Bits(26, 2) == 0); // Type 0 or 1.
+ return ((Bit(25) == 0) && ((Bits(20, 5) & 0x19) == 0x10) && (Bit(7) == 0));
+ }
+ inline bool IsMultiplyOrSyncPrimitive() const {
+ ASSERT(Bits(26, 2) == 0); // Type 0 or 1.
+ return ((Bit(25) == 0) && (Bits(4, 4) == 9));
+ }
+
+ // Test for Supervisor Call instruction.
+ inline bool IsSvc() const {
+ return ((InstructionBits() & 0xff000000) == 0xef000000);
+ }
+
+ // Test for Breakpoint instruction.
+ inline bool IsBkpt() const {
+ return ((InstructionBits() & 0xfff000f0) == 0xe1200070);
+ }
+
+ // VFP register fields.
+ inline SRegister SnField() const {
+ return static_cast<SRegister>((Bits(kRnShift, kRnBits) << 1) + Bit(7));
+ }
+ inline SRegister SdField() const {
+ return static_cast<SRegister>((Bits(kRdShift, kRdBits) << 1) + Bit(22));
+ }
+ inline SRegister SmField() const {
+ return static_cast<SRegister>((Bits(kRmShift, kRmBits) << 1) + Bit(5));
+ }
+ inline DRegister DnField() const {
+ return static_cast<DRegister>(Bits(kRnShift, kRnBits) + (Bit(7) << 4));
+ }
+ inline DRegister DdField() const {
+ return static_cast<DRegister>(Bits(kRdShift, kRdBits) + (Bit(22) << 4));
+ }
+ inline DRegister DmField() const {
+ return static_cast<DRegister>(Bits(kRmShift, kRmBits) + (Bit(5) << 4));
+ }
+
+ // Test for VFP data processing or single transfer instructions of type 7.
+ inline bool IsVFPDataProcessingOrSingleTransfer() const {
+ ASSERT(ConditionField() != kSpecialCondition);
+ ASSERT(TypeField() == 7);
+ return ((Bit(24) == 0) && (Bits(9, 3) == 5));
+ // Bit(4) == 0: Data Processing
+ // Bit(4) == 1: 8, 16, or 32-bit Transfer between ARM Core and VFP
+ }
+
+ // Test for VFP 64-bit transfer instructions of type 6.
+ inline bool IsVFPDoubleTransfer() const {
+ ASSERT(ConditionField() != kSpecialCondition);
+ ASSERT(TypeField() == 6);
+ return ((Bits(21, 4) == 2) && (Bits(9, 3) == 5) &&
+ ((Bits(4, 4) & 0xd) == 1));
+ }
+
+ // Test for VFP load and store instructions of type 6.
+ inline bool IsVFPLoadStore() const {
+ ASSERT(ConditionField() != kSpecialCondition);
+ ASSERT(TypeField() == 6);
+ return ((Bits(20, 5) & 0x12) == 0x10) && (Bits(9, 3) == 5);
+ }
+
+ // Special accessors that test for existence of a value.
+ inline bool HasS() const { return SField() == 1; }
+ inline bool HasB() const { return BField() == 1; }
+ inline bool HasW() const { return WField() == 1; }
+ inline bool HasL() const { return LField() == 1; }
+ inline bool HasSign() const { return SignField() == 1; }
+ inline bool HasH() const { return HField() == 1; }
+ inline bool HasLink() const { return LinkField() == 1; }
+
+ // Instructions are read out of a code stream. The only way to get a
+ // reference to an instruction is to convert a pointer. There is no way
+ // to allocate or create instances of class Instr.
+ // Use the At(pc) function to create references to Instr.
+ static Instr* At(uword pc) { return reinterpret_cast<Instr*>(pc); }
+ Instr* Next() { return this + kInstrSize; }
+
+ private:
+ DISALLOW_ALLOCATION();
+ DISALLOW_IMPLICIT_CONSTRUCTORS(Instr);
+};
+
} // namespace dart
#endif // VM_CONSTANTS_ARM_H_
diff --git a/runtime/vm/dart.cc b/runtime/vm/dart.cc
index 405e416..e5d97ed 100644
--- a/runtime/vm/dart.cc
+++ b/runtime/vm/dart.cc
@@ -15,6 +15,7 @@
#include "vm/object.h"
#include "vm/object_store.h"
#include "vm/port.h"
+#include "vm/simulator.h"
#include "vm/snapshot.h"
#include "vm/stub_code.h"
#include "vm/symbols.h"
@@ -94,6 +95,9 @@
FreeListElement::InitOnce();
Api::InitOnce();
CodeObservers::InitOnce();
+#if defined(USING_SIMULATOR)
+ Simulator::InitOnce();
+#endif
// Create the read-only handles area.
ASSERT(predefined_handles_ == NULL);
predefined_handles_ = new ReadOnlyHandles();
@@ -155,13 +159,13 @@
String& url = String::Handle();
String& source = String::Handle();
for (int i = 0; i < lib_count; i++) {
- lib |= libs.At(i);
+ lib ^= libs.At(i);
url = lib.url();
OS::Print("Library %s:\n", url.ToCString());
scripts = lib.LoadedScripts();
intptr_t script_count = scripts.Length();
for (intptr_t i = 0; i < script_count; i++) {
- script |= scripts.At(i);
+ script ^= scripts.At(i);
url = script.url();
source = script.Source();
OS::Print("Source for %s:\n", url.ToCString());
@@ -213,6 +217,8 @@
isolate->heap()->ProfileToFile("initialize");
}
+ Object::VerifyBuiltinVtables();
+
StubCode::Init(isolate);
// TODO(regis): Reenable this code for arm and mips when possible.
#if defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64)
@@ -244,6 +250,7 @@
uword Dart::AllocateReadOnlyHandle() {
+ ASSERT(Isolate::Current() == Dart::vm_isolate());
ASSERT(predefined_handles_ != NULL);
return predefined_handles_->handles_.AllocateScopedHandle();
}
diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc
index 9c673b3..95d3f0c 100644
--- a/runtime/vm/dart_api_impl.cc
+++ b/runtime/vm/dart_api_impl.cc
@@ -1787,7 +1787,7 @@
"[%"Pd"..%"Pd"].",
str_size, String::kMaxElements);
}
- if (str_obj.IsCanonical()) {
+ if (str_obj.InVMHeap()) {
// Since the string object is read only we do not externalize
// the string but instead copy the contents of the string into the
// specified buffer and return a Null object.
@@ -2734,7 +2734,7 @@
// Some special types like 'dynamic' have a null functions list.
if (!func_array.IsNull()) {
for (intptr_t i = 0; i < func_array.Length(); ++i) {
- func |= func_array.At(i);
+ func ^= func_array.At(i);
// Skip implicit getters and setters.
if (func.kind() == RawFunction::kImplicitGetter ||
@@ -2755,7 +2755,7 @@
while (it.HasNext()) {
obj = it.GetNext();
if (obj.IsFunction()) {
- func |= obj.raw();
+ func ^= obj.raw();
name = func.UserVisibleName();
names.Add(name);
}
@@ -3078,7 +3078,7 @@
// allocated in the vm isolate.
if (!field_array.IsNull()) {
for (intptr_t i = 0; i < field_array.Length(); ++i) {
- field |= field_array.At(i);
+ field ^= field_array.At(i);
name = field.UserVisibleName();
names.Add(name);
}
@@ -3090,7 +3090,7 @@
while (it.HasNext()) {
obj = it.GetNext();
if (obj.IsField()) {
- field |= obj.raw();
+ field ^= obj.raw();
name = field.UserVisibleName();
names.Add(name);
}
@@ -3393,7 +3393,7 @@
// TODO(turnidge): Support redirecting factories.
ASSERT(result.IsFunction());
Function& constructor = Function::Handle(isolate);
- constructor |= result.raw();
+ constructor ^= result.raw();
Instance& new_object = Instance::Handle(isolate);
if (constructor.IsConstructor()) {
@@ -3806,7 +3806,7 @@
if (field.IsNull()) {
const String& setter_name =
String::Handle(isolate, Field::SetterName(field_name));
- setter |= lib.LookupFunctionAllowPrivate(setter_name);
+ setter ^= lib.LookupFunctionAllowPrivate(setter_name);
}
if (!setter.IsNull()) {
@@ -4180,7 +4180,7 @@
return Api::NewError("%s: Unable to deserialize snapshot correctly.",
CURRENT_FUNC);
}
- library |= tmp.raw();
+ library ^= tmp.raw();
library.set_debuggable(true);
isolate->object_store()->set_root_library(library);
return Api::NewHandle(isolate, library.raw());
diff --git a/runtime/vm/dart_api_impl_test.cc b/runtime/vm/dart_api_impl_test.cc
index ec3e94c..625d603 100644
--- a/runtime/vm/dart_api_impl_test.cc
+++ b/runtime/vm/dart_api_impl_test.cc
@@ -1248,7 +1248,7 @@
const String& str1 = String::Handle(String::New("Test String"));
Dart_Handle ref = Api::NewHandle(isolate, str1.raw());
String& str2 = String::Handle();
- str2 |= Api::UnwrapHandle(ref);
+ str2 ^= Api::UnwrapHandle(ref);
EXPECT(str1.Equals(str2));
}
Dart_ExitScope();
@@ -1297,22 +1297,22 @@
DARTSCOPE_NOCHECKS(isolate);
for (int i = 0; i < 500; i++) {
String& str = String::Handle();
- str |= Api::UnwrapHandle(handles[i]);
+ str ^= Api::UnwrapHandle(handles[i]);
EXPECT(str.Equals(kTestString1));
}
for (int i = 500; i < 1000; i++) {
String& str = String::Handle();
- str |= Api::UnwrapHandle(handles[i]);
+ str ^= Api::UnwrapHandle(handles[i]);
EXPECT(str.Equals(kTestString2));
}
for (int i = 1000; i < 1500; i++) {
String& str = String::Handle();
- str |= Api::UnwrapHandle(handles[i]);
+ str ^= Api::UnwrapHandle(handles[i]);
EXPECT(str.Equals(kTestString1));
}
for (int i = 1500; i < 2000; i++) {
String& str = String::Handle();
- str |= Api::UnwrapHandle(handles[i]);
+ str ^= Api::UnwrapHandle(handles[i]);
EXPECT(str.Equals(kTestString2));
}
}
@@ -2255,7 +2255,7 @@
}
EXPECT_EQ(100, state->CountLocalHandles());
for (int i = 0; i < 100; i++) {
- val |= Api::UnwrapHandle(handles[i]);
+ val ^= Api::UnwrapHandle(handles[i]);
EXPECT_EQ(i, val.Value());
}
// Start another scope and allocate some more local handles.
@@ -2266,7 +2266,7 @@
}
EXPECT_EQ(200, state->CountLocalHandles());
for (int i = 100; i < 200; i++) {
- val |= Api::UnwrapHandle(handles[i]);
+ val ^= Api::UnwrapHandle(handles[i]);
EXPECT_EQ(i, val.Value());
}
@@ -2278,7 +2278,7 @@
}
EXPECT_EQ(300, state->CountLocalHandles());
for (int i = 200; i < 300; i++) {
- val |= Api::UnwrapHandle(handles[i]);
+ val ^= Api::UnwrapHandle(handles[i]);
EXPECT_EQ(i, val.Value());
}
EXPECT_EQ(300, state->CountLocalHandles());
@@ -7078,7 +7078,7 @@
{
DARTSCOPE_NOCHECKS(isolate);
String& handle = String::Handle();
- handle |= Api::UnwrapHandle(str);
+ handle ^= Api::UnwrapHandle(str);
EXPECT(handle.IsOld());
}
EXPECT_VALID(Dart_GetPeer(str, &out));
@@ -7406,7 +7406,7 @@
&peer,
MakeExternalCback);
- EXPECT(Dart_IsNull(str));
+ EXPECT(Dart_IsExternalString(str));
for (intptr_t i = 0; i < kExpectedLen; i++) {
EXPECT_EQ(expected_str[i], ext_str[i]);
}
diff --git a/runtime/vm/dart_entry.cc b/runtime/vm/dart_entry.cc
index 3461a53..47cb5b7 100644
--- a/runtime/vm/dart_entry.cc
+++ b/runtime/vm/dart_entry.cc
@@ -247,7 +247,7 @@
String& name = String::Handle();
Smi& pos = Smi::Handle();
for (intptr_t i = 0; i < num_named_args; i++) {
- name |= optional_arguments_names.At(i);
+ name ^= optional_arguments_names.At(i);
pos = Smi::New(num_pos_args + i);
intptr_t insert_index = kFirstNamedEntryIndex + (kNamedEntrySize * i);
// Shift already inserted pairs with "larger" names.
@@ -255,11 +255,11 @@
Smi& previous_pos = Smi::Handle();
while (insert_index > kFirstNamedEntryIndex) {
intptr_t previous_index = insert_index - kNamedEntrySize;
- previous_name |= descriptor.At(previous_index + kNameOffset);
+ previous_name ^= descriptor.At(previous_index + kNameOffset);
intptr_t result = name.CompareTo(previous_name);
ASSERT(result != 0); // Duplicate argument names checked in parser.
if (result > 0) break;
- previous_pos |= descriptor.At(previous_index + kPositionOffset);
+ previous_pos ^= descriptor.At(previous_index + kPositionOffset);
descriptor.SetAt(insert_index + kNameOffset, previous_name);
descriptor.SetAt(insert_index + kPositionOffset, previous_pos);
insert_index = previous_index;
diff --git a/runtime/vm/debugger.cc b/runtime/vm/debugger.cc
index b913f7f..a10d329 100644
--- a/runtime/vm/debugger.cc
+++ b/runtime/vm/debugger.cc
@@ -508,7 +508,7 @@
ASSERT(i < desc_indices_.length());
intptr_t desc_index = desc_indices_[i];
ASSERT(name != NULL);
- *name |= var_descriptors_.GetName(desc_index);
+ *name ^= var_descriptors_.GetName(desc_index);
RawLocalVarDescriptors::VarInfo var_info;
var_descriptors_.GetInfo(desc_index, &var_info);
ASSERT(token_pos != NULL);
@@ -824,7 +824,7 @@
functions = cls.functions();
intptr_t num_functions = functions.IsNull() ? 0 : functions.Length();
for (intptr_t f = 0; f < num_functions; f++) {
- function |= functions.At(f);
+ function ^= functions.At(f);
ASSERT(!function.IsNull());
if (function.HasOptimizedCode()) {
function.SwitchToUnoptimizedCode();
@@ -1126,6 +1126,11 @@
}
+void Debugger::OneTimeBreakAtEntry(const Function& target_function) {
+ InstrumentForStepping(target_function);
+}
+
+
SourceBreakpoint* Debugger::SetBreakpointAtEntry(
const Function& target_function) {
ASSERT(!target_function.IsNull());
@@ -1142,7 +1147,7 @@
const GrowableObjectArray& libs =
GrowableObjectArray::Handle(isolate_->object_store()->libraries());
for (int i = 0; i < libs.Length(); i++) {
- lib |= libs.At(i);
+ lib ^= libs.At(i);
script = lib.LookupScript(script_url);
if (!script.IsNull()) {
break;
@@ -1277,7 +1282,7 @@
while (!cls.IsNull()) {
fields = cls.fields();
for (int i = 0; i < fields.Length(); i++) {
- field |= fields.At(i);
+ field ^= fields.At(i);
if (!field.is_static()) {
field_name = field.name();
field_list.Add(field_name);
@@ -1299,7 +1304,7 @@
String& field_name = String::Handle();
Object& field_value = Object::Handle();
for (int i = 0; i < fields.Length(); i++) {
- field |= fields.At(i);
+ field ^= fields.At(i);
if (field.is_static()) {
field_name = field.name();
field_value = GetStaticField(cls, field_name);
@@ -1324,7 +1329,7 @@
while (it.HasNext()) {
entry = it.GetNext();
if (entry.IsField()) {
- field |= entry.raw();
+ field ^= entry.raw();
cls = field.owner();
ASSERT(field.is_static());
field_name = field.name();
diff --git a/runtime/vm/debugger.h b/runtime/vm/debugger.h
index 04b5fcb..b85cfc7 100644
--- a/runtime/vm/debugger.h
+++ b/runtime/vm/debugger.h
@@ -250,6 +250,7 @@
SourceBreakpoint* SetBreakpointAtEntry(const Function& target_function);
SourceBreakpoint* SetBreakpointAtLine(const String& script_url,
intptr_t line_number);
+ void OneTimeBreakAtEntry(const Function& target_function);
void RemoveBreakpoint(intptr_t bp_id);
SourceBreakpoint* GetBreakpointById(intptr_t id);
diff --git a/runtime/vm/debugger_api_impl.cc b/runtime/vm/debugger_api_impl.cc
index d4f9d0a..301b524 100644
--- a/runtime/vm/debugger_api_impl.cc
+++ b/runtime/vm/debugger_api_impl.cc
@@ -361,6 +361,42 @@
}
+DART_EXPORT Dart_Handle Dart_OneTimeBreakAtEntry(
+ Dart_Handle library_in,
+ Dart_Handle class_name_in,
+ Dart_Handle function_name_in) {
+ Isolate* isolate = Isolate::Current();
+ DARTSCOPE(isolate);
+ UNWRAP_AND_CHECK_PARAM(Library, library, library_in);
+ UNWRAP_AND_CHECK_PARAM(String, class_name, class_name_in);
+ UNWRAP_AND_CHECK_PARAM(String, function_name, function_name_in);
+
+ const char* msg = CheckIsolateState(isolate);
+ if (msg != NULL) {
+ return Api::NewError("%s", msg);
+ }
+
+ // Resolve the breakpoint target function.
+ Debugger* debugger = isolate->debugger();
+ const Function& bp_target = Function::Handle(
+ debugger->ResolveFunction(library, class_name, function_name));
+ if (bp_target.IsNull()) {
+ const bool toplevel = class_name.Length() == 0;
+ return Api::NewError("%s: could not find function '%s%s%s'",
+ CURRENT_FUNC,
+ toplevel ? "" : class_name.ToCString(),
+ toplevel ? "" : ".",
+ function_name.ToCString());
+ }
+
+ debugger->OneTimeBreakAtEntry(bp_target);
+ return Api::True(isolate);
+}
+
+
+
+
+
DART_EXPORT Dart_Handle Dart_RemoveBreakpoint(intptr_t bp_id) {
Isolate* isolate = Isolate::Current();
DARTSCOPE(isolate);
@@ -574,7 +610,7 @@
Script& script = Script::Handle();
String& url = String::Handle();
for (int i = 0; i < num_scripts; i++) {
- script |= loaded_scripts.At(i);
+ script ^= loaded_scripts.At(i);
url = script.url();
script_list.SetAt(i, url);
}
@@ -595,7 +631,7 @@
Library &lib = Library::Handle();
const Array& library_id_list = Array::Handle(Array::New(num_libs));
for (int i = 0; i < num_libs; i++) {
- lib |= libs.At(i);
+ lib ^= libs.At(i);
ASSERT(!lib.IsNull());
ASSERT(Smi::IsValid(lib.index()));
library_id_list.SetAt(i, Smi::Handle(Smi::New(lib.index())));
@@ -670,7 +706,7 @@
String& lib_url = String::Handle();
const Array& library_url_list = Array::Handle(Array::New(num_libs));
for (int i = 0; i < num_libs; i++) {
- lib |= libs.At(i);
+ lib ^= libs.At(i);
ASSERT(!lib.IsNull());
lib_url = lib.url();
library_url_list.SetAt(i, lib_url);
diff --git a/runtime/vm/deopt_instructions.cc b/runtime/vm/deopt_instructions.cc
index d393088..37d6e23 100644
--- a/runtime/vm/deopt_instructions.cc
+++ b/runtime/vm/deopt_instructions.cc
@@ -202,7 +202,7 @@
void Execute(DeoptimizationContext* deopt_context, intptr_t to_index) {
Function& function = Function::Handle(deopt_context->isolate());
- function |= deopt_context->ObjectAt(object_table_index_);
+ function ^= deopt_context->ObjectAt(object_table_index_);
const Code& code =
Code::Handle(deopt_context->isolate(), function.unoptimized_code());
uword continue_at_pc = code.GetDeoptAfterPcAtDeoptId(deopt_id_);
@@ -261,7 +261,7 @@
void Execute(DeoptimizationContext* deopt_context, intptr_t to_index) {
Function& function = Function::Handle(deopt_context->isolate());
- function |= deopt_context->ObjectAt(object_table_index_);
+ function ^= deopt_context->ObjectAt(object_table_index_);
const Code& code =
Code::Handle(deopt_context->isolate(), function.unoptimized_code());
uword continue_at_pc = code.GetDeoptBeforePcAtDeoptId(deopt_id_);
@@ -439,7 +439,7 @@
void Execute(DeoptimizationContext* deopt_context, intptr_t to_index) {
Function& function = Function::Handle(deopt_context->isolate());
- function |= deopt_context->ObjectAt(object_table_index_);
+ function ^= deopt_context->ObjectAt(object_table_index_);
const Code& code =
Code::Handle(deopt_context->isolate(), function.unoptimized_code());
ASSERT(!code.IsNull());
@@ -585,7 +585,7 @@
DeoptRetAfterAddressInstr::GetEncodedValues(from_index,
&object_table_index,
&deopt_id);
- *func |= object_table.At(object_table_index);
+ *func ^= object_table.At(object_table_index);
const Code& code = Code::Handle(func->unoptimized_code());
return code.GetDeoptAfterPcAtDeoptId(deopt_id);
}
@@ -823,9 +823,9 @@
DeoptInfo* info,
Smi* reason) {
intptr_t i = index * kEntrySize;
- *offset |= table.At(i);
- *info |= table.At(i + 1);
- *reason |= table.At(i + 2);
+ *offset ^= table.At(i);
+ *info ^= table.At(i + 1);
+ *reason ^= table.At(i + 2);
}
} // namespace dart
diff --git a/runtime/vm/disassembler.h b/runtime/vm/disassembler.h
index 63a972b..25224c7 100644
--- a/runtime/vm/disassembler.h
+++ b/runtime/vm/disassembler.h
@@ -28,7 +28,6 @@
intptr_t human_size,
uword pc) = 0;
- // TODO(regis): Remove Print function once we have a real x64 disassembler.
// Print a formatted message.
virtual void Print(const char* format, ...) = 0;
};
diff --git a/runtime/vm/disassembler_x64.cc b/runtime/vm/disassembler_x64.cc
index f8ab7be..4d15072 100644
--- a/runtime/vm/disassembler_x64.cc
+++ b/runtime/vm/disassembler_x64.cc
@@ -1509,6 +1509,13 @@
data += 3;
break;
+ case 0xC8:
+ AppendToBuffer("enter %d, %d",
+ *reinterpret_cast<uint16_t*>(data + 1),
+ data[3]);
+ data += 4;
+ break;
+
case 0x69: // fall through
case 0x6B: {
int mod, regop, rm;
diff --git a/runtime/vm/elfgen.h b/runtime/vm/elfgen.h
index fb8c2f6..9406853 100644
--- a/runtime/vm/elfgen.h
+++ b/runtime/vm/elfgen.h
@@ -120,6 +120,7 @@
kELFDATA2LSB = 1,
kELFDATA2MSB = 2,
kEM_386 = 3,
+ kEM_MIPS = 8,
kEM_ARM = 40,
kEM_X86_64 = 62,
kEV_CURRENT = 1,
@@ -336,15 +337,13 @@
DebugInfo::ByteBuffer* symtab = §ion_buf_[kSymtab];
const int beg = symtab->size();
WriteInt(symtab, AddName(name)); // st_name
-#if defined(TARGET_ARCH_X64)
+#if defined(ARCH_IS_64_BIT)
WriteShort(symtab, (kSTB_LOCAL << 4) + kSTT_FUNC); // st_info + (st_other<<8)
WriteShort(symtab, kText); // st_shndx
#endif
WriteWord(symtab, pc); // st_value
WriteWord(symtab, size); // st_size
-#if defined(TARGET_ARCH_IA32) || \
- defined(TARGET_ARCH_ARM) || \
- defined(TARGET_ARCH_MIPS)
+#if defined(ARCH_IS_32_BIT)
// st_info + (st_other<<8)
WriteShort(symtab, (kSTB_EXPORTED << 4) + kSTT_FUNC);
WriteShort(symtab, kText); // st_shndx
@@ -385,12 +384,12 @@
void ElfGen::AddELFHeader(int shoff) {
ASSERT(text_vma_ != 0); // Code must have been added.
Write(&header_, kEI_MAG0_MAG3, 4); // EI_MAG0..EI_MAG3
-#if defined(TARGET_ARCH_IA32) || \
- defined(TARGET_ARCH_ARM) || \
- defined(TARGET_ARCH_MIPS)
+#if defined(ARCH_IS_32_BIT)
WriteByte(&header_, kELFCLASS32); // EI_CLASS
-#elif defined(TARGET_ARCH_X64)
+#elif defined(ARCH_IS_64_BIT)
WriteByte(&header_, kELFCLASS64); // EI_CLASS
+#else
+#error Unknown architecture.
#endif
WriteByte(&header_, kELFDATA2LSB); // EI_DATA
WriteByte(&header_, kEV_CURRENT); // EI_VERSION
@@ -404,6 +403,10 @@
WriteShort(&header_, kEM_X86_64); // e_machine
#elif defined(TARGET_ARCH_ARM)
WriteShort(&header_, kEM_ARM); // e_machine
+#elif defined(TARGET_ARCH_MIPS)
+ WriteShort(&header_, kEM_MIPS); // e_machine
+#else
+#error Unknown architecture.
#endif
WriteInt(&header_, kEV_CURRENT); // e_version
WriteWord(&header_, 0); // e_entry: none
diff --git a/runtime/vm/exceptions.cc b/runtime/vm/exceptions.cc
index 7301473..167b74b 100644
--- a/runtime/vm/exceptions.cc
+++ b/runtime/vm/exceptions.cc
@@ -20,11 +20,20 @@
"Prints a stack trace everytime a throw occurs.");
DEFINE_FLAG(bool, heap_profile_out_of_memory, false,
"Writes a heap profile on unhandled out-of-memory exceptions.");
-
+DEFINE_FLAG(bool, verbose_stacktrace, false,
+ "Stack traces will include methods marked invisible.");
const char* Exceptions::kCastErrorDstName = "type cast";
+static bool ShouldShowFunction(const Function& function) {
+ if (FLAG_verbose_stacktrace) {
+ return true;
+ }
+ return function.is_visible();
+}
+
+
// Iterate through the stack frames and try to find a frame with an
// exception handler. Once found, set the pc, sp and fp so that execution
// can continue in that frame.
@@ -56,16 +65,20 @@
ASSERT(pc != 0);
code = func.unoptimized_code();
offset = Smi::New(pc - code.EntryPoint());
- func_list.Add(func);
- code_list.Add(code);
- pc_offset_list.Add(offset);
+ if (ShouldShowFunction(func)) {
+ func_list.Add(func);
+ code_list.Add(code);
+ pc_offset_list.Add(offset);
+ }
}
} else {
offset = Smi::New(frame->pc() - code.EntryPoint());
func = code.function();
- func_list.Add(func);
- code_list.Add(code);
- pc_offset_list.Add(offset);
+ if (ShouldShowFunction(func)) {
+ func_list.Add(func);
+ code_list.Add(code);
+ pc_offset_list.Add(offset);
+ }
}
if (frame->FindExceptionHandler(handler_pc)) {
*handler_sp = frame->sp();
@@ -194,11 +207,11 @@
if (existing_stacktrace.IsNull()) {
stacktrace = Stacktrace::New(func_list, code_list, pc_offset_list);
} else {
- stacktrace |= existing_stacktrace.raw();
+ stacktrace ^= existing_stacktrace.raw();
stacktrace.Append(func_list, code_list, pc_offset_list);
}
} else {
- stacktrace |= existing_stacktrace.raw();
+ stacktrace ^= existing_stacktrace.raw();
}
if (FLAG_print_stacktrace_at_throw) {
OS::Print("Exception '%s' thrown:\n", exception.ToCString());
diff --git a/runtime/vm/flow_graph.cc b/runtime/vm/flow_graph.cc
index 8821941..e2e114e 100644
--- a/runtime/vm/flow_graph.cc
+++ b/runtime/vm/flow_graph.cc
@@ -758,218 +758,6 @@
}
-// Helper to replace a predecessor block. For each successor of 'old_block', the
-// predecessors will be reordered to preserve block-order sorting of the
-// predecessors as well as the phis if the successor is a join.
-void FlowGraph::ReplacePredecessor(BlockEntryInstr* old_block,
- BlockEntryInstr* new_block) {
- // Set the last instruction of the new block to that of the old block.
- Instruction* last = old_block->last_instruction();
- new_block->set_last_instruction(last);
- // For each successor, update the predecessors.
- for (intptr_t sidx = 0; sidx < last->SuccessorCount(); ++sidx) {
- // If the successor is a target, update its predecessor.
- TargetEntryInstr* target = last->SuccessorAt(sidx)->AsTargetEntry();
- if (target != NULL) {
- target->predecessor_ = new_block;
- continue;
- }
- // If the successor is a join, update each predecessor and the phis.
- JoinEntryInstr* join = last->SuccessorAt(sidx)->AsJoinEntry();
- ASSERT(join != NULL);
- // Find the old predecessor index.
- intptr_t old_index = join->IndexOfPredecessor(old_block);
- intptr_t pred_count = join->PredecessorCount();
- ASSERT(old_index >= 0);
- ASSERT(old_index < pred_count);
- // Find the new predecessor index while reordering the predecessors.
- intptr_t new_id = new_block->block_id();
- intptr_t new_index = old_index;
- if (old_block->block_id() < new_id) {
- // Search upwards, bubbling down intermediate predecessors.
- for (; new_index < pred_count - 1; ++new_index) {
- if (join->predecessors_[new_index + 1]->block_id() > new_id) break;
- join->predecessors_[new_index] = join->predecessors_[new_index + 1];
- }
- } else {
- // Search downwards, bubbling up intermediate predecessors.
- for (; new_index > 0; --new_index) {
- if (join->predecessors_[new_index - 1]->block_id() < new_id) break;
- join->predecessors_[new_index] = join->predecessors_[new_index - 1];
- }
- }
- join->predecessors_[new_index] = new_block;
- // If the new and old predecessor index match there is nothing to update.
- if ((join->phis() == NULL) || (old_index == new_index)) return;
- // Otherwise, reorder the predecessor uses in each phi.
- for (intptr_t i = 0; i < join->phis()->length(); ++i) {
- PhiInstr* phi = (*join->phis())[i];
- if (phi == NULL) continue;
- ASSERT(pred_count == phi->InputCount());
- // Save the predecessor use.
- Value* pred_use = phi->InputAt(old_index);
- // Move uses between old and new.
- intptr_t step = (old_index < new_index) ? 1 : -1;
- for (intptr_t use_idx = old_index;
- use_idx != new_index;
- use_idx += step) {
- Value* use = phi->InputAt(use_idx + step);
- phi->SetInputAt(use_idx, use);
- use->set_use_index(use_idx);
- }
- // Write the predecessor use.
- phi->SetInputAt(new_index, pred_use);
- pred_use->set_use_index(new_index);
- }
- }
-}
-
-
-// Inline a flow graph at a call site.
-//
-// Assumes the callee graph was computed by BuildGraph with an inlining context
-// and transformed to SSA with ComputeSSA with a correct virtual register
-// number, and that the use lists have been correctly computed.
-//
-// After inlining the caller graph will correctly have adjusted the pre/post
-// orders, the dominator tree and the use lists.
-void FlowGraph::InlineCall(Definition* call,
- FlowGraph* callee_graph,
- ValueInliningContext* inlining_context) {
- ASSERT(call->previous() != NULL);
- ASSERT(call->next() != NULL);
- ASSERT(callee_graph->graph_entry()->SuccessorCount() == 1);
- ASSERT(callee_graph->max_block_id() > max_block_id());
- ASSERT(callee_graph->max_virtual_register_number() >
- max_virtual_register_number());
-
- // Adjust the max block id to the max block id of the callee graph.
- max_block_id_ = callee_graph->max_block_id();
-
- // Adjust the SSA temp index by the callee graph's index.
- current_ssa_temp_index_ = callee_graph->max_virtual_register_number();
-
- BlockEntryInstr* caller_entry = call->GetBlock();
- TargetEntryInstr* callee_entry = callee_graph->graph_entry()->normal_entry();
-
- // Attach the outer environment on each instruction in the callee graph.
- for (BlockIterator block_it = callee_graph->postorder_iterator();
- !block_it.Done();
- block_it.Advance()) {
- for (ForwardInstructionIterator it(block_it.Current());
- !it.Done();
- it.Advance()) {
- Instruction* instr = it.Current();
- // TODO(zerny): Avoid creating unnecessary environments. Note that some
- // optimizations need deoptimization info for non-deoptable instructions,
- // eg, LICM on GOTOs.
- if (instr->env() != NULL) call->env()->DeepCopyToOuter(instr);
- }
- }
-
- // Insert the callee graph into the caller graph. First sort the list of
- // exits by block id (recording block entries as a side effect).
- inlining_context->SortExits();
- if (inlining_context->NumExits() == 0) {
- // TODO(zerny): Add support for non-local exits, such as throw.
- UNREACHABLE();
- } else if (inlining_context->NumExits() == 1) {
- // For just one exit, replace the uses and remove the call from the graph.
- call->ReplaceUsesWith(inlining_context->ValueAt(0)->definition());
- call->previous()->LinkTo(callee_entry->next());
- inlining_context->LastInstructionAt(0)->LinkTo(call->next());
- // In case of control flow, locally update the predecessors, phis and
- // dominator tree.
- // TODO(zerny): should we leave the dominator tree since we recompute it
- // after a full inlining pass?
- if (callee_graph->preorder().length() > 2) {
- BlockEntryInstr* exit_block = inlining_context->ExitBlockAt(0);
- // Pictorially, the graph structure is:
- //
- // Bc : caller_entry Bi : callee_entry
- // before_call inlined_head
- // call ... other blocks ...
- // after_call Be : exit_block
- // inlined_foot
- // And becomes:
- //
- // Bc : caller_entry
- // before_call
- // inlined_head
- // ... other blocks ...
- // Be : exit_block
- // inlined_foot
- // after_call
- //
- // For 'after_call', caller entry (Bc) is replaced by callee exit (Be).
- ReplacePredecessor(caller_entry, exit_block);
- // For 'inlined_head', callee entry (Bi) is replaced by caller entry (Bc).
- ReplacePredecessor(callee_entry, caller_entry);
- // The callee exit is now the immediate dominator of blocks whose
- // immediate dominator was the caller entry.
- ASSERT(exit_block->dominated_blocks().is_empty());
- for (intptr_t i = 0; i < caller_entry->dominated_blocks().length(); ++i) {
- BlockEntryInstr* block = caller_entry->dominated_blocks()[i];
- block->set_dominator(exit_block);
- exit_block->AddDominatedBlock(block);
- }
- // The caller entry is now the immediate dominator of blocks whose
- // immediate dominator was the callee entry.
- caller_entry->ClearDominatedBlocks();
- for (intptr_t i = 0; i < callee_entry->dominated_blocks().length(); ++i) {
- BlockEntryInstr* block = callee_entry->dominated_blocks()[i];
- block->set_dominator(caller_entry);
- caller_entry->AddDominatedBlock(block);
- }
- }
- } else {
- // Create a join of the returns.
- JoinEntryInstr* join =
- new JoinEntryInstr(++max_block_id_,
- CatchClauseNode::kInvalidTryIndex,
- caller_entry->loop_depth());
- intptr_t count = inlining_context->NumExits();
- for (intptr_t i = 0; i < count; ++i) {
- inlining_context->LastInstructionAt(i)->Goto(join);
- // Directly add the predecessors of the join in ascending block id order.
- join->predecessors_.Add(inlining_context->ExitBlockAt(i));
- }
- // If the call has uses, create a phi of the returns.
- if (call->HasUses()) {
- // Environment count: length before call - argument count (+ return)
- intptr_t env_count = call->env()->Length() - call->ArgumentCount();
- // Add a phi of the return values.
- join->InsertPhi(env_count, env_count + 1);
- PhiInstr* phi = join->phis()->Last();
- phi->set_ssa_temp_index(alloc_ssa_temp_index());
- phi->mark_alive();
- for (intptr_t i = 0; i < count; ++i) {
- Value* value = inlining_context->ValueAt(i);
- phi->SetInputAt(i, value);
- value->set_instruction(phi);
- value->set_use_index(i);
- }
- // Replace uses of the call with the phi.
- call->ReplaceUsesWith(phi);
- }
- // Remove the call from the graph.
- call->previous()->LinkTo(callee_entry->next());
- join->LinkTo(call->next());
- // Replace the blocks after splitting (see comment in the len=1 case above).
- ReplacePredecessor(caller_entry, join);
- ReplacePredecessor(callee_entry, caller_entry);
- // Update the last instruction pointers on each exit block to the new goto.
- for (intptr_t i = 0; i < count; ++i) {
- inlining_context->ExitBlockAt(i)->set_last_instruction(
- inlining_context->LastInstructionAt(i)->next());
- }
- // Mark that the dominator tree is invalid.
- // TODO(zerny): Compute the dominator frontier locally.
- invalid_dominator_tree_ = true;
- }
-}
-
-
void FlowGraph::RepairGraphAfterInlining() {
DiscoverBlocks();
if (invalid_dominator_tree_) {
diff --git a/runtime/vm/flow_graph.h b/runtime/vm/flow_graph.h
index 46b6a6e..81edee2 100644
--- a/runtime/vm/flow_graph.h
+++ b/runtime/vm/flow_graph.h
@@ -91,14 +91,16 @@
}
intptr_t current_ssa_temp_index() const { return current_ssa_temp_index_; }
+ void set_current_ssa_temp_index(intptr_t index) {
+ current_ssa_temp_index_ = index;
+ }
intptr_t max_virtual_register_number() const {
return current_ssa_temp_index();
}
- intptr_t max_block_id() const {
- return max_block_id_;
- }
+ intptr_t max_block_id() const { return max_block_id_; }
+ void set_max_block_id(intptr_t id) { max_block_id_ = id; }
GraphEntryInstr* graph_entry() const {
return graph_entry_;
@@ -124,14 +126,13 @@
// body blocks for each loop header.
void ComputeLoops(GrowableArray<BlockEntryInstr*>* loop_headers);
- void InlineCall(Definition* call,
- FlowGraph* callee_graph,
- ValueInliningContext* inlining_context);
void RepairGraphAfterInlining();
// TODO(zerny): Once the SSA is feature complete this should be removed.
void Bailout(const char* reason) const;
+ void InvalidateDominatorTree() { invalid_dominator_tree_ = true; }
+
#ifdef DEBUG
// Validation methods for debugging.
bool ResetUseLists();
diff --git a/runtime/vm/flow_graph_builder.cc b/runtime/vm/flow_graph_builder.cc
index dd1c6104..9d04729 100644
--- a/runtime/vm/flow_graph_builder.cc
+++ b/runtime/vm/flow_graph_builder.cc
@@ -60,6 +60,41 @@
}
+InliningContext* InliningContext::Create(Definition* call) {
+ return new ValueInliningContext();
+}
+
+
+void InliningContext::PrepareGraphs(FlowGraph* caller_graph,
+ Definition* call,
+ FlowGraph* callee_graph) {
+ ASSERT(callee_graph->graph_entry()->SuccessorCount() == 1);
+ ASSERT(callee_graph->max_block_id() > caller_graph->max_block_id());
+ ASSERT(callee_graph->max_virtual_register_number() >
+ caller_graph->max_virtual_register_number());
+
+ // Adjust the caller's maximum block id and current SSA temp index.
+ caller_graph->set_max_block_id(callee_graph->max_block_id());
+ caller_graph->set_current_ssa_temp_index(
+ callee_graph->max_virtual_register_number());
+
+ // Attach the outer environment on each instruction in the callee graph.
+ for (BlockIterator block_it = callee_graph->postorder_iterator();
+ !block_it.Done();
+ block_it.Advance()) {
+ for (ForwardInstructionIterator it(block_it.Current());
+ !it.Done();
+ it.Advance()) {
+ Instruction* instr = it.Current();
+ // TODO(zerny): Avoid creating unnecessary environments. Note that some
+ // optimizations need deoptimization info for non-deoptable instructions,
+ // eg, LICM on GOTOs.
+ if (instr->env() != NULL) call->env()->DeepCopyToOuter(instr);
+ }
+ }
+}
+
+
void ValueInliningContext::AddExit(ReturnInstr* exit) {
Data data = { NULL, exit };
exits_.Add(data);
@@ -81,6 +116,118 @@
}
+void ValueInliningContext::ReplaceCall(FlowGraph* caller_graph,
+ Definition* call,
+ FlowGraph* callee_graph) {
+ ASSERT(call->previous() != NULL);
+ ASSERT(call->next() != NULL);
+ PrepareGraphs(caller_graph, call, callee_graph);
+
+ BlockEntryInstr* caller_entry = call->GetBlock();
+ TargetEntryInstr* callee_entry = callee_graph->graph_entry()->normal_entry();
+
+ // Insert the callee graph into the caller graph. First sort the list of
+ // exits by block id (recording block entries as a side effect).
+ SortExits();
+ intptr_t num_exits = exits_.length();
+ if (num_exits == 0) {
+ // TODO(zerny): Add support for non-local exits, such as throw.
+ UNREACHABLE();
+ } else if (num_exits == 1) {
+ // For just one exit, replace the uses and remove the call from the graph.
+ call->ReplaceUsesWith(ValueAt(0)->definition());
+ call->previous()->LinkTo(callee_entry->next());
+ LastInstructionAt(0)->LinkTo(call->next());
+ // In case of control flow, locally update the predecessors, phis and
+ // dominator tree.
+ // TODO(zerny): should we leave the dominator tree since we recompute it
+ // after a full inlining pass?
+ if (callee_graph->preorder().length() > 2) {
+ BlockEntryInstr* exit_block = ExitBlockAt(0);
+ // Pictorially, the graph structure is:
+ //
+ // Bc : caller_entry Bi : callee_entry
+ // before_call inlined_head
+ // call ... other blocks ...
+ // after_call Be : exit_block
+ // inlined_foot
+ // And becomes:
+ //
+ // Bc : caller_entry
+ // before_call
+ // inlined_head
+ // ... other blocks ...
+ // Be : exit_block
+ // inlined_foot
+ // after_call
+ //
+ // For 'after_call', caller entry (Bc) is replaced by callee exit (Be).
+ caller_entry->ReplaceAsPredecessorWith(exit_block);
+ // For 'inlined_head', callee entry (Bi) is replaced by caller entry (Bc).
+ callee_entry->ReplaceAsPredecessorWith(caller_entry);
+ // The callee exit is now the immediate dominator of blocks whose
+ // immediate dominator was the caller entry.
+ ASSERT(exit_block->dominated_blocks().is_empty());
+ for (intptr_t i = 0; i < caller_entry->dominated_blocks().length(); ++i) {
+ BlockEntryInstr* block = caller_entry->dominated_blocks()[i];
+ block->set_dominator(exit_block);
+ exit_block->AddDominatedBlock(block);
+ }
+ // The caller entry is now the immediate dominator of blocks whose
+ // immediate dominator was the callee entry.
+ caller_entry->ClearDominatedBlocks();
+ for (intptr_t i = 0; i < callee_entry->dominated_blocks().length(); ++i) {
+ BlockEntryInstr* block = callee_entry->dominated_blocks()[i];
+ block->set_dominator(caller_entry);
+ caller_entry->AddDominatedBlock(block);
+ }
+ }
+ } else {
+ // Create a join of the returns.
+ intptr_t join_id = caller_graph->max_block_id() + 1;
+ caller_graph->set_max_block_id(join_id);
+ JoinEntryInstr* join =
+ new JoinEntryInstr(join_id, CatchClauseNode::kInvalidTryIndex);
+ for (intptr_t i = 0; i < num_exits; ++i) {
+ LastInstructionAt(i)->Goto(join);
+ // Directly add the predecessors of the join in ascending block id order.
+ join->predecessors_.Add(ExitBlockAt(i));
+ }
+ // If the call has uses, create a phi of the returns.
+ if (call->HasUses()) {
+ // Environment count: length before call - argument count (+ return)
+ intptr_t env_count = call->env()->Length() - call->ArgumentCount();
+ // Add a phi of the return values.
+ join->InsertPhi(env_count, env_count + 1);
+ PhiInstr* phi = join->phis()->Last();
+ phi->set_ssa_temp_index(caller_graph->alloc_ssa_temp_index());
+ phi->mark_alive();
+ for (intptr_t i = 0; i < num_exits; ++i) {
+ Value* value = ValueAt(i);
+ phi->SetInputAt(i, value);
+ value->set_instruction(phi);
+ value->set_use_index(i);
+ }
+ // Replace uses of the call with the phi.
+ call->ReplaceUsesWith(phi);
+ }
+ // Remove the call from the graph.
+ call->previous()->LinkTo(callee_entry->next());
+ join->LinkTo(call->next());
+ // Replace the blocks after splitting (see comment in the len=1 case above).
+ caller_entry->ReplaceAsPredecessorWith(join);
+ callee_entry->ReplaceAsPredecessorWith(caller_entry);
+ // Update the last instruction pointers on each exit block to the new goto.
+ for (intptr_t i = 0; i < num_exits; ++i) {
+ ExitBlockAt(i)->set_last_instruction(LastInstructionAt(i)->next());
+ }
+ // Mark that the dominator tree is invalid.
+ // TODO(zerny): Compute the dominator frontier locally.
+ caller_graph->InvalidateDominatorTree();
+ }
+}
+
+
void EffectGraphVisitor::Append(const EffectGraphVisitor& other_fragment) {
ASSERT(is_open());
if (other_fragment.is_empty()) return;
@@ -204,9 +351,7 @@
temp_index_ = true_fragment.temp_index();
} else {
JoinEntryInstr* join =
- new JoinEntryInstr(owner()->AllocateBlockId(),
- owner()->try_index(),
- loop_depth());
+ new JoinEntryInstr(owner()->AllocateBlockId(), owner()->try_index());
true_exit->Goto(join);
false_exit->Goto(join);
exit_ = join;
@@ -235,9 +380,7 @@
Append(test_fragment);
} else {
JoinEntryInstr* join =
- new JoinEntryInstr(owner()->AllocateBlockId(),
- owner()->try_index(),
- loop_depth() + 1);
+ new JoinEntryInstr(owner()->AllocateBlockId(), owner()->try_index());
join->LinkTo(test_fragment.entry());
Goto(join);
body_exit->Goto(join);
@@ -349,9 +492,7 @@
ASSERT(!branches.is_empty());
for (intptr_t i = 0; i < branches.length(); i++) {
TargetEntryInstr* target =
- new TargetEntryInstr(owner()->AllocateBlockId(),
- owner()->try_index(),
- loop_depth());
+ new TargetEntryInstr(owner()->AllocateBlockId(), owner()->try_index());
*(branches[i]) = target;
target->Goto(join);
}
@@ -374,17 +515,13 @@
if (branches.length() == 1) {
TargetEntryInstr* target =
- new TargetEntryInstr(owner()->AllocateBlockId(),
- owner()->try_index(),
- loop_depth());
+ new TargetEntryInstr(owner()->AllocateBlockId(), owner()->try_index());
*(branches[0]) = target;
return target;
}
JoinEntryInstr* join =
- new JoinEntryInstr(owner()->AllocateBlockId(),
- owner()->try_index(),
- loop_depth());
+ new JoinEntryInstr(owner()->AllocateBlockId(), owner()->try_index());
ConnectBranchesTo(branches, join);
return join;
}
@@ -475,13 +612,11 @@
if ((node->kind() == Token::kAND) || (node->kind() == Token::kOR)) {
TestGraphVisitor for_left(owner(),
temp_index(),
- loop_depth(),
node->left()->token_pos());
node->left()->Visit(&for_left);
TestGraphVisitor for_right(owner(),
temp_index(),
- loop_depth(),
node->right()->token_pos());
node->right()->Visit(&for_right);
@@ -520,13 +655,13 @@
// <Statement> ::= Return { value: <Expression>
// inlined_finally_list: <InlinedFinally>* }
void EffectGraphVisitor::VisitReturnNode(ReturnNode* node) {
- ValueGraphVisitor for_value(owner(), temp_index(), loop_depth());
+ ValueGraphVisitor for_value(owner(), temp_index());
node->value()->Visit(&for_value);
Append(for_value);
for (intptr_t i = 0; i < node->inlined_finally_list_length(); i++) {
InlineBailout("EffectGraphVisitor::VisitReturnNode (exception)");
- EffectGraphVisitor for_effect(owner(), temp_index(), loop_depth());
+ EffectGraphVisitor for_effect(owner(), temp_index());
node->InlinedFinallyNodeAt(i)->Visit(&for_effect);
Append(for_effect);
if (!is_open()) return;
@@ -649,7 +784,7 @@
// type: AbstractType
// dst_name: String }
void EffectGraphVisitor::VisitAssignableNode(AssignableNode* node) {
- ValueGraphVisitor for_value(owner(), temp_index(), loop_depth());
+ ValueGraphVisitor for_value(owner(), temp_index());
node->expr()->Visit(&for_value);
Append(for_value);
Definition* checked_value;
@@ -669,7 +804,7 @@
void ValueGraphVisitor::VisitAssignableNode(AssignableNode* node) {
- ValueGraphVisitor for_value(owner(), temp_index(), loop_depth());
+ ValueGraphVisitor for_value(owner(), temp_index());
node->expr()->Visit(&for_value);
Append(for_value);
ReturnValue(BuildAssignableValue(node->expr()->token_pos(),
@@ -689,12 +824,11 @@
// See ValueGraphVisitor::VisitBinaryOpNode.
TestGraphVisitor for_left(owner(),
temp_index(),
- loop_depth(),
node->left()->token_pos());
node->left()->Visit(&for_left);
- EffectGraphVisitor for_right(owner(), temp_index(), loop_depth());
+ EffectGraphVisitor for_right(owner(), temp_index());
node->right()->Visit(&for_right);
- EffectGraphVisitor empty(owner(), temp_index(), loop_depth());
+ EffectGraphVisitor empty(owner(), temp_index());
if (node->kind() == Token::kAND) {
Join(for_left, for_right, empty);
} else {
@@ -702,12 +836,12 @@
}
return;
}
- ValueGraphVisitor for_left_value(owner(), temp_index(), loop_depth());
+ ValueGraphVisitor for_left_value(owner(), temp_index());
node->left()->Visit(&for_left_value);
Append(for_left_value);
PushArgumentInstr* push_left = PushArgument(for_left_value.value());
- ValueGraphVisitor for_right_value(owner(), temp_index(), loop_depth());
+ ValueGraphVisitor for_right_value(owner(), temp_index());
node->right()->Visit(&for_right_value);
Append(for_right_value);
PushArgumentInstr* push_right = PushArgument(for_right_value.value());
@@ -739,11 +873,10 @@
TestGraphVisitor for_test(owner(),
temp_index(),
- loop_depth(),
node->left()->token_pos());
node->left()->Visit(&for_test);
- ValueGraphVisitor for_right(owner(), temp_index(), loop_depth());
+ ValueGraphVisitor for_right(owner(), temp_index());
node->right()->Visit(&for_right);
Value* right_value = for_right.value();
if (FLAG_enable_type_checks) {
@@ -759,13 +892,13 @@
for_right.Do(BuildStoreExprTemp(compare));
if (node->kind() == Token::kAND) {
- ValueGraphVisitor for_false(owner(), temp_index(), loop_depth());
+ ValueGraphVisitor for_false(owner(), temp_index());
Value* constant_false = for_false.Bind(new ConstantInstr(Bool::False()));
for_false.Do(BuildStoreExprTemp(constant_false));
Join(for_test, for_right, for_false);
} else {
ASSERT(node->kind() == Token::kOR);
- ValueGraphVisitor for_true(owner(), temp_index(), loop_depth());
+ ValueGraphVisitor for_true(owner(), temp_index());
Value* constant_true = for_true.Bind(new ConstantInstr(Bool::True()));
for_true.Do(BuildStoreExprTemp(constant_true));
Join(for_test, for_true, for_right);
@@ -878,7 +1011,7 @@
void EffectGraphVisitor::BuildTypeTest(ComparisonNode* node) {
ASSERT(Token::IsTypeTestOperator(node->kind()));
- EffectGraphVisitor for_left_value(owner(), temp_index(), loop_depth());
+ EffectGraphVisitor for_left_value(owner(), temp_index());
node->left()->Visit(&for_left_value);
Append(for_left_value);
}
@@ -888,7 +1021,7 @@
ASSERT(Token::IsTypeCastOperator(node->kind()));
const AbstractType& type = node->right()->AsTypeNode()->type();
ASSERT(type.IsFinalized()); // The type in a type cast may be malformed.
- ValueGraphVisitor for_value(owner(), temp_index(), loop_depth());
+ ValueGraphVisitor for_value(owner(), temp_index());
node->left()->Visit(&for_value);
const String& dst_name = String::ZoneHandle(
Symbols::New(Exceptions::kCastErrorDstName));
@@ -909,7 +1042,7 @@
const Type& object_type = Type::Handle(Type::ObjectType());
if (type.IsInstantiated() && object_type.IsSubtypeOf(type, NULL)) {
// Must evaluate left side.
- EffectGraphVisitor for_left_value(owner(), temp_index(), loop_depth());
+ EffectGraphVisitor for_left_value(owner(), temp_index());
node->left()->Visit(&for_left_value);
Append(for_left_value);
ReturnDefinition(new ConstantInstr(negate_result ?
@@ -943,7 +1076,7 @@
return;
}
- ValueGraphVisitor for_left_value(owner(), temp_index(), loop_depth());
+ ValueGraphVisitor for_left_value(owner(), temp_index());
node->left()->Visit(&for_left_value);
Append(for_left_value);
PushArgumentInstr* push_left = PushArgument(for_left_value.value());
@@ -986,7 +1119,7 @@
ASSERT(Token::IsTypeCastOperator(node->kind()));
const AbstractType& type = node->right()->AsTypeNode()->type();
ASSERT(type.IsFinalized()); // The type in a type cast may be malformed.
- ValueGraphVisitor for_value(owner(), temp_index(), loop_depth());
+ ValueGraphVisitor for_value(owner(), temp_index());
node->left()->Visit(&for_value);
Append(for_value);
const String& dst_name = String::ZoneHandle(
@@ -1013,10 +1146,10 @@
}
if ((node->kind() == Token::kEQ_STRICT) ||
(node->kind() == Token::kNE_STRICT)) {
- ValueGraphVisitor for_left_value(owner(), temp_index(), loop_depth());
+ ValueGraphVisitor for_left_value(owner(), temp_index());
node->left()->Visit(&for_left_value);
Append(for_left_value);
- ValueGraphVisitor for_right_value(owner(), temp_index(), loop_depth());
+ ValueGraphVisitor for_right_value(owner(), temp_index());
node->right()->Visit(&for_right_value);
Append(for_right_value);
StrictCompareInstr* comp = new StrictCompareInstr(
@@ -1026,10 +1159,10 @@
}
if ((node->kind() == Token::kEQ) || (node->kind() == Token::kNE)) {
- ValueGraphVisitor for_left_value(owner(), temp_index(), loop_depth());
+ ValueGraphVisitor for_left_value(owner(), temp_index());
node->left()->Visit(&for_left_value);
Append(for_left_value);
- ValueGraphVisitor for_right_value(owner(), temp_index(), loop_depth());
+ ValueGraphVisitor for_right_value(owner(), temp_index());
node->right()->Visit(&for_right_value);
Append(for_right_value);
if (FLAG_enable_type_checks) {
@@ -1056,10 +1189,10 @@
return;
}
- ValueGraphVisitor for_left_value(owner(), temp_index(), loop_depth());
+ ValueGraphVisitor for_left_value(owner(), temp_index());
node->left()->Visit(&for_left_value);
Append(for_left_value);
- ValueGraphVisitor for_right_value(owner(), temp_index(), loop_depth());
+ ValueGraphVisitor for_right_value(owner(), temp_index());
node->right()->Visit(&for_right_value);
Append(for_right_value);
RelationalOpInstr* comp = new RelationalOpInstr(node->token_pos(),
@@ -1073,7 +1206,7 @@
void EffectGraphVisitor::VisitUnaryOpNode(UnaryOpNode* node) {
// "!" cannot be overloaded, therefore do not call operator.
if (node->kind() == Token::kNOT) {
- ValueGraphVisitor for_value(owner(), temp_index(), loop_depth());
+ ValueGraphVisitor for_value(owner(), temp_index());
node->operand()->Visit(&for_value);
Append(for_value);
Value* value = for_value.value();
@@ -1086,7 +1219,7 @@
return;
}
- ValueGraphVisitor for_value(owner(), temp_index(), loop_depth());
+ ValueGraphVisitor for_value(owner(), temp_index());
node->operand()->Visit(&for_value);
Append(for_value);
PushArgumentInstr* push_value = PushArgument(for_value.value());
@@ -1108,14 +1241,13 @@
void EffectGraphVisitor::VisitConditionalExprNode(ConditionalExprNode* node) {
TestGraphVisitor for_test(owner(),
temp_index(),
- loop_depth(),
node->condition()->token_pos());
node->condition()->Visit(&for_test);
// Translate the subexpressions for their effects.
- EffectGraphVisitor for_true(owner(), temp_index(), loop_depth());
+ EffectGraphVisitor for_true(owner(), temp_index());
node->true_expr()->Visit(&for_true);
- EffectGraphVisitor for_false(owner(), temp_index(), loop_depth());
+ EffectGraphVisitor for_false(owner(), temp_index());
node->false_expr()->Visit(&for_false);
Join(for_test, for_true, for_false);
@@ -1125,16 +1257,15 @@
void ValueGraphVisitor::VisitConditionalExprNode(ConditionalExprNode* node) {
TestGraphVisitor for_test(owner(),
temp_index(),
- loop_depth(),
node->condition()->token_pos());
node->condition()->Visit(&for_test);
- ValueGraphVisitor for_true(owner(), temp_index(), loop_depth());
+ ValueGraphVisitor for_true(owner(), temp_index());
node->true_expr()->Visit(&for_true);
ASSERT(for_true.is_open());
for_true.Do(BuildStoreExprTemp(for_true.value()));
- ValueGraphVisitor for_false(owner(), temp_index(), loop_depth());
+ ValueGraphVisitor for_false(owner(), temp_index());
node->false_expr()->Visit(&for_false);
ASSERT(for_false.is_open());
for_false.Do(BuildStoreExprTemp(for_false.value()));
@@ -1150,12 +1281,11 @@
void EffectGraphVisitor::VisitIfNode(IfNode* node) {
TestGraphVisitor for_test(owner(),
temp_index(),
- loop_depth(),
node->condition()->token_pos());
node->condition()->Visit(&for_test);
- EffectGraphVisitor for_true(owner(), temp_index(), loop_depth());
- EffectGraphVisitor for_false(owner(), temp_index(), loop_depth());
+ EffectGraphVisitor for_true(owner(), temp_index());
+ EffectGraphVisitor for_false(owner(), temp_index());
node->true_branch()->Visit(&for_true);
// The for_false graph fragment will be empty (default graph fragment) if
@@ -1166,11 +1296,10 @@
void EffectGraphVisitor::VisitSwitchNode(SwitchNode* node) {
- EffectGraphVisitor switch_body(owner(), temp_index(), loop_depth());
+ EffectGraphVisitor switch_body(owner(), temp_index());
node->body()->Visit(&switch_body);
Append(switch_body);
if ((node->label() != NULL) && (node->label()->join_for_break() != NULL)) {
- node->label()->join_for_break()->set_loop_depth(loop_depth());
if (is_open()) Goto(node->label()->join_for_break());
exit_ = node->label()->join_for_break();
}
@@ -1204,7 +1333,7 @@
void EffectGraphVisitor::VisitCaseNode(CaseNode* node) {
const intptr_t len = node->case_expressions()->length();
// Create case statements instructions.
- EffectGraphVisitor for_case_statements(owner(), temp_index(), loop_depth());
+ EffectGraphVisitor for_case_statements(owner(), temp_index());
// Compute start of statements fragment.
JoinEntryInstr* statement_start = NULL;
if ((node->label() != NULL) && node->label()->is_continue_target()) {
@@ -1213,14 +1342,12 @@
statement_start = node->label()->join_for_continue();
if (statement_start == NULL) {
statement_start = new JoinEntryInstr(owner()->AllocateBlockId(),
- owner()->try_index(),
- loop_depth());
+ owner()->try_index());
node->label()->set_join_for_continue(statement_start);
}
} else {
statement_start = new JoinEntryInstr(owner()->AllocateBlockId(),
- owner()->try_index(),
- loop_depth());
+ owner()->try_index());
}
node->statements()->Visit(&for_case_statements);
Instruction* statement_exit =
@@ -1239,7 +1366,6 @@
AstNode* case_expr = node->case_expressions()->NodeAt(i);
TestGraphVisitor for_case_expression(owner(),
temp_index(),
- loop_depth(),
case_expr->token_pos());
case_expr->Visit(&for_case_expression);
if (i == 0) {
@@ -1268,8 +1394,7 @@
} else {
if (statement_exit != NULL) {
JoinEntryInstr* join = new JoinEntryInstr(owner()->AllocateBlockId(),
- owner()->try_index(),
- loop_depth());
+ owner()->try_index());
statement_exit->Goto(join);
next_target->Goto(join);
exit_instruction = join;
@@ -1303,12 +1428,11 @@
void EffectGraphVisitor::VisitWhileNode(WhileNode* node) {
TestGraphVisitor for_test(owner(),
temp_index(),
- loop_depth() + 1,
node->condition()->token_pos());
node->condition()->Visit(&for_test);
ASSERT(!for_test.is_empty()); // Language spec.
- EffectGraphVisitor for_body(owner(), temp_index(), loop_depth() + 1);
+ EffectGraphVisitor for_body(owner(), temp_index());
for_body.AddInstruction(
new CheckStackOverflowInstr(node->token_pos()));
node->body()->Visit(&for_body);
@@ -1318,14 +1442,12 @@
ASSERT(lbl != NULL);
JoinEntryInstr* join = lbl->join_for_continue();
if (join != NULL) {
- join->set_loop_depth(loop_depth() + 1);
if (for_body.is_open()) for_body.Goto(join);
for_body.exit_ = join;
}
TieLoop(for_test, for_body);
join = lbl->join_for_break();
if (join != NULL) {
- join->set_loop_depth(loop_depth());
Goto(join);
exit_ = join;
}
@@ -1342,14 +1464,13 @@
// g) break-join
void EffectGraphVisitor::VisitDoWhileNode(DoWhileNode* node) {
// Traverse body first in order to generate continue and break labels.
- EffectGraphVisitor for_body(owner(), temp_index(), loop_depth() + 1);
+ EffectGraphVisitor for_body(owner(), temp_index());
for_body.AddInstruction(
new CheckStackOverflowInstr(node->token_pos()));
node->body()->Visit(&for_body);
TestGraphVisitor for_test(owner(),
temp_index(),
- loop_depth() + 1,
node->condition()->token_pos());
node->condition()->Visit(&for_test);
ASSERT(is_open());
@@ -1357,8 +1478,7 @@
// Tie do-while loop (test is after the body).
JoinEntryInstr* body_entry_join =
new JoinEntryInstr(owner()->AllocateBlockId(),
- owner()->try_index(),
- loop_depth() + 1);
+ owner()->try_index());
Goto(body_entry_join);
Instruction* body_exit = AppendFragment(body_entry_join, for_body);
@@ -1366,10 +1486,7 @@
if ((body_exit != NULL) || (join != NULL)) {
if (join == NULL) {
join = new JoinEntryInstr(owner()->AllocateBlockId(),
- owner()->try_index(),
- loop_depth() + 1);
- } else {
- join->set_loop_depth(loop_depth() + 1);
+ owner()->try_index());
}
join->LinkTo(for_test.entry());
if (body_exit != NULL) {
@@ -1382,7 +1499,6 @@
if (join == NULL) {
exit_ = for_test.CreateFalseSuccessor();
} else {
- join->set_loop_depth(loop_depth());
for_test.IfFalseGoto(join);
exit_ = join;
}
@@ -1402,13 +1518,13 @@
// h) loop-exit-target
// i) break-join
void EffectGraphVisitor::VisitForNode(ForNode* node) {
- EffectGraphVisitor for_initializer(owner(), temp_index(), loop_depth());
+ EffectGraphVisitor for_initializer(owner(), temp_index());
node->initializer()->Visit(&for_initializer);
Append(for_initializer);
ASSERT(is_open());
// Compose body to set any jump labels.
- EffectGraphVisitor for_body(owner(), temp_index(), loop_depth() + 1);
+ EffectGraphVisitor for_body(owner(), temp_index());
for_body.AddInstruction(
new CheckStackOverflowInstr(node->token_pos()));
node->body()->Visit(&for_body);
@@ -1416,11 +1532,10 @@
// Join loop body, increment and compute their end instruction.
ASSERT(!for_body.is_empty());
Instruction* loop_increment_end = NULL;
- EffectGraphVisitor for_increment(owner(), temp_index(), loop_depth() + 1);
+ EffectGraphVisitor for_increment(owner(), temp_index());
node->increment()->Visit(&for_increment);
JoinEntryInstr* join = node->label()->join_for_continue();
if (join != NULL) {
- join->set_loop_depth(loop_depth() + 1);
// Insert the join between the body and increment.
if (for_body.is_open()) for_body.Goto(join);
loop_increment_end = AppendFragment(join, for_increment);
@@ -1439,9 +1554,7 @@
// body is not open, i.e., no backward branch exists.
if (loop_increment_end != NULL) {
JoinEntryInstr* loop_start =
- new JoinEntryInstr(owner()->AllocateBlockId(),
- owner()->try_index(),
- loop_depth() + 1);
+ new JoinEntryInstr(owner()->AllocateBlockId(), owner()->try_index());
Goto(loop_start);
loop_increment_end->Goto(loop_start);
exit_ = loop_start;
@@ -1450,20 +1563,16 @@
if (node->condition() == NULL) {
// Endless loop, no test.
JoinEntryInstr* body_entry =
- new JoinEntryInstr(owner()->AllocateBlockId(),
- owner()->try_index(),
- loop_depth() + 1);
+ new JoinEntryInstr(owner()->AllocateBlockId(), owner()->try_index());
AppendFragment(body_entry, for_body);
Goto(body_entry);
if (node->label()->join_for_break() != NULL) {
- node->label()->join_for_break()->set_loop_depth(loop_depth());
// Control flow of ForLoop continues into join_for_break.
exit_ = node->label()->join_for_break();
}
} else {
TestGraphVisitor for_test(owner(),
temp_index(),
- loop_depth() + 1,
node->condition()->token_pos());
node->condition()->Visit(&for_test);
Append(for_test);
@@ -1474,7 +1583,6 @@
if (node->label()->join_for_break() == NULL) {
exit_ = for_test.CreateFalseSuccessor();
} else {
- node->label()->join_for_break()->set_loop_depth(loop_depth());
for_test.IfFalseGoto(node->label()->join_for_break());
exit_ = node->label()->join_for_break();
}
@@ -1484,7 +1592,7 @@
void EffectGraphVisitor::VisitJumpNode(JumpNode* node) {
for (intptr_t i = 0; i < node->inlined_finally_list_length(); i++) {
- EffectGraphVisitor for_effect(owner(), temp_index(), loop_depth());
+ EffectGraphVisitor for_effect(owner(), temp_index());
node->InlinedFinallyNodeAt(i)->Visit(&for_effect);
Append(for_effect);
if (!is_open()) return;
@@ -1522,17 +1630,13 @@
if (node->kind() == Token::kBREAK) {
if (node->label()->join_for_break() == NULL) {
node->label()->set_join_for_break(
- new JoinEntryInstr(owner()->AllocateBlockId(),
- owner()->try_index(),
- BlockEntryInstr::kInvalidLoopDepth));
+ new JoinEntryInstr(owner()->AllocateBlockId(), owner()->try_index()));
}
jump_target = node->label()->join_for_break();
} else {
if (node->label()->join_for_continue() == NULL) {
node->label()->set_join_for_continue(
- new JoinEntryInstr(owner()->AllocateBlockId(),
- owner()->try_index(),
- BlockEntryInstr::kInvalidLoopDepth));
+ new JoinEntryInstr(owner()->AllocateBlockId(), owner()->try_index()));
}
jump_target = node->label()->join_for_continue();
}
@@ -1561,7 +1665,7 @@
ZoneGrowableArray<PushArgumentInstr*>* arguments =
new ZoneGrowableArray<PushArgumentInstr*>(node->length());
for (int i = 0; i < node->length(); ++i) {
- ValueGraphVisitor for_value(owner(), temp_index(), loop_depth());
+ ValueGraphVisitor for_value(owner(), temp_index());
node->ElementAt(i)->Visit(&for_value);
Append(for_value);
arguments->Add(PushArgument(for_value.value()));
@@ -1608,7 +1712,7 @@
receiver = BuildNullValue();
} else {
ASSERT(function.IsImplicitInstanceClosureFunction());
- ValueGraphVisitor for_receiver(owner(), temp_index(), loop_depth());
+ ValueGraphVisitor for_receiver(owner(), temp_index());
node->receiver()->Visit(&for_receiver);
Append(for_receiver);
receiver = for_receiver.value();
@@ -1642,7 +1746,7 @@
const ArgumentListNode& node,
ZoneGrowableArray<Value*>* values) {
for (intptr_t i = 0; i < node.length(); ++i) {
- ValueGraphVisitor for_argument(owner(), temp_index(), loop_depth());
+ ValueGraphVisitor for_argument(owner(), temp_index());
node.NodeAt(i)->Visit(&for_argument);
Append(for_argument);
values->Add(for_argument.value());
@@ -1654,7 +1758,7 @@
const ArgumentListNode& node,
ZoneGrowableArray<PushArgumentInstr*>* values) {
for (intptr_t i = 0; i < node.length(); ++i) {
- ValueGraphVisitor for_argument(owner(), temp_index(), loop_depth());
+ ValueGraphVisitor for_argument(owner(), temp_index());
node.NodeAt(i)->Visit(&for_argument);
Append(for_argument);
PushArgumentInstr* push_arg = PushArgument(for_argument.value());
@@ -1664,7 +1768,7 @@
void EffectGraphVisitor::VisitInstanceCallNode(InstanceCallNode* node) {
- ValueGraphVisitor for_receiver(owner(), temp_index(), loop_depth());
+ ValueGraphVisitor for_receiver(owner(), temp_index());
node->receiver()->Visit(&for_receiver);
Append(for_receiver);
PushArgumentInstr* push_receiver = PushArgument(for_receiver.value());
@@ -1694,10 +1798,10 @@
const Library& core_lib = Library::Handle(Library::CoreLibrary());
if (cls.library() == core_lib.raw()) {
ASSERT(node->arguments()->length() == 2);
- ValueGraphVisitor for_left_value(owner(), temp_index(), loop_depth());
+ ValueGraphVisitor for_left_value(owner(), temp_index());
node->arguments()->NodeAt(0)->Visit(&for_left_value);
Append(for_left_value);
- ValueGraphVisitor for_right_value(owner(), temp_index(), loop_depth());
+ ValueGraphVisitor for_right_value(owner(), temp_index());
node->arguments()->NodeAt(1)->Visit(&for_right_value);
Append(for_right_value);
StrictCompareInstr* comp = new StrictCompareInstr(
@@ -1723,7 +1827,7 @@
ClosureCallInstr* EffectGraphVisitor::BuildClosureCall(
ClosureCallNode* node) {
- ValueGraphVisitor for_closure(owner(), temp_index(), loop_depth());
+ ValueGraphVisitor for_closure(owner(), temp_index());
node->closure()->Visit(&for_closure);
Append(for_closure);
PushArgumentInstr* push_closure = PushArgument(for_closure.value());
@@ -1922,7 +2026,7 @@
}
ASSERT(owner()->parsed_function().instantiator() != NULL);
- ValueGraphVisitor for_instantiator(owner(), temp_index(), loop_depth());
+ ValueGraphVisitor for_instantiator(owner(), temp_index());
owner()->parsed_function().instantiator()->Visit(&for_instantiator);
Append(for_instantiator);
return for_instantiator.value();
@@ -1957,7 +2061,7 @@
// No instantiator for factories.
ASSERT(instantiator == NULL);
ASSERT(owner()->parsed_function().instantiator() != NULL);
- ValueGraphVisitor for_instantiator(owner(), temp_index(), loop_depth());
+ ValueGraphVisitor for_instantiator(owner(), temp_index());
owner()->parsed_function().instantiator()->Visit(&for_instantiator);
Append(for_instantiator);
return for_instantiator.value();
@@ -2105,7 +2209,7 @@
void EffectGraphVisitor::VisitInstanceGetterNode(InstanceGetterNode* node) {
- ValueGraphVisitor for_receiver(owner(), temp_index(), loop_depth());
+ ValueGraphVisitor for_receiver(owner(), temp_index());
node->receiver()->Visit(&for_receiver);
Append(for_receiver);
PushArgumentInstr* push_receiver = PushArgument(for_receiver.value());
@@ -2125,12 +2229,12 @@
InstanceSetterNode* node,
ZoneGrowableArray<PushArgumentInstr*>* arguments,
bool result_is_needed) {
- ValueGraphVisitor for_receiver(owner(), temp_index(), loop_depth());
+ ValueGraphVisitor for_receiver(owner(), temp_index());
node->receiver()->Visit(&for_receiver);
Append(for_receiver);
arguments->Add(PushArgument(for_receiver.value()));
- ValueGraphVisitor for_value(owner(), temp_index(), loop_depth());
+ ValueGraphVisitor for_value(owner(), temp_index());
node->value()->Visit(&for_value);
Append(for_value);
@@ -2197,7 +2301,7 @@
ReturnDefinition(call);
return;
} else {
- ValueGraphVisitor receiver_value(owner(), temp_index(), loop_depth());
+ ValueGraphVisitor receiver_value(owner(), temp_index());
node->receiver()->Visit(&receiver_value);
Append(receiver_value);
arguments->Add(PushArgument(receiver_value.value()));
@@ -2271,12 +2375,12 @@
} else {
if (is_super_setter) {
// Add receiver of instance getter.
- ValueGraphVisitor for_receiver(owner(), temp_index(), loop_depth());
+ ValueGraphVisitor for_receiver(owner(), temp_index());
node->receiver()->Visit(&for_receiver);
Append(for_receiver);
arguments->Add(PushArgument(for_receiver.value()));
}
- ValueGraphVisitor for_value(owner(), temp_index(), loop_depth());
+ ValueGraphVisitor for_value(owner(), temp_index());
node->value()->Visit(&for_value);
Append(for_value);
Value* value = NULL;
@@ -2327,7 +2431,7 @@
// <Expression> ::= LoadLocal { local: LocalVariable }
void EffectGraphVisitor::VisitLoadLocalNode(LoadLocalNode* node) {
if (node->HasPseudo()) {
- EffectGraphVisitor for_pseudo(owner(), temp_index(), loop_depth());
+ EffectGraphVisitor for_pseudo(owner(), temp_index());
node->pseudo()->Visit(&for_pseudo);
Append(for_pseudo);
}
@@ -2345,7 +2449,7 @@
// value: <Expression> }
void EffectGraphVisitor::HandleStoreLocal(StoreLocalNode* node,
bool result_is_needed) {
- ValueGraphVisitor for_value(owner(), temp_index(), loop_depth());
+ ValueGraphVisitor for_value(owner(), temp_index());
node->value()->Visit(&for_value);
Append(for_value);
Value* store_value = for_value.value();
@@ -2374,7 +2478,7 @@
void EffectGraphVisitor::VisitLoadInstanceFieldNode(
LoadInstanceFieldNode* node) {
- ValueGraphVisitor for_instance(owner(), temp_index(), loop_depth());
+ ValueGraphVisitor for_instance(owner(), temp_index());
node->instance()->Visit(&for_instance);
Append(for_instance);
LoadFieldInstr* load = new LoadFieldInstr(
@@ -2387,10 +2491,10 @@
void EffectGraphVisitor::VisitStoreInstanceFieldNode(
StoreInstanceFieldNode* node) {
- ValueGraphVisitor for_instance(owner(), temp_index(), loop_depth());
+ ValueGraphVisitor for_instance(owner(), temp_index());
node->instance()->Visit(&for_instance);
Append(for_instance);
- ValueGraphVisitor for_value(owner(), for_instance.temp_index(), loop_depth());
+ ValueGraphVisitor for_value(owner(), for_instance.temp_index());
node->value()->Visit(&for_value);
Append(for_value);
Value* store_value = for_value.value();
@@ -2424,7 +2528,7 @@
Definition* EffectGraphVisitor::BuildStoreStaticField(
StoreStaticFieldNode* node, bool result_is_needed) {
- ValueGraphVisitor for_value(owner(), temp_index(), loop_depth());
+ ValueGraphVisitor for_value(owner(), temp_index());
node->value()->Visit(&for_value);
Append(for_value);
Value* store_value = NULL;
@@ -2487,12 +2591,12 @@
}
ZoneGrowableArray<PushArgumentInstr*>* arguments =
new ZoneGrowableArray<PushArgumentInstr*>(2);
- ValueGraphVisitor for_array(owner(), temp_index(), loop_depth());
+ ValueGraphVisitor for_array(owner(), temp_index());
node->array()->Visit(&for_array);
Append(for_array);
arguments->Add(PushArgument(for_array.value()));
- ValueGraphVisitor for_index(owner(), temp_index(), loop_depth());
+ ValueGraphVisitor for_index(owner(), temp_index());
node->index_expr()->Visit(&for_index);
Append(for_index);
arguments->Add(PushArgument(for_index.value()));
@@ -2533,7 +2637,7 @@
if (result_is_needed) {
// Even though noSuchMethod most likely does not return,
// we save the stored value if the result is needed.
- ValueGraphVisitor for_value(owner(), temp_index(), loop_depth());
+ ValueGraphVisitor for_value(owner(), temp_index());
node->value()->Visit(&for_value);
Append(for_value);
Bind(BuildStoreExprTemp(for_value.value()));
@@ -2558,17 +2662,17 @@
ZoneGrowableArray<PushArgumentInstr*>* arguments =
new ZoneGrowableArray<PushArgumentInstr*>(3);
- ValueGraphVisitor for_array(owner(), temp_index(), loop_depth());
+ ValueGraphVisitor for_array(owner(), temp_index());
node->array()->Visit(&for_array);
Append(for_array);
arguments->Add(PushArgument(for_array.value()));
- ValueGraphVisitor for_index(owner(), temp_index(), loop_depth());
+ ValueGraphVisitor for_index(owner(), temp_index());
node->index_expr()->Visit(&for_index);
Append(for_index);
arguments->Add(PushArgument(for_index.value()));
- ValueGraphVisitor for_value(owner(), temp_index(), loop_depth());
+ ValueGraphVisitor for_value(owner(), temp_index());
node->value()->Visit(&for_value);
Append(for_value);
Value* value = NULL;
@@ -2754,7 +2858,7 @@
intptr_t i = 0;
while (is_open() && (i < node->length())) {
- EffectGraphVisitor for_effect(owner(), temp_index(), loop_depth());
+ EffectGraphVisitor for_effect(owner(), temp_index());
node->NodeAt(i++)->Visit(&for_effect);
Append(for_effect);
if (!is_open()) {
@@ -2779,7 +2883,6 @@
// taken care of unchaining the context.
if ((node->label() != NULL) &&
(node->label()->join_for_break() != NULL)) {
- node->label()->join_for_break()->set_loop_depth(loop_depth());
if (is_open()) Goto(node->label()->join_for_break());
exit_ = node->label()->join_for_break();
}
@@ -2800,7 +2903,7 @@
new CatchEntryInstr(node->exception_var(), node->stacktrace_var()));
BuildLoadContext(node->context_var());
- EffectGraphVisitor for_catch(owner(), temp_index(), loop_depth());
+ EffectGraphVisitor for_catch(owner(), temp_index());
node->VisitChildren(&for_catch);
Append(for_catch);
}
@@ -2815,20 +2918,18 @@
// Preserve CTX into local variable '%saved_context'.
BuildStoreContext(node->context_var());
- EffectGraphVisitor for_try_block(owner(), temp_index(), loop_depth());
+ EffectGraphVisitor for_try_block(owner(), temp_index());
node->try_block()->Visit(&for_try_block);
if (for_try_block.is_open()) {
JoinEntryInstr* after_try =
- new JoinEntryInstr(owner()->AllocateBlockId(),
- old_try_index,
- loop_depth());
+ new JoinEntryInstr(owner()->AllocateBlockId(), old_try_index);
for_try_block.Goto(after_try);
for_try_block.exit_ = after_try;
}
JoinEntryInstr* try_entry =
- new JoinEntryInstr(owner()->AllocateBlockId(), try_index, loop_depth());
+ new JoinEntryInstr(owner()->AllocateBlockId(), try_index);
Goto(try_entry);
AppendFragment(try_entry, for_try_block);
@@ -2843,12 +2944,10 @@
// that we can set the appropriate handler pc when we generate
// code for this catch block.
catch_block->set_try_index(try_index);
- EffectGraphVisitor for_catch_block(owner(), temp_index(), loop_depth());
+ EffectGraphVisitor for_catch_block(owner(), temp_index());
catch_block->Visit(&for_catch_block);
TargetEntryInstr* catch_entry =
- new TargetEntryInstr(owner()->AllocateBlockId(),
- old_try_index,
- loop_depth());
+ new TargetEntryInstr(owner()->AllocateBlockId(), old_try_index);
catch_entry->set_catch_try_index(try_index);
catch_entry->set_catch_handler_types(catch_block->handler_types());
owner()->AddCatchEntry(catch_entry);
@@ -2857,7 +2956,6 @@
if (node->end_catch_label() != NULL) {
JoinEntryInstr* join = node->end_catch_label()->join_for_continue();
if (join != NULL) {
- join->set_loop_depth(loop_depth());
if (is_open()) Goto(join);
exit_ = join;
}
@@ -2866,7 +2964,7 @@
// Generate code for the finally block if one exists.
if ((node->finally_block() != NULL) && is_open()) {
- EffectGraphVisitor for_finally_block(owner(), temp_index(), loop_depth());
+ EffectGraphVisitor for_finally_block(owner(), temp_index());
node->finally_block()->Visit(&for_finally_block);
Append(for_finally_block);
}
@@ -2895,7 +2993,7 @@
// Evaluate the receiver before the arguments. This will be used
// as an argument to the noSuchMethod call.
- ValueGraphVisitor for_receiver(owner(), temp_index(), loop_depth());
+ ValueGraphVisitor for_receiver(owner(), temp_index());
receiver->Visit(&for_receiver);
Append(for_receiver);
PushArgumentInstr* push_receiver = PushArgument(for_receiver.value());
@@ -3000,7 +3098,7 @@
// TODO(kmillikin) non-local control flow is not handled correctly
// by the inliner.
InlineBailout("EffectGraphVisitor::BuildThrowNode (exception)");
- ValueGraphVisitor for_exception(owner(), temp_index(), loop_depth());
+ ValueGraphVisitor for_exception(owner(), temp_index());
node->exception()->Visit(&for_exception);
Append(for_exception);
PushArgument(for_exception.value());
@@ -3008,7 +3106,7 @@
if (node->stacktrace() == NULL) {
instr = new ThrowInstr(node->token_pos());
} else {
- ValueGraphVisitor for_stack_trace(owner(), temp_index(), loop_depth());
+ ValueGraphVisitor for_stack_trace(owner(), temp_index());
node->stacktrace()->Visit(&for_stack_trace);
Append(for_stack_trace);
PushArgument(for_stack_trace.value());
@@ -3045,10 +3143,8 @@
BuildLoadContext(node->context_var());
JoinEntryInstr* finally_entry =
- new JoinEntryInstr(owner()->AllocateBlockId(),
- owner()->try_index(),
- loop_depth());
- EffectGraphVisitor for_finally_block(owner(), temp_index(), loop_depth());
+ new JoinEntryInstr(owner()->AllocateBlockId(), owner()->try_index());
+ EffectGraphVisitor for_finally_block(owner(), temp_index());
node->finally_block()->Visit(&for_finally_block);
if (try_index >= 0) {
@@ -3057,9 +3153,7 @@
if (for_finally_block.is_open()) {
JoinEntryInstr* after_finally =
- new JoinEntryInstr(owner()->AllocateBlockId(),
- owner()->try_index(),
- loop_depth());
+ new JoinEntryInstr(owner()->AllocateBlockId(), owner()->try_index());
for_finally_block.Goto(after_finally);
for_finally_block.exit_ = after_finally;
}
@@ -3070,7 +3164,7 @@
}
-FlowGraph* FlowGraphBuilder::BuildGraph(intptr_t initial_loop_depth) {
+FlowGraph* FlowGraphBuilder::BuildGraph() {
if (FLAG_print_ast) {
// Print the function ast before IL generation.
AstPrinter::PrintFunctionNodes(parsed_function());
@@ -3079,10 +3173,9 @@
const Function& function = parsed_function().function();
TargetEntryInstr* normal_entry =
new TargetEntryInstr(AllocateBlockId(),
- CatchClauseNode::kInvalidTryIndex,
- initial_loop_depth);
+ CatchClauseNode::kInvalidTryIndex);
graph_entry_ = new GraphEntryInstr(normal_entry);
- EffectGraphVisitor for_effect(this, 0, initial_loop_depth);
+ EffectGraphVisitor for_effect(this, 0);
// TODO(kmillikin): We can eliminate stack checks in some cases (e.g., the
// stack check on entry for leaf routines).
Instruction* check = new CheckStackOverflowInstr(function.token_pos());
diff --git a/runtime/vm/flow_graph_builder.h b/runtime/vm/flow_graph_builder.h
index ac1dd73..b30ad92 100644
--- a/runtime/vm/flow_graph_builder.h
+++ b/runtime/vm/flow_graph_builder.h
@@ -19,7 +19,28 @@
// An abstraction of the graph context in which an inlined call occurs.
class InliningContext: public ZoneAllocated {
public:
+ // Create the appropriate inlining context for the flow graph context of a
+ // call.
+ static InliningContext* Create(Definition* call);
+
virtual void AddExit(ReturnInstr* exit) = 0;
+
+ // Inline a flow graph at a call site.
+ //
+ // Assumes the callee graph was computed by BuildGraph with an inlining
+ // context and transformed to SSA with ComputeSSA with a correct virtual
+ // register number, and that the use lists have been correctly computed.
+ //
+ // After inlining the caller graph will correctly have adjusted the
+ // pre/post orders, the dominator tree and the use lists.
+ virtual void ReplaceCall(FlowGraph* caller_graph,
+ Definition* call,
+ FlowGraph* callee_graph) = 0;
+
+ protected:
+ static void PrepareGraphs(FlowGraph* caller_graph,
+ Definition* call,
+ FlowGraph* callee_graph);
};
@@ -30,6 +51,18 @@
public:
ValueInliningContext() : exits_(4) { }
+ virtual void AddExit(ReturnInstr* exit);
+
+ virtual void ReplaceCall(FlowGraph* caller_graph,
+ Definition* call,
+ FlowGraph* callee_graph);
+
+ private:
+ struct Data {
+ BlockEntryInstr* exit_block;
+ ReturnInstr* exit_return;
+ };
+
BlockEntryInstr* ExitBlockAt(intptr_t i) const {
ASSERT(exits_[i].exit_block != NULL);
return exits_[i].exit_block;
@@ -41,17 +74,8 @@
return exits_[i].exit_return->value();
}
- intptr_t NumExits() { return exits_.length(); }
- virtual void AddExit(ReturnInstr* exit);
- void SortExits();
-
- private:
- struct Data {
- BlockEntryInstr* exit_block;
- ReturnInstr* exit_return;
- };
-
static int LowestBlockIdFirst(const Data* a, const Data* b);
+ void SortExits();
GrowableArray<Data> exits_;
};
@@ -64,7 +88,7 @@
FlowGraphBuilder(const ParsedFunction& parsed_function,
InliningContext* inlining_context);
- FlowGraph* BuildGraph(intptr_t initial_loop_depth);
+ FlowGraph* BuildGraph();
const ParsedFunction& parsed_function() const { return parsed_function_; }
@@ -137,13 +161,11 @@
class EffectGraphVisitor : public AstNodeVisitor {
public:
EffectGraphVisitor(FlowGraphBuilder* owner,
- intptr_t temp_index,
- intptr_t loop_depth)
+ intptr_t temp_index)
: owner_(owner),
temp_index_(temp_index),
entry_(NULL),
- exit_(NULL),
- loop_depth_(loop_depth) { }
+ exit_(NULL) { }
#define DEFINE_VISIT(type, name) virtual void Visit##type(type* node);
NODE_LIST(DEFINE_VISIT)
@@ -151,7 +173,6 @@
FlowGraphBuilder* owner() const { return owner_; }
intptr_t temp_index() const { return temp_index_; }
- intptr_t loop_depth() const { return loop_depth_; }
Instruction* entry() const { return entry_; }
Instruction* exit() const { return exit_; }
@@ -328,9 +349,6 @@
// Output parameters.
Instruction* entry_;
Instruction* exit_;
-
- // Internal state.
- const intptr_t loop_depth_;
};
@@ -342,9 +360,8 @@
class ValueGraphVisitor : public EffectGraphVisitor {
public:
ValueGraphVisitor(FlowGraphBuilder* owner,
- intptr_t temp_index,
- intptr_t loop_depth)
- : EffectGraphVisitor(owner, temp_index, loop_depth), value_(NULL) { }
+ intptr_t temp_index)
+ : EffectGraphVisitor(owner, temp_index), value_(NULL) { }
// Visit functions overridden by this class.
virtual void VisitLiteralNode(LiteralNode* node);
@@ -406,9 +423,8 @@
public:
TestGraphVisitor(FlowGraphBuilder* owner,
intptr_t temp_index,
- intptr_t loop_depth,
intptr_t condition_token_pos)
- : ValueGraphVisitor(owner, temp_index, loop_depth),
+ : ValueGraphVisitor(owner, temp_index),
true_successor_addresses_(1),
false_successor_addresses_(1),
condition_token_pos_(condition_token_pos) { }
diff --git a/runtime/vm/flow_graph_compiler.cc b/runtime/vm/flow_graph_compiler.cc
index ec02181..a55ae09 100644
--- a/runtime/vm/flow_graph_compiler.cc
+++ b/runtime/vm/flow_graph_compiler.cc
@@ -890,6 +890,10 @@
return Int16Array::kBytesPerElement;
case kUint16ArrayCid:
return Uint16Array::kBytesPerElement;
+ case kInt32ArrayCid:
+ return Int32Array::kBytesPerElement;
+ case kUint32ArrayCid:
+ return Uint32Array::kBytesPerElement;
case kOneByteStringCid:
return OneByteString::kBytesPerElement;
case kTwoByteStringCid:
@@ -922,6 +926,10 @@
return Int16Array::data_offset();
case kUint16ArrayCid:
return Uint16Array::data_offset();
+ case kInt32ArrayCid:
+ return Int32Array::data_offset();
+ case kUint32ArrayCid:
+ return Uint32Array::data_offset();
case kOneByteStringCid:
return OneByteString::data_offset();
case kTwoByteStringCid:
diff --git a/runtime/vm/flow_graph_compiler_ia32.cc b/runtime/vm/flow_graph_compiler_ia32.cc
index 97b8da1..a8d383d 100644
--- a/runtime/vm/flow_graph_compiler_ia32.cc
+++ b/runtime/vm/flow_graph_compiler_ia32.cc
@@ -1523,6 +1523,10 @@
return FieldAddress(array, index, TIMES_1, Int16Array::data_offset());
case kUint16ArrayCid:
return FieldAddress(array, index, TIMES_1, Uint16Array::data_offset());
+ case kInt32ArrayCid:
+ return FieldAddress(array, index, TIMES_2, Int32Array::data_offset());
+ case kUint32ArrayCid:
+ return FieldAddress(array, index, TIMES_2, Uint32Array::data_offset());
case kOneByteStringCid:
return FieldAddress(array, index, TIMES_1, OneByteString::data_offset());
case kTwoByteStringCid:
diff --git a/runtime/vm/flow_graph_compiler_x64.cc b/runtime/vm/flow_graph_compiler_x64.cc
index 777f1ae..1abf729 100644
--- a/runtime/vm/flow_graph_compiler_x64.cc
+++ b/runtime/vm/flow_graph_compiler_x64.cc
@@ -1527,6 +1527,10 @@
return FieldAddress(array, index, TIMES_1, Int16Array::data_offset());
case kUint16ArrayCid:
return FieldAddress(array, index, TIMES_1, Uint16Array::data_offset());
+ case kInt32ArrayCid:
+ return FieldAddress(array, index, TIMES_2, Int32Array::data_offset());
+ case kUint32ArrayCid:
+ return FieldAddress(array, index, TIMES_2, Uint32Array::data_offset());
case kOneByteStringCid:
return FieldAddress(array, index, TIMES_1, OneByteString::data_offset());
case kTwoByteStringCid:
diff --git a/runtime/vm/flow_graph_inliner.cc b/runtime/vm/flow_graph_inliner.cc
index 3a71164..bd74d4c 100644
--- a/runtime/vm/flow_graph_inliner.cc
+++ b/runtime/vm/flow_graph_inliner.cc
@@ -26,8 +26,6 @@
"Inline function calls up to threshold nesting depth");
DEFINE_FLAG(int, inlining_size_threshold, 20,
"Always inline functions that have threshold or fewer instructions");
-DEFINE_FLAG(int, inlining_in_loop_size_threshold, 80,
- "Inline functions in loops that have threshold or fewer instructions");
DEFINE_FLAG(int, inlining_callee_call_sites_threshold, 1,
"Always inline functions containing threshold or fewer calls.");
DEFINE_FLAG(int, inlining_constant_arguments_count, 1,
@@ -303,8 +301,7 @@
function_cache_() { }
// Inlining heuristics based on Cooper et al. 2008.
- bool ShouldWeInline(intptr_t loop_depth,
- intptr_t instr_count,
+ bool ShouldWeInline(intptr_t instr_count,
intptr_t call_site_count,
intptr_t const_arg_count) {
if (instr_count <= FLAG_inlining_size_threshold) {
@@ -313,10 +310,6 @@
if (call_site_count <= FLAG_inlining_callee_call_sites_threshold) {
return true;
}
- if ((loop_depth > 0) &&
- (instr_count <= FLAG_inlining_in_loop_size_threshold)) {
- return true;
- }
if ((const_arg_count >= FLAG_inlining_constant_arguments_count) &&
(instr_count <= FLAG_inlining_constant_arguments_size_threshold)) {
return true;
@@ -385,18 +378,14 @@
return false;
}
- const intptr_t loop_depth = call->GetBlock()->loop_depth();
const intptr_t constant_arguments = CountConstants(*arguments);
- if (!ShouldWeInline(loop_depth,
- function.optimized_instruction_count(),
+ if (!ShouldWeInline(function.optimized_instruction_count(),
function.optimized_call_site_count(),
constant_arguments)) {
TRACE_INLINING(OS::Print(" Bailout: early heuristics with "
- "loop depth: %"Pd", "
"code size: %"Pd", "
"call sites: %"Pd", "
"const args: %"Pd"\n",
- loop_depth,
function.optimized_instruction_count(),
function.optimized_call_site_count(),
constant_arguments));
@@ -447,7 +436,7 @@
}
// Build the callee graph.
- ValueInliningContext* inlining_context = new ValueInliningContext();
+ InliningContext* inlining_context = InliningContext::Create(call);
FlowGraphBuilder builder(*parsed_function, inlining_context);
builder.SetInitialBlockId(caller_graph_->max_block_id());
FlowGraph* callee_graph;
@@ -455,7 +444,7 @@
TimerScope timer(FLAG_compiler_stats,
&CompilerStats::graphinliner_build_timer,
isolate);
- callee_graph = builder.BuildGraph(loop_depth);
+ callee_graph = builder.BuildGraph();
}
// The parameter stubs are a copy of the actual arguments providing
@@ -537,13 +526,11 @@
function.set_optimized_call_site_count(info.call_site_count());
// Use heuristics do decide if this call should be inlined.
- if (!ShouldWeInline(loop_depth,
- size,
+ if (!ShouldWeInline(size,
info.call_site_count(),
constants_count)) {
// If size is larger than all thresholds, don't consider it again.
if ((size > FLAG_inlining_size_threshold) &&
- (size > FLAG_inlining_in_loop_size_threshold) &&
(size > FLAG_inlining_callee_call_sites_threshold) &&
(size > FLAG_inlining_constant_arguments_size_threshold)) {
function.set_is_inlinable(false);
@@ -552,11 +539,9 @@
isolate->set_deopt_id(prev_deopt_id);
isolate->set_ic_data_array(prev_ic_data.raw());
TRACE_INLINING(OS::Print(" Bailout: heuristics with "
- "loop depth: %"Pd", "
"code size: %"Pd", "
"call sites: %"Pd", "
"const args: %"Pd"\n",
- loop_depth,
size,
info.call_site_count(),
constants_count));
@@ -574,7 +559,7 @@
isolate);
// Plug result in the caller graph.
- caller_graph_->InlineCall(call, callee_graph, inlining_context);
+ inlining_context->ReplaceCall(caller_graph_, call, callee_graph);
// Remove push arguments of the call.
for (intptr_t i = 0; i < call->ArgumentCount(); ++i) {
@@ -792,7 +777,7 @@
GrowableArray<NamedArgument> named_args(argument_names_count);
for (intptr_t i = 0; i < argument_names.Length(); ++i) {
String& arg_name = String::Handle(Isolate::Current());
- arg_name |= argument_names.At(i);
+ arg_name ^= argument_names.At(i);
named_args.Add(
NamedArgument(&arg_name, (*arguments)[i + fixed_param_count]));
}
diff --git a/runtime/vm/flow_graph_optimizer.cc b/runtime/vm/flow_graph_optimizer.cc
index ad4f034..29ff1e1 100644
--- a/runtime/vm/flow_graph_optimizer.cc
+++ b/runtime/vm/flow_graph_optimizer.cc
@@ -597,7 +597,28 @@
return false;
}
break;
-
+ case kInt32ArrayCid:
+ case kUint32ArrayCid: {
+ // Check if elements fit into a smi or the platform supports unboxed
+ // mints.
+ if ((kSmiBits < 32) && !FlowGraphCompiler::SupportsUnboxedMints()) {
+ return false;
+ }
+ // Check that value is always smi or mint, if the platform has unboxed
+ // mints (ia32 with at least SSE 4.1).
+ value_check = call->ic_data()->AsUnaryClassChecksForArgNr(2);
+ for (intptr_t i = 0; i < value_check.NumberOfChecks(); i++) {
+ intptr_t cid = value_check.GetReceiverClassIdAt(i);
+ if (FlowGraphCompiler::SupportsUnboxedMints()) {
+ if ((cid != kSmiCid) && (cid != kMintCid)) {
+ return false;
+ }
+ } else if (cid != kSmiCid) {
+ return false;
+ }
+ }
+ break;
+ }
case kFloat32ArrayCid:
case kFloat64ArrayCid: {
// Check that value is always double.
@@ -645,6 +666,8 @@
case kUint8ClampedArrayCid:
case kInt16ArrayCid:
case kUint16ArrayCid:
+ case kInt32ArrayCid:
+ case kUint32ArrayCid:
ASSERT(value_type.IsIntType());
// Fall through.
case kFloat32ArrayCid:
@@ -677,22 +700,20 @@
// Check if store barrier is needed.
bool needs_store_barrier = true;
if (!value_check.IsNull()) {
- ASSERT(value_check.NumberOfChecks() == 1);
- if (value_check.GetReceiverClassIdAt(0) == kSmiCid) {
+ needs_store_barrier = false;
+ if (value_check.NumberOfChecks() == 1 &&
+ value_check.GetReceiverClassIdAt(0) == kSmiCid) {
InsertBefore(call,
new CheckSmiInstr(value->Copy(), call->deopt_id()),
call->env(),
Definition::kEffect);
- needs_store_barrier = false;
} else {
- ASSERT(value_check.GetReceiverClassIdAt(0) == kDoubleCid);
InsertBefore(call,
new CheckClassInstr(value->Copy(),
call->deopt_id(),
value_check),
call->env(),
Definition::kEffect);
- needs_store_barrier = false;
}
}
@@ -720,7 +741,14 @@
case kExternalUint8ArrayCid:
case kInt16ArrayCid:
case kUint16ArrayCid:
- // Acceptable load index classes.
+ break;
+ case kInt32ArrayCid:
+ case kUint32ArrayCid:
+ // Check if elements fit into a smi or the platform supports unboxed
+ // mints.
+ if ((kSmiBits < 32) && !FlowGraphCompiler::SupportsUnboxedMints()) {
+ return false;
+ }
break;
default:
return false;
@@ -1261,6 +1289,22 @@
}
+void FlowGraphOptimizer::ReplaceWithMathCFunction(
+ InstanceCallInstr* call,
+ MethodRecognizer::Kind recognized_kind) {
+ AddCheckClass(call, call->ArgumentAt(0)->value()->Copy());
+ ZoneGrowableArray<Value*>* args =
+ new ZoneGrowableArray<Value*>(call->ArgumentCount());
+ for (intptr_t i = 0; i < call->ArgumentCount(); i++) {
+ args->Add(call->ArgumentAt(i)->value());
+ }
+ InvokeMathCFunctionInstr* invoke =
+ new InvokeMathCFunctionInstr(args, call, recognized_kind);
+ call->ReplaceWith(invoke, current_iterator());
+ RemovePushArguments(call);
+}
+
+
// Inline only simple, frequently called core library methods.
bool FlowGraphOptimizer::TryInlineInstanceMethod(InstanceCallInstr* call) {
ASSERT(call->HasICData());
@@ -1308,38 +1352,47 @@
}
if (class_ids[0] == kDoubleCid) {
- if (recognized_kind == MethodRecognizer::kDoubleToInteger) {
- AddCheckClass(call, call->ArgumentAt(0)->value()->Copy());
- ASSERT(call->HasICData());
- const ICData& ic_data = *call->ic_data();
- Definition* d2i_instr = NULL;
- if (ic_data.deopt_reason() == kDeoptDoubleToSmi) {
- // Do not repeatedly deoptimize because result didn't fit into Smi.
- d2i_instr = new DoubleToIntegerInstr(call->ArgumentAt(0)->value(),
- call);
- } else {
- // Optimistically assume result fits into Smi.
- d2i_instr = new DoubleToSmiInstr(call->ArgumentAt(0)->value(), call);
+ switch (recognized_kind) {
+ case MethodRecognizer::kDoubleToInteger: {
+ AddCheckClass(call, call->ArgumentAt(0)->value()->Copy());
+ ASSERT(call->HasICData());
+ const ICData& ic_data = *call->ic_data();
+ Definition* d2i_instr = NULL;
+ if (ic_data.deopt_reason() == kDeoptDoubleToSmi) {
+ // Do not repeatedly deoptimize because result didn't fit into Smi.
+ d2i_instr = new DoubleToIntegerInstr(call->ArgumentAt(0)->value(),
+ call);
+ } else {
+ // Optimistically assume result fits into Smi.
+ d2i_instr = new DoubleToSmiInstr(call->ArgumentAt(0)->value(), call);
+ }
+ call->ReplaceWith(d2i_instr, current_iterator());
+ RemovePushArguments(call);
+ return true;
}
- call->ReplaceWith(d2i_instr, current_iterator());
- RemovePushArguments(call);
- return true;
- }
- if ((recognized_kind == MethodRecognizer::kDoubleTruncate) ||
- (recognized_kind == MethodRecognizer::kDoubleRound) ||
- (recognized_kind == MethodRecognizer::kDoubleFloor) ||
- (recognized_kind == MethodRecognizer::kDoubleCeil)) {
- if (!CPUFeatures::double_truncate_round_supported()) {
+ case MethodRecognizer::kDoubleMod:
+ case MethodRecognizer::kDoublePow:
+ ReplaceWithMathCFunction(call, recognized_kind);
+ return true;
+ case MethodRecognizer::kDoubleTruncate:
+ case MethodRecognizer::kDoubleRound:
+ case MethodRecognizer::kDoubleFloor:
+ case MethodRecognizer::kDoubleCeil:
+ if (!CPUFeatures::double_truncate_round_supported()) {
+ ReplaceWithMathCFunction(call, recognized_kind);
+ } else {
+ AddCheckClass(call, call->ArgumentAt(0)->value()->Copy());
+ DoubleToDoubleInstr* d2d_instr =
+ new DoubleToDoubleInstr(call->ArgumentAt(0)->value(),
+ call,
+ recognized_kind);
+ call->ReplaceWith(d2d_instr, current_iterator());
+ RemovePushArguments(call);
+ }
+ return true;
+ default:
+ // Unsupported method.
return false;
- }
- AddCheckClass(call, call->ArgumentAt(0)->value()->Copy());
- DoubleToDoubleInstr* d2d_instr =
- new DoubleToDoubleInstr(call->ArgumentAt(0)->value(),
- call,
- recognized_kind);
- call->ReplaceWith(d2d_instr, current_iterator());
- RemovePushArguments(call);
- return true;
}
}
@@ -4322,6 +4375,12 @@
}
+void ConstantPropagator::VisitInvokeMathCFunction(
+ InvokeMathCFunctionInstr* instr) {
+ // TODO(kmillikin): Handle conversion.
+ SetValue(instr, non_constant_);
+}
+
void ConstantPropagator::VisitConstant(ConstantInstr* instr) {
SetValue(instr, instr->value());
}
@@ -4498,16 +4557,12 @@
ASSERT(reachable_->Contains(if_false->preorder_number()));
ASSERT(if_false->parallel_move() == NULL);
ASSERT(if_false->loop_info() == NULL);
- join = new JoinEntryInstr(if_false->block_id(),
- if_false->try_index(),
- if_false->loop_depth());
+ join = new JoinEntryInstr(if_false->block_id(), if_false->try_index());
next = if_false->next();
} else if (!reachable_->Contains(if_false->preorder_number())) {
ASSERT(if_true->parallel_move() == NULL);
ASSERT(if_true->loop_info() == NULL);
- join = new JoinEntryInstr(if_true->block_id(),
- if_true->try_index(),
- if_true->loop_depth());
+ join = new JoinEntryInstr(if_true->block_id(), if_true->try_index());
next = if_true->next();
}
diff --git a/runtime/vm/flow_graph_optimizer.h b/runtime/vm/flow_graph_optimizer.h
index 45285cc..7b4d055 100644
--- a/runtime/vm/flow_graph_optimizer.h
+++ b/runtime/vm/flow_graph_optimizer.h
@@ -106,6 +106,8 @@
RawBool* InstanceOfAsBool(const ICData& ic_data,
const AbstractType& type) const;
+ void ReplaceWithMathCFunction(InstanceCallInstr* call,
+ MethodRecognizer::Kind recognized_kind);
FlowGraph* flow_graph_;
diff --git a/runtime/vm/il_printer.cc b/runtime/vm/il_printer.cc
index 37566d9..bd501ac 100644
--- a/runtime/vm/il_printer.cc
+++ b/runtime/vm/il_printer.cc
@@ -556,6 +556,12 @@
}
+void InvokeMathCFunctionInstr::PrintOperandsTo(BufferFormatter* f) const {
+ f->Print("%s, ", MethodRecognizer::KindToCString(recognized_kind_));
+ Definition::PrintOperandsTo(f);
+}
+
+
void GraphEntryInstr::PrintTo(BufferFormatter* f) const {
const GrowableArray<Definition*>& defns = initial_definitions_;
f->Print("B%"Pd"[graph]", block_id());
diff --git a/runtime/vm/instructions_arm_test.cc b/runtime/vm/instructions_arm_test.cc
new file mode 100644
index 0000000..86e4dc1
--- /dev/null
+++ b/runtime/vm/instructions_arm_test.cc
@@ -0,0 +1,53 @@
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+#include "vm/globals.h"
+#if defined(TARGET_ARCH_ARM)
+
+#include "vm/assembler.h"
+#include "vm/instructions.h"
+#include "vm/stub_code.h"
+#include "vm/unit_test.h"
+
+namespace dart {
+
+#define __ assembler->
+
+ASSEMBLER_TEST_GENERATE(Call, assembler) {
+ UNIMPLEMENTED();
+}
+
+
+ASSEMBLER_TEST_RUN(Call, entry) {
+ CallPattern call(entry);
+ EXPECT_EQ(StubCode::InstanceFunctionLookupLabel().address(),
+ call.TargetAddress());
+}
+
+
+ASSEMBLER_TEST_GENERATE(Jump, assembler) {
+ UNIMPLEMENTED();
+}
+
+
+ASSEMBLER_TEST_RUN(Jump, entry) {
+ JumpPattern jump1(entry);
+ EXPECT_EQ(StubCode::InstanceFunctionLookupLabel().address(),
+ jump1.TargetAddress());
+ JumpPattern jump2(entry + jump1.pattern_length_in_bytes());
+ EXPECT_EQ(StubCode::AllocateArrayLabel().address(),
+ jump2.TargetAddress());
+ uword target1 = jump1.TargetAddress();
+ uword target2 = jump2.TargetAddress();
+ jump1.SetTargetAddress(target2);
+ jump2.SetTargetAddress(target1);
+ EXPECT_EQ(StubCode::AllocateArrayLabel().address(),
+ jump1.TargetAddress());
+ EXPECT_EQ(StubCode::InstanceFunctionLookupLabel().address(),
+ jump2.TargetAddress());
+}
+
+} // namespace dart
+
+#endif // defined TARGET_ARCH_ARM
diff --git a/runtime/vm/instructions_mips_test.cc b/runtime/vm/instructions_mips_test.cc
new file mode 100644
index 0000000..3fec989
--- /dev/null
+++ b/runtime/vm/instructions_mips_test.cc
@@ -0,0 +1,53 @@
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+#include "vm/globals.h"
+#if defined(TARGET_ARCH_MIPS)
+
+#include "vm/assembler.h"
+#include "vm/instructions.h"
+#include "vm/stub_code.h"
+#include "vm/unit_test.h"
+
+namespace dart {
+
+#define __ assembler->
+
+ASSEMBLER_TEST_GENERATE(Call, assembler) {
+ UNIMPLEMENTED();
+}
+
+
+ASSEMBLER_TEST_RUN(Call, entry) {
+ CallPattern call(entry);
+ EXPECT_EQ(StubCode::InstanceFunctionLookupLabel().address(),
+ call.TargetAddress());
+}
+
+
+ASSEMBLER_TEST_GENERATE(Jump, assembler) {
+ UNIMPLEMENTED();
+}
+
+
+ASSEMBLER_TEST_RUN(Jump, entry) {
+ JumpPattern jump1(entry);
+ EXPECT_EQ(StubCode::InstanceFunctionLookupLabel().address(),
+ jump1.TargetAddress());
+ JumpPattern jump2(entry + jump1.pattern_length_in_bytes());
+ EXPECT_EQ(StubCode::AllocateArrayLabel().address(),
+ jump2.TargetAddress());
+ uword target1 = jump1.TargetAddress();
+ uword target2 = jump2.TargetAddress();
+ jump1.SetTargetAddress(target2);
+ jump2.SetTargetAddress(target1);
+ EXPECT_EQ(StubCode::AllocateArrayLabel().address(),
+ jump1.TargetAddress());
+ EXPECT_EQ(StubCode::InstanceFunctionLookupLabel().address(),
+ jump2.TargetAddress());
+}
+
+} // namespace dart
+
+#endif // defined TARGET_ARCH_MIPS
diff --git a/runtime/vm/intermediate_language.cc b/runtime/vm/intermediate_language.cc
index d5cfa0a..c7f87b1 100644
--- a/runtime/vm/intermediate_language.cc
+++ b/runtime/vm/intermediate_language.cc
@@ -200,7 +200,7 @@
GraphEntryInstr::GraphEntryInstr(TargetEntryInstr* normal_entry)
- : BlockEntryInstr(0, CatchClauseNode::kInvalidTryIndex, 0),
+ : BlockEntryInstr(0, CatchClauseNode::kInvalidTryIndex),
normal_entry_(normal_entry),
catch_entries_(),
initial_definitions_(),
@@ -828,6 +828,74 @@
}
+// Helper to mutate the graph during inlining. This block should be
+// replaced with new_block as a predecessor of all of this block's
+// successors. For each successor, the predecessors will be reordered
+// to preserve block-order sorting of the predecessors as well as the
+// phis if the successor is a join.
+void BlockEntryInstr::ReplaceAsPredecessorWith(BlockEntryInstr* new_block) {
+ // Set the last instruction of the new block to that of the old block.
+ Instruction* last = last_instruction();
+ new_block->set_last_instruction(last);
+ // For each successor, update the predecessors.
+ for (intptr_t sidx = 0; sidx < last->SuccessorCount(); ++sidx) {
+ // If the successor is a target, update its predecessor.
+ TargetEntryInstr* target = last->SuccessorAt(sidx)->AsTargetEntry();
+ if (target != NULL) {
+ target->predecessor_ = new_block;
+ continue;
+ }
+ // If the successor is a join, update each predecessor and the phis.
+ JoinEntryInstr* join = last->SuccessorAt(sidx)->AsJoinEntry();
+ ASSERT(join != NULL);
+ // Find the old predecessor index.
+ intptr_t old_index = join->IndexOfPredecessor(this);
+ intptr_t pred_count = join->PredecessorCount();
+ ASSERT(old_index >= 0);
+ ASSERT(old_index < pred_count);
+ // Find the new predecessor index while reordering the predecessors.
+ intptr_t new_id = new_block->block_id();
+ intptr_t new_index = old_index;
+ if (block_id() < new_id) {
+ // Search upwards, bubbling down intermediate predecessors.
+ for (; new_index < pred_count - 1; ++new_index) {
+ if (join->predecessors_[new_index + 1]->block_id() > new_id) break;
+ join->predecessors_[new_index] = join->predecessors_[new_index + 1];
+ }
+ } else {
+ // Search downwards, bubbling up intermediate predecessors.
+ for (; new_index > 0; --new_index) {
+ if (join->predecessors_[new_index - 1]->block_id() < new_id) break;
+ join->predecessors_[new_index] = join->predecessors_[new_index - 1];
+ }
+ }
+ join->predecessors_[new_index] = new_block;
+ // If the new and old predecessor index match there is nothing to update.
+ if ((join->phis() == NULL) || (old_index == new_index)) return;
+ // Otherwise, reorder the predecessor uses in each phi.
+ for (intptr_t i = 0; i < join->phis()->length(); ++i) {
+ PhiInstr* phi = (*join->phis())[i];
+ if (phi == NULL) continue;
+ ASSERT(pred_count == phi->InputCount());
+ // Save the predecessor use.
+ Value* pred_use = phi->InputAt(old_index);
+ // Move uses between old and new.
+ intptr_t step = (old_index < new_index) ? 1 : -1;
+ for (intptr_t use_idx = old_index;
+ use_idx != new_index;
+ use_idx += step) {
+ Value* use = phi->InputAt(use_idx + step);
+ phi->SetInputAt(use_idx, use);
+ use->set_use_index(use_idx);
+ }
+ // Write the predecessor use.
+ phi->SetInputAt(new_index, pred_use);
+ pred_use->set_use_index(new_index);
+ }
+ }
+}
+
+
void JoinEntryInstr::InsertPhi(intptr_t var_index, intptr_t var_count) {
// Lazily initialize the array of phis.
// Currently, phis are stored in a sparse array that holds the phi
@@ -1128,6 +1196,8 @@
case kExternalUint8ArrayCid:
case kInt16ArrayCid:
case kUint16ArrayCid:
+ case kInt32ArrayCid:
+ case kUint32ArrayCid:
case kOneByteStringCid:
case kTwoByteStringCid:
return Type::IntType();
@@ -1138,80 +1208,11 @@
}
-intptr_t LoadIndexedInstr::ResultCid() const {
- switch (class_id_) {
- case kArrayCid:
- case kImmutableArrayCid:
- return kDynamicCid;
- case kFloat32ArrayCid :
- case kFloat64ArrayCid :
- return kDoubleCid;
- case kInt8ArrayCid:
- case kUint8ArrayCid:
- case kUint8ClampedArrayCid:
- case kExternalUint8ArrayCid:
- case kInt16ArrayCid:
- case kUint16ArrayCid:
- case kOneByteStringCid:
- case kTwoByteStringCid:
- return kSmiCid;
- default:
- UNIMPLEMENTED();
- return kSmiCid;
- }
-}
-
-
-Representation LoadIndexedInstr::representation() const {
- switch (class_id_) {
- case kArrayCid:
- case kImmutableArrayCid:
- case kInt8ArrayCid:
- case kUint8ArrayCid:
- case kUint8ClampedArrayCid:
- case kExternalUint8ArrayCid:
- case kInt16ArrayCid:
- case kUint16ArrayCid:
- case kOneByteStringCid:
- case kTwoByteStringCid:
- return kTagged;
- case kFloat32ArrayCid :
- case kFloat64ArrayCid :
- return kUnboxedDouble;
- default:
- UNIMPLEMENTED();
- return kTagged;
- }
-}
-
-
RawAbstractType* StoreIndexedInstr::CompileType() const {
return AbstractType::null();
}
-Representation StoreIndexedInstr::RequiredInputRepresentation(
- intptr_t idx) const {
- if ((idx == 0) || (idx == 1)) return kTagged;
- ASSERT(idx == 2);
- switch (class_id_) {
- case kArrayCid:
- case kInt8ArrayCid:
- case kUint8ArrayCid:
- case kUint8ClampedArrayCid:
- case kInt16ArrayCid:
- case kUint16ArrayCid:
- return kTagged;
- case kFloat32ArrayCid :
- case kFloat64ArrayCid :
- return kUnboxedDouble;
- default:
- UNIMPLEMENTED();
- return kTagged;
- }
-}
-
-
RawAbstractType* StoreInstanceFieldInstr::CompileType() const {
return value()->CompileType();
}
@@ -1617,6 +1618,11 @@
}
+RawAbstractType* InvokeMathCFunctionInstr::CompileType() const {
+ return Type::Double();
+}
+
+
RawAbstractType* CheckClassInstr::CompileType() const {
return AbstractType::null();
}
@@ -2683,6 +2689,76 @@
}
}
+
+intptr_t InvokeMathCFunctionInstr::ArgumentCountFor(
+ MethodRecognizer::Kind kind) {
+ switch (kind) {
+ case MethodRecognizer::kDoubleTruncate:
+ case MethodRecognizer::kDoubleRound:
+ case MethodRecognizer::kDoubleFloor:
+ case MethodRecognizer::kDoubleCeil: {
+ ASSERT(!CPUFeatures::double_truncate_round_supported());
+ return 1;
+ }
+ case MethodRecognizer::kDoubleMod:
+ case MethodRecognizer::kDoublePow:
+ return 2;
+ default:
+ UNREACHABLE();
+ }
+ return 0;
+}
+
+// Use expected function signatures to help MSVC compiler resolve overloading.
+typedef double (*UnaryMathCFunction) (double x);
+typedef double (*BinaryMathCFunction) (double x, double y);
+
+extern const RuntimeEntry kPowRuntimeEntry(
+ "libc_pow", reinterpret_cast<RuntimeFunction>(
+ static_cast<BinaryMathCFunction>(&pow)), 0, true);
+
+extern const RuntimeEntry kModRuntimeEntry(
+ "libc_fmod", reinterpret_cast<RuntimeFunction>(
+ static_cast<BinaryMathCFunction>(&fmod)), 0, true);
+
+extern const RuntimeEntry kFloorRuntimeEntry(
+ "libc_floor", reinterpret_cast<RuntimeFunction>(
+ static_cast<UnaryMathCFunction>(&floor)), 0, true);
+
+extern const RuntimeEntry kCeilRuntimeEntry(
+ "libc_ceil", reinterpret_cast<RuntimeFunction>(
+ static_cast<UnaryMathCFunction>(&ceil)), 0, true);
+
+extern const RuntimeEntry kTruncRuntimeEntry(
+ "libc_trunc", reinterpret_cast<RuntimeFunction>(
+ static_cast<UnaryMathCFunction>(&trunc)), 0, true);
+
+extern const RuntimeEntry kRoundRuntimeEntry(
+ "libc_round", reinterpret_cast<RuntimeFunction>(
+ static_cast<UnaryMathCFunction>(&round)), 0, true);
+
+
+const RuntimeEntry& InvokeMathCFunctionInstr::TargetFunction() const {
+ switch (recognized_kind_) {
+ case MethodRecognizer::kDoubleTruncate:
+ return kTruncRuntimeEntry;
+ case MethodRecognizer::kDoubleRound:
+ return kRoundRuntimeEntry;
+ case MethodRecognizer::kDoubleFloor:
+ return kFloorRuntimeEntry;
+ case MethodRecognizer::kDoubleCeil:
+ return kCeilRuntimeEntry;
+ case MethodRecognizer::kDoublePow:
+ return kPowRuntimeEntry;
+ case MethodRecognizer::kDoubleMod:
+ return kModRuntimeEntry;
+ default:
+ UNREACHABLE();
+ }
+ return kPowRuntimeEntry;
+}
+
+
#undef __
} // namespace dart
diff --git a/runtime/vm/intermediate_language.h b/runtime/vm/intermediate_language.h
index 0228cfb..c00b43c 100644
--- a/runtime/vm/intermediate_language.h
+++ b/runtime/vm/intermediate_language.h
@@ -48,6 +48,8 @@
V(_Double, round, DoubleRound, 620870996) \
V(_Double, floor, DoubleFloor, 620870996) \
V(_Double, ceil, DoubleCeil, 620870996) \
+ V(_Double, pow, DoublePow, 1131958048) \
+ V(_Double, _modulo, DoubleMod, 437099337) \
V(::, sqrt, MathSqrt, 1662640002) \
// Class that recognizes the name and owner of a function and returns the
@@ -274,7 +276,8 @@
M(UnaryMintOp) \
M(CheckArrayBound) \
M(Constraint) \
- M(StringFromCharCode)
+ M(StringFromCharCode) \
+ M(InvokeMathCFunction) \
#define FORWARD_DECLARATION(type) class type##Instr;
@@ -515,6 +518,7 @@
friend class LICM;
friend class DoubleToSmiInstr;
friend class DoubleToDoubleInstr;
+ friend class InvokeMathCFunctionInstr;
intptr_t deopt_id_;
intptr_t lifetime_position_; // Position used by register allocator.
@@ -653,8 +657,6 @@
// branches.
class BlockEntryInstr : public Instruction {
public:
- static const intptr_t kInvalidLoopDepth = -1;
-
virtual BlockEntryInstr* AsBlockEntry() { return this; }
virtual intptr_t PredecessorCount() const = 0;
@@ -748,19 +750,17 @@
loop_info_ = loop_info;
}
- intptr_t loop_depth() const { return loop_depth_; }
- void set_loop_depth(intptr_t loop_depth) {
- ASSERT(loop_depth_ == kInvalidLoopDepth);
- ASSERT(loop_depth != kInvalidLoopDepth);
- loop_depth_ = loop_depth;
- }
-
virtual BlockEntryInstr* GetBlock() const {
return const_cast<BlockEntryInstr*>(this);
}
+ // Helper to mutate the graph during inlining. This block should be
+ // replaced with new_block as a predecessor of all of this block's
+ // successors.
+ void ReplaceAsPredecessorWith(BlockEntryInstr* new_block);
+
protected:
- BlockEntryInstr(intptr_t block_id, intptr_t try_index, intptr_t loop_depth)
+ BlockEntryInstr(intptr_t block_id, intptr_t try_index)
: block_id_(block_id),
try_index_(try_index),
preorder_number_(-1),
@@ -769,8 +769,7 @@
dominated_blocks_(1),
last_instruction_(NULL),
parallel_move_(NULL),
- loop_info_(NULL),
- loop_depth_(loop_depth) { }
+ loop_info_(NULL) { }
private:
virtual void ClearPredecessors() = 0;
@@ -797,9 +796,6 @@
// preorder number.
BitVector* loop_info_;
- // Syntactic loop depth of the block.
- intptr_t loop_depth_;
-
DISALLOW_COPY_AND_ASSIGN(BlockEntryInstr);
};
@@ -903,8 +899,8 @@
class JoinEntryInstr : public BlockEntryInstr {
public:
- JoinEntryInstr(intptr_t block_id, intptr_t try_index, intptr_t loop_depth)
- : BlockEntryInstr(block_id, try_index, loop_depth),
+ JoinEntryInstr(intptr_t block_id, intptr_t try_index)
+ : BlockEntryInstr(block_id, try_index),
predecessors_(2), // Two is the assumed to be the common case.
phis_(NULL),
phi_count_(0) { }
@@ -933,7 +929,10 @@
virtual void PrintTo(BufferFormatter* f) const;
private:
- friend class FlowGraph; // Access to predecessors_ when inlining.
+ // Classes that have access to predecessors_ when inlining.
+ friend class BlockEntryInstr;
+ friend class ValueInliningContext;
+
virtual void ClearPredecessors() { predecessors_.Clear(); }
virtual void AddPredecessor(BlockEntryInstr* predecessor);
@@ -975,8 +974,8 @@
class TargetEntryInstr : public BlockEntryInstr {
public:
- TargetEntryInstr(intptr_t block_id, intptr_t try_index, intptr_t loop_depth)
- : BlockEntryInstr(block_id, try_index, loop_depth),
+ TargetEntryInstr(intptr_t block_id, intptr_t try_index)
+ : BlockEntryInstr(block_id, try_index),
predecessor_(NULL),
catch_try_index_(CatchClauseNode::kInvalidTryIndex),
catch_handler_types_(Array::ZoneHandle()) { }
@@ -1012,7 +1011,8 @@
virtual void PrintTo(BufferFormatter* f) const;
private:
- friend class FlowGraph; // Access to predecessor_ when inlining.
+ friend class BlockEntryInstr; // Access to predecessor_ when inlining.
+
virtual void ClearPredecessors() { predecessor_ = NULL; }
virtual void AddPredecessor(BlockEntryInstr* predecessor) {
ASSERT(predecessor_ == NULL);
@@ -4056,6 +4056,76 @@
};
+class InvokeMathCFunctionInstr : public Definition {
+ public:
+ InvokeMathCFunctionInstr(ZoneGrowableArray<Value*>* inputs,
+ InstanceCallInstr* instance_call,
+ MethodRecognizer::Kind recognized_kind)
+ : inputs_(inputs), locs_(NULL), recognized_kind_(recognized_kind) {
+ ASSERT(inputs_->length() == ArgumentCountFor(recognized_kind_));
+ deopt_id_ = instance_call->deopt_id();
+ }
+
+ static intptr_t ArgumentCountFor(MethodRecognizer::Kind recognized_kind_);
+
+ const RuntimeEntry& TargetFunction() const;
+
+ MethodRecognizer::Kind recognized_kind() const { return recognized_kind_; }
+
+ DECLARE_INSTRUCTION(InvokeMathCFunction)
+ virtual RawAbstractType* CompileType() const;
+ virtual void PrintOperandsTo(BufferFormatter* f) const;
+
+ virtual bool CanDeoptimize() const { return false; }
+
+ virtual bool HasSideEffect() const { return false; }
+
+ virtual intptr_t ResultCid() const { return kDoubleCid; }
+
+ virtual Representation representation() const {
+ return kUnboxedDouble;
+ }
+
+ virtual Representation RequiredInputRepresentation(intptr_t idx) const {
+ ASSERT((0 <= idx) && (idx < InputCount()));
+ return kUnboxedDouble;
+ }
+
+ virtual intptr_t DeoptimizationTarget() const { return deopt_id_; }
+
+ virtual intptr_t InputCount() const {
+ return inputs_->length();
+ }
+
+ virtual Value* InputAt(intptr_t i) const {
+ return (*inputs_)[i];
+ }
+
+ virtual void SetInputAt(intptr_t i, Value* value) {
+ ASSERT(value != NULL);
+ (*inputs_)[i] = value;
+ }
+
+ // Returns a structure describing the location constraints required
+ // to emit native code for this definition.
+ LocationSummary* locs() {
+ if (locs_ == NULL) {
+ locs_ = MakeLocationSummary();
+ }
+ return locs_;
+ }
+
+ private:
+ ZoneGrowableArray<Value*>* inputs_;
+
+ LocationSummary* locs_;
+
+ const MethodRecognizer::Kind recognized_kind_;
+
+ DISALLOW_COPY_AND_ASSIGN(InvokeMathCFunctionInstr);
+};
+
+
class CheckClassInstr : public TemplateInstruction<1> {
public:
CheckClassInstr(Value* value,
diff --git a/runtime/vm/intermediate_language_arm.cc b/runtime/vm/intermediate_language_arm.cc
index 8838123..176e4a4 100644
--- a/runtime/vm/intermediate_language_arm.cc
+++ b/runtime/vm/intermediate_language_arm.cc
@@ -172,6 +172,18 @@
}
+intptr_t LoadIndexedInstr::ResultCid() const {
+ UNIMPLEMENTED();
+ return kDynamicCid;
+}
+
+
+Representation LoadIndexedInstr::representation() const {
+ UNIMPLEMENTED();
+ return kTagged;
+}
+
+
LocationSummary* LoadIndexedInstr::MakeLocationSummary() const {
UNIMPLEMENTED();
return NULL;
@@ -183,6 +195,13 @@
}
+Representation StoreIndexedInstr::RequiredInputRepresentation(
+ intptr_t idx) const {
+ UNIMPLEMENTED();
+ return kTagged;
+}
+
+
LocationSummary* StoreIndexedInstr::MakeLocationSummary() const {
UNIMPLEMENTED();
return NULL;
@@ -476,6 +495,17 @@
}
+LocationSummary* InvokeMathCFunctionInstr::MakeLocationSummary() const {
+ UNIMPLEMENTED();
+ return NULL;
+}
+
+
+void InvokeMathCFunctionInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+ UNIMPLEMENTED();
+}
+
+
LocationSummary* PolymorphicInstanceCallInstr::MakeLocationSummary() const {
UNIMPLEMENTED();
return NULL;
diff --git a/runtime/vm/intermediate_language_ia32.cc b/runtime/vm/intermediate_language_ia32.cc
index c336720..ca21720 100644
--- a/runtime/vm/intermediate_language_ia32.cc
+++ b/runtime/vm/intermediate_language_ia32.cc
@@ -1091,6 +1091,60 @@
}
+intptr_t LoadIndexedInstr::ResultCid() const {
+ switch (class_id_) {
+ case kArrayCid:
+ case kImmutableArrayCid:
+ return kDynamicCid;
+ case kFloat32ArrayCid :
+ case kFloat64ArrayCid :
+ return kDoubleCid;
+ case kInt8ArrayCid:
+ case kUint8ArrayCid:
+ case kUint8ClampedArrayCid:
+ case kExternalUint8ArrayCid:
+ case kInt16ArrayCid:
+ case kUint16ArrayCid:
+ case kOneByteStringCid:
+ case kTwoByteStringCid:
+ return kSmiCid;
+ case kInt32ArrayCid:
+ case kUint32ArrayCid:
+ // Result can be smi or mint when boxed.
+ return kDynamicCid;
+ default:
+ UNIMPLEMENTED();
+ return kDynamicCid;
+ }
+}
+
+
+Representation LoadIndexedInstr::representation() const {
+ switch (class_id_) {
+ case kArrayCid:
+ case kImmutableArrayCid:
+ case kInt8ArrayCid:
+ case kUint8ArrayCid:
+ case kUint8ClampedArrayCid:
+ case kExternalUint8ArrayCid:
+ case kInt16ArrayCid:
+ case kUint16ArrayCid:
+ case kOneByteStringCid:
+ case kTwoByteStringCid:
+ return kTagged;
+ case kInt32ArrayCid:
+ case kUint32ArrayCid:
+ return kUnboxedMint;
+ case kFloat32ArrayCid :
+ case kFloat64ArrayCid :
+ return kUnboxedDouble;
+ default:
+ UNIMPLEMENTED();
+ return kTagged;
+ }
+}
+
+
LocationSummary* LoadIndexedInstr::MakeLocationSummary() const {
const intptr_t kNumInputs = 2;
const intptr_t kNumTemps = 0;
@@ -1144,16 +1198,26 @@
: FlowGraphCompiler::ElementAddressForIntIndex(
class_id(), array, Smi::Cast(index.constant()).Value());
- if (representation() == kUnboxedDouble) {
+ if ((representation() == kUnboxedDouble) ||
+ (representation() == kUnboxedMint)) {
XmmRegister result = locs()->out().fpu_reg();
- if (class_id() == kFloat32ArrayCid) {
- // Load single precision float.
- __ movss(result, element_address);
- // Promote to double.
- __ cvtss2sd(result, locs()->out().fpu_reg());
- } else {
- ASSERT(class_id() == kFloat64ArrayCid);
- __ movsd(result, element_address);
+ switch (class_id()) {
+ case kInt32ArrayCid:
+ __ movss(result, element_address);
+ __ pmovsxdq(result, result);
+ break;
+ case kUint32ArrayCid:
+ __ xorpd(result, result);
+ __ movss(result, element_address);
+ break;
+ case kFloat32ArrayCid:
+ // Load single precision float and promote to double.
+ __ movss(result, element_address);
+ __ cvtss2sd(result, locs()->out().fpu_reg());
+ break;
+ case kFloat64ArrayCid:
+ __ movsd(result, element_address);
+ break;
}
return;
}
@@ -1194,6 +1258,31 @@
}
+Representation StoreIndexedInstr::RequiredInputRepresentation(
+ intptr_t idx) const {
+ if ((idx == 0) || (idx == 1)) return kTagged;
+ ASSERT(idx == 2);
+ switch (class_id_) {
+ case kArrayCid:
+ case kInt8ArrayCid:
+ case kUint8ArrayCid:
+ case kUint8ClampedArrayCid:
+ case kInt16ArrayCid:
+ case kUint16ArrayCid:
+ return kTagged;
+ case kInt32ArrayCid:
+ case kUint32ArrayCid:
+ return kUnboxedMint;
+ case kFloat32ArrayCid :
+ case kFloat64ArrayCid :
+ return kUnboxedDouble;
+ default:
+ UNIMPLEMENTED();
+ return kTagged;
+ }
+}
+
+
LocationSummary* StoreIndexedInstr::MakeLocationSummary() const {
const intptr_t kNumInputs = 3;
const intptr_t kNumTemps = 0;
@@ -1228,6 +1317,8 @@
// Need temp register for float-to-double conversion.
locs->AddTemp(Location::RequiresFpuRegister());
// Fall through.
+ case kInt32ArrayCid:
+ case kUint32ArrayCid:
case kFloat64ArrayCid:
// TODO(srdjan): Support Float64 constants.
locs->set_in(2, Location::RequiresFpuRegister());
@@ -1318,11 +1409,15 @@
}
case kInt16ArrayCid:
case kUint16ArrayCid: {
- Register value = locs()->in(2).reg();
- __ SmiUntag(value);
- __ movw(element_address, value);
- break;
- }
+ Register value = locs()->in(2).reg();
+ __ SmiUntag(value);
+ __ movw(element_address, value);
+ break;
+ }
+ case kInt32ArrayCid:
+ case kUint32ArrayCid:
+ __ movss(element_address, locs()->in(2).fpu_reg());
+ break;
case kFloat32ArrayCid:
// Convert to single precision.
__ cvtsd2ss(locs()->temp(0).fpu_reg(), locs()->in(2).fpu_reg());
@@ -1823,16 +1918,15 @@
LocationSummary* BinarySmiOpInstr::MakeLocationSummary() const {
const intptr_t kNumInputs = 2;
if (op_kind() == Token::kTRUNCDIV) {
- const intptr_t kNumTemps = 3;
+ const intptr_t kNumTemps = 1;
LocationSummary* summary =
new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall);
+ // Both inputs must be writable because they will be untagged.
summary->set_in(0, Location::RegisterLocation(EAX));
- summary->set_in(1, Location::RegisterLocation(ECX));
+ summary->set_in(1, Location::WritableRegister());
summary->set_out(Location::SameAsFirstInput());
- summary->set_temp(0, Location::RegisterLocation(EBX));
- // Will be used for for sign extension.
- summary->set_temp(1, Location::RegisterLocation(EDX));
- summary->set_temp(2, Location::RequiresRegister());
+ // Will be used for sign extension and division.
+ summary->set_temp(0, Location::RegisterLocation(EDX));
return summary;
} else if (op_kind() == Token::kSHR) {
const intptr_t kNumTemps = 0;
@@ -1994,22 +2088,17 @@
break;
}
case Token::kTRUNCDIV: {
- Register temp = locs()->temp(0).reg();
// Handle divide by zero in runtime.
- // Deoptimization requires that temp and right are preserved.
__ testl(right, right);
__ j(ZERO, deopt);
ASSERT(left == EAX);
ASSERT((right != EDX) && (right != EAX));
- ASSERT((temp != EDX) && (temp != EAX));
- ASSERT(locs()->temp(1).reg() == EDX);
+ ASSERT(locs()->temp(0).reg() == EDX);
ASSERT(result == EAX);
- Register right_temp = locs()->temp(2).reg();
- __ movl(right_temp, right);
__ SmiUntag(left);
- __ SmiUntag(right_temp);
+ __ SmiUntag(right);
__ cdq(); // Sign extend EAX -> EDX:EAX.
- __ idivl(right_temp); // EAX: quotient, EDX: remainder.
+ __ idivl(right); // EAX: quotient, EDX: remainder.
// Check the corner case of dividing the 'MIN_SMI' with -1, in which
// case we cannot tag the result.
__ cmpl(result, Immediate(0x40000000));
@@ -2426,6 +2515,33 @@
}
+LocationSummary* InvokeMathCFunctionInstr::MakeLocationSummary() const {
+ ASSERT((InputCount() == 1) || (InputCount() == 2));
+ const intptr_t kNumTemps = 0;
+ LocationSummary* result =
+ new LocationSummary(InputCount(), kNumTemps, LocationSummary::kCall);
+ result->set_in(0, Location::FpuRegisterLocation(XMM1, Location::kDouble));
+ if (InputCount() == 2) {
+ result->set_in(1, Location::FpuRegisterLocation(XMM2, Location::kDouble));
+ }
+ result->set_out(Location::FpuRegisterLocation(XMM1, Location::kDouble));
+ return result;
+}
+
+
+void InvokeMathCFunctionInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+ __ EnterFrame(0);
+ __ ReserveAlignedFrameSpace(kDoubleSize * InputCount());
+ for (intptr_t i = 0; i < InputCount(); i++) {
+ __ movsd(Address(ESP, kDoubleSize * i), locs()->in(i).fpu_reg());
+ }
+ __ CallRuntime(TargetFunction());
+ __ fstpl(Address(ESP, 0));
+ __ movsd(locs()->out().fpu_reg(), Address(ESP, 0));
+ __ leave();
+}
+
+
LocationSummary* PolymorphicInstanceCallInstr::MakeLocationSummary() const {
return MakeCallSummary();
}
diff --git a/runtime/vm/intermediate_language_mips.cc b/runtime/vm/intermediate_language_mips.cc
index 5fdbc56..77bd6a2 100644
--- a/runtime/vm/intermediate_language_mips.cc
+++ b/runtime/vm/intermediate_language_mips.cc
@@ -172,6 +172,18 @@
}
+intptr_t LoadIndexedInstr::ResultCid() const {
+ UNIMPLEMENTED();
+ return kDynamicCid;
+}
+
+
+Representation LoadIndexedInstr::representation() const {
+ UNIMPLEMENTED();
+ return kTagged;
+}
+
+
LocationSummary* LoadIndexedInstr::MakeLocationSummary() const {
UNIMPLEMENTED();
return NULL;
@@ -183,6 +195,13 @@
}
+Representation StoreIndexedInstr::RequiredInputRepresentation(
+ intptr_t idx) const {
+ UNIMPLEMENTED();
+ return kTagged;
+}
+
+
LocationSummary* StoreIndexedInstr::MakeLocationSummary() const {
UNIMPLEMENTED();
return NULL;
@@ -476,6 +495,17 @@
}
+LocationSummary* InvokeMathCFunctionInstr::MakeLocationSummary() const {
+ UNIMPLEMENTED();
+ return NULL;
+}
+
+
+void InvokeMathCFunctionInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+ UNIMPLEMENTED();
+}
+
+
LocationSummary* PolymorphicInstanceCallInstr::MakeLocationSummary() const {
UNIMPLEMENTED();
return NULL;
diff --git a/runtime/vm/intermediate_language_test.cc b/runtime/vm/intermediate_language_test.cc
index 7286ce5..4caaa86 100644
--- a/runtime/vm/intermediate_language_test.cc
+++ b/runtime/vm/intermediate_language_test.cc
@@ -9,7 +9,7 @@
TEST_CASE(InstructionTests) {
TargetEntryInstr* target_instr =
- new TargetEntryInstr(1, CatchClauseNode::kInvalidTryIndex, 0);
+ new TargetEntryInstr(1, CatchClauseNode::kInvalidTryIndex);
EXPECT(target_instr->IsBlockEntry());
EXPECT(!target_instr->IsDefinition());
CurrentContextInstr* context = new CurrentContextInstr();
@@ -20,7 +20,7 @@
TEST_CASE(OptimizationTests) {
JoinEntryInstr* join =
- new JoinEntryInstr(1, CatchClauseNode::kInvalidTryIndex, 0);
+ new JoinEntryInstr(1, CatchClauseNode::kInvalidTryIndex);
Definition* def1 = new PhiInstr(join, 0);
Definition* def2 = new PhiInstr(join, 0);
diff --git a/runtime/vm/intermediate_language_x64.cc b/runtime/vm/intermediate_language_x64.cc
index 1a59275..14fbd2a 100644
--- a/runtime/vm/intermediate_language_x64.cc
+++ b/runtime/vm/intermediate_language_x64.cc
@@ -955,6 +955,57 @@
}
+intptr_t LoadIndexedInstr::ResultCid() const {
+ switch (class_id_) {
+ case kArrayCid:
+ case kImmutableArrayCid:
+ return kDynamicCid;
+ case kFloat32ArrayCid :
+ case kFloat64ArrayCid :
+ return kDoubleCid;
+ case kInt8ArrayCid:
+ case kUint8ArrayCid:
+ case kUint8ClampedArrayCid:
+ case kExternalUint8ArrayCid:
+ case kInt16ArrayCid:
+ case kUint16ArrayCid:
+ case kOneByteStringCid:
+ case kTwoByteStringCid:
+ case kInt32ArrayCid:
+ case kUint32ArrayCid:
+ return kSmiCid;
+ default:
+ UNIMPLEMENTED();
+ return kSmiCid;
+ }
+}
+
+
+Representation LoadIndexedInstr::representation() const {
+ switch (class_id_) {
+ case kArrayCid:
+ case kImmutableArrayCid:
+ case kInt8ArrayCid:
+ case kUint8ArrayCid:
+ case kUint8ClampedArrayCid:
+ case kExternalUint8ArrayCid:
+ case kInt16ArrayCid:
+ case kUint16ArrayCid:
+ case kOneByteStringCid:
+ case kTwoByteStringCid:
+ case kInt32ArrayCid:
+ case kUint32ArrayCid:
+ return kTagged;
+ case kFloat32ArrayCid :
+ case kFloat64ArrayCid :
+ return kUnboxedDouble;
+ default:
+ UNIMPLEMENTED();
+ return kTagged;
+ }
+}
+
+
LocationSummary* LoadIndexedInstr::MakeLocationSummary() const {
const intptr_t kNumInputs = 2;
const intptr_t kNumTemps = 0;
@@ -1050,6 +1101,14 @@
__ movzxw(result, element_address);
__ SmiTag(result);
break;
+ case kInt32ArrayCid:
+ __ movsxl(result, element_address);
+ __ SmiTag(result);
+ break;
+ case kUint32ArrayCid:
+ __ movl(result, element_address);
+ __ SmiTag(result);
+ break;
default:
ASSERT((class_id() == kArrayCid) || (class_id() == kImmutableArrayCid));
__ movq(result, element_address);
@@ -1058,6 +1117,30 @@
}
+Representation StoreIndexedInstr::RequiredInputRepresentation(
+ intptr_t idx) const {
+ if ((idx == 0) || (idx == 1)) return kTagged;
+ ASSERT(idx == 2);
+ switch (class_id_) {
+ case kArrayCid:
+ case kInt8ArrayCid:
+ case kUint8ArrayCid:
+ case kUint8ClampedArrayCid:
+ case kInt16ArrayCid:
+ case kUint16ArrayCid:
+ case kInt32ArrayCid:
+ case kUint32ArrayCid:
+ return kTagged;
+ case kFloat32ArrayCid :
+ case kFloat64ArrayCid :
+ return kUnboxedDouble;
+ default:
+ UNIMPLEMENTED();
+ return kTagged;
+ }
+}
+
+
LocationSummary* StoreIndexedInstr::MakeLocationSummary() const {
const intptr_t kNumInputs = 3;
const intptr_t kNumTemps = 0;
@@ -1085,6 +1168,8 @@
break;
case kInt16ArrayCid:
case kUint16ArrayCid:
+ case kInt32ArrayCid:
+ case kUint32ArrayCid:
// Writable register because the value must be untagged before storing.
locs->set_in(2, Location::WritableRegister());
break;
@@ -1182,11 +1267,18 @@
}
case kInt16ArrayCid:
case kUint16ArrayCid: {
- Register value = locs()->in(2).reg();
- __ SmiUntag(value);
- __ movw(element_address, value);
+ Register value = locs()->in(2).reg();
+ __ SmiUntag(value);
+ __ movw(element_address, value);
+ break;
+ }
+ case kInt32ArrayCid:
+ case kUint32ArrayCid: {
+ Register value = locs()->in(2).reg();
+ __ SmiUntag(value);
+ __ movl(element_address, value);
break;
- }
+ }
case kFloat32ArrayCid:
// Convert to single precision.
__ cvtsd2ss(locs()->temp(0).fpu_reg(), locs()->in(2).fpu_reg());
@@ -1702,16 +1794,15 @@
}
if (op_kind() == Token::kTRUNCDIV) {
- const intptr_t kNumTemps = 3;
+ const intptr_t kNumTemps = 1;
LocationSummary* summary =
new LocationSummary(kNumInputs, kNumTemps, LocationSummary::kNoCall);
+ // Both inputs must be writable because they will be untagged.
summary->set_in(0, Location::RegisterLocation(RAX));
- summary->set_in(1, Location::RegisterLocation(RCX));
+ summary->set_in(1, Location::WritableRegister());
summary->set_out(Location::SameAsFirstInput());
- summary->set_temp(0, Location::RegisterLocation(RBX));
- // Will be used for for sign extension.
- summary->set_temp(1, Location::RegisterLocation(RDX));
- summary->set_temp(2, Location::RequiresRegister());
+ // Will be used for sign extension and division.
+ summary->set_temp(0, Location::RegisterLocation(RDX));
return summary;
} else if (op_kind() == Token::kSHR) {
const intptr_t kNumTemps = 0;
@@ -1875,22 +1966,17 @@
break;
}
case Token::kTRUNCDIV: {
- Register temp = locs()->temp(0).reg();
// Handle divide by zero in runtime.
- // Deoptimization requires that temp and right are preserved.
__ testq(right, right);
__ j(ZERO, deopt);
ASSERT(left == RAX);
ASSERT((right != RDX) && (right != RAX));
- ASSERT((temp != RDX) && (temp != RAX));
- ASSERT(locs()->temp(1).reg() == RDX);
+ ASSERT(locs()->temp(0).reg() == RDX);
ASSERT(result == RAX);
- Register right_temp = locs()->temp(2).reg();
- __ movq(right_temp, right);
__ SmiUntag(left);
- __ SmiUntag(right_temp);
+ __ SmiUntag(right);
__ cqo(); // Sign extend RAX -> RDX:RAX.
- __ idivq(right_temp); // RAX: quotient, RDX: remainder.
+ __ idivq(right); // RAX: quotient, RDX: remainder.
// Check the corner case of dividing the 'MIN_SMI' with -1, in which
// case we cannot tag the result.
__ cmpq(result, Immediate(0x4000000000000000));
@@ -2316,6 +2402,40 @@
}
+LocationSummary* InvokeMathCFunctionInstr::MakeLocationSummary() const {
+ // Calling convention on x64 uses XMM0 and XMM1 to pass the first two
+ // double arguments and XMM0 to return the result. Unfortunately
+ // currently we can't specify these registers because ParallelMoveResolver
+ // assumes that XMM0 is free at all times.
+ // TODO(vegorov): allow XMM0 to be used.
+ ASSERT((InputCount() == 1) || (InputCount() == 2));
+ const intptr_t kNumTemps = 0;
+ LocationSummary* result =
+ new LocationSummary(InputCount(), kNumTemps, LocationSummary::kCall);
+ result->set_in(0, Location::FpuRegisterLocation(XMM1, Location::kDouble));
+ if (InputCount() == 2) {
+ result->set_in(1, Location::FpuRegisterLocation(XMM2, Location::kDouble));
+ }
+ result->set_out(Location::FpuRegisterLocation(XMM1, Location::kDouble));
+ return result;
+}
+
+
+void InvokeMathCFunctionInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+ ASSERT(locs()->in(0).fpu_reg() == XMM1);
+ __ EnterFrame(0);
+ __ ReserveAlignedFrameSpace(0);
+ __ movaps(XMM0, locs()->in(0).fpu_reg());
+ if (InputCount() == 2) {
+ ASSERT(locs()->in(1).fpu_reg() == XMM2);
+ __ movaps(XMM1, locs()->in(1).fpu_reg());
+ }
+ __ CallRuntime(TargetFunction());
+ __ movaps(locs()->out().fpu_reg(), XMM0);
+ __ leave();
+}
+
+
LocationSummary* PolymorphicInstanceCallInstr::MakeLocationSummary() const {
return MakeCallSummary();
}
diff --git a/runtime/vm/intrinsifier.h b/runtime/vm/intrinsifier.h
index 7f5c51f..9231d26 100644
--- a/runtime/vm/intrinsifier.h
+++ b/runtime/vm/intrinsifier.h
@@ -85,20 +85,31 @@
V(_ByteArrayBase, get:length, ByteArrayBase_getLength, 1098081765) \
V(_Int8Array, [], Int8Array_getIndexed, 1295306322) \
V(_Int8Array, []=, Int8Array_setIndexed, 1709956322) \
+ V(_Int8Array, _new, Int8Array_new, 535958453) \
V(_Uint8Array, [], Uint8Array_getIndexed, 578331916) \
V(_Uint8Array, []=, Uint8Array_setIndexed, 121509844) \
+ V(_Uint8Array, _new, Uint8Array_new, 604355565) \
V(_Uint8ClampedArray, [], UintClamped8Array_getIndexed, 327062422) \
V(_Uint8ClampedArray, []=, Uint8ClampedArray_setIndexed, 2054663547) \
+ V(_Uint8ClampedArray, _new, Uint8ClampedArray_new, 1070949952) \
V(_Int16Array, [], Int16Array_getIndexed, 870098766) \
+ V(_Int16Array, _new, Int16Array_new, 903723993) \
V(_Uint16Array, [], Uint16Array_getIndexed, 1019828411) \
+ V(_Uint16Array, _new, Uint16Array_new, 133542762) \
V(_Int32Array, [], Int32Array_getIndexed, 1999321436) \
+ V(_Int32Array, _new, Int32Array_new, 8218286) \
V(_Uint32Array, [], Uint32Array_getIndexed, 1750764660) \
+ V(_Uint32Array, _new, Uint32Array_new, 469402161) \
V(_Int64Array, [], Int64Array_getIndexed, 504894128) \
+ V(_Int64Array, _new, Int64Array_new, 60605075) \
V(_Uint64Array, [], Uint64Array_getIndexed, 31272531) \
+ V(_Uint64Array, _new, Uint64Array_new, 624354107) \
V(_Float32Array, [], Float32Array_getIndexed, 147582932) \
V(_Float32Array, []=, Float32Array_setIndexed, 664454270) \
+ V(_Float32Array, _new, Float32Array_new, 109944959) \
V(_Float64Array, [], Float64Array_getIndexed, 638830526) \
V(_Float64Array, []=, Float64Array_setIndexed, 1948811847) \
+ V(_Float64Array, _new, Float64Array_new, 147668392) \
V(_ExternalUint8Array, [], ExternalUint8Array_getIndexed, 753790851) \
// TODO(srdjan): Implement _FixedSizeArrayIterator, get:current and
diff --git a/runtime/vm/intrinsifier_ia32.cc b/runtime/vm/intrinsifier_ia32.cc
index 29b1477..fe89c8c 100644
--- a/runtime/vm/intrinsifier_ia32.cc
+++ b/runtime/vm/intrinsifier_ia32.cc
@@ -39,8 +39,8 @@
// Compute the size to be allocated, it is based on the array length
// and is computed as:
// RoundedAllocationSize((array_length * kwordSize) + sizeof(RawArray)).
- __ movl(EDI, Address(ESP, kArrayLengthOffset)); // Array Length.
- // Assert that length is a Smi.
+ __ movl(EDI, Address(ESP, kArrayLengthOffset)); // Array length.
+ // Check that length is a positive Smi.
__ testl(EDI, Immediate(kSmiTagSize));
__ j(NOT_ZERO, &fall_through);
__ cmpl(EDI, Immediate(0));
@@ -50,7 +50,7 @@
Immediate(reinterpret_cast<int32_t>(Smi::New(Array::kMaxElements)));
__ cmpl(EDI, max_len);
__ j(GREATER, &fall_through);
- intptr_t fixed_size = sizeof(RawArray) + kObjectAlignment - 1;
+ const intptr_t fixed_size = sizeof(RawArray) + kObjectAlignment - 1;
__ leal(EDI, Address(EDI, TIMES_2, fixed_size)); // EDI is a Smi.
ASSERT(kSmiTagShift == 1);
__ andl(EDI, Immediate(-kObjectAlignment));
@@ -544,6 +544,98 @@
}
+#define TYPED_ARRAY_ALLOCATION(type_name, scale_factor) \
+ Label fall_through; \
+ const intptr_t kArrayLengthStackOffset = 1 * kWordSize; \
+ __ movl(EDI, Address(ESP, kArrayLengthStackOffset)); /* Array length. */ \
+ /* Check that length is a positive Smi. */ \
+ /* EDI: requested array length argument. */ \
+ __ testl(EDI, Immediate(kSmiTagSize)); \
+ __ j(NOT_ZERO, &fall_through); \
+ __ cmpl(EDI, Immediate(0)); \
+ __ j(LESS, &fall_through); \
+ __ SmiUntag(EDI); \
+ /* Check for maximum allowed length. */ \
+ /* EDI: untagged array length. */ \
+ __ cmpl(EDI, Immediate(type_name::kMaxElements)); \
+ __ j(GREATER, &fall_through); \
+ const intptr_t fixed_size = sizeof(Raw##type_name) + kObjectAlignment - 1; \
+ __ leal(EDI, Address(EDI, scale_factor, fixed_size)); \
+ __ andl(EDI, Immediate(-kObjectAlignment)); \
+ Heap* heap = Isolate::Current()->heap(); \
+ \
+ __ movl(EAX, Address::Absolute(heap->TopAddress())); \
+ __ movl(EBX, EAX); \
+ \
+ /* EDI: allocation size. */ \
+ __ addl(EBX, EDI); \
+ __ j(CARRY, &fall_through); \
+ \
+ /* Check if the allocation fits into the remaining space. */ \
+ /* EAX: potential new object start. */ \
+ /* EBX: potential next object start. */ \
+ /* EDI: allocation size. */ \
+ __ cmpl(EBX, Address::Absolute(heap->EndAddress())); \
+ __ j(ABOVE_EQUAL, &fall_through); \
+ \
+ /* Successfully allocated the object(s), now update top to point to */ \
+ /* next object start and initialize the object. */ \
+ __ movl(Address::Absolute(heap->TopAddress()), EBX); \
+ __ addl(EAX, Immediate(kHeapObjectTag)); \
+ \
+ /* Initialize the tags. */ \
+ /* EAX: new object start as a tagged pointer. */ \
+ /* EBX: new object end address. */ \
+ /* EDI: allocation size. */ \
+ { \
+ Label size_tag_overflow, done; \
+ __ cmpl(EDI, Immediate(RawObject::SizeTag::kMaxSizeTag)); \
+ __ j(ABOVE, &size_tag_overflow, Assembler::kNearJump); \
+ __ shll(EDI, Immediate(RawObject::kSizeTagBit - kObjectAlignmentLog2)); \
+ __ jmp(&done, Assembler::kNearJump); \
+ \
+ __ Bind(&size_tag_overflow); \
+ __ movl(EDI, Immediate(0)); \
+ __ Bind(&done); \
+ \
+ /* Get the class index and insert it into the tags. */ \
+ __ orl(EDI, Immediate(RawObject::ClassIdTag::encode(k##type_name##Cid))); \
+ __ movl(FieldAddress(EAX, type_name::tags_offset()), EDI); /* Tags. */ \
+ } \
+ /* Set the length field. */ \
+ /* EAX: new object start as a tagged pointer. */ \
+ /* EBX: new object end address. */ \
+ __ movl(EDI, Address(ESP, kArrayLengthStackOffset)); /* Array length. */ \
+ __ StoreIntoObjectNoBarrier(EAX, \
+ FieldAddress(EAX, type_name::length_offset()), \
+ EDI); \
+ /* Initialize all array elements to 0. */ \
+ /* EAX: new object start as a tagged pointer. */ \
+ /* EBX: new object end address. */ \
+ /* EDI: iterator which initially points to the start of the variable */ \
+ /* ECX: scratch register. */ \
+ /* data area to be initialized. */ \
+ __ xorl(ECX, ECX); /* Zero. */ \
+ __ leal(EDI, FieldAddress(EAX, sizeof(Raw##type_name))); \
+ Label done, init_loop; \
+ __ Bind(&init_loop); \
+ __ cmpl(EDI, EBX); \
+ __ j(ABOVE_EQUAL, &done, Assembler::kNearJump); \
+ __ movl(Address(EDI, 0), ECX); \
+ __ addl(EDI, Immediate(kWordSize)); \
+ __ jmp(&init_loop, Assembler::kNearJump); \
+ __ Bind(&done); \
+ \
+ __ ret(); \
+ __ Bind(&fall_through); \
+
+
+bool Intrinsifier::Int8Array_new(Assembler* assembler) {
+ TYPED_ARRAY_ALLOCATION(Int8Array, TIMES_1);
+ return false;
+}
+
+
bool Intrinsifier::Uint8Array_getIndexed(Assembler* assembler) {
Label fall_through;
TestByteArrayIndex(assembler, &fall_through);
@@ -584,6 +676,12 @@
}
+bool Intrinsifier::Uint8Array_new(Assembler* assembler) {
+ TYPED_ARRAY_ALLOCATION(Uint8Array, TIMES_1);
+ return false;
+}
+
+
bool Intrinsifier::UintClamped8Array_getIndexed(Assembler* assembler) {
Label fall_through;
TestByteArrayIndex(assembler, &fall_through);
@@ -633,6 +731,12 @@
}
+bool Intrinsifier::Uint8ClampedArray_new(Assembler* assembler) {
+ TYPED_ARRAY_ALLOCATION(Uint8ClampedArray, TIMES_1);
+ return false;
+}
+
+
bool Intrinsifier::Int16Array_getIndexed(Assembler* assembler) {
Label fall_through;
TestByteArrayIndex(assembler, &fall_through);
@@ -647,6 +751,12 @@
}
+bool Intrinsifier::Int16Array_new(Assembler* assembler) {
+ TYPED_ARRAY_ALLOCATION(Int16Array, TIMES_2);
+ return false;
+}
+
+
bool Intrinsifier::Uint16Array_getIndexed(Assembler* assembler) {
Label fall_through;
TestByteArrayIndex(assembler, &fall_through);
@@ -661,6 +771,12 @@
}
+bool Intrinsifier::Uint16Array_new(Assembler* assembler) {
+ TYPED_ARRAY_ALLOCATION(Uint16Array, TIMES_2);
+ return false;
+}
+
+
bool Intrinsifier::Int32Array_getIndexed(Assembler* assembler) {
Label fall_through;
TestByteArrayIndex(assembler, &fall_through);
@@ -683,6 +799,12 @@
}
+bool Intrinsifier::Int32Array_new(Assembler* assembler) {
+ TYPED_ARRAY_ALLOCATION(Int32Array, TIMES_4);
+ return false;
+}
+
+
bool Intrinsifier::Uint32Array_getIndexed(Assembler* assembler) {
Label fall_through;
TestByteArrayIndex(assembler, &fall_through);
@@ -705,16 +827,34 @@
}
+bool Intrinsifier::Uint32Array_new(Assembler* assembler) {
+ TYPED_ARRAY_ALLOCATION(Uint32Array, TIMES_4);
+ return false;
+}
+
+
bool Intrinsifier::Int64Array_getIndexed(Assembler* assembler) {
return false;
}
+bool Intrinsifier::Int64Array_new(Assembler* assembler) {
+ TYPED_ARRAY_ALLOCATION(Int64Array, TIMES_8);
+ return false;
+}
+
+
bool Intrinsifier::Uint64Array_getIndexed(Assembler* assembler) {
return false;
}
+bool Intrinsifier::Uint64Array_new(Assembler* assembler) {
+ TYPED_ARRAY_ALLOCATION(Uint64Array, TIMES_8);
+ return false;
+}
+
+
bool Intrinsifier::Float32Array_getIndexed(Assembler* assembler) {
Label fall_through;
TestByteArrayIndex(assembler, &fall_through);
@@ -771,6 +911,12 @@
}
+bool Intrinsifier::Float32Array_new(Assembler* assembler) {
+ TYPED_ARRAY_ALLOCATION(Float32Array, TIMES_4);
+ return false;
+}
+
+
bool Intrinsifier::Float64Array_getIndexed(Assembler* assembler) {
Label fall_through;
TestByteArrayIndex(assembler, &fall_through);
@@ -821,6 +967,12 @@
}
+bool Intrinsifier::Float64Array_new(Assembler* assembler) {
+ TYPED_ARRAY_ALLOCATION(Float64Array, TIMES_8);
+ return false;
+}
+
+
bool Intrinsifier::ExternalUint8Array_getIndexed(Assembler* assembler) {
Label fall_through;
TestByteArrayIndex(assembler, &fall_through);
diff --git a/runtime/vm/intrinsifier_x64.cc b/runtime/vm/intrinsifier_x64.cc
index 855a316..df97b4e 100644
--- a/runtime/vm/intrinsifier_x64.cc
+++ b/runtime/vm/intrinsifier_x64.cc
@@ -39,7 +39,7 @@
// and is computed as:
// RoundedAllocationSize((array_length * kwordSize) + sizeof(RawArray)).
__ movq(RDI, Address(RSP, kArrayLengthOffset)); // Array Length.
- // Assert that length is a Smi.
+ // Check that length is a positive Smi.
__ testq(RDI, Immediate(kSmiTagSize));
__ j(NOT_ZERO, &fall_through);
__ cmpq(RDI, Immediate(0));
@@ -49,7 +49,7 @@
Immediate(reinterpret_cast<int64_t>(Smi::New(Array::kMaxElements)));
__ cmpq(RDI, max_len);
__ j(GREATER, &fall_through);
- intptr_t fixed_size = sizeof(RawArray) + kObjectAlignment - 1;
+ const intptr_t fixed_size = sizeof(RawArray) + kObjectAlignment - 1;
__ leaq(RDI, Address(RDI, TIMES_4, fixed_size)); // RDI is a Smi.
ASSERT(kSmiTagShift == 1);
__ andq(RDI, Immediate(-kObjectAlignment));
@@ -497,6 +497,118 @@
}
+#define TYPED_ARRAY_ALLOCATION(type_name, scale_factor) \
+ Label fall_through; \
+ const intptr_t kArrayLengthStackOffset = 1 * kWordSize; \
+ __ movq(RDI, Address(RSP, kArrayLengthStackOffset)); /* Array length. */ \
+ /* Check that length is a positive Smi. */ \
+ /* RDI: requested array length argument. */ \
+ __ testq(RDI, Immediate(kSmiTagSize)); \
+ __ j(NOT_ZERO, &fall_through); \
+ __ cmpq(RDI, Immediate(0)); \
+ __ j(LESS, &fall_through); \
+ __ SmiUntag(RDI); \
+ /* Check for maximum allowed length. */ \
+ /* RDI: untagged array length. */ \
+ __ cmpq(RDI, Immediate(type_name::kMaxElements)); \
+ __ j(GREATER, &fall_through); \
+ const intptr_t fixed_size = sizeof(Raw##type_name) + kObjectAlignment - 1; \
+ __ leaq(RDI, Address(RDI, scale_factor, fixed_size)); \
+ __ andq(RDI, Immediate(-kObjectAlignment)); \
+ Heap* heap = Isolate::Current()->heap(); \
+ \
+ __ movq(RAX, Immediate(heap->TopAddress())); \
+ __ movq(RAX, Address(RAX, 0)); \
+ __ movq(RCX, RAX); \
+ \
+ /* RDI: allocation size. */ \
+ __ addq(RCX, RDI); \
+ __ j(CARRY, &fall_through); \
+ \
+ /* Check if the allocation fits into the remaining space. */ \
+ /* RAX: potential new object start. */ \
+ /* RCX: potential next object start. */ \
+ /* RDI: allocation size. */ \
+ /* R13: scratch register. */ \
+ __ movq(R13, Immediate(heap->EndAddress())); \
+ __ cmpq(RCX, Address(R13, 0)); \
+ __ j(ABOVE_EQUAL, &fall_through); \
+ \
+ /* Successfully allocated the object(s), now update top to point to */ \
+ /* next object start and initialize the object. */ \
+ __ movq(R13, Immediate(heap->TopAddress())); \
+ __ movq(Address(R13, 0), RCX); \
+ __ addq(RAX, Immediate(kHeapObjectTag)); \
+ \
+ /* Initialize the tags. */ \
+ /* RAX: new object start as a tagged pointer. */ \
+ /* RCX: new object end address. */ \
+ /* RDI: allocation size. */ \
+ /* R13: scratch register. */ \
+ { \
+ Label size_tag_overflow, done; \
+ __ cmpq(RDI, Immediate(RawObject::SizeTag::kMaxSizeTag)); \
+ __ j(ABOVE, &size_tag_overflow, Assembler::kNearJump); \
+ __ shlq(RDI, Immediate(RawObject::kSizeTagBit - kObjectAlignmentLog2)); \
+ __ jmp(&done, Assembler::kNearJump); \
+ \
+ __ Bind(&size_tag_overflow); \
+ __ movq(RDI, Immediate(0)); \
+ __ Bind(&done); \
+ \
+ /* Get the class index and insert it into the tags. */ \
+ __ orq(RDI, Immediate(RawObject::ClassIdTag::encode(k##type_name##Cid))); \
+ __ movq(FieldAddress(RAX, type_name::tags_offset()), RDI); /* Tags. */ \
+ } \
+ /* Set the length field. */ \
+ /* RAX: new object start as a tagged pointer. */ \
+ /* RCX: new object end address. */ \
+ __ movq(RDI, Address(RSP, kArrayLengthStackOffset)); /* Array length. */ \
+ __ StoreIntoObjectNoBarrier(RAX, \
+ FieldAddress(RAX, type_name::length_offset()), \
+ RDI); \
+ /* Initialize all array elements to 0. */ \
+ /* RAX: new object start as a tagged pointer. */ \
+ /* RCX: new object end address. */ \
+ /* RDI: iterator which initially points to the start of the variable */ \
+ /* RBX: scratch register. */ \
+ /* data area to be initialized. */ \
+ __ xorq(RBX, RBX); /* Zero. */ \
+ __ leaq(RDI, FieldAddress(RAX, sizeof(Raw##type_name))); \
+ Label done, init_loop; \
+ __ Bind(&init_loop); \
+ __ cmpq(RDI, RCX); \
+ __ j(ABOVE_EQUAL, &done, Assembler::kNearJump); \
+ __ movq(Address(RDI, 0), RBX); \
+ __ addq(RDI, Immediate(kWordSize)); \
+ __ jmp(&init_loop, Assembler::kNearJump); \
+ __ Bind(&done); \
+ \
+ __ ret(); \
+ __ Bind(&fall_through); \
+
+
+bool Intrinsifier::Int8Array_new(Assembler* assembler) {
+ TYPED_ARRAY_ALLOCATION(Int8Array, TIMES_1);
+ return false;
+}
+
+
+bool Intrinsifier::Uint8Array_getIndexed(Assembler* assembler) {
+ Label fall_through;
+ TestByteArrayIndex(assembler, &fall_through);
+ __ SmiUntag(R12);
+ __ movzxb(RAX, FieldAddress(RAX,
+ R12,
+ TIMES_1,
+ Uint8Array::data_offset()));
+ __ SmiTag(RAX);
+ __ ret();
+ __ Bind(&fall_through);
+ return false;
+}
+
+
bool Intrinsifier::Uint8Array_setIndexed(Assembler* assembler) {
Label fall_through;
// Verify that the array index is valid.
@@ -520,6 +632,12 @@
}
+bool Intrinsifier::Uint8Array_new(Assembler* assembler) {
+ TYPED_ARRAY_ALLOCATION(Uint8Array, TIMES_1);
+ return false;
+}
+
+
bool Intrinsifier::UintClamped8Array_getIndexed(Assembler* assembler) {
Label fall_through;
TestByteArrayIndex(assembler, &fall_through);
@@ -566,17 +684,8 @@
}
-bool Intrinsifier::Uint8Array_getIndexed(Assembler* assembler) {
- Label fall_through;
- TestByteArrayIndex(assembler, &fall_through);
- __ SmiUntag(R12);
- __ movzxb(RAX, FieldAddress(RAX,
- R12,
- TIMES_1,
- Uint8Array::data_offset()));
- __ SmiTag(RAX);
- __ ret();
- __ Bind(&fall_through);
+bool Intrinsifier::Uint8ClampedArray_new(Assembler* assembler) {
+ TYPED_ARRAY_ALLOCATION(Uint8ClampedArray, TIMES_1);
return false;
}
@@ -595,6 +704,12 @@
}
+bool Intrinsifier::Int16Array_new(Assembler* assembler) {
+ TYPED_ARRAY_ALLOCATION(Int16Array, TIMES_2);
+ return false;
+}
+
+
bool Intrinsifier::Uint16Array_getIndexed(Assembler* assembler) {
Label fall_through;
TestByteArrayIndex(assembler, &fall_through);
@@ -609,6 +724,12 @@
}
+bool Intrinsifier::Uint16Array_new(Assembler* assembler) {
+ TYPED_ARRAY_ALLOCATION(Uint16Array, TIMES_2);
+ return false;
+}
+
+
bool Intrinsifier::Int32Array_getIndexed(Assembler* assembler) {
Label fall_through;
TestByteArrayIndex(assembler, &fall_through);
@@ -623,6 +744,12 @@
}
+bool Intrinsifier::Int32Array_new(Assembler* assembler) {
+ TYPED_ARRAY_ALLOCATION(Int32Array, TIMES_4);
+ return false;
+}
+
+
bool Intrinsifier::Uint32Array_getIndexed(Assembler* assembler) {
Label fall_through;
TestByteArrayIndex(assembler, &fall_through);
@@ -637,6 +764,12 @@
}
+bool Intrinsifier::Uint32Array_new(Assembler* assembler) {
+ TYPED_ARRAY_ALLOCATION(Uint32Array, TIMES_4);
+ return false;
+}
+
+
bool Intrinsifier::Int64Array_getIndexed(Assembler* assembler) {
Label fall_through;
TestByteArrayIndex(assembler, &fall_through);
@@ -658,6 +791,12 @@
}
+bool Intrinsifier::Int64Array_new(Assembler* assembler) {
+ TYPED_ARRAY_ALLOCATION(Int64Array, TIMES_8);
+ return false;
+}
+
+
bool Intrinsifier::Uint64Array_getIndexed(Assembler* assembler) {
Label fall_through;
TestByteArrayIndex(assembler, &fall_through);
@@ -678,6 +817,12 @@
}
+bool Intrinsifier::Uint64Array_new(Assembler* assembler) {
+ TYPED_ARRAY_ALLOCATION(Uint64Array, TIMES_8);
+ return false;
+}
+
+
bool Intrinsifier::Float32Array_getIndexed(Assembler* assembler) {
Label fall_through;
TestByteArrayIndex(assembler, &fall_through);
@@ -733,6 +878,12 @@
}
+bool Intrinsifier::Float32Array_new(Assembler* assembler) {
+ TYPED_ARRAY_ALLOCATION(Float32Array, TIMES_4);
+ return false;
+}
+
+
bool Intrinsifier::Float64Array_getIndexed(Assembler* assembler) {
Label fall_through;
TestByteArrayIndex(assembler, &fall_through);
@@ -783,6 +934,12 @@
}
+bool Intrinsifier::Float64Array_new(Assembler* assembler) {
+ TYPED_ARRAY_ALLOCATION(Float64Array, TIMES_8);
+ return false;
+}
+
+
bool Intrinsifier::ExternalUint8Array_getIndexed(Assembler* assembler) {
Label fall_through;
TestByteArrayIndex(assembler, &fall_through);
diff --git a/runtime/vm/isolate.cc b/runtime/vm/isolate.cc
index 72aa5cd..06ca69e 100644
--- a/runtime/vm/isolate.cc
+++ b/runtime/vm/isolate.cc
@@ -17,6 +17,7 @@
#include "vm/object_store.h"
#include "vm/parser.h"
#include "vm/port.h"
+#include "vm/simulator.h"
#include "vm/stack_frame.h"
#include "vm/stub_code.h"
#include "vm/symbols.h"
@@ -270,6 +271,7 @@
api_state_(NULL),
stub_code_(NULL),
debugger_(NULL),
+ simulator_(NULL),
long_jump_base_(NULL),
timer_list_(),
deopt_id_(0),
@@ -297,6 +299,9 @@
delete api_state_;
delete stub_code_;
delete debugger_;
+#if defined(USING_SIMULATOR)
+ delete simulator_;
+#endif
delete mutex_;
mutex_ = NULL; // Fail fast if interrupts are scheduled on a dead isolate.
delete message_handler_;
@@ -432,7 +437,7 @@
return &ICData::ZoneHandle();
}
ICData& ic_data_handle = ICData::ZoneHandle();
- ic_data_handle |= array_handle.At(deopt_id);
+ ic_data_handle ^= array_handle.At(deopt_id);
return &ic_data_handle;
}
@@ -457,7 +462,7 @@
const int func_len = class_functions.IsNull() ? 0 : class_functions.Length();
for (int j = 0; j < func_len; j++) {
Function& function = Function::Handle();
- function |= class_functions.At(j);
+ function ^= class_functions.At(j);
if (function.usage_counter() > 0) {
functions->Add(&function);
}
@@ -474,7 +479,7 @@
Library& library = Library::Handle();
GrowableArray<const Function*> invoked_functions;
for (int i = 0; i < libraries.Length(); i++) {
- library |= libraries.At(i);
+ library ^= libraries.At(i);
Class& cls = Class::Handle();
ClassDictionaryIterator iter(library);
while (iter.HasNext()) {
@@ -483,7 +488,7 @@
}
Array& anon_classes = Array::Handle(library.raw_ptr()->anonymous_classes_);
for (int i = 0; i < library.raw_ptr()->num_anonymous_; i++) {
- cls |= anon_classes.At(i);
+ cls ^= anon_classes.At(i);
AddFunctionsFromClass(cls, &invoked_functions);
}
}
diff --git a/runtime/vm/isolate.h b/runtime/vm/isolate.h
index f79bd4f..c9fe421 100644
--- a/runtime/vm/isolate.h
+++ b/runtime/vm/isolate.h
@@ -36,6 +36,7 @@
class RawMint;
class RawInteger;
class RawError;
+class Simulator;
class StackResource;
class StackZone;
class StubCode;
@@ -201,6 +202,10 @@
// The true stack limit for this isolate.
uword saved_stack_limit() const { return saved_stack_limit_; }
+ static uword GetSpecifiedStackSize();
+
+ static const intptr_t kStackSizeBuffer = (16 * KB);
+
enum {
kApiInterrupt = 0x1, // An interrupt from Dart_InterruptIsolate.
kMessageInterrupt = 0x2, // An interrupt to process an out of band message.
@@ -238,6 +243,9 @@
Debugger* debugger() const { return debugger_; }
+ Simulator* simulator() const { return simulator_; }
+ void set_simulator(Simulator* value) { simulator_ = value; }
+
GcPrologueCallbacks& gc_prologue_callbacks() {
return gc_prologue_callbacks_;
}
@@ -342,10 +350,6 @@
void BuildName(const char* name_prefix);
void PrintInvokedFunctions();
- static uword GetSpecifiedStackSize();
-
- static const intptr_t kStackSizeBuffer = (16 * KB);
-
static ThreadLocalKey isolate_key;
StoreBufferBlock store_buffer_block_;
StoreBuffer store_buffer_;
@@ -364,6 +368,7 @@
ApiState* api_state_;
StubCode* stub_code_;
Debugger* debugger_;
+ Simulator* simulator_;
LongJump* long_jump_base_;
TimerList timer_list_;
intptr_t deopt_id_;
diff --git a/runtime/vm/locations.h b/runtime/vm/locations.h
index fcd9c81..f8b7f6c 100644
--- a/runtime/vm/locations.h
+++ b/runtime/vm/locations.h
@@ -418,7 +418,7 @@
}
void set_in(intptr_t index, Location loc) {
- ASSERT(!always_calls() || loc.IsRegister());
+ ASSERT(!always_calls() || loc.IsMachineRegister());
input_locations_[index] = loc;
}
@@ -453,7 +453,7 @@
}
void set_out(Location loc) {
- ASSERT(!always_calls() || (loc.IsRegister() || loc.IsInvalid()));
+ ASSERT(!always_calls() || (loc.IsMachineRegister() || loc.IsInvalid()));
output_location_ = loc;
}
diff --git a/runtime/vm/native_arguments.h b/runtime/vm/native_arguments.h
index 7111c86..de192a2 100644
--- a/runtime/vm/native_arguments.h
+++ b/runtime/vm/native_arguments.h
@@ -16,6 +16,7 @@
class Isolate;
class Object;
class RawObject;
+class Simulator;
#if defined(TESTING) || defined(DEBUG)
@@ -151,6 +152,7 @@
class InstanceFunctionBit : public BitField<bool, kInstanceFunctionBit, 1> {};
class ClosureFunctionBit : public BitField<bool, kClosureFunctionBit, 1> {};
friend class BootstrapNatives;
+ friend class Simulator;
friend void SetReturnValueHelper(Dart_NativeArguments, Dart_Handle);
// Since this function is passed a RawObject directly, we need to be
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index c53878b..93d2cfe 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -117,6 +117,46 @@
const double MegamorphicCache::kLoadFactor = 0.75;
+// The following functions are marked as invisible, meaning they will be hidden
+// in the stack trace.
+// (Library, class name, method name)
+#define INVISIBLE_LIST(V) \
+ V(CoreLibrary, Object, _noSuchMethod) \
+ V(CoreLibrary, List, _throwArgumentError) \
+ V(CoreLibrary, AssertionErrorImplementation, _throwNew) \
+ V(CoreLibrary, TypeErrorImplementation, _throwNew) \
+ V(CoreLibrary, FallThroughErrorImplementation, _throwNew) \
+ V(CoreLibrary, AbstractClassInstantiationErrorImplementation, _throwNew) \
+ V(CoreLibrary, NoSuchMethodError, _throwNew) \
+ V(CoreLibrary, int, _throwFormatException) \
+ V(CoreLibrary, int, _parse) \
+
+
+static void MarkFunctionAsInvisible(const Library& lib,
+ const char* class_name,
+ const char* function_name) {
+ ASSERT(!lib.IsNull());
+ const Class& cls = Class::Handle(
+ lib.LookupClass(String::Handle(String::New(class_name))));
+ ASSERT(!cls.IsNull());
+ const Function& function =
+ Function::Handle(
+ cls.LookupFunctionAllowPrivate(
+ String::Handle(String::New(function_name))));
+ ASSERT(!function.IsNull());
+ function.set_is_visible(false);
+}
+
+
+static void MarkInvisibleFunctions() {
+#define MARK_FUNCTION(lib, class_name, function_name) \
+ MarkFunctionAsInvisible(Library::Handle(Library::lib()), \
+ #class_name, #function_name); \
+
+INVISIBLE_LIST(MARK_FUNCTION)
+#undef MARK_FUNCTION
+}
+
// Takes a vm internal name and makes it suitable for external user.
//
// Examples:
@@ -244,16 +284,16 @@
Smi::handle_vtable_ = fake_smi.vtable();
}
- // Allocate the read only object handles here.
- empty_array_ = reinterpret_cast<Array*>(Dart::AllocateReadOnlyHandle());
- sentinel_ = reinterpret_cast<Instance*>(Dart::AllocateReadOnlyHandle());
- transition_sentinel_ =
- reinterpret_cast<Instance*>(Dart::AllocateReadOnlyHandle());
- bool_true_ = reinterpret_cast<Bool*>(Dart::AllocateReadOnlyHandle());
- bool_false_ = reinterpret_cast<Bool*>(Dart::AllocateReadOnlyHandle());
-
Isolate* isolate = Isolate::Current();
Heap* heap = isolate->heap();
+
+ // Allocate the read only object handles here.
+ empty_array_ = Array::ReadOnlyHandle(isolate);
+ sentinel_ = Instance::ReadOnlyHandle(isolate);
+ transition_sentinel_ = Instance::ReadOnlyHandle(isolate);
+ bool_true_ = Bool::ReadOnlyHandle(isolate);
+ bool_false_ = Bool::ReadOnlyHandle(isolate);
+
// Allocate and initialize the null instance.
// 'null_' must be the first object allocated as it is used in allocation to
// clear the object.
@@ -542,6 +582,21 @@
}
+void Object::VerifyBuiltinVtables() {
+#if defined(DEBUG)
+ Isolate* isolate = Isolate::Current();
+ ASSERT(isolate != NULL);
+ Class& cls = Class::Handle(isolate, Class::null());
+ for (intptr_t cid = (kIllegalCid + 1); cid < kNumPredefinedCids; cid++) {
+ if (isolate->class_table()->HasValidClassAt(cid)) {
+ cls ^= isolate->class_table()->At(cid);
+ ASSERT(builtin_vtables_[cid] == cls.raw_ptr()->handle_vtable_);
+ }
+ }
+#endif
+}
+
+
void Object::RegisterClass(const Class& cls,
const String& name,
const Library& lib) {
@@ -1024,6 +1079,7 @@
cls.set_super_type(Type::Handle());
ClassFinalizer::VerifyBootstrapClasses();
+ MarkInvisibleFunctions();
return Error::null();
}
@@ -1208,15 +1264,13 @@
cid = kInstanceCid;
}
ASSERT(vtable() == builtin_vtables_[cid]);
- Isolate* isolate = Isolate::Current();
if (FLAG_verify_handles) {
+ Isolate* isolate = Isolate::Current();
Heap* isolate_heap = isolate->heap();
Heap* vm_isolate_heap = Dart::vm_isolate()->heap();
ASSERT(isolate_heap->Contains(RawObject::ToAddr(raw_)) ||
vm_isolate_heap->Contains(RawObject::ToAddr(raw_)));
}
- ASSERT(builtin_vtables_[cid] ==
- isolate->class_table()->At(cid)->ptr()->handle_vtable_);
}
#endif
}
@@ -1450,7 +1504,7 @@
const Array& field_array = Array::Handle(fields());
Field& field = Field::Handle();
for (intptr_t i = 0; i < field_array.Length(); ++i) {
- field |= field_array.At(i);
+ field ^= field_array.At(i);
if (!field.is_static()) {
return true;
}
@@ -1466,7 +1520,7 @@
Function& func = Function::Handle();
intptr_t len = value.Length();
for (intptr_t i = 0; i < len; i++) {
- func |= value.At(i);
+ func ^= value.At(i);
ASSERT(func.Owner() == raw());
}
#endif
@@ -1506,7 +1560,7 @@
intptr_t best_fit_token_pos = -1;
intptr_t best_fit_index = -1;
for (intptr_t i = 0; i < num_closures; i++) {
- closure |= closures.At(i);
+ closure ^= closures.At(i);
ASSERT(!closure.IsNull());
if ((closure.token_pos() <= token_pos) &&
(token_pos < closure.end_token_pos()) &&
@@ -1517,7 +1571,7 @@
}
closure = Function::null();
if (best_fit_index >= 0) {
- closure |= closures.At(best_fit_index);
+ closure ^= closures.At(best_fit_index);
}
return closure.raw();
}
@@ -1674,7 +1728,7 @@
Field& field = Field::Handle();
intptr_t len = flds.Length();
for (intptr_t i = 0; i < len; i++) {
- field |= flds.At(i);
+ field ^= flds.At(i);
// Offset is computed only for instance fields.
if (!field.is_static()) {
ASSERT(field.Offset() == 0);
@@ -1730,8 +1784,8 @@
const GrowableObjectArray& new_functions = GrowableObjectArray::Handle(
GrowableObjectArray::New(orig_len));
for (intptr_t i = 0; i < orig_len; i++) {
- orig_func |= orig_list.At(i);
- member_name = orig_func.name();
+ orig_func ^= orig_list.At(i);
+ member_name ^= orig_func.name();
func = patch.LookupFunction(member_name);
if (func.IsNull()) {
// Non-patched function is preserved, all patched functions are added in
@@ -1745,7 +1799,7 @@
}
}
for (intptr_t i = 0; i < patch_len; i++) {
- func |= patch_list.At(i);
+ func ^= patch_list.At(i);
func.set_owner(patch_class);
new_functions.Add(func);
}
@@ -1763,20 +1817,20 @@
Field& orig_field = Field::Handle();
new_list = Array::New(patch_len + orig_len);
for (intptr_t i = 0; i < patch_len; i++) {
- field |= patch_list.At(i);
+ field ^= patch_list.At(i);
field.set_owner(*this);
member_name = field.name();
// TODO(iposva): Verify non-public fields only.
// Verify no duplicate additions.
- orig_field = LookupField(member_name);
+ orig_field ^= LookupField(member_name);
if (!orig_field.IsNull()) {
return FormatPatchError("duplicate field: %s", member_name);
}
new_list.SetAt(i, field);
}
for (intptr_t i = 0; i < orig_len; i++) {
- field |= orig_list.At(i);
+ field ^= orig_list.At(i);
new_list.SetAt(patch_len + i, field);
}
SetFields(new_list);
@@ -1791,7 +1845,7 @@
Field& field = Field::Handle();
intptr_t len = value.Length();
for (intptr_t i = 0; i < len; i++) {
- field |= value.At(i);
+ field ^= value.At(i);
ASSERT(field.owner() == raw());
}
#endif
@@ -2310,7 +2364,6 @@
RawFunction* Class::LookupFunction(const String& name) const {
Isolate* isolate = Isolate::Current();
- ASSERT(name.IsOneByteString());
Array& funcs = Array::Handle(isolate, functions());
if (funcs.IsNull()) {
// This can occur, e.g., for Null classes.
@@ -2322,7 +2375,7 @@
// Quick Symbol compare.
NoGCScope no_gc;
for (intptr_t i = 0; i < len; i++) {
- function |= funcs.At(i);
+ function ^= funcs.At(i);
if (function.name() == name.raw()) {
return function.raw();
}
@@ -2330,8 +2383,8 @@
} else {
String& function_name = String::Handle(isolate, String::null());
for (intptr_t i = 0; i < len; i++) {
- function |= funcs.At(i);
- function_name |= function.name();
+ function ^= funcs.At(i);
+ function_name ^= function.name();
if (function_name.Equals(name)) {
return function.raw();
}
@@ -2344,7 +2397,6 @@
RawFunction* Class::LookupFunctionAllowPrivate(const String& name) const {
Isolate* isolate = Isolate::Current();
- ASSERT(name.IsOneByteString());
Array& funcs = Array::Handle(isolate, functions());
if (funcs.IsNull()) {
// This can occur, e.g., for Null classes.
@@ -2354,10 +2406,10 @@
String& function_name = String::Handle(isolate, String::null());
intptr_t len = funcs.Length();
for (intptr_t i = 0; i < len; i++) {
- function |= funcs.At(i);
- function_name |= function.name();
- if (OneByteString::EqualsIgnoringPrivateKey(function_name, name)) {
- return function.raw();
+ function ^= funcs.At(i);
+ function_name ^= function.name();
+ if (String::EqualsIgnoringPrivateKey(function_name, name)) {
+ return function.raw();
}
}
// No function found.
@@ -2384,8 +2436,8 @@
String& function_name = String::Handle(isolate, String::null());
intptr_t len = funcs.Length();
for (intptr_t i = 0; i < len; i++) {
- function |= funcs.At(i);
- function_name |= function.name();
+ function ^= funcs.At(i);
+ function_name ^= function.name();
if (MatchesAccessorName(function_name, prefix, prefix_length, name)) {
return function.raw();
}
@@ -2407,7 +2459,7 @@
Array& funcs = Array::Handle(functions());
intptr_t len = funcs.Length();
for (intptr_t i = 0; i < len; i++) {
- func |= funcs.At(i);
+ func ^= funcs.At(i);
if ((func.token_pos() <= token_pos) &&
(token_pos <= func.end_token_pos())) {
return func.raw();
@@ -2450,16 +2502,15 @@
RawField* Class::LookupField(const String& name) const {
Isolate* isolate = Isolate::Current();
- ASSERT(name.IsOneByteString());
const Array& flds = Array::Handle(isolate, fields());
Field& field = Field::Handle(isolate, Field::null());
String& field_name = String::Handle(isolate, String::null());
intptr_t len = flds.Length();
for (intptr_t i = 0; i < len; i++) {
- field |= flds.At(i);
- field_name |= field.name();
- if (OneByteString::EqualsIgnoringPrivateKey(field_name, name)) {
- return field.raw();
+ field ^= flds.At(i);
+ field_name ^= field.name();
+ if (String::EqualsIgnoringPrivateKey(field_name, name)) {
+ return field.raw();
}
}
// No field found.
@@ -3008,7 +3059,7 @@
// Last element of the array is the number of used elements.
intptr_t table_size = table.Length() - 1;
Smi& used = Smi::Handle(isolate);
- used |= table.At(table_size);
+ used ^= table.At(table_size);
intptr_t used_elements = used.Value() + 1;
used = Smi::New(used_elements);
table.SetAt(table_size, used);
@@ -3511,7 +3562,7 @@
RawString* Function::ParameterNameAt(intptr_t index) const {
const Array& parameter_names = Array::Handle(raw_ptr()->parameter_names_);
String& parameter_name = String::Handle();
- parameter_name |= parameter_names.At(index);
+ parameter_name ^= parameter_names.At(index);
return parameter_name.raw();
}
@@ -3628,6 +3679,11 @@
}
+void Function::set_is_visible(bool value) const {
+ set_kind_tag(VisibleBit::update(value, raw_ptr()->kind_tag_));
+}
+
+
intptr_t Function::NumParameters() const {
return num_fixed_parameters() + NumOptionalParameters();
}
@@ -3730,13 +3786,13 @@
String& argument_name = String::Handle();
String& parameter_name = String::Handle();
for (int i = 0; i < num_named_arguments; i++) {
- argument_name |= argument_names.At(i);
+ argument_name ^= argument_names.At(i);
ASSERT(argument_name.IsSymbol());
bool found = false;
const int num_positional_args = num_arguments - num_named_arguments;
const int num_parameters = NumParameters();
for (int j = num_positional_args; !found && (j < num_parameters); j++) {
- parameter_name |= ParameterNameAt(j);
+ parameter_name = ParameterNameAt(j);
ASSERT(argument_name.IsSymbol());
if (argument_name.Equals(parameter_name)) {
found = true;
@@ -4027,7 +4083,6 @@
bool is_external,
const Object& owner,
intptr_t token_pos) {
- ASSERT(name.IsOneByteString());
ASSERT(!owner.IsNull());
const Function& result = Function::Handle(Function::New());
result.set_parameter_types(Object::empty_array());
@@ -4038,6 +4093,7 @@
result.set_is_const(is_const);
result.set_is_abstract(is_abstract);
result.set_is_external(is_external);
+ result.set_is_visible(true); // Will be computed later.
result.set_intrinsic_kind(kUnknownIntrinsic);
result.set_owner(owner);
result.set_token_pos(token_pos);
@@ -4063,7 +4119,6 @@
RawFunction* Function::NewClosureFunction(const String& name,
const Function& parent,
intptr_t token_pos) {
- ASSERT(name.IsOneByteString());
ASSERT(!parent.IsNull());
// Use the owner defining the parent function and not the class containing it.
const Object& parent_owner = Object::Handle(parent.raw_ptr()->owner_);
@@ -4096,9 +4151,9 @@
// Set closure function's context scope.
ContextScope& context_scope = ContextScope::Handle();
if (is_static()) {
- context_scope |= ContextScope::New(0);
+ context_scope = ContextScope::New(0);
} else {
- context_scope |= LocalScope::CreateImplicitClosureScope(*this);
+ context_scope = LocalScope::CreateImplicitClosureScope(*this);
}
closure_function.set_context_scope(context_scope);
@@ -4589,7 +4644,6 @@
bool is_const,
const Class& owner,
intptr_t token_pos) {
- ASSERT(name.IsOneByteString());
ASSERT(!owner.IsNull());
const Field& result = Field::Handle(Field::New());
result.set_name(name);
@@ -5212,7 +5266,7 @@
const Array& symbols = Array::Handle(isolate,
object_store->keyword_symbols());
ASSERT(!symbols.IsNull());
- str |= symbols.At(kind - Token::kFirstKeyword);
+ str ^= symbols.At(kind - Token::kFirstKeyword);
ASSERT(!str.IsNull());
return str.raw();
}
@@ -5595,7 +5649,7 @@
// Insert the object at the empty slot.
dict.SetAt(index, obj);
Smi& used = Smi::Handle();
- used |= dict.At(dict_size);
+ used ^= dict.At(dict_size);
intptr_t used_elements = used.Value() + 1; // One more element added.
used = Smi::New(used_elements);
dict.SetAt(dict_size, used); // Update used count.
@@ -5619,7 +5673,7 @@
Namespace& ns = Namespace::Handle();
Object& obj = Object::Handle();
for (int i = 0; i < exports.Length(); i++) {
- ns |= exports.At(i);
+ ns ^= exports.At(i);
obj = ns.Lookup(name);
if (!obj.IsNull()) {
return obj.raw();
@@ -5701,7 +5755,7 @@
}
bool is_unique = true;
for (int i = 0; i < scripts.Length(); i++) {
- script_obj |= scripts.At(i);
+ script_obj ^= scripts.At(i);
if (script_obj.raw() == owner_script.raw()) {
// We already have a reference to this script.
is_unique = false;
@@ -5729,7 +5783,7 @@
String& script_url = String::Handle();
intptr_t num_scripts = scripts.Length();
for (int i = 0; i < num_scripts; i++) {
- script |= scripts.At(i);
+ script ^= scripts.At(i);
script_url = script.url();
if (script_url.Equals(url)) {
return script.raw();
@@ -5783,7 +5837,7 @@
Array& anon_classes = Array::Handle(this->raw_ptr()->anonymous_classes_);
intptr_t num_anonymous = raw_ptr()->num_anonymous_;
for (int i = 0; i < num_anonymous; i++) {
- cls |= anon_classes.At(i);
+ cls ^= anon_classes.At(i);
ASSERT(!cls.IsNull());
if (script.raw() == cls.script()) {
func = cls.LookupFunctionAtToken(token_pos);
@@ -5832,10 +5886,10 @@
Namespace& import = Namespace::Handle();
Object& obj = Object::Handle();
for (intptr_t j = 0; j < this->num_imports(); j++) {
- import |= imports.At(j);
+ import ^= imports.At(j);
obj = import.Lookup(name);
if (!obj.IsNull() && obj.IsField()) {
- field |= obj.raw();
+ field ^= obj.raw();
return field.raw();
}
}
@@ -5854,7 +5908,7 @@
}
if (!obj.IsNull()) {
if (obj.IsField()) {
- field |= obj.raw();
+ field ^= obj.raw();
return field.raw();
}
}
@@ -5881,10 +5935,10 @@
Namespace& import = Namespace::Handle();
Object& obj = Object::Handle();
for (intptr_t j = 0; j < this->num_imports(); j++) {
- import |= imports.At(j);
+ import ^= imports.At(j);
obj = import.Lookup(name);
if (!obj.IsNull() && obj.IsFunction()) {
- function |= obj.raw();
+ function ^= obj.raw();
return function.raw();
}
}
@@ -5919,7 +5973,7 @@
const Array& imports = Array::Handle(this->imports());
Namespace& import = Namespace::Handle();
for (intptr_t j = 0; j < this->num_imports(); j++) {
- import |= imports.At(j);
+ import ^= imports.At(j);
obj = import.Lookup(name);
if (!obj.IsNull()) {
return obj.raw();
@@ -6008,7 +6062,7 @@
}
const Array& import_list = Array::Handle(imports());
Namespace& import = Namespace::Handle();
- import |= import_list.At(index);
+ import ^= import_list.At(index);
return import.raw();
}
@@ -6289,8 +6343,8 @@
GrowableObjectArray& libs = GrowableObjectArray::Handle(
isolate, isolate->object_store()->libraries());
for (int i = 0; i < libs.Length(); i++) {
- lib |= libs.At(i);
- lib_url = lib.url();
+ lib ^= libs.At(i);
+ lib_url ^= lib.url();
if (lib_url.Equals(url)) {
return lib.raw();
}
@@ -6312,8 +6366,8 @@
Library& lib = Library::Handle();
String& lib_url = String::Handle();
for (int i = 0; i < libs.Length(); i++) {
- lib |= libs.At(i);
- lib_url |= lib.url();
+ lib ^= libs.At(i);
+ lib_url ^= lib.url();
lib_key = lib_url.Hash();
if (lib_key == key) {
return true;
@@ -6343,7 +6397,7 @@
ASSERT(IsPrivate(name));
// ASSERT(strchr(name, '@') == NULL);
String& str = String::Handle();
- str |= name.raw();
+ str = name.raw();
str = String::Concat(str, String::Handle(this->private_key()));
str = Symbols::New(str);
return str.raw();
@@ -6357,7 +6411,7 @@
ASSERT(!libs.IsNull());
if ((0 <= index) && (index < libs.Length())) {
Library& lib = Library::Handle();
- lib |= libs.At(index);
+ lib ^= libs.At(index);
return lib.raw();
}
return Library::null();
@@ -6434,7 +6488,7 @@
if ((index >= 0) || (index < num_imports())) {
const Array& imports = Array::Handle(this->imports());
Namespace& import = Namespace::Handle();
- import |= imports.At(index);
+ import ^= imports.At(index);
return import.library();
}
return Library::null();
@@ -6482,7 +6536,7 @@
Object& obj = Object::Handle();
Namespace& import = Namespace::Handle();
for (intptr_t i = 0; i < num_imports(); i++) {
- import |= imports.At(i);
+ import ^= imports.At(i);
obj = import.Lookup(class_name);
if (!obj.IsNull() && obj.IsClass()) {
// TODO(hausner):
@@ -6556,7 +6610,7 @@
String& hidden = String::Handle();
intptr_t num_names = names.Length();
for (intptr_t i = 0; i < num_names; i++) {
- hidden |= names.At(i);
+ hidden ^= names.At(i);
if (name.Equals(hidden)) {
return true;
}
@@ -6569,7 +6623,7 @@
String& shown = String::Handle();
intptr_t num_names = names.Length();
for (intptr_t i = 0; i < num_names; i++) {
- shown |= names.At(i);
+ shown ^= names.At(i);
if (name.Equals(shown)) {
return false;
}
@@ -6628,10 +6682,10 @@
Library& lib = Library::Handle();
Class& cls = Class::Handle();
for (int i = 0; i < libs.Length(); i++) {
- lib |= libs.At(i);
+ lib ^= libs.At(i);
ClassDictionaryIterator it(lib);
while (it.HasNext()) {
- cls |= it.GetNextClass();
+ cls = it.GetNextClass();
error = Compiler::CompileAllFunctions(cls);
if (!error.IsNull()) {
return error.raw();
@@ -6639,7 +6693,7 @@
}
Array& anon_classes = Array::Handle(lib.raw_ptr()->anonymous_classes_);
for (int i = 0; i < lib.raw_ptr()->num_anonymous_; i++) {
- cls |= anon_classes.At(i);
+ cls ^= anon_classes.At(i);
error = Compiler::CompileAllFunctions(cls);
if (!error.IsNull()) {
return error.raw();
@@ -6968,7 +7022,7 @@
const Array& names = Array::Handle(raw_ptr()->names_);
ASSERT(Length() == names.Length());
String& name = String::Handle();
- name |= names.At(var_index);
+ name ^= names.At(var_index);
return name.raw();
}
@@ -7301,7 +7355,7 @@
intptr_t Code::Comments::PCOffsetAt(intptr_t idx) const {
Smi& result = Smi::Handle();
- result |= comments_.At(idx * kNumberOfEntries + kPCOffsetEntry);
+ result ^= comments_.At(idx * kNumberOfEntries + kPCOffsetEntry);
return result.Value();
}
@@ -7314,7 +7368,7 @@
RawString* Code::Comments::CommentAt(intptr_t idx) const {
String& result = String::Handle();
- result |= comments_.At(idx * kNumberOfEntries + kCommentEntry);
+ result ^= comments_.At(idx * kNumberOfEntries + kCommentEntry);
return result.raw();
}
@@ -7381,7 +7435,7 @@
for (intptr_t i = 0; i < array.Length(); i += kSCallTableEntryLength) {
if (array.At(i) == raw_code_offset) {
Function& function = Function::Handle();
- function |= array.At(i + kSCallTableFunctionEntry);
+ function ^= array.At(i + kSCallTableFunctionEntry);
return function.raw();
}
}
@@ -7666,7 +7720,7 @@
*maps = stackmaps();
*map = Stackmap::null();
for (intptr_t i = 0; i < maps->Length(); i++) {
- *map |= maps->At(i);
+ *map ^= maps->At(i);
ASSERT(!map->IsNull());
if (map->PC() == pc) {
return map->raw(); // We found a stack map for this frame.
@@ -7981,10 +8035,10 @@
intptr_t data_pos = index * TestEntryLength();
Smi& smi = Smi::Handle();
for (intptr_t i = 0; i < num_args_tested(); i++) {
- smi |= data.At(data_pos++);
+ smi ^= data.At(data_pos++);
class_ids->Add(smi.Value());
}
- (*target) |= data.At(data_pos++);
+ (*target) ^= data.At(data_pos++);
}
@@ -7997,9 +8051,9 @@
const Array& data = Array::Handle(ic_data());
intptr_t data_pos = index * TestEntryLength();
Smi& smi = Smi::Handle();
- smi |= data.At(data_pos);
+ smi ^= data.At(data_pos);
*class_id = smi.Value();
- *target |= data.At(data_pos + 1);
+ *target ^= data.At(data_pos + 1);
}
@@ -8016,7 +8070,7 @@
const Array& data = Array::Handle(ic_data());
const intptr_t data_pos = index * TestEntryLength();
Smi& smi = Smi::Handle();
- smi |= data.At(data_pos);
+ smi ^= data.At(data_pos);
return smi.Value();
}
@@ -8034,7 +8088,7 @@
const intptr_t data_pos = index * TestEntryLength() +
CountIndexFor(num_args_tested());
Smi& smi = Smi::Handle();
- smi |= data.At(data_pos);
+ smi ^= data.At(data_pos);
return smi.Value();
}
@@ -8266,9 +8320,9 @@
// Rehash the valid entries.
for (intptr_t i = 0; i < old_capacity; ++i) {
- class_id |= GetClassId(old_buckets, i);
+ class_id ^= GetClassId(old_buckets, i);
if (class_id.Value() != kIllegalCid) {
- target |= GetTargetFunction(old_buckets, i);
+ target ^= GetTargetFunction(old_buckets, i);
Insert(class_id, target);
}
}
@@ -8286,7 +8340,7 @@
Smi& probe = Smi::Handle();
intptr_t i = index;
do {
- probe |= GetClassId(backing_array, i);
+ probe ^= GetClassId(backing_array, i);
if (probe.Value() == kIllegalCid) {
SetEntry(backing_array, i, class_id, target);
set_filled_entry_count(filled_entry_count() + 1);
@@ -8361,12 +8415,12 @@
Array& data = Array::Handle(cache());
intptr_t data_pos = ix * kTestEntryLength;
Smi& instance_class_id_handle = Smi::Handle();
- instance_class_id_handle |= data.At(data_pos + kInstanceClassId);
+ instance_class_id_handle ^= data.At(data_pos + kInstanceClassId);
*instance_class_id = instance_class_id_handle.Value();
*instance_type_arguments ^= data.At(data_pos + kInstanceTypeArguments);
*instantiator_type_arguments ^=
data.At(data_pos + kInstantiatorTypeArguments);
- *test_result |= data.At(data_pos + kTestResult);
+ *test_result ^= data.At(data_pos + kTestResult);
}
@@ -9682,7 +9736,7 @@
if (IsSmi()) return raw();
if (IsMint()) {
Mint& mint = Mint::Handle();
- mint |= raw();
+ mint ^= raw();
if (Smi::IsValid64(mint.value())) {
return Smi::New(mint.value());
} else {
@@ -9691,7 +9745,7 @@
}
ASSERT(IsBigint());
Bigint& big_value = Bigint::Handle();
- big_value |= raw();
+ big_value ^= raw();
if (BigintOperations::FitsIntoSmi(big_value)) {
return BigintOperations::ToSmi(big_value);
} else if (BigintOperations::FitsIntoMint(big_value)) {
@@ -9712,8 +9766,8 @@
if (IsSmi() && other.IsSmi()) {
Smi& left_smi = Smi::Handle();
Smi& right_smi = Smi::Handle();
- left_smi |= raw();
- right_smi |= other.raw();
+ left_smi ^= raw();
+ right_smi ^= other.raw();
const intptr_t left_value = left_smi.Value();
const intptr_t right_value = right_smi.Value();
switch (operation) {
@@ -9810,8 +9864,8 @@
if (IsSmi() && other.IsSmi()) {
Smi& op1 = Smi::Handle();
Smi& op2 = Smi::Handle();
- op1 |= raw();
- op2 |= other.raw();
+ op1 ^= raw();
+ op2 ^= other.raw();
intptr_t result = 0;
switch (kind) {
case Token::kBIT_AND:
@@ -10005,7 +10059,7 @@
Mint& canonical_value = Mint::Handle();
intptr_t index = 0;
while (index < constants_len) {
- canonical_value |= constants.At(index);
+ canonical_value ^= constants.At(index);
if (canonical_value.IsNull()) {
break;
}
@@ -10159,7 +10213,7 @@
Double& canonical_value = Double::Handle();
intptr_t index = 0;
while (index < constants_len) {
- canonical_value |= constants.At(index);
+ canonical_value ^= constants.At(index);
if (canonical_value.IsNull()) {
break;
}
@@ -10205,16 +10259,16 @@
ASSERT(!IsNull());
if (IsSmi()) {
Smi& smi = Smi::Handle();
- smi |= raw();
+ smi ^= raw();
return BigintOperations::NewFromSmi(smi);
} else if (IsMint()) {
Mint& mint = Mint::Handle();
- mint |= raw();
+ mint ^= raw();
return BigintOperations::NewFromInt64(mint.value());
} else {
ASSERT(IsBigint());
Bigint& big = Bigint::Handle();
- big |= raw();
+ big ^= raw();
ASSERT(!BigintOperations::FitsIntoSmi(big));
return big.raw();
}
@@ -10292,7 +10346,7 @@
Bigint& canonical_value = Bigint::Handle();
intptr_t index = 0;
while (index < constants_len) {
- canonical_value |= constants.At(index);
+ canonical_value ^= constants.At(index);
if (canonical_value.IsNull()) {
break;
}
@@ -10688,10 +10742,10 @@
String& result = String::Handle();
intptr_t char_size = str.CharSize();
if (char_size == kOneByteChar) {
- result |= OneByteString::New(len, space);
+ result = OneByteString::New(len, space);
} else {
ASSERT(char_size == kTwoByteChar);
- result |= TwoByteString::New(len, space);
+ result = TwoByteString::New(len, space);
}
String::Copy(result, 0, str, 0, len);
return result.raw();
@@ -10860,7 +10914,7 @@
String& str = String::Handle();
intptr_t char_size = kOneByteChar;
for (intptr_t i = 0; i < strings_len; i++) {
- str |= strings.At(i);
+ str ^= strings.At(i);
result_len += str.Length();
char_size = Utils::Maximum(char_size, str.CharSize());
}
@@ -10908,9 +10962,9 @@
}
}
if (is_one_byte_string) {
- result |= OneByteString::New(length, space);
+ result = OneByteString::New(length, space);
} else {
- result |= TwoByteString::New(length, space);
+ result = TwoByteString::New(length, space);
}
String::Copy(result, 0, str, begin_index, length);
return result.raw();
@@ -10960,7 +11014,7 @@
intptr_t original_size = 0;
uword tags = raw_ptr()->tags_;
- ASSERT(!IsCanonical());
+ ASSERT(!InVMHeap());
if (class_id == kOneByteStringCid) {
used_size = ExternalOneByteString::InstanceSize();
original_size = OneByteString::InstanceSize(str_length);
@@ -11057,6 +11111,104 @@
}
+// Check to see if 'str1' matches 'str2' as is or
+// once the private key separator is stripped from str2.
+//
+// Things are made more complicated by the fact that constructors are
+// added *after* the private suffix, so "foo@123.named" should match
+// "foo.named".
+//
+// Also, the private suffix can occur more than once in the name, as in:
+//
+// _ReceivePortImpl@6be832b._internal@6be832b
+//
+template<typename T1, typename T2>
+static bool EqualsIgnoringPrivateKey(const String& str1,
+ const String& str2) {
+ intptr_t len = str1.Length();
+ intptr_t str2_len = str2.Length();
+ if (len == str2_len) {
+ for (intptr_t i = 0; i < len; i++) {
+ if (T1::CharAt(str1, i) != T2::CharAt(str2, i)) {
+ return false;
+ }
+ }
+ return true;
+ }
+ if (len < str2_len) {
+ return false; // No way they can match.
+ }
+ intptr_t pos = 0;
+ intptr_t str2_pos = 0;
+ while (pos < len) {
+ int32_t ch = T1::CharAt(str1, pos);
+ pos++;
+
+ if (ch == Scanner::kPrivateKeySeparator) {
+ // Consume a private key separator.
+ while ((pos < len) && (T1::CharAt(str1, pos) != '.')) {
+ pos++;
+ }
+ // Resume matching characters.
+ continue;
+ }
+ if ((str2_pos == str2_len) || (ch != T2::CharAt(str2, str2_pos))) {
+ return false;
+ }
+ str2_pos++;
+ }
+
+ // We have reached the end of mangled_name string.
+ ASSERT(pos == len);
+ return (str2_pos == str2_len);
+}
+
+
+#define EQUALS_IGNORING_PRIVATE_KEY(class_id, type, str1, str2) \
+ switch (class_id) { \
+ case kOneByteStringCid : \
+ return dart::EqualsIgnoringPrivateKey<type, OneByteString>(str1, str2); \
+ case kTwoByteStringCid : \
+ return dart::EqualsIgnoringPrivateKey<type, TwoByteString>(str1, str2); \
+ case kExternalOneByteStringCid : \
+ return dart::EqualsIgnoringPrivateKey<type, ExternalOneByteString>(str1, \
+ str2);\
+ case kExternalTwoByteStringCid : \
+ return dart::EqualsIgnoringPrivateKey<type, ExternalTwoByteString>(str1, \
+ str2);\
+ } \
+ UNREACHABLE(); \
+
+
+bool String::EqualsIgnoringPrivateKey(const String& str1,
+ const String& str2) {
+ if (str1.raw() == str2.raw()) {
+ return true; // Both handles point to the same raw instance.
+ }
+ NoGCScope no_gc;
+ intptr_t str1_class_id = str1.raw()->GetClassId();
+ intptr_t str2_class_id = str2.raw()->GetClassId();
+ switch (str1_class_id) {
+ case kOneByteStringCid :
+ EQUALS_IGNORING_PRIVATE_KEY(str2_class_id, OneByteString, str1, str2);
+ break;
+ case kTwoByteStringCid :
+ EQUALS_IGNORING_PRIVATE_KEY(str2_class_id, TwoByteString, str1, str2);
+ break;
+ case kExternalOneByteStringCid :
+ EQUALS_IGNORING_PRIVATE_KEY(str2_class_id,
+ ExternalOneByteString, str1, str2);
+ break;
+ case kExternalTwoByteStringCid :
+ EQUALS_IGNORING_PRIVATE_KEY(str2_class_id,
+ ExternalTwoByteString, str1, str2);
+ break;
+ }
+ UNREACHABLE();
+ return false;
+}
+
+
bool String::CodePointIterator::Next() {
ASSERT(index_ >= -1);
intptr_t length = Utf16::Length(ch_);
@@ -11110,63 +11262,6 @@
}
-// Check to see if 'str1' matches 'str2' as is or
-// once the private key separator is stripped from str2.
-//
-// Things are made more complicated by the fact that constructors are
-// added *after* the private suffix, so "foo@123.named" should match
-// "foo.named".
-//
-// Also, the private suffix can occur more than once in the name, as in:
-//
-// _ReceivePortImpl@6be832b._internal@6be832b
-//
-bool OneByteString::EqualsIgnoringPrivateKey(const String& str1,
- const String& str2) {
- ASSERT(str2.IsOneByteString());
- if (str1.raw() == str2.raw()) {
- return true; // Both handles point to the same raw instance.
- }
- NoGCScope no_gc;
- intptr_t len = str1.Length();
- intptr_t str2_len = str2.Length();
- if (len == str2_len) {
- for (intptr_t i = 0; i < len; i++) {
- if (*CharAddr(str1, i) != *CharAddr(str2, i)) {
- return false;
- }
- }
- return true;
- }
- if (len < str2_len) {
- return false; // No way they can match.
- }
- intptr_t pos = 0;
- intptr_t str2_pos = 0;
- while (pos < len) {
- int32_t ch = *CharAddr(str1, pos);
- pos++;
-
- if (ch == Scanner::kPrivateKeySeparator) {
- // Consume a private key separator.
- while ((pos < len) && (*CharAddr(str1, pos) != '.')) {
- pos++;
- }
- // Resume matching characters.
- continue;
- }
- if ((str2_pos == str2_len) || (ch != *CharAddr(str2, str2_pos))) {
- return false;
- }
- str2_pos++;
- }
-
- // We have reached the end of mangled_name string.
- ASSERT(pos == len);
- return (str2_pos == str2_len);
-}
-
-
RawOneByteString* OneByteString::New(intptr_t len,
Heap::Space space) {
ASSERT(Isolate::Current() == Dart::vm_isolate() ||
@@ -11272,7 +11367,7 @@
intptr_t strings_len = strings.Length();
intptr_t pos = 0;
for (intptr_t i = 0; i < strings_len; i++) {
- str |= strings.At(i);
+ str ^= strings.At(i);
intptr_t str_len = str.Length();
String::Copy(result, pos, str, 0, str_len);
pos += str_len;
@@ -11441,7 +11536,7 @@
intptr_t strings_len = strings.Length();
intptr_t pos = 0;
for (intptr_t i = 0; i < strings_len; i++) {
- str |= strings.At(i);
+ str ^= strings.At(i);
intptr_t str_len = str.Length();
String::Copy(result, pos, str, 0, str_len);
pos += str_len;
@@ -12625,7 +12720,7 @@
RawJSRegExp* JSRegExp::FromDataStartAddress(void* data) {
JSRegExp& regexp = JSRegExp::Handle();
intptr_t addr = reinterpret_cast<intptr_t>(data) - sizeof(RawJSRegExp);
- regexp |= RawObject::FromAddr(addr);
+ regexp ^= RawObject::FromAddr(addr);
return regexp.raw();
}
diff --git a/runtime/vm/object.h b/runtime/vm/object.h
index 2df948e..548a0c4 100644
--- a/runtime/vm/object.h
+++ b/runtime/vm/object.h
@@ -39,21 +39,10 @@
#define CHECK_HANDLE()
#endif
-#define OBJECT_IMPLEMENTATION(object, super) \
+#define BASE_OBJECT_IMPLEMENTATION(object, super) \
public: /* NOLINT */ \
Raw##object* raw() const { return reinterpret_cast<Raw##object*>(raw_); } \
- void operator=(Raw##object* value) { \
- initializeHandle(this, value); \
- } \
bool Is##object() const { return true; } \
- void operator^=(RawObject* value) { \
- initializeHandle(this, value); \
- ASSERT(IsNull() || Is##object()); \
- } \
- void operator|=(RawObject* value) { \
- raw_ = value; \
- CHECK_HANDLE(); \
- } \
static object& Handle(Isolate* isolate, Raw##object* raw_ptr) { \
object* obj = \
reinterpret_cast<object*>(VMHandles::AllocateHandle(isolate)); \
@@ -88,6 +77,12 @@
initializeHandle(obj, raw_ptr); \
return *obj; \
} \
+ static object* ReadOnlyHandle(Isolate* isolate) { \
+ object* obj = reinterpret_cast<object*>( \
+ Dart::AllocateReadOnlyHandle()); \
+ initializeHandle(obj, object::null()); \
+ return obj; \
+ } \
static object& ZoneHandle() { \
return ZoneHandle(Isolate::Current(), object::null()); \
} \
@@ -119,8 +114,6 @@
} \
virtual const char* ToCString() const; \
static const ClassId kClassId = k##object##Cid; \
- protected: /* NOLINT */ \
- object() : super() {} \
private: /* NOLINT */ \
/* Initialize the handle based on the raw_ptr in the presence of null. */ \
static void initializeHandle(object* obj, RawObject* raw_ptr) { \
@@ -146,6 +139,19 @@
Snapshot::Kind); \
friend class SnapshotReader; \
+#define OBJECT_IMPLEMENTATION(object, super) \
+ public: /* NOLINT */ \
+ void operator=(Raw##object* value) { \
+ initializeHandle(this, value); \
+ } \
+ void operator^=(RawObject* value) { \
+ initializeHandle(this, value); \
+ ASSERT(IsNull() || Is##object()); \
+ } \
+ protected: /* NOLINT */ \
+ object() : super() {} \
+ BASE_OBJECT_IMPLEMENTATION(object, super) \
+
#define HEAP_OBJECT_IMPLEMENTATION(object, super) \
OBJECT_IMPLEMENTATION(object, super); \
Raw##object* raw_ptr() const { \
@@ -155,6 +161,27 @@
SNAPSHOT_READER_SUPPORT(object) \
friend class StackFrame; \
+// This macro is used to denote types that do not have a sub-type.
+#define FINAL_HEAP_OBJECT_IMPLEMENTATION(object, super) \
+ public: /* NOLINT */ \
+ void operator=(Raw##object* value) { \
+ raw_ = value; \
+ CHECK_HANDLE(); \
+ } \
+ void operator^=(RawObject* value) { \
+ raw_ = value; \
+ CHECK_HANDLE(); \
+ } \
+ private: /* NOLINT */ \
+ object() : super() {} \
+ BASE_OBJECT_IMPLEMENTATION(object, super) \
+ Raw##object* raw_ptr() const { \
+ ASSERT(raw() != null()); \
+ return raw()->ptr(); \
+ } \
+ SNAPSHOT_READER_SUPPORT(object) \
+ friend class StackFrame; \
+
class Object {
public:
virtual ~Object() { }
@@ -353,6 +380,8 @@
return RoundedAllocationSize(sizeof(RawObject));
}
+ static void VerifyBuiltinVtables();
+
static const ClassId kClassId = kObjectCid;
// Different kinds of type tests.
@@ -860,7 +889,7 @@
const AbstractTypeArguments& other_type_arguments,
Error* malformed_error) const;
- HEAP_OBJECT_IMPLEMENTATION(Class, Object);
+ FINAL_HEAP_OBJECT_IMPLEMENTATION(Class, Object);
friend class AbstractType;
friend class Instance;
friend class Object;
@@ -894,7 +923,7 @@
static RawUnresolvedClass* New();
- HEAP_OBJECT_IMPLEMENTATION(UnresolvedClass, Object);
+ FINAL_HEAP_OBJECT_IMPLEMENTATION(UnresolvedClass, Object);
friend class Class;
};
@@ -1123,7 +1152,7 @@
void set_script(const Script& value) const;
static RawPatchClass* New();
- HEAP_OBJECT_IMPLEMENTATION(PatchClass, Object);
+ FINAL_HEAP_OBJECT_IMPLEMENTATION(PatchClass, Object);
friend class Class;
};
@@ -1390,6 +1419,11 @@
bool IsInlineable() const;
void set_is_inlinable(bool value) const;
+ bool is_visible() const {
+ return VisibleBit::decode(raw_ptr()->kind_tag_);
+ }
+ void set_is_visible(bool value) const;
+
enum IntrinsicKind {
kUnknownIntrinsic = 0, // Initial value.
kIsIntrinsic,
@@ -1545,9 +1579,10 @@
kNativeBit = 5,
kAbstractBit = 6,
kExternalBit = 7,
- kIntrinsicTagBit = 8,
+ kVisibleBit = 8,
+ kIntrinsicTagBit = 9,
kIntrinsicTagSize = 2,
- kKindTagBit = 10,
+ kKindTagBit = 11,
kKindTagSize = 4,
};
class StaticBit : public BitField<bool, kStaticBit, 1> {};
@@ -1558,6 +1593,7 @@
class NativeBit : public BitField<bool, kNativeBit, 1> {};
class AbstractBit : public BitField<bool, kAbstractBit, 1> {};
class ExternalBit : public BitField<bool, kExternalBit, 1> {};
+ class VisibleBit : public BitField<bool, kVisibleBit, 1> {};
class IntrinsicKindBits :
public BitField<Function::IntrinsicKind,
kIntrinsicTagBit, kIntrinsicTagSize> {}; // NOLINT
@@ -1601,7 +1637,7 @@
const AbstractTypeArguments& other_type_arguments,
Error* malformed_error) const;
- HEAP_OBJECT_IMPLEMENTATION(Function, Object);
+ FINAL_HEAP_OBJECT_IMPLEMENTATION(Function, Object);
friend class Class;
};
@@ -1636,7 +1672,7 @@
static RawClosureData* New();
- HEAP_OBJECT_IMPLEMENTATION(ClosureData, Object);
+ FINAL_HEAP_OBJECT_IMPLEMENTATION(ClosureData, Object);
friend class Class;
friend class Function;
friend class HeapProfiler;
@@ -1664,7 +1700,7 @@
static RawRedirectionData* New();
- HEAP_OBJECT_IMPLEMENTATION(RedirectionData, Object);
+ FINAL_HEAP_OBJECT_IMPLEMENTATION(RedirectionData, Object);
friend class Class;
friend class Function;
friend class HeapProfiler;
@@ -1758,7 +1794,7 @@
}
static RawField* New();
- HEAP_OBJECT_IMPLEMENTATION(Field, Object);
+ FINAL_HEAP_OBJECT_IMPLEMENTATION(Field, Object);
friend class Class;
friend class HeapProfiler;
};
@@ -1782,7 +1818,7 @@
void set_literal(const String& literal) const;
void set_value(const Object& value) const;
- HEAP_OBJECT_IMPLEMENTATION(LiteralToken, Object);
+ FINAL_HEAP_OBJECT_IMPLEMENTATION(LiteralToken, Object);
friend class Class;
};
@@ -1860,7 +1896,7 @@
static RawTokenStream* New();
static void DataFinalizer(void *peer);
- HEAP_OBJECT_IMPLEMENTATION(TokenStream, Object);
+ FINAL_HEAP_OBJECT_IMPLEMENTATION(TokenStream, Object);
friend class Class;
};
@@ -1911,7 +1947,7 @@
void set_tokens(const TokenStream& value) const;
static RawScript* New();
- HEAP_OBJECT_IMPLEMENTATION(Script, Object);
+ FINAL_HEAP_OBJECT_IMPLEMENTATION(Script, Object);
friend class Class;
};
@@ -2104,7 +2140,7 @@
bool import_core_lib);
RawObject* LookupEntry(const String& name, intptr_t *index) const;
- HEAP_OBJECT_IMPLEMENTATION(Library, Object);
+ FINAL_HEAP_OBJECT_IMPLEMENTATION(Library, Object);
friend class Class;
friend class Debugger;
friend class DictionaryIterator;
@@ -2141,7 +2177,7 @@
void set_num_imports(intptr_t value) const;
static RawLibraryPrefix* New();
- HEAP_OBJECT_IMPLEMENTATION(LibraryPrefix, Object);
+ FINAL_HEAP_OBJECT_IMPLEMENTATION(LibraryPrefix, Object);
friend class Class;
friend class Isolate;
};
@@ -2166,7 +2202,7 @@
private:
static RawNamespace* New();
- HEAP_OBJECT_IMPLEMENTATION(Namespace, Object);
+ FINAL_HEAP_OBJECT_IMPLEMENTATION(Namespace, Object);
friend class Class;
};
@@ -2222,7 +2258,7 @@
// and links the two in a GC safe manner.
static RawInstructions* New(intptr_t size);
- HEAP_OBJECT_IMPLEMENTATION(Instructions, Object);
+ FINAL_HEAP_OBJECT_IMPLEMENTATION(Instructions, Object);
friend class Class;
friend class Code;
};
@@ -2258,7 +2294,7 @@
static RawLocalVarDescriptors* New(intptr_t num_variables);
private:
- HEAP_OBJECT_IMPLEMENTATION(LocalVarDescriptors, Object);
+ FINAL_HEAP_OBJECT_IMPLEMENTATION(LocalVarDescriptors, Object);
friend class Class;
};
@@ -2356,7 +2392,7 @@
return reinterpret_cast<RawSmi**>(EntryAddr(index, entry_offset));
}
- HEAP_OBJECT_IMPLEMENTATION(PcDescriptors, Object);
+ FINAL_HEAP_OBJECT_IMPLEMENTATION(PcDescriptors, Object);
friend class Class;
};
@@ -2409,7 +2445,7 @@
bool GetBit(intptr_t bit_index) const;
void SetBit(intptr_t bit_index, bool value) const;
- HEAP_OBJECT_IMPLEMENTATION(Stackmap, Object);
+ FINAL_HEAP_OBJECT_IMPLEMENTATION(Stackmap, Object);
friend class BitmapBuilder;
friend class Class;
};
@@ -2455,7 +2491,7 @@
static const intptr_t kMaxHandlers = 1024 * 1024;
void set_handled_types_data(const Array& value) const;
- HEAP_OBJECT_IMPLEMENTATION(ExceptionHandlers, Object);
+ FINAL_HEAP_OBJECT_IMPLEMENTATION(ExceptionHandlers, Object);
friend class Class;
};
@@ -2522,7 +2558,7 @@
void SetLength(intptr_t value) const;
- HEAP_OBJECT_IMPLEMENTATION(DeoptInfo, Object);
+ FINAL_HEAP_OBJECT_IMPLEMENTATION(DeoptInfo, Object);
friend class Class;
};
@@ -2755,7 +2791,7 @@
// and links the two in a GC safe manner.
static RawCode* New(intptr_t pointer_offsets_length);
- HEAP_OBJECT_IMPLEMENTATION(Code, Object);
+ FINAL_HEAP_OBJECT_IMPLEMENTATION(Code, Object);
friend class Class;
};
@@ -2816,7 +2852,7 @@
raw_ptr()->num_variables_ = num_variables;
}
- HEAP_OBJECT_IMPLEMENTATION(Context, Object);
+ FINAL_HEAP_OBJECT_IMPLEMENTATION(Context, Object);
friend class Class;
};
@@ -2888,7 +2924,7 @@
return reinterpret_cast<RawContextScope::VariableDesc*>(raw_addr);
}
- HEAP_OBJECT_IMPLEMENTATION(ContextScope, Object);
+ FINAL_HEAP_OBJECT_IMPLEMENTATION(ContextScope, Object);
friend class Class;
};
@@ -3025,7 +3061,7 @@
intptr_t TestEntryLength() const;
void WriteSentinel() const;
- HEAP_OBJECT_IMPLEMENTATION(ICData, Object);
+ FINAL_HEAP_OBJECT_IMPLEMENTATION(ICData, Object);
friend class Class;
};
@@ -3079,7 +3115,7 @@
static inline RawObject* GetTargetFunction(const Array& array,
intptr_t index);
- HEAP_OBJECT_IMPLEMENTATION(MegamorphicCache, Object);
+ FINAL_HEAP_OBJECT_IMPLEMENTATION(MegamorphicCache, Object);
};
@@ -3123,7 +3159,7 @@
intptr_t TestEntryLength() const;
- HEAP_OBJECT_IMPLEMENTATION(SubtypeTestCache, Object);
+ FINAL_HEAP_OBJECT_IMPLEMENTATION(SubtypeTestCache, Object);
friend class Class;
};
@@ -3157,7 +3193,7 @@
void set_message(const String& message) const;
static RawApiError* New();
- HEAP_OBJECT_IMPLEMENTATION(ApiError, Error);
+ FINAL_HEAP_OBJECT_IMPLEMENTATION(ApiError, Error);
friend class Class;
};
@@ -3182,7 +3218,7 @@
void set_message(const String& message) const;
static RawLanguageError* New();
- HEAP_OBJECT_IMPLEMENTATION(LanguageError, Error);
+ FINAL_HEAP_OBJECT_IMPLEMENTATION(LanguageError, Error);
friend class Class;
};
@@ -3213,7 +3249,7 @@
void set_exception(const Instance& exception) const;
void set_stacktrace(const Instance& stacktrace) const;
- HEAP_OBJECT_IMPLEMENTATION(UnhandledException, Error);
+ FINAL_HEAP_OBJECT_IMPLEMENTATION(UnhandledException, Error);
friend class Class;
};
@@ -3237,7 +3273,7 @@
private:
void set_message(const String& message) const;
- HEAP_OBJECT_IMPLEMENTATION(UnwindError, Error);
+ FINAL_HEAP_OBJECT_IMPLEMENTATION(UnwindError, Error);
friend class Class;
};
@@ -3684,6 +3720,15 @@
RawInteger* ShiftOp(Token::Kind kind, const Smi& other) const;
+ void operator=(RawSmi* value) {
+ raw_ = value;
+ CHECK_HANDLE();
+ }
+ void operator^=(RawObject* value) {
+ raw_ = value;
+ CHECK_HANDLE();
+ }
+
private:
static intptr_t ValueFromRaw(uword raw_value) {
intptr_t value = raw_value;
@@ -3692,7 +3737,9 @@
}
static cpp_vtable handle_vtable_;
- OBJECT_IMPLEMENTATION(Smi, Integer);
+ Smi() : Integer() {}
+ BASE_OBJECT_IMPLEMENTATION(Smi, Integer);
+
friend class Api; // For ValueFromRaw
friend class Class;
friend class Object;
@@ -3736,7 +3783,7 @@
private:
void set_value(int64_t value) const;
- HEAP_OBJECT_IMPLEMENTATION(Mint, Integer);
+ FINAL_HEAP_OBJECT_IMPLEMENTATION(Mint, Integer);
friend class Class;
};
@@ -3817,7 +3864,7 @@
static RawBigint* Allocate(intptr_t length, Heap::Space space = Heap::kNew);
- HEAP_OBJECT_IMPLEMENTATION(Bigint, Integer);
+ FINAL_HEAP_OBJECT_IMPLEMENTATION(Bigint, Integer);
friend class BigintOperations;
friend class Class;
};
@@ -3855,7 +3902,7 @@
private:
void set_value(double value) const;
- HEAP_OBJECT_IMPLEMENTATION(Double, Number);
+ FINAL_HEAP_OBJECT_IMPLEMENTATION(Double, Number);
friend class Class;
};
@@ -4078,6 +4125,9 @@
static RawString* ToLowerCase(const String& str,
Heap::Space space = Heap::kNew);
+ static bool EqualsIgnoringPrivateKey(const String& str1,
+ const String& str2);
+
static RawString* NewFormatted(const char* format, ...)
PRINTF_ATTRIBUTE(1, 2);
static RawString* NewFormattedV(const char* format, va_list args);
@@ -4108,7 +4158,7 @@
CallbackType new_symbol,
Snapshot::Kind kind);
- HEAP_OBJECT_IMPLEMENTATION(String, Instance);
+ FINAL_HEAP_OBJECT_IMPLEMENTATION(String, Instance);
friend class Class;
friend class Symbols;
@@ -4128,9 +4178,6 @@
static RawOneByteString* EscapeSpecialCharacters(const String& str,
bool raw_str);
- static bool EqualsIgnoringPrivateKey(const String& str1,
- const String& str2);
-
// We use the same maximum elements for all strings.
static const intptr_t kBytesPerElement = 1;
static const intptr_t kMaxElements = String::kMaxElements;
@@ -4470,7 +4517,7 @@
// New should only be called to initialize the two legal bool values.
static RawBool* New(bool value);
- HEAP_OBJECT_IMPLEMENTATION(Bool, Instance);
+ FINAL_HEAP_OBJECT_IMPLEMENTATION(Bool, Instance);
friend class Class;
friend class Object; // To initialize the true and false values.
};
@@ -4574,7 +4621,7 @@
static RawImmutableArray* New(intptr_t len, Heap::Space space = Heap::kNew);
private:
- HEAP_OBJECT_IMPLEMENTATION(ImmutableArray, Array);
+ FINAL_HEAP_OBJECT_IMPLEMENTATION(ImmutableArray, Array);
friend class Class;
};
@@ -4683,7 +4730,7 @@
static const int kDefaultInitialCapacity = 4;
- HEAP_OBJECT_IMPLEMENTATION(GrowableObjectArray, Instance);
+ FINAL_HEAP_OBJECT_IMPLEMENTATION(GrowableObjectArray, Instance);
friend class Array;
friend class Class;
};
@@ -4802,7 +4849,7 @@
return reinterpret_cast<uint8_t*>(&raw_ptr()->data_) + byte_offset;
}
- HEAP_OBJECT_IMPLEMENTATION(Int8Array, ByteArray);
+ FINAL_HEAP_OBJECT_IMPLEMENTATION(Int8Array, ByteArray);
friend class ByteArray;
friend class Class;
};
@@ -4854,7 +4901,7 @@
return reinterpret_cast<uint8_t*>(&raw_ptr()->data_) + byte_offset;
}
- HEAP_OBJECT_IMPLEMENTATION(Uint8Array, ByteArray);
+ FINAL_HEAP_OBJECT_IMPLEMENTATION(Uint8Array, ByteArray);
friend class ByteArray;
friend class Class;
};
@@ -4907,7 +4954,7 @@
return reinterpret_cast<uint8_t*>(&raw_ptr()->data_) + byte_offset;
}
- HEAP_OBJECT_IMPLEMENTATION(Uint8ClampedArray, ByteArray);
+ FINAL_HEAP_OBJECT_IMPLEMENTATION(Uint8ClampedArray, ByteArray);
friend class ByteArray;
friend class Class;
};
@@ -4959,7 +5006,7 @@
return reinterpret_cast<uint8_t*>(&raw_ptr()->data_) + byte_offset;
}
- HEAP_OBJECT_IMPLEMENTATION(Int16Array, ByteArray);
+ FINAL_HEAP_OBJECT_IMPLEMENTATION(Int16Array, ByteArray);
friend class ByteArray;
friend class Class;
};
@@ -5011,7 +5058,7 @@
return reinterpret_cast<uint8_t*>(&raw_ptr()->data_) + byte_offset;
}
- HEAP_OBJECT_IMPLEMENTATION(Uint16Array, ByteArray);
+ FINAL_HEAP_OBJECT_IMPLEMENTATION(Uint16Array, ByteArray);
friend class ByteArray;
friend class Class;
};
@@ -5063,7 +5110,7 @@
return reinterpret_cast<uint8_t*>(&raw_ptr()->data_) + byte_offset;
}
- HEAP_OBJECT_IMPLEMENTATION(Int32Array, ByteArray);
+ FINAL_HEAP_OBJECT_IMPLEMENTATION(Int32Array, ByteArray);
friend class ByteArray;
friend class Class;
};
@@ -5115,7 +5162,7 @@
return reinterpret_cast<uint8_t*>(&raw_ptr()->data_) + byte_offset;
}
- HEAP_OBJECT_IMPLEMENTATION(Uint32Array, ByteArray);
+ FINAL_HEAP_OBJECT_IMPLEMENTATION(Uint32Array, ByteArray);
friend class ByteArray;
friend class Class;
};
@@ -5167,7 +5214,7 @@
return reinterpret_cast<uint8_t*>(&raw_ptr()->data_) + byte_offset;
}
- HEAP_OBJECT_IMPLEMENTATION(Int64Array, ByteArray);
+ FINAL_HEAP_OBJECT_IMPLEMENTATION(Int64Array, ByteArray);
friend class ByteArray;
friend class Class;
};
@@ -5219,7 +5266,7 @@
return reinterpret_cast<uint8_t*>(&raw_ptr()->data_) + byte_offset;
}
- HEAP_OBJECT_IMPLEMENTATION(Uint64Array, ByteArray);
+ FINAL_HEAP_OBJECT_IMPLEMENTATION(Uint64Array, ByteArray);
friend class ByteArray;
friend class Class;
};
@@ -5271,7 +5318,7 @@
return reinterpret_cast<uint8_t*>(&raw_ptr()->data_) + byte_offset;
}
- HEAP_OBJECT_IMPLEMENTATION(Float32Array, ByteArray);
+ FINAL_HEAP_OBJECT_IMPLEMENTATION(Float32Array, ByteArray);
friend class ByteArray;
friend class Class;
};
@@ -5323,7 +5370,7 @@
return reinterpret_cast<uint8_t*>(&raw_ptr()->data_) + byte_offset;
}
- HEAP_OBJECT_IMPLEMENTATION(Float64Array, ByteArray);
+ FINAL_HEAP_OBJECT_IMPLEMENTATION(Float64Array, ByteArray);
friend class ByteArray;
friend class Class;
};
@@ -5381,7 +5428,7 @@
raw_ptr()->external_data_ = data;
}
- HEAP_OBJECT_IMPLEMENTATION(ExternalInt8Array, ByteArray);
+ FINAL_HEAP_OBJECT_IMPLEMENTATION(ExternalInt8Array, ByteArray);
friend class ByteArray;
friend class Class;
};
@@ -5459,7 +5506,8 @@
Heap::Space space = Heap::kNew);
private:
- HEAP_OBJECT_IMPLEMENTATION(ExternalUint8ClampedArray, ExternalUint8Array);
+ FINAL_HEAP_OBJECT_IMPLEMENTATION(ExternalUint8ClampedArray,
+ ExternalUint8Array);
friend class Class;
};
@@ -5516,7 +5564,7 @@
raw_ptr()->external_data_ = data;
}
- HEAP_OBJECT_IMPLEMENTATION(ExternalInt16Array, ByteArray);
+ FINAL_HEAP_OBJECT_IMPLEMENTATION(ExternalInt16Array, ByteArray);
friend class ByteArray;
friend class Class;
};
@@ -5574,7 +5622,7 @@
raw_ptr()->external_data_ = data;
}
- HEAP_OBJECT_IMPLEMENTATION(ExternalUint16Array, ByteArray);
+ FINAL_HEAP_OBJECT_IMPLEMENTATION(ExternalUint16Array, ByteArray);
friend class ByteArray;
friend class Class;
};
@@ -5632,7 +5680,7 @@
raw_ptr()->external_data_ = data;
}
- HEAP_OBJECT_IMPLEMENTATION(ExternalInt32Array, ByteArray);
+ FINAL_HEAP_OBJECT_IMPLEMENTATION(ExternalInt32Array, ByteArray);
friend class ByteArray;
friend class Class;
};
@@ -5690,7 +5738,7 @@
raw_ptr()->external_data_ = data;
}
- HEAP_OBJECT_IMPLEMENTATION(ExternalUint32Array, ByteArray);
+ FINAL_HEAP_OBJECT_IMPLEMENTATION(ExternalUint32Array, ByteArray);
friend class ByteArray;
friend class Class;
};
@@ -5748,7 +5796,7 @@
raw_ptr()->external_data_ = data;
}
- HEAP_OBJECT_IMPLEMENTATION(ExternalInt64Array, ByteArray);
+ FINAL_HEAP_OBJECT_IMPLEMENTATION(ExternalInt64Array, ByteArray);
friend class ByteArray;
friend class Class;
};
@@ -5806,7 +5854,7 @@
raw_ptr()->external_data_ = data;
}
- HEAP_OBJECT_IMPLEMENTATION(ExternalUint64Array, ByteArray);
+ FINAL_HEAP_OBJECT_IMPLEMENTATION(ExternalUint64Array, ByteArray);
friend class ByteArray;
friend class Class;
};
@@ -5864,7 +5912,7 @@
raw_ptr()->external_data_ = data;
}
- HEAP_OBJECT_IMPLEMENTATION(ExternalFloat32Array, ByteArray);
+ FINAL_HEAP_OBJECT_IMPLEMENTATION(ExternalFloat32Array, ByteArray);
friend class ByteArray;
friend class Class;
};
@@ -5922,7 +5970,7 @@
raw_ptr()->external_data_ = data;
}
- HEAP_OBJECT_IMPLEMENTATION(ExternalFloat64Array, ByteArray);
+ FINAL_HEAP_OBJECT_IMPLEMENTATION(ExternalFloat64Array, ByteArray);
friend class ByteArray;
friend class Class;
};
@@ -5931,7 +5979,7 @@
// DartFunction represents the abstract Dart class 'Function'.
class DartFunction : public Instance {
private:
- HEAP_OBJECT_IMPLEMENTATION(DartFunction, Instance);
+ FINAL_HEAP_OBJECT_IMPLEMENTATION(DartFunction, Instance);
friend class Class;
friend class Instance;
};
@@ -6036,7 +6084,7 @@
void set_code_array(const Array& code_array) const;
void set_pc_offset_array(const Array& pc_offset_array) const;
- HEAP_OBJECT_IMPLEMENTATION(Stacktrace, Instance);
+ FINAL_HEAP_OBJECT_IMPLEMENTATION(Stacktrace, Instance);
friend class Class;
};
@@ -6116,7 +6164,7 @@
raw_ptr()->data_length_ = Smi::New(value);
}
- HEAP_OBJECT_IMPLEMENTATION(JSRegExp, Instance);
+ FINAL_HEAP_OBJECT_IMPLEMENTATION(JSRegExp, Instance);
friend class Class;
};
@@ -6151,7 +6199,7 @@
}
private:
- HEAP_OBJECT_IMPLEMENTATION(WeakProperty, Instance);
+ FINAL_HEAP_OBJECT_IMPLEMENTATION(WeakProperty, Instance);
friend class Class;
};
@@ -6181,15 +6229,13 @@
}
set_vtable(builtin_vtables_[cid]);
#if defined(DEBUG)
- Isolate* isolate = Isolate::Current();
if (FLAG_verify_handles) {
+ Isolate* isolate = Isolate::Current();
Heap* isolate_heap = isolate->heap();
Heap* vm_isolate_heap = Dart::vm_isolate()->heap();
ASSERT(isolate_heap->Contains(RawObject::ToAddr(raw_)) ||
vm_isolate_heap->Contains(RawObject::ToAddr(raw_)));
}
- ASSERT(builtin_vtables_[cid] ==
- isolate->class_table()->At(cid)->ptr()->handle_vtable_);
#endif
}
diff --git a/runtime/vm/object_test.cc b/runtime/vm/object_test.cc
index 93d7ec8..04b4299 100644
--- a/runtime/vm/object_test.cc
+++ b/runtime/vm/object_test.cc
@@ -2960,96 +2960,129 @@
// Simple matches.
mangled_name = OneByteString::New("foo");
bare_name = OneByteString::New("foo");
- EXPECT(OneByteString::EqualsIgnoringPrivateKey(mangled_name, bare_name));
+ EXPECT(String::EqualsIgnoringPrivateKey(mangled_name, bare_name));
mangled_name = OneByteString::New("foo.");
bare_name = OneByteString::New("foo.");
- EXPECT(OneByteString::EqualsIgnoringPrivateKey(mangled_name, bare_name));
+ EXPECT(String::EqualsIgnoringPrivateKey(mangled_name, bare_name));
mangled_name = OneByteString::New("foo.named");
bare_name = OneByteString::New("foo.named");
- EXPECT(OneByteString::EqualsIgnoringPrivateKey(mangled_name, bare_name));
+ EXPECT(String::EqualsIgnoringPrivateKey(mangled_name, bare_name));
// Simple mismatches.
mangled_name = OneByteString::New("bar");
bare_name = OneByteString::New("foo");
- EXPECT(!OneByteString::EqualsIgnoringPrivateKey(mangled_name, bare_name));
+ EXPECT(!String::EqualsIgnoringPrivateKey(mangled_name, bare_name));
mangled_name = OneByteString::New("foo.");
bare_name = OneByteString::New("foo");
- EXPECT(!OneByteString::EqualsIgnoringPrivateKey(mangled_name, bare_name));
+ EXPECT(!String::EqualsIgnoringPrivateKey(mangled_name, bare_name));
mangled_name = OneByteString::New("foo");
bare_name = OneByteString::New("foo.");
- EXPECT(!OneByteString::EqualsIgnoringPrivateKey(mangled_name, bare_name));
+ EXPECT(!String::EqualsIgnoringPrivateKey(mangled_name, bare_name));
mangled_name = OneByteString::New("foo.name");
bare_name = OneByteString::New("foo.named");
- EXPECT(!OneByteString::EqualsIgnoringPrivateKey(mangled_name, bare_name));
+ EXPECT(!String::EqualsIgnoringPrivateKey(mangled_name, bare_name));
mangled_name = OneByteString::New("foo.named");
bare_name = OneByteString::New("foo.name");
- EXPECT(!OneByteString::EqualsIgnoringPrivateKey(mangled_name, bare_name));
+ EXPECT(!String::EqualsIgnoringPrivateKey(mangled_name, bare_name));
// Private match.
mangled_name = OneByteString::New("foo@12345");
bare_name = OneByteString::New("foo");
- EXPECT(OneByteString::EqualsIgnoringPrivateKey(mangled_name, bare_name));
+ EXPECT(String::EqualsIgnoringPrivateKey(mangled_name, bare_name));
// Private mismatch.
mangled_name = OneByteString::New("food@12345");
bare_name = OneByteString::New("foo");
- EXPECT(!OneByteString::EqualsIgnoringPrivateKey(mangled_name, bare_name));
+ EXPECT(!String::EqualsIgnoringPrivateKey(mangled_name, bare_name));
// Private mismatch 2.
mangled_name = OneByteString::New("foo@12345");
bare_name = OneByteString::New("food");
- EXPECT(!OneByteString::EqualsIgnoringPrivateKey(mangled_name, bare_name));
+ EXPECT(!String::EqualsIgnoringPrivateKey(mangled_name, bare_name));
// Private constructor match.
mangled_name = OneByteString::New("foo@12345.");
bare_name = OneByteString::New("foo.");
- EXPECT(OneByteString::EqualsIgnoringPrivateKey(mangled_name, bare_name));
+ EXPECT(String::EqualsIgnoringPrivateKey(mangled_name, bare_name));
// Private constructor mismatch.
mangled_name = OneByteString::New("foo@12345.");
bare_name = OneByteString::New("foo");
- EXPECT(!OneByteString::EqualsIgnoringPrivateKey(mangled_name, bare_name));
+ EXPECT(!String::EqualsIgnoringPrivateKey(mangled_name, bare_name));
// Private constructor mismatch 2.
mangled_name = OneByteString::New("foo@12345");
bare_name = OneByteString::New("foo.");
- EXPECT(!OneByteString::EqualsIgnoringPrivateKey(mangled_name, bare_name));
+ EXPECT(!String::EqualsIgnoringPrivateKey(mangled_name, bare_name));
// Named private constructor match.
mangled_name = OneByteString::New("foo@12345.named");
bare_name = OneByteString::New("foo.named");
- EXPECT(OneByteString::EqualsIgnoringPrivateKey(mangled_name, bare_name));
+ EXPECT(String::EqualsIgnoringPrivateKey(mangled_name, bare_name));
// Named private constructor mismatch.
mangled_name = OneByteString::New("foo@12345.name");
bare_name = OneByteString::New("foo.named");
- EXPECT(!OneByteString::EqualsIgnoringPrivateKey(mangled_name, bare_name));
+ EXPECT(!String::EqualsIgnoringPrivateKey(mangled_name, bare_name));
// Named private constructor mismatch 2.
mangled_name = OneByteString::New("foo@12345.named");
bare_name = OneByteString::New("foo.name");
- EXPECT(!OneByteString::EqualsIgnoringPrivateKey(mangled_name, bare_name));
+ EXPECT(!String::EqualsIgnoringPrivateKey(mangled_name, bare_name));
// Named double-private constructor match. Yes, this happens.
mangled_name = OneByteString::New("foo@12345.named@12345");
bare_name = OneByteString::New("foo.named");
- EXPECT(OneByteString::EqualsIgnoringPrivateKey(mangled_name, bare_name));
+ EXPECT(String::EqualsIgnoringPrivateKey(mangled_name, bare_name));
// Named double-private constructor mismatch.
mangled_name = OneByteString::New("foo@12345.name@12345");
bare_name = OneByteString::New("foo.named");
- EXPECT(!OneByteString::EqualsIgnoringPrivateKey(mangled_name, bare_name));
+ EXPECT(!String::EqualsIgnoringPrivateKey(mangled_name, bare_name));
// Named double-private constructor mismatch.
mangled_name = OneByteString::New("foo@12345.named@12345");
bare_name = OneByteString::New("foo.name");
- EXPECT(!OneByteString::EqualsIgnoringPrivateKey(mangled_name, bare_name));
+ EXPECT(!String::EqualsIgnoringPrivateKey(mangled_name, bare_name));
+
+ const char* ext_mangled_str = "foo@12345.name@12345";
+ const char* ext_bare_str = "foo.name";
+ const char* ext_bad_bare_str = "foo.named";
+ String& ext_mangled_name = String::Handle();
+ String& ext_bare_name = String::Handle();
+ String& ext_bad_bare_name = String::Handle();
+
+ mangled_name = OneByteString::New("foo@12345.name@12345");
+ ext_mangled_name = ExternalOneByteString::New(
+ reinterpret_cast<const uint8_t*>(ext_mangled_str),
+ strlen(ext_mangled_str), NULL, NULL, Heap::kNew);
+ EXPECT(ext_mangled_name.IsExternalOneByteString());
+ ext_bare_name = ExternalOneByteString::New(
+ reinterpret_cast<const uint8_t*>(ext_bare_str),
+ strlen(ext_bare_str), NULL, NULL, Heap::kNew);
+ EXPECT(ext_bare_name.IsExternalOneByteString());
+ ext_bad_bare_name = ExternalOneByteString::New(
+ reinterpret_cast<const uint8_t*>(ext_bad_bare_str),
+ strlen(ext_bad_bare_str), NULL, NULL, Heap::kNew);
+ EXPECT(ext_bad_bare_name.IsExternalOneByteString());
+
+ // str1 - OneByteString, str2 - ExternalOneByteString.
+ EXPECT(String::EqualsIgnoringPrivateKey(mangled_name, ext_bare_name));
+ EXPECT(!String::EqualsIgnoringPrivateKey(mangled_name, ext_bad_bare_name));
+
+ // str1 - ExternalOneByteString, str2 - OneByteString.
+ EXPECT(String::EqualsIgnoringPrivateKey(ext_mangled_name, bare_name));
+
+ // str1 - ExternalOneByteString, str2 - ExternalOneByteString.
+ EXPECT(String::EqualsIgnoringPrivateKey(ext_mangled_name, ext_bare_name));
+ EXPECT(!String::EqualsIgnoringPrivateKey(ext_mangled_name,
+ ext_bad_bare_name));
}
diff --git a/runtime/vm/os.h b/runtime/vm/os.h
index 8829b46..52e575d 100644
--- a/runtime/vm/os.h
+++ b/runtime/vm/os.h
@@ -40,12 +40,13 @@
// from midnight January 1, 1970 UTC.
static int64_t GetCurrentTimeMicros();
- // Returns an aligned array of type T with n entries.
+ // Returns a cleared aligned array of type T with n entries.
// Alignment must be >= 16 and a power of two.
template<typename T>
static T* AllocateAlignedArray(intptr_t n, intptr_t alignment) {
T* result = reinterpret_cast<T*>(OS::AlignedAllocate(n * sizeof(*result),
alignment));
+ memset(result, 0, n * sizeof(*result));
return result;
}
@@ -77,6 +78,9 @@
// Sleep the currently executing thread for millis ms.
static void Sleep(int64_t millis);
+ // Debug break.
+ static void DebugBreak();
+
// Print formatted output to stdout/stderr for debugging.
static void Print(const char* format, ...) PRINTF_ATTRIBUTE(1, 2);
static void PrintErr(const char* format, ...) PRINTF_ATTRIBUTE(1, 2);
diff --git a/runtime/vm/os_android.cc b/runtime/vm/os_android.cc
index ac1a640..94d58b3 100644
--- a/runtime/vm/os_android.cc
+++ b/runtime/vm/os_android.cc
@@ -309,6 +309,11 @@
}
+void OS::DebugBreak() {
+ UNIMPLEMENTED();
+}
+
+
void OS::Print(const char* format, ...) {
va_list args;
va_start(args, format);
diff --git a/runtime/vm/os_linux.cc b/runtime/vm/os_linux.cc
index 2e6d12e..66360b7 100644
--- a/runtime/vm/os_linux.cc
+++ b/runtime/vm/os_linux.cc
@@ -112,11 +112,11 @@
pprof_symbol_generator_->WriteToMemory(debug_region);
int buffer_size = debug_region->size();
void* buffer = debug_region->data();
- delete debug_region;
if (buffer_size > 0) {
ASSERT(buffer != NULL);
(*file_write)(buffer, buffer_size, out_file);
}
+ delete debug_region;
(*file_close)(out_file);
DebugInfo::UnregisterAllSections();
}
@@ -310,6 +310,19 @@
}
+void OS::DebugBreak() {
+#if defined(HOST_ARCH_X64) || defined(HOST_ARCH_IA32)
+ asm("int $3");
+#elif defined(HOST_ARCH_ARM)
+ asm("svc #0x9f0001"); // __ARM_NR_breakpoint
+#elif defined(HOST_ARCH_MIPS)
+ UNIMPLEMENTED();
+#else
+#error Unsupported architecture.
+#endif
+}
+
+
void OS::Print(const char* format, ...) {
va_list args;
va_start(args, format);
diff --git a/runtime/vm/os_macos.cc b/runtime/vm/os_macos.cc
index 56c4842..35166e1 100644
--- a/runtime/vm/os_macos.cc
+++ b/runtime/vm/os_macos.cc
@@ -123,6 +123,15 @@
}
+void OS::DebugBreak() {
+#if defined(HOST_ARCH_X64) || defined(HOST_ARCH_IA32)
+ asm("int $3");
+#else
+#error Unsupported architecture.
+#endif
+}
+
+
void OS::Print(const char* format, ...) {
va_list args;
va_start(args, format);
diff --git a/runtime/vm/os_win.cc b/runtime/vm/os_win.cc
index 75bd8f8..d4d51d7 100644
--- a/runtime/vm/os_win.cc
+++ b/runtime/vm/os_win.cc
@@ -158,6 +158,22 @@
}
+void OS::DebugBreak() {
+#if defined(_MSC_VER)
+ // Microsoft Visual C/C++ or drop-in replacement.
+ __debugbreak();
+#elif defined(__GCC__)
+ // MinGW?
+ asm("int $3");
+#else
+ // Microsoft style assembly.
+ __asm {
+ int 3
+ }
+#endif
+}
+
+
void OS::Print(const char* format, ...) {
va_list args;
va_start(args, format);
diff --git a/runtime/vm/parser.cc b/runtime/vm/parser.cc
index 4077274..2125da9 100644
--- a/runtime/vm/parser.cc
+++ b/runtime/vm/parser.cc
@@ -27,8 +27,6 @@
DEFINE_FLAG(bool, trace_parser, false, "Trace parser operations.");
DEFINE_FLAG(bool, warning_as_error, false, "Treat warnings as errors.");
DEFINE_FLAG(bool, silent_warnings, false, "Silence warnings.");
-DEFINE_FLAG(bool, warn_legacy_map_literal, false,
- "Warning on legacy map literal syntax (single type argument)");
static void CheckedModeHandler(bool value) {
FLAG_enable_asserts = value;
@@ -364,14 +362,14 @@
String* Parser::CurrentLiteral() const {
String& result = String::ZoneHandle();
- result |= tokens_iterator_.CurrentLiteral();
+ result = tokens_iterator_.CurrentLiteral();
return &result;
}
RawDouble* Parser::CurrentDoubleLiteral() const {
LiteralToken& token = LiteralToken::Handle();
- token |= tokens_iterator_.CurrentToken();
+ token ^= tokens_iterator_.CurrentToken();
ASSERT(token.kind() == Token::kDOUBLE);
return reinterpret_cast<RawDouble*>(token.value());
}
@@ -379,7 +377,7 @@
RawInteger* Parser::CurrentIntegerLiteral() const {
LiteralToken& token = LiteralToken::Handle();
- token |= tokens_iterator_.CurrentToken();
+ token ^= tokens_iterator_.CurrentToken();
ASSERT(token.kind() == Token::kINTEGER);
return reinterpret_cast<RawInteger*>(token.value());
}
@@ -626,7 +624,7 @@
bool has_constructor() const {
Function& func = Function::Handle();
for (int i = 0; i < functions_.Length(); i++) {
- func |= functions_.At(i);
+ func ^= functions_.At(i);
if (func.kind() == RawFunction::kConstructor) {
return true;
}
@@ -660,7 +658,7 @@
String& test_name = String::Handle();
Field& field = Field::Handle();
for (int i = 0; i < fields_.Length(); i++) {
- field |= fields_.At(i);
+ field ^= fields_.At(i);
test_name = field.name();
if (name.Equals(test_name)) {
return &field;
@@ -677,7 +675,7 @@
String& test_name = String::Handle();
Function& func = Function::Handle();
for (int i = 0; i < functions_.Length(); i++) {
- func |= functions_.At(i);
+ func ^= functions_.At(i);
test_name = func.name();
if (name.Equals(test_name)) {
return &func;
@@ -1748,6 +1746,9 @@
// "this" must not be accessible in initializer expressions.
receiver->set_invisible(true);
AstNode* init_expr = ParseConditionalExpr();
+ if (CurrentToken() == Token::kCASCADE) {
+ init_expr = ParseCascades(init_expr);
+ }
receiver->set_invisible(false);
SetAllowFunctionLiterals(saved_mode);
Field& field = Field::ZoneHandle(cls.LookupInstanceField(field_name));
@@ -1766,7 +1767,7 @@
Field& field = Field::Handle();
SequenceNode* initializers = current_block_->statements;
for (int field_num = 0; field_num < fields.Length(); field_num++) {
- field |= fields.At(field_num);
+ field ^= fields.At(field_num);
if (field.is_static() || !field.is_final()) {
continue;
}
@@ -1798,10 +1799,10 @@
Field& f = Field::Handle();
const intptr_t saved_pos = TokenPos();
for (int i = 0; i < fields.Length(); i++) {
- f |= fields.At(i);
+ f ^= fields.At(i);
if (!f.is_static() && f.has_initializer()) {
Field& field = Field::ZoneHandle();
- field |= fields.At(i);
+ field ^= fields.At(i);
if (field.is_final()) {
// Final fields with initializer expression may not be initialized
// again by constructors. Remember that this field is already
@@ -3138,7 +3139,7 @@
ErrorMsg(classname_pos, "'%s' is already defined",
class_name.ToCString());
}
- cls |= obj.raw();
+ cls ^= obj.raw();
if (is_patch) {
String& patch = String::Handle(
String::Concat(Symbols::PatchSpace(), class_name));
@@ -7113,7 +7114,7 @@
// canonicalized strings.
ASSERT(CurrentLiteral()->IsSymbol());
for (int i = 0; i < names.Length(); i++) {
- arg_name |= names.At(i);
+ arg_name ^= names.At(i);
if (CurrentLiteral()->Equals(arg_name)) {
ErrorMsg("duplicate named argument");
}
@@ -7402,7 +7403,7 @@
if (primary_node->primary().IsClass()) {
// If the primary node referred to a class we are loading a
// qualified static field.
- cls |= primary_node->primary().raw();
+ cls ^= primary_node->primary().raw();
}
}
if (cls.IsNull()) {
@@ -7709,7 +7710,7 @@
return false;
}
if (ident.Equals(Symbols::This())) {
- // 'this' is not a formal parameter.
+ // 'this' is not a formal parameter that can be tested with '?this'.
return false;
}
// Since an argument definition test does not use the value of the formal
@@ -7717,16 +7718,19 @@
const bool kTestOnly = true; // No capturing.
LocalVariable* local =
current_block_->scope->LookupVariable(ident, kTestOnly);
- if (local == NULL) {
- if (!current_function().IsLocalFunction()) {
+ if ((local == NULL) ||
+ (local->owner()->HasContextLevel() &&
+ (local->owner()->context_level() < 1))) {
+ if ((local == NULL) && !current_function().IsLocalFunction()) {
// We are not generating code for a local function, so all locals,
// captured or not, are in scope. However, 'ident' was not found, so it
// does not exist.
return false;
}
- // The formal parameter may belong to an enclosing function and may not have
+ // The formal parameter belongs to an enclosing function and may not have
// been captured, so it was not included in the context scope and it cannot
// be found by LookupVariable.
+ ASSERT((local == NULL) || local->is_captured());
// 'ident' necessarily refers to the formal parameter of one of the
// enclosing functions, or a compile error would have prevented the
// outermost enclosing function to be executed and we would not be compiling
@@ -8135,7 +8139,7 @@
intptr_t num_imports = library_.num_imports();
Object& imported_obj = Object::Handle();
for (int i = 0; i < num_imports; i++) {
- import |= library_.ImportAt(i);
+ import = library_.ImportAt(i);
imported_obj = LookupNameInImport(import, name);
if (!imported_obj.IsNull()) {
const Library& lib = Library::Handle(import.library());
@@ -8238,7 +8242,7 @@
Object& resolved_obj = Object::Handle();
const Array& imports = Array::Handle(prefix.imports());
for (intptr_t i = 0; i < prefix.num_imports(); i++) {
- import |= imports.At(i);
+ import ^= imports.At(i);
resolved_obj = LookupNameInImport(import, name);
if (!resolved_obj.IsNull()) {
obj = resolved_obj.raw();
@@ -8672,29 +8676,16 @@
if (!map_type_arguments.IsNull()) {
ASSERT(map_type_arguments.Length() > 0);
// Map literals take two type arguments.
- if (map_type_arguments.Length() < 2) {
- // TODO(hausner): Remove legacy syntax support.
- // We temporarily accept a single type argument.
- if (FLAG_warn_legacy_map_literal) {
- Warning(type_pos,
- "a map literal takes two type arguments specifying "
- "the key type and the value type");
- }
- TypeArguments& type_array = TypeArguments::Handle(TypeArguments::New(2));
- type_array.SetTypeAt(0, Type::Handle(Type::StringType()));
- type_array.SetTypeAt(1, value_type);
- map_type_arguments = type_array.raw();
- } else if (map_type_arguments.Length() > 2) {
+ if (map_type_arguments.Length() != 2) {
ErrorMsg(type_pos,
"a map literal takes two type arguments specifying "
"the key type and the value type");
- } else {
- const AbstractType& key_type =
- AbstractType::Handle(map_type_arguments.TypeAt(0));
- value_type = map_type_arguments.TypeAt(1);
- if (!key_type.IsStringType()) {
- ErrorMsg(type_pos, "the key type of a map literal must be 'String'");
- }
+ }
+ const AbstractType& key_type =
+ AbstractType::Handle(map_type_arguments.TypeAt(0));
+ value_type = map_type_arguments.TypeAt(1);
+ if (!key_type.IsStringType()) {
+ ErrorMsg(type_pos, "the key type of a map literal must be 'String'");
}
if (is_const && !value_type.IsInstantiated()) {
ErrorMsg(type_pos,
@@ -9138,7 +9129,7 @@
// Call interpolation function.
String& concatenated = String::ZoneHandle();
- concatenated |= DartEntry::InvokeStatic(func, interpolate_arg);
+ concatenated ^= DartEntry::InvokeStatic(func, interpolate_arg);
if (concatenated.IsUnhandledException()) {
ErrorMsg("Exception thrown in Parser::Interpolate");
}
diff --git a/runtime/vm/resolver.cc b/runtime/vm/resolver.cc
index 8b60ea3..5a55b48 100644
--- a/runtime/vm/resolver.cc
+++ b/runtime/vm/resolver.cc
@@ -126,22 +126,22 @@
const bool is_getter = Field::IsGetterName(function_name);
String& field_name = String::Handle();
if (is_getter) {
- field_name |= Field::NameFromGetter(function_name);
+ field_name ^= Field::NameFromGetter(function_name);
}
// Now look for an instance function whose name matches function_name
// in the class.
Function& function = Function::Handle();
while (function.IsNull() && !cls.IsNull()) {
- function |= cls.LookupDynamicFunction(function_name);
+ function ^= cls.LookupDynamicFunction(function_name);
// Getter invocation might actually be a method extraction.
if (is_getter && function.IsNull()) {
- function |= cls.LookupDynamicFunction(field_name);
+ function ^= cls.LookupDynamicFunction(field_name);
if (!function.IsNull()) {
// We were looking for the getter but found a method with the same name.
// Create a method extractor and return it.
- function |= CreateMethodExtractor(function_name, function);
+ function ^= CreateMethodExtractor(function_name, function);
}
}
@@ -163,7 +163,7 @@
// Check if we are referring to a top level function.
const Object& object = Object::Handle(library.LookupObject(function_name));
if (!object.IsNull() && object.IsFunction()) {
- function |= object.raw();
+ function ^= object.raw();
if (!function.AreValidArguments(num_arguments, argument_names, NULL)) {
if (FLAG_trace_resolving) {
String& error_message = String::Handle();
diff --git a/runtime/vm/scanner.cc b/runtime/vm/scanner.cc
index 6dae332..5c589e0 100644
--- a/runtime/vm/scanner.cc
+++ b/runtime/vm/scanner.cc
@@ -312,7 +312,7 @@
if (char_pos == ident_length) {
if (keywords_[i].keyword_symbol == NULL) {
String& symbol = String::ZoneHandle();
- symbol |= keyword_symbol_table_.At(i);
+ symbol ^= keyword_symbol_table_.At(i);
ASSERT(!symbol.IsNull());
keywords_[i].keyword_symbol = &symbol;
}
diff --git a/runtime/vm/simulator.h b/runtime/vm/simulator.h
new file mode 100644
index 0000000..58c493f
--- /dev/null
+++ b/runtime/vm/simulator.h
@@ -0,0 +1,36 @@
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+#ifndef VM_SIMULATOR_H_
+#define VM_SIMULATOR_H_
+
+#include "vm/globals.h"
+
+#if defined(TARGET_ARCH_IA32)
+// No simulator used.
+
+#elif defined(TARGET_ARCH_X64)
+// No simulator used.
+
+#elif defined(TARGET_ARCH_ARM)
+#if defined(HOST_ARCH_ARM)
+// No simulator used.
+#else
+#define USING_SIMULATOR 1
+#include "vm/simulator_arm.h"
+#endif
+
+#elif defined(TARGET_ARCH_MIPS)
+#if defined(HOST_ARCH_MIPS)
+// No simulator used.
+#else
+#define USING_SIMULATOR 1
+#include "vm/simulator_mips.h"
+#endif
+
+#else
+#error Unknown architecture.
+#endif
+
+#endif // VM_SIMULATOR_H_
diff --git a/runtime/vm/simulator_arm.cc b/runtime/vm/simulator_arm.cc
new file mode 100644
index 0000000..c4dca42
--- /dev/null
+++ b/runtime/vm/simulator_arm.cc
@@ -0,0 +1,2739 @@
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+#include <math.h> // for isnan.
+#include <setjmp.h>
+#include <stdlib.h>
+
+#include "vm/globals.h"
+#if defined(TARGET_ARCH_ARM)
+
+// Only build the simulator if not compiling for real ARM hardware.
+#if !defined(HOST_ARCH_ARM)
+
+#include "vm/simulator.h"
+
+#include "vm/assembler.h"
+#include "vm/constants_arm.h"
+#include "vm/disassembler.h"
+#include "vm/native_arguments.h"
+#include "vm/thread.h"
+
+namespace dart {
+
+DEFINE_FLAG(bool, trace_sim, false, "Trace simulator execution.");
+DEFINE_FLAG(int, stop_sim_at, 0, "Address to stop simulator at.");
+
+
+// This macro provides a platform independent use of sscanf. The reason for
+// SScanF not being implemented in a platform independent way through
+// OS in the same way as SNPrint is that the Windows C Run-Time
+// Library does not provide vsscanf.
+#define SScanF sscanf // NOLINT
+
+
+// Unimplemented counter class for debugging and measurement purposes.
+class StatsCounter {
+ public:
+ explicit StatsCounter(const char* name) {
+ UNIMPLEMENTED();
+ }
+
+ void Increment() {
+ UNIMPLEMENTED();
+ }
+};
+
+
+// SimulatorSetjmpBuffer are linked together, and the last created one
+// is referenced by the Simulator. When an exception is thrown, the exception
+// runtime looks at where to jump and finds the corresponding
+// SimulatorSetjmpBuffer based on the stack pointer of the exception handler.
+// The runtime then does a Longjmp on that buffer to return to the simulator.
+class SimulatorSetjmpBuffer {
+ public:
+ int Setjmp() { return setjmp(buffer_); }
+ void Longjmp() {
+ // "This" is now the last setjmp buffer.
+ simulator_->set_last_setjmp_buffer(this);
+ longjmp(buffer_, 1);
+ }
+
+ explicit SimulatorSetjmpBuffer(Simulator* sim) {
+ simulator_ = sim;
+ link_ = sim->last_setjmp_buffer();
+ sim->set_last_setjmp_buffer(this);
+ sp_ = sim->get_register(SP);
+ }
+
+ ~SimulatorSetjmpBuffer() {
+ ASSERT(simulator_->last_setjmp_buffer() == this);
+ simulator_->set_last_setjmp_buffer(link_);
+ }
+
+ SimulatorSetjmpBuffer* link() { return link_; }
+
+ int32_t sp() { return sp_; }
+
+ private:
+ int32_t sp_;
+ Simulator* simulator_;
+ SimulatorSetjmpBuffer* link_;
+ jmp_buf buffer_;
+
+ friend class Simulator;
+};
+
+
+// The SimulatorDebugger class is used by the simulator while debugging
+// simulated ARM code.
+class SimulatorDebugger {
+ public:
+ explicit SimulatorDebugger(Simulator* sim);
+ ~SimulatorDebugger();
+
+ void Stop(Instr* instr, const char* message);
+ void Debug();
+ char* ReadLine(const char* prompt);
+
+ private:
+ static const int32_t kSimulatorBreakpointInstr = // svc #kBreakpointSvcCode
+ ((AL << kConditionShift) | (0xf << 24) | kBreakpointSvcCode);
+ static const int32_t kNopInstr = // nop
+ ((AL << kConditionShift) | (0x32 << 20) | (0xf << 12));
+
+ Simulator* sim_;
+
+ bool GetValue(char* desc, uint32_t* value);
+ bool GetFValue(char* desc, float* value);
+ bool GetDValue(char* desc, double* value);
+
+ // Set or delete a breakpoint. Returns true if successful.
+ bool SetBreakpoint(Instr* breakpc);
+ bool DeleteBreakpoint(Instr* breakpc);
+
+ // Undo and redo all breakpoints. This is needed to bracket disassembly and
+ // execution to skip past breakpoints when run from the debugger.
+ void UndoBreakpoints();
+ void RedoBreakpoints();
+};
+
+
+SimulatorDebugger::SimulatorDebugger(Simulator* sim) {
+ sim_ = sim;
+}
+
+
+SimulatorDebugger::~SimulatorDebugger() {
+}
+
+
+void SimulatorDebugger::Stop(Instr* instr, const char* message) {
+ OS::Print("Simulator hit %s\n", message);
+ Debug();
+}
+
+
+static Register LookupCoreRegisterByName(const char* name) {
+ static const char* kNames[] = {
+ "r0", "r1", "r2", "r3",
+ "r4", "r5", "r6", "r7",
+ "r8", "r9", "r10", "r11",
+ "r12", "r13", "r14", "r15",
+ "pc", "lr", "sp", "ip",
+ "fp", "sl"
+ };
+ static const Register kRegisters[] = {
+ R0, R1, R2, R3,
+ R4, R5, R6, R7,
+ R8, R9, R10, R11,
+ R12, R13, R14, R15,
+ PC, LR, SP, IP,
+ FP, R10
+ };
+ ASSERT(ARRAY_SIZE(kNames) == ARRAY_SIZE(kRegisters));
+ for (unsigned i = 0; i < ARRAY_SIZE(kNames); i++) {
+ if (strcmp(kNames[i], name) == 0) {
+ return kRegisters[i];
+ }
+ }
+ return kNoRegister;
+}
+
+
+static SRegister LookupSRegisterByName(const char* name) {
+ int reg_nr = -1;
+ bool ok = SScanF(name, "s%d", ®_nr);
+ if (ok && (0 <= reg_nr) && (reg_nr < kNumberOfSRegisters)) {
+ return static_cast<SRegister>(reg_nr);
+ }
+ return kNoSRegister;
+}
+
+
+static DRegister LookupDRegisterByName(const char* name) {
+ int reg_nr = -1;
+ bool ok = SScanF(name, "d%d", ®_nr);
+ if (ok && (0 <= reg_nr) && (reg_nr < kNumberOfDRegisters)) {
+ return static_cast<DRegister>(reg_nr);
+ }
+ return kNoDRegister;
+}
+
+
+bool SimulatorDebugger::GetValue(char* desc, uint32_t* value) {
+ Register reg = LookupCoreRegisterByName(desc);
+ if (reg != kNoRegister) {
+ if (reg == PC) {
+ *value = sim_->get_pc();
+ } else {
+ *value = sim_->get_register(reg);
+ }
+ return true;
+ }
+ if ((desc[0] == '*')) {
+ uint32_t addr;
+ if (GetValue(desc + 1, &addr)) {
+ *value = *(reinterpret_cast<uint32_t*>(addr));
+ return true;
+ }
+ }
+ bool retval = SScanF(desc, "0x%x", value) == 1;
+ if (!retval) {
+ retval = SScanF(desc, "%x", value) == 1;
+ }
+ return retval;
+}
+
+
+bool SimulatorDebugger::GetFValue(char* desc, float* value) {
+ SRegister sreg = LookupSRegisterByName(desc);
+ if (sreg != kNoSRegister) {
+ *value = sim_->get_sregister(sreg);
+ return true;
+ }
+ if ((desc[0] == '*')) {
+ uint32_t addr;
+ if (GetValue(desc + 1, &addr)) {
+ *value = *(reinterpret_cast<float*>(addr));
+ return true;
+ }
+ }
+ return false;
+}
+
+
+bool SimulatorDebugger::GetDValue(char* desc, double* value) {
+ DRegister dreg = LookupDRegisterByName(desc);
+ if (dreg != kNoDRegister) {
+ *value = sim_->get_dregister(dreg);
+ return true;
+ }
+ if ((desc[0] == '*')) {
+ uint32_t addr;
+ if (GetValue(desc + 1, &addr)) {
+ *value = *(reinterpret_cast<double*>(addr));
+ return true;
+ }
+ }
+ return false;
+}
+
+
+bool SimulatorDebugger::SetBreakpoint(Instr* breakpc) {
+ // Check if a breakpoint can be set. If not return without any side-effects.
+ if (sim_->break_pc_ != NULL) {
+ return false;
+ }
+
+ // Set the breakpoint.
+ sim_->break_pc_ = breakpc;
+ sim_->break_instr_ = breakpc->InstructionBits();
+ // Not setting the breakpoint instruction in the code itself. It will be set
+ // when the debugger shell continues.
+ return true;
+}
+
+
+bool SimulatorDebugger::DeleteBreakpoint(Instr* breakpc) {
+ if (sim_->break_pc_ != NULL) {
+ sim_->break_pc_->SetInstructionBits(sim_->break_instr_);
+ }
+
+ sim_->break_pc_ = NULL;
+ sim_->break_instr_ = 0;
+ return true;
+}
+
+
+void SimulatorDebugger::UndoBreakpoints() {
+ if (sim_->break_pc_ != NULL) {
+ sim_->break_pc_->SetInstructionBits(sim_->break_instr_);
+ }
+}
+
+
+void SimulatorDebugger::RedoBreakpoints() {
+ if (sim_->break_pc_ != NULL) {
+ sim_->break_pc_->SetInstructionBits(kSimulatorBreakpointInstr);
+ }
+}
+
+
+void SimulatorDebugger::Debug() {
+ intptr_t last_pc = -1;
+ bool done = false;
+
+#define COMMAND_SIZE 63
+#define ARG_SIZE 255
+
+#define STR(a) #a
+#define XSTR(a) STR(a)
+
+ char cmd[COMMAND_SIZE + 1];
+ char arg1[ARG_SIZE + 1];
+ char arg2[ARG_SIZE + 1];
+
+ // make sure to have a proper terminating character if reaching the limit
+ cmd[COMMAND_SIZE] = 0;
+ arg1[ARG_SIZE] = 0;
+ arg2[ARG_SIZE] = 0;
+
+ // Undo all set breakpoints while running in the debugger shell. This will
+ // make them invisible to all commands.
+ UndoBreakpoints();
+
+ while (!done) {
+ if (last_pc != sim_->get_pc()) {
+ last_pc = sim_->get_pc();
+ Disassembler::Disassemble(last_pc, last_pc + Instr::kInstrSize);
+ }
+ char* line = ReadLine("sim> ");
+ if (line == NULL) {
+ break;
+ } else {
+ // Use sscanf to parse the individual parts of the command line. At the
+ // moment no command expects more than two parameters.
+ int args = SScanF(line,
+ "%" XSTR(COMMAND_SIZE) "s "
+ "%" XSTR(ARG_SIZE) "s "
+ "%" XSTR(ARG_SIZE) "s",
+ cmd, arg1, arg2);
+ if ((strcmp(cmd, "h") == 0) || (strcmp(cmd, "help") == 0)) {
+ OS::Print("c/cont -- continue execution\n"
+ "disasm -- disassemble instrs at current pc location\n"
+ " other variants are:\n"
+ " disasm <address>\n"
+ " disasm <address> <number_of_instructions>\n"
+ " by default 10 instrs are disassembled\n"
+ "del -- delete breakpoints\n"
+ "flags -- print flag values\n"
+ "gdb -- transfer control to gdb\n"
+ "h/help -- print this help string\n"
+ "break <address> -- set break point at specified address\n"
+ "p/print <reg or value or *addr> -- print integer value\n"
+ "pf/printfloat <sreg or *addr> -- print float value\n"
+ "pd/printdouble <dreg or *addr> -- print double value\n"
+ "po/printobject <*reg or *addr> -- print object\n"
+ "si/stepi -- single step an instruction\n"
+ "unstop -- if current pc is a stop instr make it a nop\n");
+ } else if ((strcmp(cmd, "si") == 0) || (strcmp(cmd, "stepi") == 0)) {
+ sim_->InstructionDecode(reinterpret_cast<Instr*>(sim_->get_pc()));
+ } else if ((strcmp(cmd, "c") == 0) || (strcmp(cmd, "cont") == 0)) {
+ // Execute the one instruction we broke at with breakpoints disabled.
+ sim_->InstructionDecode(reinterpret_cast<Instr*>(sim_->get_pc()));
+ // Leave the debugger shell.
+ done = true;
+ } else if ((strcmp(cmd, "p") == 0) || (strcmp(cmd, "print") == 0)) {
+ if (args == 2) {
+ uint32_t value;
+ if (GetValue(arg1, &value)) {
+ OS::Print("%s: %u 0x%x\n", arg1, value, value);
+ } else {
+ OS::Print("%s unrecognized\n", arg1);
+ }
+ } else {
+ OS::Print("print <reg or value or *addr>\n");
+ }
+ } else if ((strcmp(cmd, "pf") == 0) || (strcmp(cmd, "printfloat") == 0)) {
+ if (args == 2) {
+ float fvalue;
+ if (GetFValue(arg1, &fvalue)) {
+ uint32_t value = bit_cast<uint32_t, float>(fvalue);
+ OS::Print("%s: 0%u 0x%x %.8g\n", arg1, value, value, fvalue);
+ } else {
+ OS::Print("%s unrecognized\n", arg1);
+ }
+ } else {
+ OS::Print("printfloat <sreg or *addr>\n");
+ }
+ } else if ((strcmp(cmd, "pd") == 0) ||
+ (strcmp(cmd, "printdouble") == 0)) {
+ if (args == 2) {
+ double dvalue;
+ if (GetDValue(arg1, &dvalue)) {
+ uint64_t long_value = bit_cast<uint64_t, double>(dvalue);
+ OS::Print("%s: %llu 0x%llx %.8g\n",
+ arg1, long_value, long_value, dvalue);
+ } else {
+ OS::Print("%s unrecognized\n", arg1);
+ }
+ } else {
+ OS::Print("printdouble <dreg or *addr>\n");
+ }
+ } else if ((strcmp(cmd, "po") == 0) ||
+ (strcmp(cmd, "printobject") == 0)) {
+ if (args == 2) {
+ uint32_t value;
+ // Make the dereferencing '*' optional.
+ if (((arg1[0] == '*') && GetValue(arg1 + 1, &value)) ||
+ GetValue(arg1, &value)) {
+ if (Isolate::Current()->heap()->Contains(value)) {
+ OS::Print("%s: \n", arg1);
+#if defined(DEBUG)
+ const Object& obj = Object::Handle(
+ reinterpret_cast<RawObject*>(value));
+ obj.Print();
+#endif // defined(DEBUG)
+ } else {
+ OS::Print("0x%x is not an object reference\n", value);
+ }
+ } else {
+ OS::Print("%s unrecognized\n", arg1);
+ }
+ } else {
+ OS::Print("printobject <*reg or *addr>\n");
+ }
+ } else if (strcmp(cmd, "disasm") == 0) {
+ uint32_t start = 0;
+ uint32_t end = 0;
+ if (args == 1) {
+ start = sim_->get_pc();
+ end = start + (10 * Instr::kInstrSize);
+ } else if (args == 2) {
+ if (GetValue(arg1, &start)) {
+ // no length parameter passed, assume 10 instructions
+ end = start + (10 * Instr::kInstrSize);
+ }
+ } else {
+ uint32_t length;
+ if (GetValue(arg1, &start) && GetValue(arg2, &length)) {
+ end = start + (length * Instr::kInstrSize);
+ }
+ }
+
+ Disassembler::Disassemble(start, end);
+ } else if (strcmp(cmd, "gdb") == 0) {
+ OS::Print("relinquishing control to gdb\n");
+ OS::DebugBreak();
+ OS::Print("regaining control from gdb\n");
+ } else if (strcmp(cmd, "break") == 0) {
+ if (args == 2) {
+ uint32_t addr;
+ if (GetValue(arg1, &addr)) {
+ if (!SetBreakpoint(reinterpret_cast<Instr*>(addr))) {
+ OS::Print("setting breakpoint failed\n");
+ }
+ } else {
+ OS::Print("%s unrecognized\n", arg1);
+ }
+ } else {
+ OS::Print("break <addr>\n");
+ }
+ } else if (strcmp(cmd, "del") == 0) {
+ if (!DeleteBreakpoint(NULL)) {
+ OS::Print("deleting breakpoint failed\n");
+ }
+ } else if (strcmp(cmd, "flags") == 0) {
+ OS::Print("APSR: ");
+ OS::Print("N flag: %d; ", sim_->n_flag_);
+ OS::Print("Z flag: %d; ", sim_->z_flag_);
+ OS::Print("C flag: %d; ", sim_->c_flag_);
+ OS::Print("V flag: %d\n", sim_->v_flag_);
+ OS::Print("FPSCR: ");
+ OS::Print("N flag: %d; ", sim_->fp_n_flag_);
+ OS::Print("Z flag: %d; ", sim_->fp_z_flag_);
+ OS::Print("C flag: %d; ", sim_->fp_c_flag_);
+ OS::Print("V flag: %d\n", sim_->fp_v_flag_);
+ } else if (strcmp(cmd, "unstop") == 0) {
+ intptr_t stop_pc = sim_->get_pc() - Instr::kInstrSize;
+ Instr* stop_instr = reinterpret_cast<Instr*>(stop_pc);
+ if (stop_instr->IsSvc() || stop_instr->IsBkpt()) {
+ stop_instr->SetInstructionBits(kNopInstr);
+ } else {
+ OS::Print("Not at debugger stop.\n");
+ }
+ } else {
+ OS::Print("Unknown command: %s\n", cmd);
+ }
+ }
+ delete[] line;
+ }
+
+ // Add all the breakpoints back to stop execution and enter the debugger
+ // shell when hit.
+ RedoBreakpoints();
+
+#undef COMMAND_SIZE
+#undef ARG_SIZE
+
+#undef STR
+#undef XSTR
+}
+
+char* SimulatorDebugger::ReadLine(const char* prompt) {
+ char* result = NULL;
+ char line_buf[256];
+ int offset = 0;
+ bool keep_going = true;
+ fprintf(stdout, "%s", prompt);
+ fflush(stdout);
+ while (keep_going) {
+ if (fgets(line_buf, sizeof(line_buf), stdin) == NULL) {
+ // fgets got an error. Just give up.
+ if (result != NULL) {
+ delete[] result;
+ }
+ return NULL;
+ }
+ int len = strlen(line_buf);
+ if (len > 1 &&
+ line_buf[len - 2] == '\\' &&
+ line_buf[len - 1] == '\n') {
+ // When we read a line that ends with a "\" we remove the escape and
+ // append the remainder.
+ line_buf[len - 2] = '\n';
+ line_buf[len - 1] = 0;
+ len -= 1;
+ } else if ((len > 0) && (line_buf[len - 1] == '\n')) {
+ // Since we read a new line we are done reading the line. This
+ // will exit the loop after copying this buffer into the result.
+ keep_going = false;
+ }
+ if (result == NULL) {
+ // Allocate the initial result and make room for the terminating '\0'
+ result = new char[len + 1];
+ if (result == NULL) {
+ // OOM, so cannot readline anymore.
+ return NULL;
+ }
+ } else {
+ // Allocate a new result with enough room for the new addition.
+ int new_len = offset + len + 1;
+ char* new_result = new char[new_len];
+ if (new_result == NULL) {
+ // OOM, free the buffer allocated so far and return NULL.
+ delete[] result;
+ return NULL;
+ } else {
+ // Copy the existing input into the new array and set the new
+ // array as the result.
+ memmove(new_result, result, offset);
+ delete[] result;
+ result = new_result;
+ }
+ }
+ // Copy the newly read line into the result.
+ memmove(result + offset, line_buf, len);
+ offset += len;
+ }
+ ASSERT(result != NULL);
+ result[offset] = '\0';
+ return result;
+}
+
+
+// Synchronization primitives support.
+Mutex* Simulator::exclusive_access_lock_ = NULL;
+Simulator::AddressTag Simulator::exclusive_access_state_[kNumAddressTags];
+int Simulator::next_address_tag_;
+
+
+void Simulator::SetExclusiveAccess(uword addr) {
+ Isolate* isolate = Isolate::Current();
+ ASSERT(isolate != NULL);
+ int i = 0;
+ while ((i < kNumAddressTags) &&
+ (exclusive_access_state_[i].isolate != isolate)) {
+ i++;
+ }
+ if (i == kNumAddressTags) {
+ i = next_address_tag_;
+ if (++next_address_tag_ == kNumAddressTags) next_address_tag_ = 0;
+ exclusive_access_state_[i].isolate = isolate;
+ }
+ exclusive_access_state_[i].addr = addr;
+}
+
+
+bool Simulator::HasExclusiveAccessAndOpen(uword addr) {
+ Isolate* isolate = Isolate::Current();
+ ASSERT(isolate != NULL);
+ bool result = false;
+ for (int i = 0; i < kNumAddressTags; i++) {
+ if (exclusive_access_state_[i].isolate == isolate) {
+ if (exclusive_access_state_[i].addr == addr) {
+ result = true;
+ }
+ exclusive_access_state_[i].addr = NULL;
+ continue;
+ }
+ if (exclusive_access_state_[i].addr == addr) {
+ exclusive_access_state_[i].addr = NULL;
+ }
+ }
+ return result;
+}
+
+
+void Simulator::InitOnce() {
+ // Setup exclusive access state.
+ exclusive_access_lock_ = new Mutex();
+ for (int i = 0; i < kNumAddressTags; i++) {
+ exclusive_access_state_[i].isolate = NULL;
+ exclusive_access_state_[i].addr = NULL;
+ }
+ next_address_tag_ = 0;
+}
+
+
+Simulator::Simulator() {
+ // Setup simulator support first. Some of this information is needed to
+ // setup the architecture state.
+ // We allocate the stack here, the size is computed as the sum of
+ // the size specified by the user and the buffer space needed for
+ // handling stack overflow exceptions. To be safe in potential
+ // stack underflows we also add some underflow buffer space.
+ stack_ = new char[(Isolate::GetSpecifiedStackSize() +
+ Isolate::kStackSizeBuffer +
+ kSimulatorStackUnderflowSize)];
+ pc_modified_ = false;
+ icount_ = 0;
+ break_pc_ = NULL;
+ break_instr_ = 0;
+ last_setjmp_buffer_ = NULL;
+
+ // Setup architecture state.
+ // All registers are initialized to zero to start with.
+ for (int i = 0; i < kNumberOfCpuRegisters; i++) {
+ registers_[i] = 0;
+ }
+ n_flag_ = false;
+ z_flag_ = false;
+ c_flag_ = false;
+ v_flag_ = false;
+
+ // The sp is initialized to point to the bottom (high address) of the
+ // allocated stack area.
+ registers_[SP] = StackTop();
+ // The lr and pc are initialized to a known bad value that will cause an
+ // access violation if the simulator ever tries to execute it.
+ registers_[PC] = kBadLR;
+ registers_[LR] = kBadLR;
+
+ // All double-precision registers are initialized to zero.
+ for (int i = 0; i < kNumberOfDRegisters; i++) {
+ dregisters_[i] = 0.0;
+ }
+ // Since VFP registers are overlapping, single-precision registers should
+ // already be initialized.
+ ASSERT(2*kNumberOfDRegisters >= kNumberOfSRegisters);
+ for (int i = 0; i < kNumberOfSRegisters; i++) {
+ ASSERT(sregisters_[i] == 0.0);
+ }
+ fp_n_flag_ = false;
+ fp_z_flag_ = false;
+ fp_c_flag_ = false;
+ fp_v_flag_ = false;
+}
+
+
+Simulator::~Simulator() {
+ delete[] stack_;
+ Isolate::Current()->set_simulator(NULL);
+}
+
+
+// When the generated code calls an external reference we need to catch that in
+// the simulator. The external reference will be a function compiled for the
+// host architecture. We need to call that function instead of trying to
+// execute it with the simulator. We do that by redirecting the external
+// reference to a svc (supervisor call) instruction that is handled by
+// the simulator. We write the original destination of the jump just at a known
+// offset from the svc instruction so the simulator knows what to call.
+class Redirection {
+ public:
+ uword address_of_svc_instruction() {
+ return reinterpret_cast<uword>(&svc_instruction_);
+ }
+
+ void* external_function() const { return external_function_; }
+
+ uint32_t argument_count() const { return argument_count_; }
+
+ static Redirection* Get(void* external_function, uint32_t argument_count) {
+ Redirection* current;
+ for (current = list_; current != NULL; current = current->next_) {
+ if (current->external_function_ == external_function) return current;
+ }
+ return new Redirection(external_function, argument_count);
+ }
+
+ static Redirection* FromSvcInstruction(Instr* svc_instruction) {
+ char* addr_of_svc = reinterpret_cast<char*>(svc_instruction);
+ char* addr_of_redirection =
+ addr_of_svc - OFFSET_OF(Redirection, svc_instruction_);
+ return reinterpret_cast<Redirection*>(addr_of_redirection);
+ }
+
+ private:
+ static const int32_t kRedirectSvcInstruction =
+ ((AL << kConditionShift) | (0xf << 24) | kRedirectionSvcCode);
+ Redirection(void* external_function, uint32_t argument_count)
+ : external_function_(external_function),
+ argument_count_(argument_count),
+ svc_instruction_(kRedirectSvcInstruction),
+ next_(list_) {
+ list_ = this;
+ }
+
+ void* external_function_;
+ const uint32_t argument_count_;
+ uint32_t svc_instruction_;
+ Redirection* next_;
+ static Redirection* list_;
+};
+
+
+Redirection* Redirection::list_ = NULL;
+
+
+uword Simulator::RedirectExternalReference(void* function,
+ uint32_t argument_count) {
+ Redirection* redirection = Redirection::Get(function, argument_count);
+ return redirection->address_of_svc_instruction();
+}
+
+
+// Get the active Simulator for the current isolate.
+Simulator* Simulator::Current() {
+ Simulator* simulator = Isolate::Current()->simulator();
+ if (simulator == NULL) {
+ simulator = new Simulator();
+ Isolate::Current()->set_simulator(simulator);
+ }
+ return simulator;
+}
+
+
+// Sets the register in the architecture state. It will also deal with updating
+// Simulator internal state for special registers such as PC.
+void Simulator::set_register(Register reg, int32_t value) {
+ ASSERT((reg >= 0) && (reg < kNumberOfCpuRegisters));
+ if (reg == PC) {
+ pc_modified_ = true;
+ }
+ registers_[reg] = value;
+}
+
+
+// Get the register from the architecture state. This function does handle
+// the special case of accessing the PC register.
+int32_t Simulator::get_register(Register reg) const {
+ ASSERT((reg >= 0) && (reg < kNumberOfCpuRegisters));
+ return registers_[reg] + ((reg == PC) ? Instr::kPCReadOffset : 0);
+}
+
+
+// Raw access to the PC register.
+void Simulator::set_pc(int32_t value) {
+ pc_modified_ = true;
+ registers_[PC] = value;
+}
+
+
+// Raw access to the PC register without the special adjustment when reading.
+int32_t Simulator::get_pc() const {
+ return registers_[PC];
+}
+
+
+// Accessors for VFP register state.
+void Simulator::set_sregister(SRegister reg, float value) {
+ ASSERT((reg >= 0) && (reg < kNumberOfSRegisters));
+ sregisters_[reg] = value;
+}
+
+
+float Simulator::get_sregister(SRegister reg) const {
+ ASSERT((reg >= 0) && (reg < kNumberOfSRegisters));
+ return sregisters_[reg];
+}
+
+
+void Simulator::set_dregister(DRegister reg, double value) {
+ ASSERT((reg >= 0) && (reg < kNumberOfDRegisters));
+ dregisters_[reg] = value;
+}
+
+
+double Simulator::get_dregister(DRegister reg) const {
+ ASSERT((reg >= 0) && (reg < kNumberOfDRegisters));
+ return dregisters_[reg];
+}
+
+
+void Simulator::HandleIllegalAccess(uword addr, Instr* instr) {
+ uword fault_pc = get_pc();
+ // The debugger will not be able to single step past this instruction, but
+ // it will be possible to disassemble the code and inspect registers.
+ char buffer[128];
+ snprintf(buffer, sizeof(buffer),
+ "illegal memory access at 0x%x, pc=0x%x\n",
+ addr, fault_pc);
+ SimulatorDebugger dbg(this);
+ dbg.Stop(instr, buffer);
+ // The debugger will return control in non-interactive mode.
+ FATAL("Cannot continue execution after illegal memory access.");
+}
+
+
+// Processor versions prior to ARMv7 could not do unaligned reads and writes.
+// On some ARM platforms an interrupt is caused. On others it does a funky
+// rotation thing. However, from version v7, unaligned access is supported.
+// Note that simulator runs have the runtime system running directly on the host
+// system and only generated code is executed in the simulator. Since the host
+// is typically IA32 we will get the correct ARMv7-like behaviour on unaligned
+// accesses, but we should actually not generate code accessing unaligned data,
+// so we still want to know and abort if we encounter such code.
+void Simulator::UnalignedAccess(const char* msg, uword addr, Instr* instr) {
+ // The debugger will not be able to single step past this instruction, but
+ // it will be possible to disassemble the code and inspect registers.
+ char buffer[64];
+ snprintf(buffer, sizeof(buffer),
+ "unaligned %s at 0x%x, pc=%p\n", msg, addr, instr);
+ SimulatorDebugger dbg(this);
+ dbg.Stop(instr, buffer);
+ // The debugger will return control in non-interactive mode.
+ FATAL("Cannot continue execution after unaligned access.");
+}
+
+
+int Simulator::ReadW(uword addr, Instr* instr) {
+ static StatsCounter counter_read_w("Simulated word reads");
+ counter_read_w.Increment();
+ if ((addr & 3) == 0) {
+ intptr_t* ptr = reinterpret_cast<intptr_t*>(addr);
+ return *ptr;
+ }
+ UnalignedAccess("read", addr, instr);
+ return 0;
+}
+
+
+void Simulator::WriteW(uword addr, int value, Instr* instr) {
+ static StatsCounter counter_write_w("Simulated word writes");
+ counter_write_w.Increment();
+ if ((addr & 3) == 0) {
+ intptr_t* ptr = reinterpret_cast<intptr_t*>(addr);
+ *ptr = value;
+ return;
+ }
+ UnalignedAccess("write", addr, instr);
+}
+
+
+uint16_t Simulator::ReadHU(uword addr, Instr* instr) {
+ static StatsCounter counter_read_hu("Simulated unsigned halfword reads");
+ counter_read_hu.Increment();
+ if ((addr & 1) == 0) {
+ uint16_t* ptr = reinterpret_cast<uint16_t*>(addr);
+ return *ptr;
+ }
+ UnalignedAccess("unsigned halfword read", addr, instr);
+ return 0;
+}
+
+
+int16_t Simulator::ReadH(uword addr, Instr* instr) {
+ static StatsCounter counter_read_h("Simulated signed halfword reads");
+ counter_read_h.Increment();
+ if ((addr & 1) == 0) {
+ int16_t* ptr = reinterpret_cast<int16_t*>(addr);
+ return *ptr;
+ }
+ UnalignedAccess("signed halfword read", addr, instr);
+ return 0;
+}
+
+
+void Simulator::WriteH(uword addr, uint16_t value, Instr* instr) {
+ static StatsCounter counter_write_h("Simulated halfword writes");
+ counter_write_h.Increment();
+ if ((addr & 1) == 0) {
+ uint16_t* ptr = reinterpret_cast<uint16_t*>(addr);
+ *ptr = value;
+ return;
+ }
+ UnalignedAccess("halfword write", addr, instr);
+}
+
+
+uint8_t Simulator::ReadBU(uword addr) {
+ static StatsCounter counter_read_bu("Simulated unsigned byte reads");
+ counter_read_bu.Increment();
+ uint8_t* ptr = reinterpret_cast<uint8_t*>(addr);
+ return *ptr;
+}
+
+
+int8_t Simulator::ReadB(uword addr) {
+ static StatsCounter counter_read_b("Simulated signed byte reads");
+ counter_read_b.Increment();
+ int8_t* ptr = reinterpret_cast<int8_t*>(addr);
+ return *ptr;
+}
+
+
+void Simulator::WriteB(uword addr, uint8_t value) {
+ static StatsCounter counter_write_b("Simulated byte writes");
+ counter_write_b.Increment();
+ uint8_t* ptr = reinterpret_cast<uint8_t*>(addr);
+ *ptr = value;
+}
+
+
+// Synchronization primitives support.
+void Simulator::ClearExclusive() {
+ // This lock is initialized in Simulator::InitOnce().
+ MutexLocker ml(exclusive_access_lock_);
+ // Set exclusive access to open state for this isolate.
+ HasExclusiveAccessAndOpen(NULL);
+}
+
+
+int Simulator::ReadExclusiveW(uword addr, Instr* instr) {
+ // This lock is initialized in Simulator::InitOnce().
+ MutexLocker ml(exclusive_access_lock_);
+ SetExclusiveAccess(addr);
+ return ReadW(addr, instr);
+}
+
+
+int Simulator::WriteExclusiveW(uword addr, int value, Instr* instr) {
+ // This lock is initialized in Simulator::InitOnce().
+ MutexLocker ml(exclusive_access_lock_);
+ bool write_allowed = HasExclusiveAccessAndOpen(addr);
+ if (write_allowed) {
+ WriteW(addr, value, instr);
+ return 0; // Success.
+ }
+ return 1; // Failure.
+}
+
+
+uword Simulator::CompareExchange(uword* address,
+ uword compare_value,
+ uword new_value) {
+ // This lock is initialized in Simulator::InitOnce().
+ MutexLocker ml(exclusive_access_lock_);
+ uword value = *address;
+ if (value == compare_value) {
+ *address = new_value;
+ // Same effect on exclusive access state as a successful STREX.
+ HasExclusiveAccessAndOpen(reinterpret_cast<uword>(address));
+ } else {
+ // Same effect on exclusive access state as an LDREX.
+ SetExclusiveAccess(reinterpret_cast<uword>(address));
+ }
+ return value;
+}
+
+
+// Returns the top of the stack area to enable checking for stack pointer
+// validity.
+uintptr_t Simulator::StackTop() const {
+ // To be safe in potential stack underflows we leave some buffer above and
+ // set the stack top.
+ return reinterpret_cast<uintptr_t>(stack_) +
+ (Isolate::GetSpecifiedStackSize() + Isolate::kStackSizeBuffer);
+}
+
+
+// Unsupported instructions use Format to print an error and stop execution.
+void Simulator::Format(Instr* instr, const char* format) {
+ OS::Print("Simulator found unsupported instruction:\n 0x%p: %s\n",
+ instr,
+ format);
+ UNIMPLEMENTED();
+}
+
+
+// Checks if the current instruction should be executed based on its
+// condition bits.
+bool Simulator::ConditionallyExecute(Instr* instr) {
+ switch (instr->ConditionField()) {
+ case EQ: return z_flag_;
+ case NE: return !z_flag_;
+ case CS: return c_flag_;
+ case CC: return !c_flag_;
+ case MI: return n_flag_;
+ case PL: return !n_flag_;
+ case VS: return v_flag_;
+ case VC: return !v_flag_;
+ case HI: return c_flag_ && !z_flag_;
+ case LS: return !c_flag_ || z_flag_;
+ case GE: return n_flag_ == v_flag_;
+ case LT: return n_flag_ != v_flag_;
+ case GT: return !z_flag_ && (n_flag_ == v_flag_);
+ case LE: return z_flag_ || (n_flag_ != v_flag_);
+ case AL: return true;
+ default: UNREACHABLE();
+ }
+ return false;
+}
+
+
+// Calculate and set the Negative and Zero flags.
+void Simulator::SetNZFlags(int32_t val) {
+ n_flag_ = (val < 0);
+ z_flag_ = (val == 0);
+}
+
+
+// Set the Carry flag.
+void Simulator::SetCFlag(bool val) {
+ c_flag_ = val;
+}
+
+
+// Set the oVerflow flag.
+void Simulator::SetVFlag(bool val) {
+ v_flag_ = val;
+}
+
+
+// Calculate C flag value for additions.
+bool Simulator::CarryFrom(int32_t left, int32_t right) {
+ uint32_t uleft = static_cast<uint32_t>(left);
+ uint32_t uright = static_cast<uint32_t>(right);
+ uint32_t urest = 0xffffffffU - uleft;
+
+ return (uright > urest);
+}
+
+
+// Calculate C flag value for subtractions.
+bool Simulator::BorrowFrom(int32_t left, int32_t right) {
+ uint32_t uleft = static_cast<uint32_t>(left);
+ uint32_t uright = static_cast<uint32_t>(right);
+
+ return (uright > uleft);
+}
+
+
+// Calculate V flag value for additions and subtractions.
+bool Simulator::OverflowFrom(int32_t alu_out,
+ int32_t left, int32_t right, bool addition) {
+ bool overflow;
+ if (addition) {
+ // operands have the same sign
+ overflow = ((left >= 0 && right >= 0) || (left < 0 && right < 0))
+ // and operands and result have different sign
+ && ((left < 0 && alu_out >= 0) || (left >= 0 && alu_out < 0));
+ } else {
+ // operands have different signs
+ overflow = ((left < 0 && right >= 0) || (left >= 0 && right < 0))
+ // and first operand and result have different signs
+ && ((left < 0 && alu_out >= 0) || (left >= 0 && alu_out < 0));
+ }
+ return overflow;
+}
+
+
+// Addressing Mode 1 - Data-processing operands:
+// Get the value based on the shifter_operand with register.
+int32_t Simulator::GetShiftRm(Instr* instr, bool* carry_out) {
+ Shift shift = instr->ShiftField();
+ int shift_amount = instr->ShiftAmountField();
+ int32_t result = get_register(instr->RmField());
+ if (instr->Bit(4) == 0) {
+ // by immediate
+ if ((shift == ROR) && (shift_amount == 0)) {
+ UNIMPLEMENTED();
+ return result;
+ } else if (((shift == LSR) || (shift == ASR)) && (shift_amount == 0)) {
+ shift_amount = 32;
+ }
+ switch (shift) {
+ case ASR: {
+ if (shift_amount == 0) {
+ if (result < 0) {
+ result = 0xffffffff;
+ *carry_out = true;
+ } else {
+ result = 0;
+ *carry_out = false;
+ }
+ } else {
+ result >>= (shift_amount - 1);
+ *carry_out = (result & 1) == 1;
+ result >>= 1;
+ }
+ break;
+ }
+
+ case LSL: {
+ if (shift_amount == 0) {
+ *carry_out = c_flag_;
+ } else {
+ result <<= (shift_amount - 1);
+ *carry_out = (result < 0);
+ result <<= 1;
+ }
+ break;
+ }
+
+ case LSR: {
+ if (shift_amount == 0) {
+ result = 0;
+ *carry_out = c_flag_;
+ } else {
+ uint32_t uresult = static_cast<uint32_t>(result);
+ uresult >>= (shift_amount - 1);
+ *carry_out = (uresult & 1) == 1;
+ uresult >>= 1;
+ result = static_cast<int32_t>(uresult);
+ }
+ break;
+ }
+
+ case ROR: {
+ UNIMPLEMENTED();
+ break;
+ }
+
+ default: {
+ UNREACHABLE();
+ break;
+ }
+ }
+ } else {
+ // by register
+ Register rs = instr->RsField();
+ shift_amount = get_register(rs) &0xff;
+ switch (shift) {
+ case ASR: {
+ if (shift_amount == 0) {
+ *carry_out = c_flag_;
+ } else if (shift_amount < 32) {
+ result >>= (shift_amount - 1);
+ *carry_out = (result & 1) == 1;
+ result >>= 1;
+ } else {
+ ASSERT(shift_amount >= 32);
+ if (result < 0) {
+ *carry_out = true;
+ result = 0xffffffff;
+ } else {
+ *carry_out = false;
+ result = 0;
+ }
+ }
+ break;
+ }
+
+ case LSL: {
+ if (shift_amount == 0) {
+ *carry_out = c_flag_;
+ } else if (shift_amount < 32) {
+ result <<= (shift_amount - 1);
+ *carry_out = (result < 0);
+ result <<= 1;
+ } else if (shift_amount == 32) {
+ *carry_out = (result & 1) == 1;
+ result = 0;
+ } else {
+ ASSERT(shift_amount > 32);
+ *carry_out = false;
+ result = 0;
+ }
+ break;
+ }
+
+ case LSR: {
+ if (shift_amount == 0) {
+ *carry_out = c_flag_;
+ } else if (shift_amount < 32) {
+ uint32_t uresult = static_cast<uint32_t>(result);
+ uresult >>= (shift_amount - 1);
+ *carry_out = (uresult & 1) == 1;
+ uresult >>= 1;
+ result = static_cast<int32_t>(uresult);
+ } else if (shift_amount == 32) {
+ *carry_out = (result < 0);
+ result = 0;
+ } else {
+ *carry_out = false;
+ result = 0;
+ }
+ break;
+ }
+
+ case ROR: {
+ UNIMPLEMENTED();
+ break;
+ }
+
+ default: {
+ UNREACHABLE();
+ break;
+ }
+ }
+ }
+ return result;
+}
+
+
+// Addressing Mode 1 - Data-processing operands:
+// Get the value based on the shifter_operand with immediate.
+int32_t Simulator::GetImm(Instr* instr, bool* carry_out) {
+ int rotate = instr->RotateField() * 2;
+ int immed8 = instr->Immed8Field();
+ int imm = (immed8 >> rotate) | (immed8 << (32 - rotate));
+ *carry_out = (rotate == 0) ? c_flag_ : (imm < 0);
+ return imm;
+}
+
+
+static int count_bits(int bit_vector) {
+ int count = 0;
+ while (bit_vector != 0) {
+ if ((bit_vector & 1) != 0) {
+ count++;
+ }
+ bit_vector >>= 1;
+ }
+ return count;
+}
+
+
+// Addressing Mode 4 - Load and Store Multiple
+void Simulator::HandleRList(Instr* instr, bool load) {
+ Register rn = instr->RnField();
+ int32_t rn_val = get_register(rn);
+ int rlist = instr->RlistField();
+ int num_regs = count_bits(rlist);
+
+ uword address = 0;
+ uword end_address = 0;
+ switch (instr->PUField()) {
+ case 0: {
+ // Print("da");
+ address = rn_val - (num_regs * 4) + 4;
+ end_address = rn_val + 4;
+ rn_val = rn_val - (num_regs * 4);
+ break;
+ }
+ case 1: {
+ // Print("ia");
+ address = rn_val;
+ end_address = rn_val + (num_regs * 4);
+ rn_val = rn_val + (num_regs * 4);
+ break;
+ }
+ case 2: {
+ // Print("db");
+ address = rn_val - (num_regs * 4);
+ end_address = rn_val;
+ rn_val = address;
+ break;
+ }
+ case 3: {
+ // Print("ib");
+ address = rn_val + 4;
+ end_address = rn_val + (num_regs * 4) + 4;
+ rn_val = rn_val + (num_regs * 4);
+ break;
+ }
+ default: {
+ UNREACHABLE();
+ break;
+ }
+ }
+ if (IsIllegalAddress(address)) {
+ HandleIllegalAccess(address, instr);
+ } else {
+ if (instr->HasW()) {
+ set_register(rn, rn_val);
+ }
+ int reg = 0;
+ while (rlist != 0) {
+ if ((rlist & 1) != 0) {
+ if (load) {
+ set_register(static_cast<Register>(reg), ReadW(address, instr));
+ } else {
+ WriteW(address, get_register(static_cast<Register>(reg)), instr);
+ }
+ address += 4;
+ }
+ reg++;
+ rlist >>= 1;
+ }
+ ASSERT(end_address == address);
+ }
+}
+
+
+// Calls into the Dart runtime are based on this simple interface.
+typedef void (*SimulatorRuntimeCall)(NativeArguments arguments);
+
+
+static void PrintExternalCallTrace(intptr_t external,
+ NativeArguments arguments) {
+ // TODO(regis): Do a reverse lookup on this address and print the symbol.
+ UNIMPLEMENTED();
+}
+
+
+void Simulator::SupervisorCall(Instr* instr) {
+ int svc = instr->SvcField();
+ switch (svc) {
+ case kRedirectionSvcCode: {
+ SimulatorSetjmpBuffer buffer(this);
+
+ if (!setjmp(buffer.buffer_)) {
+ NativeArguments arguments;
+ ASSERT(sizeof(NativeArguments) == 4*kWordSize);
+ arguments.isolate_ = reinterpret_cast<Isolate*>(get_register(R0));
+ arguments.argc_tag_ = get_register(R1);
+ arguments.argv_ = reinterpret_cast<RawObject*(*)[]>(get_register(R2));
+ arguments.retval_ = reinterpret_cast<RawObject**>(get_register(R3));
+
+ int32_t saved_lr = get_register(LR);
+ Redirection* redirection = Redirection::FromSvcInstruction(instr);
+ intptr_t external =
+ reinterpret_cast<intptr_t>(redirection->external_function());
+ SimulatorRuntimeCall target =
+ reinterpret_cast<SimulatorRuntimeCall>(external);
+ if (FLAG_trace_sim) {
+ PrintExternalCallTrace(external, arguments);
+ }
+ target(arguments);
+
+ // Zap caller-saved registers, since the actual runtime call could have
+ // used them.
+ set_register(R2, icount_);
+ set_register(R3, icount_);
+ set_register(IP, icount_);
+ set_register(LR, icount_);
+ float zap_fvalue = static_cast<float>(icount_);
+ for (int i = S0; i <= S15; i++) {
+ set_sregister(static_cast<SRegister>(i), zap_fvalue);
+ }
+#ifdef VFPv3_D32
+ double zap_dvalue = static_cast<double>(icount_);
+ for (int i = D16; i <= D31; i++) {
+ set_dregister(static_cast<DRegister>(i), zap_dvalue);
+ }
+#endif // VFPv3_D32
+
+ // Zap result register pair R0:R1 and return.
+ set_register(R0, icount_);
+ set_register(R1, icount_);
+ set_pc(saved_lr);
+ }
+
+ break;
+ }
+ case kBreakpointSvcCode: {
+ SimulatorDebugger dbg(this);
+ dbg.Stop(instr, "breakpoint");
+ break;
+ }
+ case kStopMessageSvcCode: {
+ SimulatorDebugger dbg(this);
+ const char* message = *reinterpret_cast<const char**>(
+ reinterpret_cast<intptr_t>(instr) - Instr::kInstrSize);
+ set_pc(get_pc() + Instr::kInstrSize);
+ dbg.Stop(instr, message);
+ break;
+ }
+ case kWordSpillMarkerSvcCode: {
+ static StatsCounter counter_spill_w("Simulated word spills");
+ counter_spill_w.Increment();
+ break;
+ }
+ case kDWordSpillMarkerSvcCode: {
+ static StatsCounter counter_spill_d("Simulated double word spills");
+ counter_spill_d.Increment();
+ break;
+ }
+ default: {
+ UNREACHABLE();
+ break;
+ }
+ }
+}
+
+
+// Handle execution based on instruction types.
+
+// Instruction types 0 and 1 are both rolled into one function because they
+// only differ in the handling of the shifter_operand.
+void Simulator::DecodeType01(Instr* instr) {
+ if (!instr->IsDataProcessing()) {
+ // miscellaneous, multiply, sync primitives, extra loads and stores.
+ if (instr->IsMiscellaneous()) {
+ switch (instr->Bits(4, 3)) {
+ case 1: {
+ ASSERT(instr->Bits(21, 2) == 0x3);
+ // Format(instr, "clz'cond 'rd, 'rm");
+ Register rm = instr->RmField();
+ Register rd = instr->RdField();
+ int32_t rm_val = get_register(rm);
+ int32_t rd_val = 0;
+ if (rm_val != 0) {
+ while (rm_val > 0) {
+ rd_val++;
+ rm_val <<= 1;
+ }
+ } else {
+ rd_val = 32;
+ }
+ set_register(rd, rd_val);
+ break;
+ }
+ case 3: {
+ ASSERT(instr->Bits(21, 2) == 0x1);
+ // Format(instr, "blx'cond 'rm");
+ Register rm = instr->RmField();
+ int32_t rm_val = get_register(rm);
+ intptr_t pc = get_pc();
+ set_register(LR, pc + Instr::kInstrSize);
+ set_pc(rm_val);
+ break;
+ }
+ case 7: {
+ if (instr->Bits(21, 2) == 0x1) {
+ // Format(instr, "bkpt #'imm12_4");
+ SimulatorDebugger dbg(this);
+ set_pc(get_pc() + Instr::kInstrSize);
+ char buffer[32];
+ snprintf(buffer, sizeof(buffer), "bkpt #0x%x", instr->BkptField());
+ dbg.Stop(instr, buffer);
+ } else {
+ // Format(instr, "smc'cond");
+ UNIMPLEMENTED();
+ }
+ break;
+ }
+ default: {
+ UNIMPLEMENTED();
+ break;
+ }
+ }
+ } else if (instr->IsMultiplyOrSyncPrimitive()) {
+ if (instr->Bit(24) == 0) {
+ // multiply instructions.
+ Register rn = instr->RnField();
+ Register rd = instr->RdField();
+ Register rs = instr->RsField();
+ Register rm = instr->RmField();
+ int32_t rm_val = get_register(rm);
+ int32_t rs_val = get_register(rs);
+ int32_t rd_val = 0;
+ switch (instr->Bits(21, 3)) {
+ case 1:
+ // Registers rd, rn, rm, ra are encoded as rn, rm, rs, rd.
+ // Format(instr, "mla'cond's 'rn, 'rm, 'rs, 'rd");
+ case 3: {
+ // Registers rd, rn, rm, ra are encoded as rn, rm, rs, rd.
+ // Format(instr, "mls'cond's 'rn, 'rm, 'rs, 'rd");
+ rd_val = get_register(rd);
+ // fall through
+ }
+ case 0: {
+ // Registers rd, rn, rm are encoded as rn, rm, rs.
+ // Format(instr, "mul'cond's 'rn, 'rm, 'rs");
+ int32_t alu_out = rm_val * rs_val;
+ if (instr->Bits(21, 3) == 3) { // mls
+ alu_out = -alu_out;
+ }
+ alu_out += rd_val;
+ set_register(rn, alu_out);
+ if (instr->HasS()) {
+ SetNZFlags(alu_out);
+ }
+ break;
+ }
+ case 4: {
+ // Registers rd_lo, rd_hi, rn, rm are encoded as rd, rn, rm, rs.
+ // Format(instr, "umull'cond's 'rd, 'rn, 'rm, 'rs");
+ uint64_t left_op = static_cast<uint32_t>(rm_val);
+ uint64_t right_op = static_cast<uint32_t>(rs_val);
+ uint64_t result = left_op * right_op;
+ int32_t hi_res = Utils::High32Bits(result);
+ int32_t lo_res = Utils::Low32Bits(result);
+ set_register(rd, lo_res);
+ set_register(rn, hi_res);
+ if (instr->HasS()) {
+ if (lo_res != 0) {
+ // Collapse bits 0..31 into bit 32 so that 32-bit Z check works.
+ hi_res |= 1;
+ }
+ ASSERT((result == 0) == (hi_res == 0)); // Z bit
+ ASSERT(((result & (1LL << 63)) != 0) == (hi_res < 0)); // N bit
+ SetNZFlags(hi_res);
+ }
+ break;
+ }
+ default: {
+ UNIMPLEMENTED();
+ break;
+ }
+ }
+ } else {
+ // synchronization primitives
+ Register rd = instr->RdField();
+ Register rn = instr->RnField();
+ uword addr = get_register(rn);
+ switch (instr->Bits(20, 4)) {
+ case 8: {
+ // Format(instr, "strex'cond 'rd, 'rm, ['rn]");
+ if (IsIllegalAddress(addr)) {
+ HandleIllegalAccess(addr, instr);
+ } else {
+ Register rm = instr->RmField();
+ set_register(rd, WriteExclusiveW(addr, get_register(rm), instr));
+ }
+ break;
+ }
+ case 9: {
+ // Format(instr, "ldrex'cond 'rd, ['rn]");
+ if (IsIllegalAddress(addr)) {
+ HandleIllegalAccess(addr, instr);
+ } else {
+ set_register(rd, ReadExclusiveW(addr, instr));
+ }
+ break;
+ }
+ default: {
+ UNIMPLEMENTED();
+ break;
+ }
+ }
+ }
+ } else if (instr->Bit(25) == 1) {
+ // 16-bit immediate loads, msr (immediate), and hints
+ switch (instr->Bits(20, 5)) {
+ case 16:
+ case 20: {
+ uint16_t imm16 = instr->MovwField();
+ Register rd = instr->RdField();
+ if (instr->Bit(22) == 0) {
+ // Format(instr, "movw'cond 'rd, #'imm4_12");
+ set_register(rd, imm16);
+ } else {
+ // Format(instr, "movt'cond 'rd, #'imm4_12");
+ set_register(rd, (get_register(rd) & 0xffff) | (imm16 << 16));
+ }
+ break;
+ }
+ case 18: {
+ if ((instr->Bits(16, 4) == 0) && (instr->Bits(0, 8) == 0)) {
+ // Format(instr, "nop'cond");
+ } else {
+ UNIMPLEMENTED();
+ }
+ break;
+ }
+ default: {
+ UNIMPLEMENTED();
+ break;
+ }
+ }
+ } else {
+ // extra load/store instructions
+ Register rd = instr->RdField();
+ Register rn = instr->RnField();
+ int32_t rn_val = get_register(rn);
+ uword addr = 0;
+ bool write_back = false;
+ if (instr->Bit(22) == 0) {
+ Register rm = instr->RmField();
+ int32_t rm_val = get_register(rm);
+ switch (instr->PUField()) {
+ case 0: {
+ // Format(instr, "'memop'cond'x 'rd2, ['rn], -'rm");
+ ASSERT(!instr->HasW());
+ addr = rn_val;
+ rn_val -= rm_val;
+ write_back = true;
+ break;
+ }
+ case 1: {
+ // Format(instr, "'memop'cond'x 'rd2, ['rn], +'rm");
+ ASSERT(!instr->HasW());
+ addr = rn_val;
+ rn_val += rm_val;
+ write_back = true;
+ break;
+ }
+ case 2: {
+ // Format(instr, "'memop'cond'x 'rd2, ['rn, -'rm]'w");
+ rn_val -= rm_val;
+ addr = rn_val;
+ write_back = instr->HasW();
+ break;
+ }
+ case 3: {
+ // Format(instr, "'memop'cond'x 'rd2, ['rn, +'rm]'w");
+ rn_val += rm_val;
+ addr = rn_val;
+ write_back = instr->HasW();
+ break;
+ }
+ default: {
+ // The PU field is a 2-bit field.
+ UNREACHABLE();
+ break;
+ }
+ }
+ } else {
+ int32_t imm_val = (instr->ImmedHField() << 4) | instr->ImmedLField();
+ switch (instr->PUField()) {
+ case 0: {
+ // Format(instr, "'memop'cond'x 'rd2, ['rn], #-'off8");
+ ASSERT(!instr->HasW());
+ addr = rn_val;
+ rn_val -= imm_val;
+ write_back = true;
+ break;
+ }
+ case 1: {
+ // Format(instr, "'memop'cond'x 'rd2, ['rn], #+'off8");
+ ASSERT(!instr->HasW());
+ addr = rn_val;
+ rn_val += imm_val;
+ write_back = true;
+ break;
+ }
+ case 2: {
+ // Format(instr, "'memop'cond'x 'rd2, ['rn, #-'off8]'w");
+ rn_val -= imm_val;
+ addr = rn_val;
+ write_back = instr->HasW();
+ break;
+ }
+ case 3: {
+ // Format(instr, "'memop'cond'x 'rd2, ['rn, #+'off8]'w");
+ rn_val += imm_val;
+ addr = rn_val;
+ write_back = instr->HasW();
+ break;
+ }
+ default: {
+ // The PU field is a 2-bit field.
+ UNREACHABLE();
+ break;
+ }
+ }
+ }
+ if (IsIllegalAddress(addr)) {
+ HandleIllegalAccess(addr, instr);
+ } else {
+ if (write_back) {
+ set_register(rn, rn_val);
+ }
+ if (!instr->HasSign()) {
+ if (instr->HasL()) {
+ uint16_t val = ReadHU(addr, instr);
+ set_register(rd, val);
+ } else {
+ uint16_t val = get_register(rd);
+ WriteH(addr, val, instr);
+ }
+ } else if (instr->HasL()) {
+ if (instr->HasH()) {
+ int16_t val = ReadH(addr, instr);
+ set_register(rd, val);
+ } else {
+ int8_t val = ReadB(addr);
+ set_register(rd, val);
+ }
+ } else if ((rd & 1) == 0) {
+ Register rd1 = static_cast<Register>(rd | 1);
+ ASSERT(rd1 < kNumberOfCpuRegisters);
+ if (instr->HasH()) {
+ int32_t val_low = get_register(rd);
+ int32_t val_high = get_register(rd1);
+ WriteW(addr, val_low, instr);
+ WriteW(addr + 4, val_high, instr);
+ } else {
+ int32_t val_low = ReadW(addr, instr);
+ int32_t val_high = ReadW(addr + 4, instr);
+ set_register(rd, val_low);
+ set_register(rd1, val_high);
+ }
+ } else {
+ UNIMPLEMENTED();
+ }
+ }
+ }
+ } else {
+ Register rd = instr->RdField();
+ Register rn = instr->RnField();
+ int32_t rn_val = get_register(rn);
+ int32_t shifter_operand = 0;
+ bool shifter_carry_out = 0;
+ if (instr->TypeField() == 0) {
+ shifter_operand = GetShiftRm(instr, &shifter_carry_out);
+ } else {
+ ASSERT(instr->TypeField() == 1);
+ shifter_operand = GetImm(instr, &shifter_carry_out);
+ }
+ int32_t alu_out;
+
+ switch (instr->OpcodeField()) {
+ case AND: {
+ // Format(instr, "and'cond's 'rd, 'rn, 'shift_rm");
+ // Format(instr, "and'cond's 'rd, 'rn, 'imm");
+ alu_out = rn_val & shifter_operand;
+ set_register(rd, alu_out);
+ if (instr->HasS()) {
+ SetNZFlags(alu_out);
+ SetCFlag(shifter_carry_out);
+ }
+ break;
+ }
+
+ case EOR: {
+ // Format(instr, "eor'cond's 'rd, 'rn, 'shift_rm");
+ // Format(instr, "eor'cond's 'rd, 'rn, 'imm");
+ alu_out = rn_val ^ shifter_operand;
+ set_register(rd, alu_out);
+ if (instr->HasS()) {
+ SetNZFlags(alu_out);
+ SetCFlag(shifter_carry_out);
+ }
+ break;
+ }
+
+ case SUB: {
+ // Format(instr, "sub'cond's 'rd, 'rn, 'shift_rm");
+ // Format(instr, "sub'cond's 'rd, 'rn, 'imm");
+ alu_out = rn_val - shifter_operand;
+ set_register(rd, alu_out);
+ if (instr->HasS()) {
+ SetNZFlags(alu_out);
+ SetCFlag(!BorrowFrom(rn_val, shifter_operand));
+ SetVFlag(OverflowFrom(alu_out, rn_val, shifter_operand, false));
+ }
+ break;
+ }
+
+ case RSB: {
+ // Format(instr, "rsb'cond's 'rd, 'rn, 'shift_rm");
+ // Format(instr, "rsb'cond's 'rd, 'rn, 'imm");
+ alu_out = shifter_operand - rn_val;
+ set_register(rd, alu_out);
+ if (instr->HasS()) {
+ SetNZFlags(alu_out);
+ SetCFlag(!BorrowFrom(shifter_operand, rn_val));
+ SetVFlag(OverflowFrom(alu_out, shifter_operand, rn_val, false));
+ }
+ break;
+ }
+
+ case ADD: {
+ // Format(instr, "add'cond's 'rd, 'rn, 'shift_rm");
+ // Format(instr, "add'cond's 'rd, 'rn, 'imm");
+ alu_out = rn_val + shifter_operand;
+ set_register(rd, alu_out);
+ if (instr->HasS()) {
+ SetNZFlags(alu_out);
+ SetCFlag(CarryFrom(rn_val, shifter_operand));
+ SetVFlag(OverflowFrom(alu_out, rn_val, shifter_operand, true));
+ }
+ break;
+ }
+
+ case ADC: {
+ // Format(instr, "adc'cond's 'rd, 'rn, 'shift_rm");
+ // Format(instr, "adc'cond's 'rd, 'rn, 'imm");
+ alu_out = rn_val + shifter_operand + (c_flag_ ? 1 : 0);
+ set_register(rd, alu_out);
+ if (instr->HasS()) {
+ SetNZFlags(alu_out);
+ SetCFlag(CarryFrom(rn_val, shifter_operand));
+ SetVFlag(OverflowFrom(alu_out, rn_val, shifter_operand, true));
+ }
+ break;
+ }
+
+ case SBC: {
+ // Format(instr, "sbc'cond's 'rd, 'rn, 'shift_rm");
+ // Format(instr, "sbc'cond's 'rd, 'rn, 'imm");
+ alu_out = rn_val - shifter_operand - (!c_flag_ ? 1 : 0);
+ set_register(rd, alu_out);
+ if (instr->HasS()) {
+ SetNZFlags(alu_out);
+ SetCFlag(!BorrowFrom(rn_val, shifter_operand));
+ SetVFlag(OverflowFrom(alu_out, rn_val, shifter_operand, false));
+ }
+ break;
+ }
+
+ case RSC: {
+ // Format(instr, "rsc'cond's 'rd, 'rn, 'shift_rm");
+ // Format(instr, "rsc'cond's 'rd, 'rn, 'imm");
+ alu_out = shifter_operand - rn_val - (!c_flag_ ? 1 : 0);
+ set_register(rd, alu_out);
+ if (instr->HasS()) {
+ SetNZFlags(alu_out);
+ SetCFlag(!BorrowFrom(shifter_operand, rn_val));
+ SetVFlag(OverflowFrom(alu_out, shifter_operand, rn_val, false));
+ }
+ break;
+ }
+
+ case TST: {
+ if (instr->HasS()) {
+ // Format(instr, "tst'cond 'rn, 'shift_rm");
+ // Format(instr, "tst'cond 'rn, 'imm");
+ alu_out = rn_val & shifter_operand;
+ SetNZFlags(alu_out);
+ SetCFlag(shifter_carry_out);
+ } else {
+ UNIMPLEMENTED();
+ }
+ break;
+ }
+
+ case TEQ: {
+ if (instr->HasS()) {
+ // Format(instr, "teq'cond 'rn, 'shift_rm");
+ // Format(instr, "teq'cond 'rn, 'imm");
+ alu_out = rn_val ^ shifter_operand;
+ SetNZFlags(alu_out);
+ SetCFlag(shifter_carry_out);
+ } else {
+ UNIMPLEMENTED();
+ }
+ break;
+ }
+
+ case CMP: {
+ if (instr->HasS()) {
+ // Format(instr, "cmp'cond 'rn, 'shift_rm");
+ // Format(instr, "cmp'cond 'rn, 'imm");
+ alu_out = rn_val - shifter_operand;
+ SetNZFlags(alu_out);
+ SetCFlag(!BorrowFrom(rn_val, shifter_operand));
+ SetVFlag(OverflowFrom(alu_out, rn_val, shifter_operand, false));
+ } else {
+ UNIMPLEMENTED();
+ }
+ break;
+ }
+
+ case CMN: {
+ if (instr->HasS()) {
+ // Format(instr, "cmn'cond 'rn, 'shift_rm");
+ // Format(instr, "cmn'cond 'rn, 'imm");
+ alu_out = rn_val + shifter_operand;
+ SetNZFlags(alu_out);
+ SetCFlag(CarryFrom(rn_val, shifter_operand));
+ SetVFlag(OverflowFrom(alu_out, rn_val, shifter_operand, true));
+ } else {
+ UNIMPLEMENTED();
+ }
+ break;
+ }
+
+ case ORR: {
+ // Format(instr, "orr'cond's 'rd, 'rn, 'shift_rm");
+ // Format(instr, "orr'cond's 'rd, 'rn, 'imm");
+ alu_out = rn_val | shifter_operand;
+ set_register(rd, alu_out);
+ if (instr->HasS()) {
+ SetNZFlags(alu_out);
+ SetCFlag(shifter_carry_out);
+ }
+ break;
+ }
+
+ case MOV: {
+ // Format(instr, "mov'cond's 'rd, 'shift_rm");
+ // Format(instr, "mov'cond's 'rd, 'imm");
+ alu_out = shifter_operand;
+ set_register(rd, alu_out);
+ if (instr->HasS()) {
+ SetNZFlags(alu_out);
+ SetCFlag(shifter_carry_out);
+ }
+ break;
+ }
+
+ case BIC: {
+ // Format(instr, "bic'cond's 'rd, 'rn, 'shift_rm");
+ // Format(instr, "bic'cond's 'rd, 'rn, 'imm");
+ alu_out = rn_val & ~shifter_operand;
+ set_register(rd, alu_out);
+ if (instr->HasS()) {
+ SetNZFlags(alu_out);
+ SetCFlag(shifter_carry_out);
+ }
+ break;
+ }
+
+ case MVN: {
+ // Format(instr, "mvn'cond's 'rd, 'shift_rm");
+ // Format(instr, "mvn'cond's 'rd, 'imm");
+ alu_out = ~shifter_operand;
+ set_register(rd, alu_out);
+ if (instr->HasS()) {
+ SetNZFlags(alu_out);
+ SetCFlag(shifter_carry_out);
+ }
+ break;
+ }
+
+ default: {
+ UNREACHABLE();
+ break;
+ }
+ }
+ }
+}
+
+
+void Simulator::DecodeType2(Instr* instr) {
+ Register rd = instr->RdField();
+ Register rn = instr->RnField();
+ int32_t rn_val = get_register(rn);
+ int32_t im_val = instr->Offset12Field();
+ uword addr = 0;
+ bool write_back = false;
+ switch (instr->PUField()) {
+ case 0: {
+ // Format(instr, "'memop'cond'b 'rd, ['rn], #-'off12");
+ ASSERT(!instr->HasW());
+ addr = rn_val;
+ rn_val -= im_val;
+ write_back = true;
+ break;
+ }
+ case 1: {
+ // Format(instr, "'memop'cond'b 'rd, ['rn], #+'off12");
+ ASSERT(!instr->HasW());
+ addr = rn_val;
+ rn_val += im_val;
+ write_back = true;
+ break;
+ }
+ case 2: {
+ // Format(instr, "'memop'cond'b 'rd, ['rn, #-'off12]'w");
+ rn_val -= im_val;
+ addr = rn_val;
+ write_back = instr->HasW();
+ break;
+ }
+ case 3: {
+ // Format(instr, "'memop'cond'b 'rd, ['rn, #+'off12]'w");
+ rn_val += im_val;
+ addr = rn_val;
+ write_back = instr->HasW();
+ break;
+ }
+ default: {
+ UNREACHABLE();
+ break;
+ }
+ }
+ if (IsIllegalAddress(addr)) {
+ HandleIllegalAccess(addr, instr);
+ } else {
+ if (write_back) {
+ set_register(rn, rn_val);
+ }
+ if (instr->HasB()) {
+ if (instr->HasL()) {
+ unsigned char val = ReadBU(addr);
+ set_register(rd, val);
+ } else {
+ unsigned char val = get_register(rd);
+ WriteB(addr, val);
+ }
+ } else {
+ if (instr->HasL()) {
+ set_register(rd, ReadW(addr, instr));
+ } else {
+ WriteW(addr, get_register(rd), instr);
+ }
+ }
+ }
+}
+
+
+void Simulator::DecodeType3(Instr* instr) {
+ Register rd = instr->RdField();
+ Register rn = instr->RnField();
+ int32_t rn_val = get_register(rn);
+ bool shifter_carry_out = 0;
+ int32_t shifter_operand = GetShiftRm(instr, &shifter_carry_out);
+ uword addr = 0;
+ bool write_back = false;
+ switch (instr->PUField()) {
+ case 0: {
+ // Format(instr, "'memop'cond'b 'rd, ['rn], -'shift_rm");
+ ASSERT(!instr->HasW());
+ addr = rn_val;
+ rn_val -= shifter_operand;
+ write_back = true;
+ break;
+ }
+ case 1: {
+ // Format(instr, "'memop'cond'b 'rd, ['rn], +'shift_rm");
+ ASSERT(!instr->HasW());
+ addr = rn_val;
+ rn_val += shifter_operand;
+ write_back = true;
+ break;
+ }
+ case 2: {
+ // Format(instr, "'memop'cond'b 'rd, ['rn, -'shift_rm]'w");
+ rn_val -= shifter_operand;
+ addr = rn_val;
+ write_back = instr->HasW();
+ break;
+ }
+ case 3: {
+ // Format(instr, "'memop'cond'b 'rd, ['rn, +'shift_rm]'w");
+ rn_val += shifter_operand;
+ addr = rn_val;
+ write_back = instr->HasW();
+ break;
+ }
+ default: {
+ UNREACHABLE();
+ break;
+ }
+ }
+ if (IsIllegalAddress(addr)) {
+ HandleIllegalAccess(addr, instr);
+ } else {
+ if (write_back) {
+ set_register(rn, rn_val);
+ }
+ if (instr->HasB()) {
+ if (instr->HasL()) {
+ unsigned char val = ReadBU(addr);
+ set_register(rd, val);
+ } else {
+ unsigned char val = get_register(rd);
+ WriteB(addr, val);
+ }
+ } else {
+ if (instr->HasL()) {
+ set_register(rd, ReadW(addr, instr));
+ } else {
+ WriteW(addr, get_register(rd), instr);
+ }
+ }
+ }
+}
+
+
+void Simulator::DecodeType4(Instr* instr) {
+ ASSERT(instr->Bit(22) == 0); // only allowed to be set in privileged mode
+ if (instr->HasL()) {
+ // Format(instr, "ldm'cond'pu 'rn'w, 'rlist");
+ HandleRList(instr, true);
+ } else {
+ // Format(instr, "stm'cond'pu 'rn'w, 'rlist");
+ HandleRList(instr, false);
+ }
+}
+
+
+void Simulator::DecodeType5(Instr* instr) {
+ // Format(instr, "b'l'cond 'target");
+ int off = (instr->SImmed24Field() << 2) + 8;
+ intptr_t pc = get_pc();
+ if (instr->HasLink()) {
+ set_register(LR, pc + Instr::kInstrSize);
+ }
+ set_pc(pc+off);
+}
+
+
+void Simulator::DecodeType6(Instr* instr) {
+ if (instr->IsVFPDoubleTransfer()) {
+ Register rd = instr->RdField();
+ Register rn = instr->RnField();
+ if (instr->Bit(8) == 0) {
+ SRegister sm = instr->SmField();
+ SRegister sm1 = static_cast<SRegister>(sm + 1);
+ ASSERT(sm1 < kNumberOfSRegisters);
+ if (instr->Bit(20) == 1) {
+ // Format(instr, "vmovrrs'cond 'rd, 'rn, {'sm', 'sm1}");
+ set_register(rd, bit_cast<int32_t, float>(get_sregister(sm)));
+ set_register(rn, bit_cast<int32_t, float>(get_sregister(sm1)));
+ } else {
+ // Format(instr, "vmovsrr'cond {'sm, 'sm1}, 'rd', 'rn");
+ set_sregister(sm, bit_cast<float, int32_t>(get_register(rd)));
+ set_sregister(sm1, bit_cast<float, int32_t>(get_register(rn)));
+ }
+ } else {
+ DRegister dm = instr->DmField();
+ if (instr->Bit(20) == 1) {
+ // Format(instr, "vmovrrd'cond 'rd, 'rn, 'dm");
+ int64_t dm_val = bit_cast<int64_t, double>(get_dregister(dm));
+ set_register(rd, Utils::Low32Bits(dm_val));
+ set_register(rn, Utils::High32Bits(dm_val));
+ } else {
+ // Format(instr, "vmovdrr'cond 'dm, 'rd, 'rn");
+ int64_t dm_val = Utils::LowHighTo64Bits(get_register(rd),
+ get_register(rn));
+ set_dregister(dm, bit_cast<double, int64_t>(dm_val));
+ }
+ }
+ } else if (instr-> IsVFPLoadStore()) {
+ Register rn = instr->RnField();
+ int32_t addr = get_register(rn);
+ int32_t imm_val = instr->Bits(0, 8) << 2;
+ if (instr->Bit(23) == 1) {
+ addr += imm_val;
+ } else {
+ addr -= imm_val;
+ }
+ if (IsIllegalAddress(addr)) {
+ HandleIllegalAccess(addr, instr);
+ } else {
+ if (instr->Bit(8) == 0) {
+ SRegister sd = instr->SdField();
+ if (instr->Bit(20) == 1) { // vldrs
+ // Format(instr, "vldrs'cond 'sd, ['rn, #+'off10]");
+ // Format(instr, "vldrs'cond 'sd, ['rn, #-'off10]");
+ set_sregister(sd, bit_cast<float, int32_t>(ReadW(addr, instr)));
+ } else { // vstrs
+ // Format(instr, "vstrs'cond 'sd, ['rn, #+'off10]");
+ // Format(instr, "vstrs'cond 'sd, ['rn, #-'off10]");
+ WriteW(addr, bit_cast<int32_t, float>(get_sregister(sd)), instr);
+ }
+ } else {
+ DRegister dd = instr->DdField();
+ if (instr->Bit(20) == 1) { // vldrd
+ // Format(instr, "vldrd'cond 'dd, ['rn, #+'off10]");
+ // Format(instr, "vldrd'cond 'dd, ['rn, #-'off10]");
+ int64_t dd_val = Utils::LowHighTo64Bits(ReadW(addr, instr),
+ ReadW(addr + 4, instr));
+ set_dregister(dd, bit_cast<double, int64_t>(dd_val));
+ } else { // vstrd
+ // Format(instr, "vstrd'cond 'dd, ['rn, #+'off10]");
+ // Format(instr, "vstrd'cond 'dd, ['rn, #-'off10]");
+ int64_t dd_val = bit_cast<int64_t, double>(get_dregister(dd));
+ WriteW(addr, Utils::Low32Bits(dd_val), instr);
+ WriteW(addr + 4, Utils::High32Bits(dd_val), instr);
+ }
+ }
+ }
+ } else {
+ UNIMPLEMENTED();
+ }
+}
+
+
+void Simulator::DecodeType7(Instr* instr) {
+ if (instr->Bit(24) == 1) {
+ // Format(instr, "svc #'svc");
+ SupervisorCall(instr);
+ } else if (instr->IsVFPDataProcessingOrSingleTransfer()) {
+ if (instr->Bit(4) == 0) {
+ // VFP Data Processing
+ SRegister sd;
+ SRegister sn;
+ SRegister sm;
+ DRegister dd;
+ DRegister dn;
+ DRegister dm;
+ if (instr->Bit(8) == 0) {
+ sd = instr->SdField();
+ sn = instr->SnField();
+ sm = instr->SmField();
+ dd = kNoDRegister;
+ dn = kNoDRegister;
+ dm = kNoDRegister;
+ } else {
+ sd = kNoSRegister;
+ sn = kNoSRegister;
+ sm = kNoSRegister;
+ dd = instr->DdField();
+ dn = instr->DnField();
+ dm = instr->DmField();
+ }
+ switch (instr->Bits(20, 4) & 0xb) {
+ case 1: // vnmla, vnmls, vnmul
+ default: {
+ UNIMPLEMENTED();
+ break;
+ }
+ case 0: { // vmla, vmls floating-point
+ if (instr->Bit(8) == 0) {
+ float addend = get_sregister(sn) * get_sregister(sm);
+ float sd_val = get_sregister(sd);
+ if (instr->Bit(6) == 0) {
+ // Format(instr, "vmlas'cond 'sd, 'sn, 'sm");
+ } else {
+ // Format(instr, "vmlss'cond 'sd, 'sn, 'sm");
+ addend = -addend;
+ }
+ set_sregister(sd, sd_val + addend);
+ } else {
+ double addend = get_dregister(dn) * get_dregister(dm);
+ double dd_val = get_dregister(dd);
+ if (instr->Bit(6) == 0) {
+ // Format(instr, "vmlad'cond 'dd, 'dn, 'dm");
+ } else {
+ // Format(instr, "vmlsd'cond 'dd, 'dn, 'dm");
+ addend = -addend;
+ }
+ set_dregister(dd, dd_val + addend);
+ }
+ break;
+ }
+ case 2: { // vmul
+ if (instr->Bit(8) == 0) {
+ // Format(instr, "vmuls'cond 'sd, 'sn, 'sm");
+ set_sregister(sd, get_sregister(sn) * get_sregister(sm));
+ } else {
+ // Format(instr, "vmuld'cond 'dd, 'dn, 'dm");
+ set_dregister(dd, get_dregister(dn) * get_dregister(dm));
+ }
+ break;
+ }
+ case 8: { // vdiv
+ if (instr->Bit(8) == 0) {
+ // Format(instr, "vdivs'cond 'sd, 'sn, 'sm");
+ set_sregister(sd, get_sregister(sn) / get_sregister(sm));
+ } else {
+ // Format(instr, "vdivd'cond 'dd, 'dn, 'dm");
+ set_dregister(dd, get_dregister(dn) / get_dregister(dm));
+ }
+ break;
+ }
+ case 3: { // vadd, vsub floating-point
+ if (instr->Bit(8) == 0) {
+ if (instr->Bit(6) == 0) {
+ // Format(instr, "vadds'cond 'sd, 'sn, 'sm");
+ set_sregister(sd, get_sregister(sn) + get_sregister(sm));
+ } else {
+ // Format(instr, "vsubs'cond 'sd, 'sn, 'sm");
+ set_sregister(sd, get_sregister(sn) - get_sregister(sm));
+ }
+ } else {
+ if (instr->Bit(6) == 0) {
+ // Format(instr, "vaddd'cond 'dd, 'dn, 'dm");
+ set_dregister(dd, get_dregister(dn) + get_dregister(dm));
+ } else {
+ // Format(instr, "vsubd'cond 'dd, 'dn, 'dm");
+ set_dregister(dd, get_dregister(dn) - get_dregister(dm));
+ }
+ }
+ break;
+ }
+ case 0xb: { // Other VFP data-processing instructions
+ if (instr->Bit(6) == 0) { // vmov immediate
+ if (instr->Bit(8) == 0) {
+ // Format(instr, "vmovs'cond 'sd, #'immf");
+ set_sregister(sd, instr->ImmFloatField());
+ } else {
+ // Format(instr, "vmovd'cond 'dd, #'immd");
+ set_dregister(dd, instr->ImmDoubleField());
+ }
+ break;
+ }
+ switch (instr->Bits(16, 4)) {
+ case 0: { // vmov immediate, vmov register, vabs
+ switch (instr->Bits(6, 2)) {
+ case 1: { // vmov register
+ if (instr->Bit(8) == 0) {
+ // Format(instr, "vmovs'cond 'sd, 'sm");
+ set_sregister(sd, get_sregister(sm));
+ } else {
+ // Format(instr, "vmovd'cond 'dd, 'dm");
+ set_dregister(dd, get_dregister(dm));
+ }
+ break;
+ }
+ case 3: { // vabs
+ if (instr->Bit(8) == 0) {
+ // Format(instr, "vabss'cond 'sd, 'sm");
+ set_sregister(sd, fabsf(get_sregister(sm)));
+ } else {
+ // Format(instr, "vabsd'cond 'dd, 'dm");
+ set_dregister(dd, fabs(get_dregister(dm)));
+ }
+ break;
+ }
+ default: {
+ UNIMPLEMENTED();
+ break;
+ }
+ }
+ break;
+ }
+ case 1: { // vneg, vsqrt
+ switch (instr->Bits(6, 2)) {
+ case 1: { // vneg
+ if (instr->Bit(8) == 0) {
+ // Format(instr, "vnegs'cond 'sd, 'sm");
+ set_sregister(sd, -get_sregister(sm));
+ } else {
+ // Format(instr, "vnegd'cond 'dd, 'dm");
+ set_dregister(dd, -get_dregister(dm));
+ }
+ break;
+ }
+ case 3: { // vsqrt
+ if (instr->Bit(8) == 0) {
+ // Format(instr, "vsqrts'cond 'sd, 'sm");
+ set_sregister(sd, sqrtf(get_sregister(sm)));
+ } else {
+ // Format(instr, "vsqrtd'cond 'dd, 'dm");
+ set_dregister(dd, sqrt(get_dregister(dm)));
+ }
+ break;
+ }
+ default: {
+ UNIMPLEMENTED();
+ break;
+ }
+ }
+ break;
+ }
+ case 4: // vcmp, vcmpe
+ case 5: { // vcmp #0.0, vcmpe #0.0
+ if (instr->Bit(7) == 1) { // vcmpe
+ UNIMPLEMENTED();
+ } else {
+ fp_n_flag_ = false;
+ fp_z_flag_ = false;
+ fp_c_flag_ = false;
+ fp_v_flag_ = false;
+ if (instr->Bit(8) == 0) { // vcmps
+ float sd_val = get_sregister(sd);
+ float sm_val;
+ if (instr->Bit(16) == 0) {
+ // Format(instr, "vcmps'cond 'sd, 'sm");
+ sm_val = get_sregister(sm);
+ } else {
+ // Format(instr, "vcmps'cond 'sd, #0.0");
+ sm_val = 0.0f;
+ }
+ if (isnan(sd_val) || isnan(sm_val)) {
+ fp_c_flag_ = true;
+ fp_v_flag_ = true;
+ } else if (sd_val == sm_val) {
+ fp_z_flag_ = true;
+ fp_c_flag_ = true;
+ } else if (sd_val < sm_val) {
+ fp_n_flag_ = true;
+ } else {
+ fp_c_flag_ = true;
+ }
+ } else { // vcmpd
+ double dd_val = get_dregister(dd);
+ double dm_val;
+ if (instr->Bit(16) == 0) {
+ // Format(instr, "vcmpd'cond 'dd, 'dm");
+ dm_val = get_dregister(dm);
+ } else {
+ // Format(instr, "vcmpd'cond 'dd, #0.0");
+ dm_val = 0.0;
+ }
+ if (isnan(dd_val) || isnan(dm_val)) {
+ fp_c_flag_ = true;
+ fp_v_flag_ = true;
+ } else if (dd_val == dm_val) {
+ fp_z_flag_ = true;
+ fp_c_flag_ = true;
+ } else if (dd_val < dm_val) {
+ fp_n_flag_ = true;
+ } else {
+ fp_c_flag_ = true;
+ }
+ }
+ }
+ break;
+ }
+ case 7: { // vcvt between double-precision and single-precision
+ if (instr->Bit(8) == 0) {
+ // Format(instr, "vcvtds'cond 'dd, 'sm");
+ dd = instr->DdField();
+ set_dregister(dd, static_cast<double>(get_sregister(sm)));
+ } else {
+ // Format(instr, "vcvtsd'cond 'sd, 'dm");
+ sd = instr->SdField();
+ set_sregister(sd, static_cast<float>(get_dregister(dm)));
+ }
+ break;
+ }
+ case 8: { // vcvt, vcvtr between floating-point and integer
+ sm = instr->SmField();
+ float sm_val = get_sregister(sm);
+ uint32_t ud_val = 0;
+ int32_t id_val = 0;
+ if (instr->Bit(7) == 0) { // vcvtsu, vcvtdu
+ ud_val = bit_cast<uint32_t, float>(sm_val);
+ } else { // vcvtsi, vcvtdi
+ id_val = bit_cast<int32_t, float>(sm_val);
+ }
+ if (instr->Bit(8) == 0) {
+ float sd_val;
+ if (instr->Bit(7) == 0) {
+ // Format(instr, "vcvtsu'cond 'sd, 'sm");
+ sd_val = static_cast<float>(ud_val);
+ } else {
+ // Format(instr, "vcvtsi'cond 'sd, 'sm");
+ sd_val = static_cast<float>(id_val);
+ }
+ set_sregister(sd, sd_val);
+ } else {
+ double dd_val;
+ if (instr->Bit(7) == 0) {
+ // Format(instr, "vcvtdu'cond 'dd, 'sm");
+ dd_val = static_cast<double>(ud_val);
+ } else {
+ // Format(instr, "vcvtdi'cond 'dd, 'sm");
+ dd_val = static_cast<double>(id_val);
+ }
+ set_dregister(dd, dd_val);
+ }
+ break;
+ }
+ case 12:
+ case 13: { // vcvt, vcvtr between floating-point and integer
+ // We do not need to record exceptions in the FPSCR cumulative
+ // flags, because we do not use them.
+ if (instr->Bit(7) == 0) {
+ // We only support round-to-zero mode
+ UNIMPLEMENTED();
+ break;
+ }
+ int32_t id_val = 0;
+ uint32_t ud_val = 0;
+ if (instr->Bit(8) == 0) {
+ float sm_val = get_sregister(sm);
+ if (instr->Bit(16) == 0) {
+ // Format(instr, "vcvtus'cond 'sd, 'sm");
+ if (sm_val >= INT_MAX) {
+ ud_val = INT_MAX;
+ } else if (sm_val > 0.0) {
+ ud_val = static_cast<uint32_t>(sm_val);
+ }
+ } else {
+ // Format(instr, "vcvtis'cond 'sd, 'sm");
+ if (sm_val <= INT_MIN) {
+ id_val = INT_MIN;
+ } else if (sm_val >= INT_MAX) {
+ id_val = INT_MAX;
+ } else {
+ id_val = static_cast<int32_t>(sm_val);
+ }
+ ASSERT((id_val >= 0) || !(sm_val >= 0.0));
+ }
+ } else {
+ sd = instr->SdField();
+ double dm_val = get_dregister(dm);
+ if (instr->Bit(16) == 0) {
+ // Format(instr, "vcvtud'cond 'sd, 'dm");
+ if (dm_val >= INT_MAX) {
+ ud_val = INT_MAX;
+ } else if (dm_val > 0.0) {
+ ud_val = static_cast<uint32_t>(dm_val);
+ }
+ } else {
+ // Format(instr, "vcvtid'cond 'sd, 'dm");
+ if (dm_val <= INT_MIN) {
+ id_val = INT_MIN;
+ } else if (dm_val >= INT_MAX) {
+ id_val = INT_MAX;
+ } else {
+ id_val = static_cast<int32_t>(dm_val);
+ }
+ ASSERT((id_val >= 0) || !(dm_val >= 0.0));
+ }
+ }
+ float sd_val;
+ if (instr->Bit(16) == 0) {
+ sd_val = bit_cast<float, uint32_t>(ud_val);
+ } else {
+ sd_val = bit_cast<float, int32_t>(id_val);
+ }
+ set_sregister(sd, sd_val);
+ break;
+ }
+ case 2: // vcvtb, vcvtt
+ case 3: // vcvtb, vcvtt
+ case 9: // undefined
+ case 10: // vcvt between floating-point and fixed-point
+ case 11: // vcvt between floating-point and fixed-point
+ case 14: // vcvt between floating-point and fixed-point
+ case 15: // vcvt between floating-point and fixed-point
+ default: {
+ UNIMPLEMENTED();
+ break;
+ }
+ }
+ }
+ break;
+ }
+ } else {
+ // 8, 16, or 32-bit Transfer between ARM Core and VFP
+ if ((instr->Bits(21, 3) == 0) && (instr->Bit(8) == 0)) {
+ Register rd = instr->RdField();
+ SRegister sn = instr->SnField();
+ if (instr->Bit(20) == 0) {
+ // Format(instr, "vmovs'cond 'sn, 'rd");
+ set_sregister(sn, bit_cast<float, int32_t>(get_register(rd)));
+ } else {
+ // Format(instr, "vmovr'cond 'rd, 'sn");
+ set_register(rd, bit_cast<int32_t, float>(get_sregister(sn)));
+ }
+ } else if ((instr->Bits(20, 4) == 0xf) && (instr->Bit(8) == 0) &&
+ (instr->Bits(12, 4) == 0xf)) {
+ // Format(instr, "vmstat'cond");
+ n_flag_ = fp_n_flag_;
+ z_flag_ = fp_z_flag_;
+ c_flag_ = fp_c_flag_;
+ v_flag_ = fp_v_flag_;
+ } else {
+ UNIMPLEMENTED();
+ }
+ }
+ } else {
+ UNIMPLEMENTED();
+ }
+}
+
+
+// Executes the current instruction.
+void Simulator::InstructionDecode(Instr* instr) {
+ pc_modified_ = false;
+ if (FLAG_trace_sim) {
+ const uword start = reinterpret_cast<uword>(instr);
+ const uword end = start + Instr::kInstrSize;
+ Disassembler::Disassemble(start, end);
+ }
+ if (instr->ConditionField() == kSpecialCondition) {
+ if (instr->InstructionBits() == static_cast<int32_t>(0xf57ff01f)) {
+ // Format(instr, "clrex");
+ ClearExclusive();
+ } else {
+ UNIMPLEMENTED();
+ }
+ } else if (ConditionallyExecute(instr)) {
+ switch (instr->TypeField()) {
+ case 0:
+ case 1: {
+ DecodeType01(instr);
+ break;
+ }
+ case 2: {
+ DecodeType2(instr);
+ break;
+ }
+ case 3: {
+ DecodeType3(instr);
+ break;
+ }
+ case 4: {
+ DecodeType4(instr);
+ break;
+ }
+ case 5: {
+ DecodeType5(instr);
+ break;
+ }
+ case 6: {
+ DecodeType6(instr);
+ break;
+ }
+ case 7: {
+ DecodeType7(instr);
+ break;
+ }
+ default: {
+ UNIMPLEMENTED();
+ break;
+ }
+ }
+ }
+ if (!pc_modified_) {
+ set_register(PC, reinterpret_cast<int32_t>(instr) + Instr::kInstrSize);
+ }
+}
+
+
+void Simulator::Execute() {
+ static StatsCounter counter_instructions("Simulated instructions");
+
+ // Get the PC to simulate. Cannot use the accessor here as we need the
+ // raw PC value and not the one used as input to arithmetic instructions.
+ uword program_counter = get_pc();
+
+ if (FLAG_stop_sim_at == 0) {
+ // Fast version of the dispatch loop without checking whether the simulator
+ // should be stopping at a particular executed instruction.
+ while (program_counter != kEndSimulatingPC) {
+ Instr* instr = reinterpret_cast<Instr*>(program_counter);
+ icount_++;
+ counter_instructions.Increment();
+ if (IsIllegalAddress(program_counter)) {
+ HandleIllegalAccess(program_counter, instr);
+ } else {
+ InstructionDecode(instr);
+ }
+ program_counter = get_pc();
+ }
+ } else {
+ // FLAG_stop_sim_at is at the non-default value. Stop in the debugger when
+ // we reach the particular instruction count.
+ while (program_counter != kEndSimulatingPC) {
+ Instr* instr = reinterpret_cast<Instr*>(program_counter);
+ icount_++;
+ counter_instructions.Increment();
+ if (icount_ == FLAG_stop_sim_at) {
+ SimulatorDebugger dbg(this);
+ dbg.Debug();
+ } else if (IsIllegalAddress(program_counter)) {
+ HandleIllegalAccess(program_counter, instr);
+ } else {
+ InstructionDecode(instr);
+ }
+ program_counter = get_pc();
+ }
+ }
+}
+
+
+int64_t Simulator::Call(int32_t entry,
+ int32_t parameter0,
+ int32_t parameter1,
+ int32_t parameter2,
+ int32_t parameter3,
+ int32_t parameter4) {
+ // Save the SP register before the call so we can restore it.
+ int32_t sp_before_call = get_register(SP);
+
+ // Setup parameters.
+ set_register(R0, parameter0);
+ set_register(R1, parameter1);
+ set_register(R2, parameter2);
+ set_register(R3, parameter3);
+
+ // Reserve room for one stack parameter.
+ int32_t stack_pointer = sp_before_call;
+ stack_pointer -= kWordSize;
+
+ // Make sure the activation frames are properly aligned.
+ static const int kFrameAlignment = OS::ActivationFrameAlignment();
+ if (kFrameAlignment > 0) {
+ stack_pointer = Utils::RoundDown(stack_pointer, kFrameAlignment);
+ }
+
+ // Write the fourth parameter to the stack and update register SP.
+ *reinterpret_cast<int32_t*>(stack_pointer) = parameter4;
+ set_register(SP, stack_pointer);
+
+ // Prepare to execute the code at entry.
+ set_register(PC, entry);
+ // Put down marker for end of simulation. The simulator will stop simulation
+ // when the PC reaches this value. By saving the "end simulation" value into
+ // the LR the simulation stops when returning to this call point.
+ set_register(LR, kEndSimulatingPC);
+
+ // Remember the values of callee-saved registers.
+ // The code below assumes that r9 is not used as sb (static base) in
+ // simulator code and therefore is regarded as a callee-saved register.
+ int32_t r4_val = get_register(R4);
+ int32_t r5_val = get_register(R5);
+ int32_t r6_val = get_register(R6);
+ int32_t r7_val = get_register(R7);
+ int32_t r8_val = get_register(R8);
+ int32_t r9_val = get_register(R9);
+ int32_t r10_val = get_register(R10);
+ int32_t r11_val = get_register(R11);
+
+ // Setup the callee-saved registers with a known value. To be able to check
+ // that they are preserved properly across JS execution.
+ int32_t callee_saved_value = icount_;
+ set_register(R4, callee_saved_value);
+ set_register(R5, callee_saved_value);
+ set_register(R6, callee_saved_value);
+ set_register(R7, callee_saved_value);
+ set_register(R8, callee_saved_value);
+ set_register(R9, callee_saved_value);
+ set_register(R10, callee_saved_value);
+ set_register(R11, callee_saved_value);
+
+ // Start the simulation
+ Execute();
+
+ // Check that the callee-saved registers have been preserved.
+ ASSERT(callee_saved_value == get_register(R4));
+ ASSERT(callee_saved_value == get_register(R5));
+ ASSERT(callee_saved_value == get_register(R6));
+ ASSERT(callee_saved_value == get_register(R7));
+ ASSERT(callee_saved_value == get_register(R8));
+ ASSERT(callee_saved_value == get_register(R9));
+ ASSERT(callee_saved_value == get_register(R10));
+ ASSERT(callee_saved_value == get_register(R11));
+
+ // Restore callee-saved registers with the original value.
+ set_register(R4, r4_val);
+ set_register(R5, r5_val);
+ set_register(R6, r6_val);
+ set_register(R7, r7_val);
+ set_register(R8, r8_val);
+ set_register(R9, r9_val);
+ set_register(R10, r10_val);
+ set_register(R11, r11_val);
+
+ // Restore the SP register and return R1:R0.
+ set_register(SP, sp_before_call);
+ return Utils::LowHighTo64Bits(get_register(R0), get_register(R1));
+}
+
+
+void Simulator::Longjmp(
+ int32_t pc, int32_t sp, int32_t fp, const Instance& object) {
+ set_register(SP, sp);
+ set_register(FP, fp);
+ set_register(PC, pc);
+ SimulatorSetjmpBuffer* buf = last_setjmp_buffer();
+
+ // Walk over all setjmp buffers (simulated --> C++ transitions)
+ // and try to find the setjmp associated with the stack pointer.
+ while (buf->link() != NULL && buf->link()->sp() <= sp) {
+ buf = buf->link();
+ }
+ ASSERT(buf != NULL);
+
+ // Clean up stack memory of C++ frames.
+ // TODO(regis): Revisit.
+ // isolate->PrepareForUnwinding(reinterpret_cast<uword>(buf));
+ // isolate->ChangeStateToGeneratedCode();
+ set_register(kExceptionObjectReg, bit_cast<int32_t>(object.raw()));
+ buf->Longjmp();
+}
+
+} // namespace dart
+
+#endif // !defined(HOST_ARCH_ARM)
+
+#endif // defined TARGET_ARCH_ARM
diff --git a/runtime/vm/simulator_arm.h b/runtime/vm/simulator_arm.h
new file mode 100644
index 0000000..7b4a377
--- /dev/null
+++ b/runtime/vm/simulator_arm.h
@@ -0,0 +1,230 @@
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Declares a Simulator for ARM instructions if we are not generating a native
+// ARM binary. This Simulator allows us to run and debug ARM code generation on
+// regular desktop machines.
+// Dart calls into generated code by "calling" the InvokeDartCode stub,
+// which will start execution in the Simulator or forwards to the real entry
+// on a ARM HW platform.
+
+#ifndef VM_SIMULATOR_ARM_H_
+#define VM_SIMULATOR_ARM_H_
+
+#ifndef VM_SIMULATOR_H_
+#error Do not include simulator_arm.h directly; use simulator.h.
+#endif
+
+#include "vm/allocation.h"
+#include "vm/constants_arm.h"
+#include "vm/object.h"
+
+namespace dart {
+
+class Isolate;
+class SimulatorSetjmpBuffer;
+
+class Simulator {
+ public:
+ static const size_t kSimulatorStackUnderflowSize = 64;
+
+ Simulator();
+ ~Simulator();
+
+ // The currently executing Simulator instance, which is associated to the
+ // current isolate
+ static Simulator* Current();
+
+ // Accessors for register state. Reading the pc value adheres to the ARM
+ // architecture specification and is off by 8 from the currently executing
+ // instruction.
+ void set_register(Register reg, int32_t value);
+ int32_t get_register(Register reg) const;
+
+ // Special case of set_register and get_register to access the raw PC value.
+ void set_pc(int32_t value);
+ int32_t get_pc() const;
+
+ // Accessors for VFP register state.
+ void set_sregister(SRegister reg, float value);
+ float get_sregister(SRegister reg) const;
+ void set_dregister(DRegister reg, double value);
+ double get_dregister(DRegister reg) const;
+
+ // Accessor to the internal simulator stack area.
+ uintptr_t StackTop() const;
+ uintptr_t StackLimit() const;
+
+ // Executes ARM instructions until the PC reaches end_sim_pc.
+ void Execute();
+
+ // Call on program start.
+ static void InitOnce();
+
+ // Dart generally calls into generated code with 5 parameters. This is a
+ // convenience function, which sets up the simulator state and grabs the
+ // result on return.
+ int64_t Call(int32_t entry,
+ int32_t parameter0,
+ int32_t parameter1,
+ int32_t parameter2,
+ int32_t parameter3,
+ int32_t parameter4);
+
+ // Implementation of atomic compare and exchange in the same synchronization
+ // domain as other synchronization primitive instructions (e.g. ldrex, strex).
+ static uword CompareExchange(uword* address,
+ uword compare_value,
+ uword new_value);
+
+ // Runtime call support.
+ static uword RedirectExternalReference(void* function,
+ uint32_t argument_count);
+
+ void Longjmp(int32_t pc, int32_t sp, int32_t fp, const Instance& object);
+
+ private:
+ // Known bad pc value to ensure that the simulator does not execute
+ // without being properly setup.
+ static const uword kBadLR = -1;
+ // A pc value used to signal the simulator to stop execution. Generally
+ // the lr is set to this value on transition from native C code to
+ // simulated execution, so that the simulator can "return" to the native
+ // C code.
+ static const uword kEndSimulatingPC = -2;
+
+ // CPU state.
+ int32_t registers_[kNumberOfCpuRegisters];
+ bool n_flag_;
+ bool z_flag_;
+ bool c_flag_;
+ bool v_flag_;
+
+ // VFP state.
+ union { // S and D register banks are overlapping.
+ float sregisters_[kNumberOfSRegisters];
+ double dregisters_[kNumberOfDRegisters];
+ };
+ bool fp_n_flag_;
+ bool fp_z_flag_;
+ bool fp_c_flag_;
+ bool fp_v_flag_;
+
+ // Simulator support.
+ char* stack_;
+ bool pc_modified_;
+ int icount_;
+ static bool flag_trace_sim_;
+ static int32_t flag_stop_sim_at_;
+ SimulatorSetjmpBuffer* last_setjmp_buffer_;
+
+ // Registered breakpoints.
+ Instr* break_pc_;
+ int32_t break_instr_;
+
+ // Illegal memory access support.
+ static bool IsIllegalAddress(uword addr) {
+ return addr < 64*1024;
+ }
+ void HandleIllegalAccess(uword addr, Instr* instr);
+
+ // Unsupported instructions use Format to print an error and stop execution.
+ void Format(Instr* instr, const char* format);
+
+ // Checks if the current instruction should be executed based on its
+ // condition bits.
+ bool ConditionallyExecute(Instr* instr);
+
+ // Helper functions to set the conditional flags in the architecture state.
+ void SetNZFlags(int32_t val);
+ void SetCFlag(bool val);
+ void SetVFlag(bool val);
+ bool CarryFrom(int32_t left, int32_t right);
+ bool BorrowFrom(int32_t left, int32_t right);
+ bool OverflowFrom(int32_t alu_out,
+ int32_t left,
+ int32_t right,
+ bool addition);
+
+ // Helper functions to decode common "addressing" modes.
+ int32_t GetShiftRm(Instr* instr, bool* carry_out);
+ int32_t GetImm(Instr* instr, bool* carry_out);
+ void HandleRList(Instr* instr, bool load);
+ void SupervisorCall(Instr* instr);
+
+ // Read and write memory.
+ void UnalignedAccess(const char* msg, uword addr, Instr* instr);
+
+ inline uint8_t ReadBU(uword addr);
+ inline int8_t ReadB(uword addr);
+ inline void WriteB(uword addr, uint8_t value);
+
+ inline uint16_t ReadHU(uword addr, Instr* instr);
+ inline int16_t ReadH(uword addr, Instr* instr);
+ inline void WriteH(uword addr, uint16_t value, Instr* instr);
+
+ inline int ReadW(uword addr, Instr* instr);
+ inline void WriteW(uword addr, int value, Instr* instr);
+
+ // Synchronization primitives support.
+ void ClearExclusive();
+ int ReadExclusiveW(uword addr, Instr* instr);
+ int WriteExclusiveW(uword addr, int value, Instr* instr);
+
+ // TODO(regis): Remove exclusive access support machinery if not needed.
+ // In Dart, there is at most one thread per isolate.
+ // We keep track of 16 exclusive access address tags across all isolates.
+ // Since we cannot simulate a native context switch, which clears
+ // the exclusive access state of the local monitor (using the CLREX
+ // instruction), we associate the isolate requesting exclusive access to the
+ // address tag. Multiple isolates requesting exclusive access (using the LDREX
+ // instruction) to the same address will result in multiple address tags being
+ // created for the same address, one per isolate.
+ // At any given time, each isolate is associated to at most one address tag.
+ static Mutex* exclusive_access_lock_;
+ static const int kNumAddressTags = 16;
+ static struct AddressTag {
+ Isolate* isolate;
+ uword addr;
+ } exclusive_access_state_[kNumAddressTags];
+ static int next_address_tag_;
+
+ // Set access to given address to 'exclusive state' for current isolate.
+ static void SetExclusiveAccess(uword addr);
+
+ // Returns true if the current isolate has exclusive access to given address,
+ // returns false otherwise. In either case, set access to given address to
+ // 'open state' for all isolates.
+ // If given addr is NULL, set access to 'open state' for current
+ // isolate (CLREX).
+ static bool HasExclusiveAccessAndOpen(uword addr);
+
+ // Executing is handled based on the instruction type.
+ void DecodeType01(Instr* instr); // Both type 0 and type 1 rolled into one.
+ void DecodeType2(Instr* instr);
+ void DecodeType3(Instr* instr);
+ void DecodeType4(Instr* instr);
+ void DecodeType5(Instr* instr);
+ void DecodeType6(Instr* instr);
+ void DecodeType7(Instr* instr);
+
+ // Executes one instruction.
+ void InstructionDecode(Instr* instr);
+
+ // Longjmp support for exceptions.
+ SimulatorSetjmpBuffer* last_setjmp_buffer() {
+ return last_setjmp_buffer_;
+ }
+ void set_last_setjmp_buffer(SimulatorSetjmpBuffer* buffer) {
+ last_setjmp_buffer_ = buffer;
+ }
+
+ friend class SimulatorDebugger;
+ friend class SimulatorSetjmpBuffer;
+ DISALLOW_COPY_AND_ASSIGN(Simulator);
+};
+
+} // namespace dart
+
+#endif // VM_SIMULATOR_ARM_H_
diff --git a/runtime/vm/simulator_mips.cc b/runtime/vm/simulator_mips.cc
new file mode 100644
index 0000000..fe3c275
--- /dev/null
+++ b/runtime/vm/simulator_mips.cc
@@ -0,0 +1,36 @@
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+#include "vm/globals.h"
+#if defined(TARGET_ARCH_MIPS)
+
+// Only build the simulator if not compiling for real MIPS hardware.
+#if !defined(HOST_ARCH_MIPS)
+
+#include "vm/simulator.h"
+
+#include "vm/assembler.h"
+#include "vm/constants_mips.h"
+#include "vm/disassembler.h"
+
+namespace dart {
+
+Simulator::Simulator() {
+ UNIMPLEMENTED();
+}
+
+
+Simulator::~Simulator() {
+ UNIMPLEMENTED();
+}
+
+
+void Simulator::InitOnce() {
+}
+
+} // namespace dart
+
+#endif // !defined(HOST_ARCH_MIPS)
+
+#endif // defined TARGET_ARCH_MIPS
diff --git a/runtime/vm/simulator_mips.h b/runtime/vm/simulator_mips.h
new file mode 100644
index 0000000..8541815
--- /dev/null
+++ b/runtime/vm/simulator_mips.h
@@ -0,0 +1,32 @@
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Declares a Simulator for MIPS instructions if we are not generating a native
+// MIPS binary. This Simulator allows us to run and debug MIPS code generation
+// on regular desktop machines.
+// Dart calls into generated code by "calling" the InvokeDartCode stub,
+// which will start execution in the Simulator or forwards to the real entry
+// on a MIPS HW platform.
+
+#ifndef VM_SIMULATOR_MIPS_H_
+#define VM_SIMULATOR_MIPS_H_
+
+#ifndef VM_SIMULATOR_H_
+#error Do not include simulator_mips.h directly; use simulator.h.
+#endif
+
+namespace dart {
+
+class Simulator {
+ public:
+ Simulator();
+ ~Simulator();
+
+ // Call on program start.
+ static void InitOnce();
+};
+
+} // namespace dart
+
+#endif // VM_SIMULATOR_MIPS_H_
diff --git a/runtime/vm/snapshot.cc b/runtime/vm/snapshot.cc
index d6a50ba..6538b90 100644
--- a/runtime/vm/snapshot.cc
+++ b/runtime/vm/snapshot.cc
@@ -418,7 +418,7 @@
cls_ = Object::token_stream_class();
stream_ = reinterpret_cast<RawTokenStream*>(
AllocateUninitialized(cls_, TokenStream::InstanceSize()));
- cls_ = object_store()->external_int8_array_class();
+ cls_ = object_store()->external_uint8_array_class();
uint8_t* array = const_cast<uint8_t*>(CurrentBufferAddress());
ASSERT(array != NULL);
Advance(len);
diff --git a/runtime/vm/snapshot_test.dart b/runtime/vm/snapshot_test.dart
index 97a933b..7e6639d 100644
--- a/runtime/vm/snapshot_test.dart
+++ b/runtime/vm/snapshot_test.dart
@@ -742,10 +742,10 @@
static double measureFor(Function f, int timeMinimum) {
int time = 0;
int iter = 0;
- Date start = new Date.now();
+ DateTime start = new DateTime.now();
while (time < timeMinimum) {
f();
- time = (new Date.now().difference(start)).inMilliseconds;
+ time = (new DateTime.now().difference(start)).inMilliseconds;
iter++;
}
// Force double result by using a double constant.
@@ -1112,12 +1112,12 @@
}
void evaluateRound() {
- int time = (new Date.now().difference(_start)).inMilliseconds;
+ int time = (new DateTime.now().difference(_start)).inMilliseconds;
if (!_warmedup && time < Benchmark1.WARMUP_TIME) {
startRound();
} else if (!_warmedup) {
_warmedup = true;
- _start = new Date.now();
+ _start = new DateTime.now();
_iterations = 0;
startRound();
} else if (_warmedup && time < Benchmark1.RUN_TIME) {
@@ -1141,7 +1141,7 @@
evaluateRound();
}
});
- _start = new Date.now();
+ _start = new DateTime.now();
startRound();
}
@@ -1150,7 +1150,7 @@
_ping.close();
}
- Date _start;
+ DateTime _start;
SendPort _pong;
SendPort _pingPort;
ReceivePort _ping;
diff --git a/runtime/vm/stub_code.cc b/runtime/vm/stub_code.cc
index dfd8aa9b..b942c17 100644
--- a/runtime/vm/stub_code.cc
+++ b/runtime/vm/stub_code.cc
@@ -45,7 +45,7 @@
#define STUB_CODE_GENERATE(name) \
- code |= Generate("_stub_"#name, StubCode::Generate##name##Stub); \
+ code ^= Generate("_stub_"#name, StubCode::Generate##name##Stub); \
name##_entry_ = new StubEntry("_stub_"#name, code);
@@ -107,7 +107,7 @@
Assembler assembler;
const char* name = cls.ToCString();
StubCode::GenerateAllocationStubForClass(&assembler, cls);
- stub |= Code::FinalizeCode(name, &assembler);
+ stub ^= Code::FinalizeCode(name, &assembler);
cls.set_allocation_stub(stub);
if (FLAG_disassemble_stubs) {
OS::Print("Code for allocation stub '%s': {\n", name);
@@ -126,7 +126,7 @@
Assembler assembler;
const char* name = func.ToCString();
StubCode::GenerateAllocationStubForClosure(&assembler, func);
- stub |= Code::FinalizeCode(name, &assembler);
+ stub ^= Code::FinalizeCode(name, &assembler);
func.set_closure_allocation_stub(stub);
if (FLAG_disassemble_stubs) {
OS::Print("Code for closure allocation stub '%s': {\n", name);
diff --git a/runtime/vm/stub_code_arm_test.cc b/runtime/vm/stub_code_arm_test.cc
new file mode 100644
index 0000000..a1893b1
--- /dev/null
+++ b/runtime/vm/stub_code_arm_test.cc
@@ -0,0 +1,89 @@
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+#include "vm/globals.h"
+#if defined(TARGET_ARCH_ARM)
+
+#include "vm/isolate.h"
+#include "vm/dart_entry.h"
+#include "vm/native_entry.h"
+#include "vm/native_entry_test.h"
+#include "vm/object.h"
+#include "vm/runtime_entry.h"
+#include "vm/stub_code.h"
+#include "vm/symbols.h"
+#include "vm/unit_test.h"
+
+#define __ assembler->
+
+namespace dart {
+
+DECLARE_RUNTIME_ENTRY(TestSmiSub);
+DECLARE_LEAF_RUNTIME_ENTRY(RawObject*, TestLeafSmiAdd, RawObject*, RawObject*);
+
+
+static Function* CreateFunction(const char* name) {
+ const String& class_name = String::Handle(Symbols::New("ownerClass"));
+ const Script& script = Script::Handle();
+ const Class& owner_class =
+ Class::Handle(Class::New(class_name, script, Scanner::kDummyTokenIndex));
+ const String& function_name = String::ZoneHandle(Symbols::New(name));
+ Function& function = Function::ZoneHandle(
+ Function::New(function_name, RawFunction::kRegularFunction,
+ true, false, false, false, owner_class, 0));
+ return &function;
+}
+
+
+// Test calls to stub code which calls into the runtime.
+static void GenerateCallToCallRuntimeStub(Assembler* assembler,
+ int value1, int value2) {
+ UNIMPLEMENTED();
+}
+
+
+TEST_CASE(CallRuntimeStubCode) {
+ extern const Function& RegisterFakeFunction(const char* name,
+ const Code& code);
+ const int value1 = 10;
+ const int value2 = 20;
+ const char* kName = "Test_CallRuntimeStubCode";
+ Assembler _assembler_;
+ GenerateCallToCallRuntimeStub(&_assembler_, value1, value2);
+ const Code& code = Code::Handle(Code::FinalizeCode(
+ *CreateFunction("Test_CallRuntimeStubCode"), &_assembler_));
+ const Function& function = RegisterFakeFunction(kName, code);
+ Smi& result = Smi::Handle();
+ result ^= DartEntry::InvokeStatic(function, Object::empty_array());
+ EXPECT_EQ((value1 - value2), result.Value());
+}
+
+
+// Test calls to stub code which calls into a leaf runtime entry.
+static void GenerateCallToCallLeafRuntimeStub(Assembler* assembler,
+ int value1,
+ int value2) {
+ UNIMPLEMENTED();
+}
+
+
+TEST_CASE(CallLeafRuntimeStubCode) {
+ extern const Function& RegisterFakeFunction(const char* name,
+ const Code& code);
+ const int value1 = 10;
+ const int value2 = 20;
+ const char* kName = "Test_CallLeafRuntimeStubCode";
+ Assembler _assembler_;
+ GenerateCallToCallLeafRuntimeStub(&_assembler_, value1, value2);
+ const Code& code = Code::Handle(Code::FinalizeCode(
+ *CreateFunction("Test_CallLeafRuntimeStubCode"), &_assembler_));
+ const Function& function = RegisterFakeFunction(kName, code);
+ Smi& result = Smi::Handle();
+ result ^= DartEntry::InvokeStatic(function, Object::empty_array());
+ EXPECT_EQ((value1 + value2), result.Value());
+}
+
+} // namespace dart
+
+#endif // defined TARGET_ARCH_ARM
diff --git a/runtime/vm/stub_code_ia32_test.cc b/runtime/vm/stub_code_ia32_test.cc
index 19ca0f1..222fd0f 100644
--- a/runtime/vm/stub_code_ia32_test.cc
+++ b/runtime/vm/stub_code_ia32_test.cc
@@ -71,7 +71,7 @@
*CreateFunction("Test_CallRuntimeStubCode"), &_assembler_));
const Function& function = RegisterFakeFunction(kName, code);
Smi& result = Smi::Handle();
- result |= DartEntry::InvokeStatic(function, Object::empty_array());
+ result ^= DartEntry::InvokeStatic(function, Object::empty_array());
EXPECT_EQ((value1 - value2), result.Value());
}
@@ -106,7 +106,7 @@
*CreateFunction("Test_CallLeafRuntimeStubCode"), &_assembler_));
const Function& function = RegisterFakeFunction(kName, code);
Smi& result = Smi::Handle();
- result |= DartEntry::InvokeStatic(function, Object::empty_array());
+ result ^= DartEntry::InvokeStatic(function, Object::empty_array());
EXPECT_EQ((value1 + value2), result.Value());
}
diff --git a/runtime/vm/stub_code_mips_test.cc b/runtime/vm/stub_code_mips_test.cc
new file mode 100644
index 0000000..7181fda
--- /dev/null
+++ b/runtime/vm/stub_code_mips_test.cc
@@ -0,0 +1,89 @@
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+#include "vm/globals.h"
+#if defined(TARGET_ARCH_MIPS)
+
+#include "vm/isolate.h"
+#include "vm/dart_entry.h"
+#include "vm/native_entry.h"
+#include "vm/native_entry_test.h"
+#include "vm/object.h"
+#include "vm/runtime_entry.h"
+#include "vm/stub_code.h"
+#include "vm/symbols.h"
+#include "vm/unit_test.h"
+
+#define __ assembler->
+
+namespace dart {
+
+DECLARE_RUNTIME_ENTRY(TestSmiSub);
+DECLARE_LEAF_RUNTIME_ENTRY(RawObject*, TestLeafSmiAdd, RawObject*, RawObject*);
+
+
+static Function* CreateFunction(const char* name) {
+ const String& class_name = String::Handle(Symbols::New("ownerClass"));
+ const Script& script = Script::Handle();
+ const Class& owner_class =
+ Class::Handle(Class::New(class_name, script, Scanner::kDummyTokenIndex));
+ const String& function_name = String::ZoneHandle(Symbols::New(name));
+ Function& function = Function::ZoneHandle(
+ Function::New(function_name, RawFunction::kRegularFunction,
+ true, false, false, false, owner_class, 0));
+ return &function;
+}
+
+
+// Test calls to stub code which calls into the runtime.
+static void GenerateCallToCallRuntimeStub(Assembler* assembler,
+ int value1, int value2) {
+ UNIMPLEMENTED();
+}
+
+
+TEST_CASE(CallRuntimeStubCode) {
+ extern const Function& RegisterFakeFunction(const char* name,
+ const Code& code);
+ const int value1 = 10;
+ const int value2 = 20;
+ const char* kName = "Test_CallRuntimeStubCode";
+ Assembler _assembler_;
+ GenerateCallToCallRuntimeStub(&_assembler_, value1, value2);
+ const Code& code = Code::Handle(Code::FinalizeCode(
+ *CreateFunction("Test_CallRuntimeStubCode"), &_assembler_));
+ const Function& function = RegisterFakeFunction(kName, code);
+ Smi& result = Smi::Handle();
+ result ^= DartEntry::InvokeStatic(function, Object::empty_array());
+ EXPECT_EQ((value1 - value2), result.Value());
+}
+
+
+// Test calls to stub code which calls into a leaf runtime entry.
+static void GenerateCallToCallLeafRuntimeStub(Assembler* assembler,
+ int value1,
+ int value2) {
+ UNIMPLEMENTED();
+}
+
+
+TEST_CASE(CallLeafRuntimeStubCode) {
+ extern const Function& RegisterFakeFunction(const char* name,
+ const Code& code);
+ const int value1 = 10;
+ const int value2 = 20;
+ const char* kName = "Test_CallLeafRuntimeStubCode";
+ Assembler _assembler_;
+ GenerateCallToCallLeafRuntimeStub(&_assembler_, value1, value2);
+ const Code& code = Code::Handle(Code::FinalizeCode(
+ *CreateFunction("Test_CallLeafRuntimeStubCode"), &_assembler_));
+ const Function& function = RegisterFakeFunction(kName, code);
+ Smi& result = Smi::Handle();
+ result ^= DartEntry::InvokeStatic(function, Object::empty_array());
+ EXPECT_EQ((value1 + value2), result.Value());
+}
+
+} // namespace dart
+
+#endif // defined TARGET_ARCH_MIPS
diff --git a/runtime/vm/symbols.cc b/runtime/vm/symbols.cc
index 0424891..a8d4cae 100644
--- a/runtime/vm/symbols.cc
+++ b/runtime/vm/symbols.cc
@@ -65,7 +65,7 @@
// The symbol_table needs to be reloaded as it might have grown in the
// previous iteration.
symbol_table = object_store->symbol_table();
- String* str = reinterpret_cast<String*>(Dart::AllocateReadOnlyHandle());
+ String* str = String::ReadOnlyHandle(isolate);
*str = OneByteString::New(names[i], Heap::kOld);
Add(symbol_table, *str);
symbol_handles_[i] = str;
@@ -81,7 +81,7 @@
ASSERT(idx < kMaxPredefinedId);
ASSERT(Utf::IsLatin1(c));
uint8_t ch = static_cast<uint8_t>(c);
- String* str = reinterpret_cast<String*>(Dart::AllocateReadOnlyHandle());
+ String* str = String::ReadOnlyHandle(isolate);
*str = OneByteString::New(&ch, 1, Heap::kOld);
Add(symbol_table, *str);
predefined_[c] = str->raw();
@@ -110,7 +110,7 @@
isolate->object_store()->symbol_table());
intptr_t table_size_index = symbol_table.Length() - 1;
dart::Smi& used = Smi::Handle();
- used |= symbol_table.At(table_size_index);
+ used ^= symbol_table.At(table_size_index);
return used.Value();
}
@@ -182,14 +182,14 @@
// First check if a symbol exists in the vm isolate for these characters.
symbol_table = Dart::vm_isolate()->object_store()->symbol_table();
intptr_t index = FindIndex(symbol_table, characters, len, hash);
- symbol |= symbol_table.At(index);
+ symbol ^= symbol_table.At(index);
if (symbol.IsNull()) {
// Now try in the symbol table of the current isolate.
symbol_table = isolate->object_store()->symbol_table();
index = FindIndex(symbol_table, characters, len, hash);
// Since we leave enough room in the table to guarantee, that we find an
// empty spot, index is the insertion point if symbol is null.
- symbol |= symbol_table.At(index);
+ symbol ^= symbol_table.At(index);
if (symbol.IsNull()) {
// Allocate new result string.
symbol = (*new_string)(characters, len, Heap::kOld);
@@ -243,14 +243,14 @@
// First check if a symbol exists in the vm isolate for these characters.
symbol_table = Dart::vm_isolate()->object_store()->symbol_table();
intptr_t index = FindIndex(symbol_table, str, begin_index, len, hash);
- symbol |= symbol_table.At(index);
+ symbol ^= symbol_table.At(index);
if (symbol.IsNull()) {
// Now try in the symbol table of the current isolate.
symbol_table = isolate->object_store()->symbol_table();
index = FindIndex(symbol_table, str, begin_index, len, hash);
// Since we leave enough room in the table to guarantee, that we find an
// empty spot, index is the insertion point if symbol is null.
- symbol |= symbol_table.At(index);
+ symbol ^= symbol_table.At(index);
if (symbol.IsNull()) {
if (str.IsOld() && begin_index == 0 && len == str.Length()) {
// Reuse the incoming str as the symbol value.
@@ -285,14 +285,14 @@
// First dump VM symbol table stats.
symbol_table = Dart::vm_isolate()->object_store()->symbol_table();
table_size = symbol_table.Length() - 1;
- used |= symbol_table.At(table_size);
+ used ^= symbol_table.At(table_size);
OS::Print("VM Isolate: Number of symbols : %"Pd"\n", used.Value());
OS::Print("VM Isolate: Symbol table capacity : %"Pd"\n", table_size);
// Now dump regular isolate symbol table stats.
symbol_table = Isolate::Current()->object_store()->symbol_table();
table_size = symbol_table.Length() - 1;
- used |= symbol_table.At(table_size);
+ used ^= symbol_table.At(table_size);
OS::Print("Isolate: Number of symbols : %"Pd"\n", used.Value());
OS::Print("Isolate: Symbol table capacity : %"Pd"\n", table_size);
@@ -319,7 +319,7 @@
String& element = String::Handle();
dart::Object& new_element = Object::Handle();
for (intptr_t i = 0; i < table_size; i++) {
- element |= symbol_table.At(i);
+ element ^= symbol_table.At(i);
if (!element.IsNull()) {
intptr_t hash = element.Hash();
intptr_t index = hash % new_table_size;
@@ -354,7 +354,7 @@
symbol.SetCanonical(); // Mark object as being canonical.
symbol_table.SetAt(index, symbol); // Remember the new symbol.
dart::Smi& used = Smi::Handle();
- used |= symbol_table.At(table_size);
+ used ^= symbol_table.At(table_size);
intptr_t used_elements = used.Value() + 1; // One more element added.
used = Smi::New(used_elements);
symbol_table.SetAt(table_size, used); // Update used count.
@@ -377,10 +377,10 @@
intptr_t num_collisions = 0;
String& symbol = String::Handle();
- symbol |= symbol_table.At(index);
+ symbol ^= symbol_table.At(index);
while (!symbol.IsNull() && !symbol.Equals(characters, len)) {
index = (index + 1) % table_size; // Move to next element.
- symbol |= symbol_table.At(index);
+ symbol ^= symbol_table.At(index);
num_collisions += 1;
}
if (FLAG_dump_symbol_stats) {
@@ -418,10 +418,10 @@
intptr_t num_collisions = 0;
String& symbol = String::Handle();
- symbol |= symbol_table.At(index);
+ symbol ^= symbol_table.At(index);
while (!symbol.IsNull() && !symbol.Equals(str, begin_index, len)) {
index = (index + 1) % table_size; // Move to next element.
- symbol |= symbol_table.At(index);
+ symbol ^= symbol_table.At(index);
num_collisions += 1;
}
if (FLAG_dump_symbol_stats) {
diff --git a/runtime/vm/vm_sources.gypi b/runtime/vm/vm_sources.gypi
index a769c92..1f53461 100644
--- a/runtime/vm/vm_sources.gypi
+++ b/runtime/vm/vm_sources.gypi
@@ -14,6 +14,7 @@
'assembler_test.cc',
'assembler_arm.cc',
'assembler_arm.h',
+ 'assembler_arm_test.cc',
'assembler_ia32.cc',
'assembler_ia32.h',
'assembler_ia32_test.cc',
@@ -28,6 +29,7 @@
'assembler_macros_x64.h',
'assembler_mips.cc',
'assembler_mips.h',
+ 'assembler_mips_test.cc',
'assembler_x64.cc',
'assembler_x64.h',
'assembler_x64_test.cc',
@@ -76,9 +78,11 @@
'code_patcher.h',
'code_patcher.cc',
'code_patcher_arm.cc',
+ 'code_patcher_arm_test.cc',
'code_patcher_ia32.cc',
'code_patcher_ia32_test.cc',
'code_patcher_mips.cc',
+ 'code_patcher_mips_test.cc',
'code_patcher_x64.cc',
'code_patcher_x64_test.cc',
'compiler.h',
@@ -186,11 +190,13 @@
'instructions.h',
'instructions_arm.cc',
'instructions_arm.h',
+ 'instructions_arm_test.cc',
'instructions_ia32.cc',
'instructions_ia32.h',
'instructions_ia32_test.cc',
'instructions_mips.cc',
'instructions_mips.h',
+ 'instructions_mips_test.cc',
'instructions_x64.cc',
'instructions_x64.h',
'instructions_x64_test.cc',
@@ -280,6 +286,11 @@
'scopes.cc',
'scopes.h',
'scopes_test.cc',
+ 'simulator.h',
+ 'simulator_arm.cc',
+ 'simulator_arm.h',
+ 'simulator_mips.cc',
+ 'simulator_mips.h',
'snapshot.cc',
'snapshot.h',
'snapshot_ids.h',
@@ -296,9 +307,11 @@
'stub_code.cc',
'stub_code.h',
'stub_code_arm.cc',
+ 'stub_code_arm_test.cc',
'stub_code_ia32.cc',
'stub_code_ia32_test.cc',
'stub_code_mips.cc',
+ 'stub_code_mips_test.cc',
'stub_code_x64.cc',
'stub_code_x64_test.cc',
'symbols.cc',
diff --git a/sdk/lib/_internal/compiler/implementation/apiimpl.dart b/sdk/lib/_internal/compiler/implementation/apiimpl.dart
index 3297e52..fd9ccd9 100644
--- a/sdk/lib/_internal/compiler/implementation/apiimpl.dart
+++ b/sdk/lib/_internal/compiler/implementation/apiimpl.dart
@@ -22,10 +22,12 @@
final Uri packageRoot;
List<String> options;
bool mockableLibraryUsed = false;
+ final Set<String> allowedLibraryCategories;
Compiler(this.provider, this.handler, this.libraryRoot, this.packageRoot,
List<String> options)
: this.options = options,
+ this.allowedLibraryCategories = getAllowedLibraryCategories(options),
super(
tracer: new ssa.HTracer(),
enableTypeAssertions: hasOption(options, '--enable-checked-mode'),
@@ -36,6 +38,7 @@
emitJavaScript: !hasOption(options, '--output-type=dart'),
disallowUnsafeEval: hasOption(options, '--disallow-unsafe-eval'),
analyzeAll: hasOption(options, '--analyze-all'),
+ analyzeOnly: hasOption(options, '--analyze-only'),
rejectDeprecatedFeatures:
hasOption(options, '--reject-deprecated-language-features'),
checkDeprecationInSdk:
@@ -59,17 +62,32 @@
return option.substring('--force-strip='.length).split(',');
}
}
- return [];
+ return const <String>[];
+ }
+
+ static Set<String> getAllowedLibraryCategories(List<String> options) {
+ for (String option in options) {
+ if (option.startsWith('--categories=')) {
+ var result = option.substring('--categories='.length).split(',');
+ result.add('Shared');
+ result.add('Internal');
+ return new Set<String>.from(result);
+ }
+ }
+ return new Set<String>.from(['Client', 'Shared', 'Internal']);
}
static bool hasOption(List<String> options, String option) {
return options.indexOf(option) >= 0;
}
+ // TODO(johnniwinther): Merge better with [translateDartUri] when
+ // [scanBuiltinLibrary] is removed.
String lookupLibraryPath(String dartLibraryName) {
LibraryInfo info = LIBRARIES[dartLibraryName];
if (info == null) return null;
if (!info.isDart2jsLibrary) return null;
+ if (!allowedLibraryCategories.contains(info.category)) return null;
String path = info.dart2jsPath;
if (path == null) {
path = info.path;
@@ -88,10 +106,7 @@
elements.LibraryElement scanBuiltinLibrary(String path) {
Uri uri = libraryRoot.resolve(lookupLibraryPath(path));
- Uri canonicalUri = null;
- if (!path.startsWith("_")) {
- canonicalUri = new Uri.fromComponents(scheme: "dart", path: path);
- }
+ Uri canonicalUri = new Uri.fromComponents(scheme: "dart", path: path);
elements.LibraryElement library =
libraryLoader.loadLibrary(uri, null, canonicalUri);
return library;
@@ -101,15 +116,30 @@
handler(null, null, null, message, api.Diagnostic.VERBOSE_INFO);
}
- leg.Script readScript(Uri uri, [tree.Node node]) {
+ /// See [leg.Compiler.translateResolvedUri].
+ Uri translateResolvedUri(elements.LibraryElement importingLibrary,
+ Uri resolvedUri, tree.Node node) {
+ if (resolvedUri.scheme == 'dart') {
+ return translateDartUri(importingLibrary, resolvedUri, node);
+ }
+ return resolvedUri;
+ }
+
+ /**
+ * Reads the script designated by [readableUri].
+ */
+ leg.Script readScript(Uri readableUri, [tree.Node node]) {
+ if (!readableUri.isAbsolute()) {
+ internalError('Relative uri $readableUri provided to readScript(Uri)',
+ node: node);
+ }
return fileReadingTask.measure(() {
- if (uri.scheme == 'dart') uri = translateDartUri(uri, node);
- var translated = translateUri(uri, node);
+ Uri resourceUri = translateUri(readableUri, node);
String text = "";
try {
// TODO(ahe): We expect the future to be complete and call value
// directly. In effect, we don't support truly asynchronous API.
- text = deprecatedFutureValue(provider(translated));
+ text = deprecatedFutureValue(provider(resourceUri));
} catch (exception) {
if (node != null) {
cancel("$exception", node: node);
@@ -118,31 +148,67 @@
throw new leg.CompilerCancelledException("$exception");
}
}
- SourceFile sourceFile = new SourceFile(translated.toString(), text);
- return new leg.Script(uri, sourceFile);
+ SourceFile sourceFile = new SourceFile(resourceUri.toString(), text);
+ // We use [readableUri] as the URI for the script since need to preserve
+ // the scheme in the script because [Script.uri] is used for resolving
+ // relative URIs mentioned in the script. See the comment on
+ // [LibraryLoader] for more details.
+ return new leg.Script(readableUri, sourceFile);
});
}
- Uri translateUri(Uri uri, tree.Node node) {
- switch (uri.scheme) {
- case 'package': return translatePackageUri(uri, node);
- default: return uri;
+ /**
+ * Translates a readable URI into a resource URI.
+ *
+ * See [LibraryLoader] for terminology on URIs.
+ */
+ Uri translateUri(Uri readableUri, tree.Node node) {
+ switch (readableUri.scheme) {
+ case 'package': return translatePackageUri(readableUri, node);
+ default: return readableUri;
}
}
- Uri translateDartUri(Uri uri, tree.Node node) {
- String path = lookupLibraryPath(uri.path);
- if (path == null || LIBRARIES[uri.path].category == "Internal") {
+ Uri translateDartUri(elements.LibraryElement importingLibrary,
+ Uri resolvedUri, tree.Node node) {
+ LibraryInfo libraryInfo = LIBRARIES[resolvedUri.path];
+ String path = lookupLibraryPath(resolvedUri.path);
+ if (libraryInfo != null &&
+ libraryInfo.category == "Internal") {
+ bool allowInternalLibraryAccess = false;
+ if (importingLibrary != null) {
+ if (importingLibrary.isPlatformLibrary || importingLibrary.isPatch) {
+ allowInternalLibraryAccess = true;
+ } else if (importingLibrary.canonicalUri.path.contains(
+ 'dart/tests/compiler/dart2js_native')) {
+ allowInternalLibraryAccess = true;
+ }
+ }
+ if (!allowInternalLibraryAccess) {
+ if (node != null && importingLibrary != null) {
+ reportDiagnostic(spanFromNode(node),
+ 'Error: Internal library $resolvedUri is not accessible from '
+ '${importingLibrary.canonicalUri}.',
+ api.Diagnostic.ERROR);
+ } else {
+ reportDiagnostic(null,
+ 'Error: Internal library $resolvedUri is not accessible.',
+ api.Diagnostic.ERROR);
+ }
+ //path = null;
+ }
+ }
+ if (path == null) {
if (node != null) {
- reportError(node, 'library not found ${uri}');
+ reportError(node, 'library not found ${resolvedUri}');
} else {
- reportDiagnostic(null, 'library not found ${uri}',
+ reportDiagnostic(null, 'library not found ${resolvedUri}',
api.Diagnostic.ERROR);
}
return null;
}
- if (uri.path == 'html' ||
- uri.path == 'io') {
+ if (resolvedUri.path == 'html' ||
+ resolvedUri.path == 'io') {
// TODO(ahe): Get rid of mockableLibraryUsed when test.dart
// supports this use case better.
mockableLibraryUsed = true;
@@ -159,6 +225,7 @@
translatePackageUri(Uri uri, tree.Node node) => packageRoot.resolve(uri.path);
bool run(Uri uri) {
+ log('Allowed library categories: $allowedLibraryCategories');
bool success = super.run(uri);
int cumulated = 0;
for (final task in tasks) {
diff --git a/sdk/lib/_internal/compiler/implementation/compiler.dart b/sdk/lib/_internal/compiler/implementation/compiler.dart
index 75a1eaa..0137e2f 100644
--- a/sdk/lib/_internal/compiler/implementation/compiler.dart
+++ b/sdk/lib/_internal/compiler/implementation/compiler.dart
@@ -193,6 +193,7 @@
*/
final int maxConcreteTypeSize;
final bool analyzeAll;
+ final bool analyzeOnly;
final bool enableNativeLiveTypeAnalysis;
final bool rejectDeprecatedFeatures;
final bool checkDeprecationInSdk;
@@ -204,6 +205,8 @@
bool disableInlining = false;
+ List<Uri> librariesToAnalyzeWhenRun;
+
final Tracer tracer;
CompilerTask measuredTask;
@@ -324,6 +327,7 @@
bool generateSourceMap: true,
bool disallowUnsafeEval: false,
this.analyzeAll: false,
+ this.analyzeOnly: false,
this.rejectDeprecatedFeatures: false,
this.checkDeprecationInSdk: false,
this.preserveComments: false,
@@ -488,33 +492,50 @@
LibraryElement scanBuiltinLibrary(String filename);
void initializeSpecialClasses() {
- final List missingClasses = [];
- ClassElement lookupSpecialClass(SourceString name) {
+ final List missingCoreClasses = [];
+ ClassElement lookupCoreClass(SourceString name) {
ClassElement result = coreLibrary.find(name);
if (result == null) {
- missingClasses.add(name.slowToString());
+ missingCoreClasses.add(name.slowToString());
}
return result;
}
- objectClass = lookupSpecialClass(const SourceString('Object'));
- boolClass = lookupSpecialClass(const SourceString('bool'));
- numClass = lookupSpecialClass(const SourceString('num'));
- intClass = lookupSpecialClass(const SourceString('int'));
- doubleClass = lookupSpecialClass(const SourceString('double'));
- stringClass = lookupSpecialClass(const SourceString('String'));
- functionClass = lookupSpecialClass(const SourceString('Function'));
- listClass = lookupSpecialClass(const SourceString('List'));
- typeClass = lookupSpecialClass(const SourceString('Type'));
- mapClass = lookupSpecialClass(const SourceString('Map'));
- jsInvocationMirrorClass =
- lookupSpecialClass(const SourceString('JSInvocationMirror'));
- closureClass = lookupSpecialClass(const SourceString('Closure'));
- dynamicClass = lookupSpecialClass(const SourceString('Dynamic_'));
- nullClass = lookupSpecialClass(const SourceString('Null'));
- types = new Types(this, dynamicClass);
- if (!missingClasses.isEmpty) {
- cancel('core library does not contain required classes: $missingClasses');
+ objectClass = lookupCoreClass(const SourceString('Object'));
+ boolClass = lookupCoreClass(const SourceString('bool'));
+ numClass = lookupCoreClass(const SourceString('num'));
+ intClass = lookupCoreClass(const SourceString('int'));
+ doubleClass = lookupCoreClass(const SourceString('double'));
+ stringClass = lookupCoreClass(const SourceString('String'));
+ functionClass = lookupCoreClass(const SourceString('Function'));
+ listClass = lookupCoreClass(const SourceString('List'));
+ typeClass = lookupCoreClass(const SourceString('Type'));
+ mapClass = lookupCoreClass(const SourceString('Map'));
+ if (!missingCoreClasses.isEmpty) {
+ internalErrorOnElement(coreLibrary,
+ 'dart:core library does not contain required classes: '
+ '$missingCoreClasses');
}
+
+ final List missingHelperClasses = [];
+ ClassElement lookupHelperClass(SourceString name) {
+ ClassElement result = jsHelperLibrary.find(name);
+ if (result == null) {
+ missingHelperClasses.add(name.slowToString());
+ }
+ return result;
+ }
+ jsInvocationMirrorClass =
+ lookupHelperClass(const SourceString('JSInvocationMirror'));
+ closureClass = lookupHelperClass(const SourceString('Closure'));
+ dynamicClass = lookupHelperClass(const SourceString('Dynamic_'));
+ nullClass = lookupHelperClass(const SourceString('Null'));
+ if (!missingHelperClasses.isEmpty) {
+ internalErrorOnElement(jsHelperLibrary,
+ 'dart:_js_helper library does not contain required classes: '
+ '$missingHelperClasses');
+ }
+
+ types = new Types(this, dynamicClass);
}
void scanBuiltinLibraries() {
@@ -529,18 +550,6 @@
isolateHelperLibrary.find(const SourceString('_WorkerStub'));
cls.setNative('"*Worker"');
- // The core library was loaded and patched before jsHelperLibrary was
- // initialized, so it wasn't imported into those two libraries during
- // patching.
- importHelperLibrary(coreLibrary);
- importHelperLibrary(interceptorsLibrary);
-
- importForeignLibrary(jsHelperLibrary);
- importForeignLibrary(interceptorsLibrary);
-
- importForeignLibrary(isolateHelperLibrary);
- importHelperLibrary(isolateHelperLibrary);
-
assertMethod = jsHelperLibrary.find(const SourceString('assertHelper'));
identicalFunction = coreLibrary.find(const SourceString('identical'));
@@ -573,94 +582,61 @@
*/
Uri resolvePatchUri(String dartLibraryPath);
- /** Define the JS helper functions in the given library. */
- void importForeignLibrary(LibraryElement library) {
- if (foreignLibrary != null) {
- libraryLoader.importLibrary(library, foreignLibrary, null);
- }
- }
-
- void importIsolateHelperLibrary(LibraryElement library) {
- if (isolateHelperLibrary != null) {
- libraryLoader.importLibrary(library, isolateHelperLibrary, null);
- }
- }
-
- // TODO(karlklose,floitsch): move this to the javascript backend.
- /** Enable the 'JS' helper for a library if needed. */
- void maybeEnableJSHelper(LibraryElement library) {
- String libraryName = library.uri.toString();
- bool nativeTest = library.entryCompilationUnit.script.name.contains(
- 'dart/tests/compiler/dart2js_native');
- if (nativeTest
- || libraryName == 'dart:async'
- || libraryName == 'dart:chrome'
- || libraryName == 'dart:mirrors'
- || libraryName == 'dart:math'
- || libraryName == 'dart:html'
- || libraryName == 'dart:html_common'
- || libraryName == 'dart:indexed_db'
- || libraryName == 'dart:svg'
- || libraryName == 'dart:web_audio') {
- if (nativeTest
- || libraryName == 'dart:html'
- || libraryName == 'dart:html_common'
- || libraryName == 'dart:indexed_db'
- || libraryName == 'dart:svg') {
- // dart:html and dart:svg need access to convertDartClosureToJS and
- // annotation classes.
- // dart:mirrors needs access to the Primitives class.
- importHelperLibrary(library);
- }
- library.addToScope(
- foreignLibrary.findLocal(const SourceString('JS')), this);
- Element jsIndexingBehaviorInterface =
- findHelper(const SourceString('JavaScriptIndexingBehavior'));
- if (jsIndexingBehaviorInterface != null) {
- library.addToScope(jsIndexingBehaviorInterface, this);
- }
- }
- }
-
- void maybeEnableIsolateHelper(LibraryElement library) {
- String libraryName = library.uri.toString();
- if (libraryName == 'dart:isolate'
- || libraryName == 'dart:html'
- // TODO(floitsch): create a separate async-helper library instead of
- // importing the isolate-library just for TimerImpl.
- || libraryName == 'dart:async') {
- importIsolateHelperLibrary(library);
- }
- }
-
void runCompiler(Uri uri) {
- log('compiling $uri ($BUILD_ID)');
+ assert(uri != null || analyzeOnly);
scanBuiltinLibraries();
- mainApp = libraryLoader.loadLibrary(uri, null, uri);
- libraries.forEach((_, library) {
- maybeEnableJSHelper(library);
- maybeEnableIsolateHelper(library);
- });
- final Element main = mainApp.find(MAIN);
- if (main == null) {
- reportFatalError('Could not find $MAIN', mainApp);
- } else {
- if (!main.isFunction()) reportFatalError('main is not a function', main);
- FunctionElement mainMethod = main;
- FunctionSignature parameters = mainMethod.computeSignature(this);
- parameters.forEachParameter((Element parameter) {
- reportFatalError('main cannot have parameters', parameter);
- });
+ if (librariesToAnalyzeWhenRun != null) {
+ for (Uri libraryUri in librariesToAnalyzeWhenRun) {
+ log('analyzing $libraryUri ($BUILD_ID)');
+ libraryLoader.loadLibrary(libraryUri, null, libraryUri);
+ }
+ }
+ if (uri != null) {
+ if (analyzeOnly) {
+ log('analyzing $uri ($BUILD_ID)');
+ } else {
+ log('compiling $uri ($BUILD_ID)');
+ }
+ mainApp = libraryLoader.loadLibrary(uri, null, uri);
+ }
+ Element main = null;
+ if (mainApp != null) {
+ main = mainApp.find(MAIN);
+ if (main == null) {
+ if (!analyzeOnly) {
+ // Allow analyze only of libraries with no main.
+ reportFatalError('Could not find $MAIN', mainApp);
+ } else if (!analyzeAll) {
+ reportFatalError(
+ "Could not find $MAIN. "
+ "No source will be analyzed. "
+ "Use '--analyze-all' to analyze all code in the library.",
+ mainApp);
+ }
+ } else {
+ if (!main.isFunction()) {
+ reportFatalError('main is not a function', main);
+ }
+ FunctionElement mainMethod = main;
+ FunctionSignature parameters = mainMethod.computeSignature(this);
+ parameters.forEachParameter((Element parameter) {
+ reportFatalError('main cannot have parameters', parameter);
+ });
+ }
}
log('Resolving...');
phase = PHASE_RESOLVING;
- if (analyzeAll) libraries.forEach((_, lib) => fullyEnqueueLibrary(lib));
+ if (analyzeAll) {
+ libraries.forEach((_, lib) => fullyEnqueueLibrary(lib));
+ }
backend.enqueueHelpers(enqueuer.resolution);
processQueue(enqueuer.resolution, main);
enqueuer.resolution.logSummary(log);
if (compilationFailed) return;
+ if (analyzeOnly) return;
+ assert(main != null);
log('Inferring types...');
typesTask.onResolutionComplete(main);
@@ -707,7 +683,9 @@
void processQueue(Enqueuer world, Element main) {
world.nativeEnqueuer.processNativeClasses(libraries.values);
- world.addToWorkList(main);
+ if (main != null) {
+ world.addToWorkList(main);
+ }
progress.reset();
world.forEach((WorkItem work) {
withCurrentElement(work.element, () => work.run(this, world));
@@ -944,7 +922,30 @@
return spanFromTokens(token, token, uri);
}
- Script readScript(Uri uri, [Node node]) {
+ /**
+ * Translates the [resolvedUri] into a readable URI.
+ *
+ * The [importingLibrary] holds the library importing [resolvedUri] or
+ * [:null:] if [resolvedUri] is loaded as the main library. The
+ * [importingLibrary] is used to grant access to internal libraries from
+ * platform libraries and patch libraries.
+ *
+ * If the [resolvedUri] is not accessible from [importingLibrary], this method
+ * is responsible for reporting errors.
+ *
+ * See [LibraryLoader] for terminology on URIs.
+ */
+ Uri translateResolvedUri(LibraryElement importingLibrary,
+ Uri resolvedUri, Node node) {
+ unimplemented('Compiler.translateResolvedUri');
+ }
+
+ /**
+ * Reads the script specified by the [readableUri].
+ *
+ * See [LibraryLoader] for terminology on URIs.
+ */
+ Script readScript(Uri readableUri, [Node node]) {
unimplemented('Compiler.readScript');
}
diff --git a/sdk/lib/_internal/compiler/implementation/dart2js.dart b/sdk/lib/_internal/compiler/implementation/dart2js.dart
index 62286a0..cf774f5 100644
--- a/sdk/lib/_internal/compiler/implementation/dart2js.dart
+++ b/sdk/lib/_internal/compiler/implementation/dart2js.dart
@@ -5,15 +5,17 @@
library dart2js;
import 'dart:async';
+import 'dart:collection' show Queue, LinkedHashMap;
import 'dart:io';
import 'dart:uri';
import 'dart:utf';
import '../compiler.dart' as api;
-import 'colors.dart' as colors;
import 'source_file.dart';
+import 'source_file_provider.dart';
import 'filenames.dart';
import 'util/uri_extras.dart';
+import '../../libraries.dart';
const String LIBRARY_ROOT = '../../../../..';
const String OUTPUT_LANGUAGE_DART = 'Dart';
@@ -69,9 +71,6 @@
void compile(List<String> argv) {
bool isWindows = (Platform.operatingSystem == 'windows');
Uri cwd = getCurrentDirectory();
- bool throwOnError = false;
- bool showWarnings = true;
- bool verbose = false;
Uri libraryRoot = cwd;
Uri out = cwd.resolve('out.js');
Uri sourceMapOut = cwd.resolve('out.js.map');
@@ -79,9 +78,12 @@
List<String> options = new List<String>();
bool explicitOut = false;
bool wantHelp = false;
- bool enableColors = false;
String outputLanguage = 'JavaScript';
bool stripArgumentSet = false;
+ bool analyzeOnly = false;
+ SourceFileProvider inputProvider = new SourceFileProvider();
+ FormattingDiagnosticHandler diagnosticHandler =
+ new FormattingDiagnosticHandler(inputProvider);
passThrough(String argument) => options.add(argument);
@@ -96,7 +98,7 @@
setOutput(String argument) {
explicitOut = true;
out = cwd.resolve(nativeToUriPath(extractParameter(argument)));
- sourceMapOut = new Uri.fromString('$out.map');
+ sourceMapOut = Uri.parse('$out.map');
}
setOutputType(String argument) {
@@ -121,12 +123,41 @@
passThrough(argument);
}
+ setAnalyzeOnly(String argument) {
+ analyzeOnly = true;
+ passThrough(argument);
+ }
+
+ setCategories(String argument) {
+ List<String> categories = extractParameter(argument).split(',');
+ Set<String> allowedCategories =
+ LIBRARIES.values.mappedBy((x) => x.category).toSet();
+ allowedCategories.remove('Shared');
+ allowedCategories.remove('Internal');
+ List<String> allowedCategoriesList =
+ new List<String>.from(allowedCategories);
+ allowedCategoriesList.sort();
+ if (categories.contains('all')) {
+ categories = allowedCategoriesList;
+ } else {
+ String allowedCategoriesString =
+ Strings.join(allowedCategoriesList, ', ');
+ for (String category in categories) {
+ if (!allowedCategories.contains(category)) {
+ fail('Error: unsupported library category "$category", '
+ 'supported categories are: $allowedCategoriesString');
+ }
+ }
+ }
+ return passThrough('--categories=${Strings.join(categories, ",")}');
+ }
+
handleShortOptions(String argument) {
var shortOptions = argument.substring(1).splitChars();
for (var shortOption in shortOptions) {
switch (shortOption) {
case 'v':
- verbose = true;
+ diagnosticHandler.verbose = true;
break;
case 'h':
case '?':
@@ -144,10 +175,12 @@
List<String> arguments = <String>[];
List<OptionHandler> handlers = <OptionHandler>[
new OptionHandler('-[chv?]+', handleShortOptions),
- new OptionHandler('--throw-on-error', (_) => throwOnError = true),
- new OptionHandler('--suppress-warnings', (_) => showWarnings = false),
+ new OptionHandler('--throw-on-error',
+ (_) => diagnosticHandler.throwOnError = true),
+ new OptionHandler('--suppress-warnings',
+ (_) => diagnosticHandler.showWarnings = false),
new OptionHandler('--output-type=dart|--output-type=js', setOutputType),
- new OptionHandler('--verbose', (_) => verbose = true),
+ new OptionHandler('--verbose', (_) => diagnosticHandler.verbose = true),
new OptionHandler('--library-root=.+', setLibraryRoot),
new OptionHandler('--out=.+|-o.+', setOutput),
new OptionHandler('--allow-mock-compilation', passThrough),
@@ -155,8 +188,9 @@
new OptionHandler('--force-strip=.*', setStrip),
// TODO(ahe): Remove the --no-colors option.
new OptionHandler('--disable-diagnostic-colors',
- (_) => enableColors = false),
- new OptionHandler('--enable-diagnostic-colors', (_) => enableColors = true),
+ (_) => diagnosticHandler.enableColors = false),
+ new OptionHandler('--enable-diagnostic-colors',
+ (_) => diagnosticHandler.enableColors = true),
new OptionHandler('--enable[_-]checked[_-]mode|--checked',
(_) => passThrough('--enable-checked-mode')),
new OptionHandler('--enable-concrete-type-inference',
@@ -165,11 +199,13 @@
new OptionHandler('--package-root=.+|-p.+', setPackageRoot),
new OptionHandler('--disallow-unsafe-eval', passThrough),
new OptionHandler('--analyze-all', passThrough),
+ new OptionHandler('--analyze-only', setAnalyzeOnly),
new OptionHandler('--disable-native-live-type-analysis', passThrough),
new OptionHandler('--enable-native-live-type-analysis', passThrough),
new OptionHandler('--reject-deprecated-language-features', passThrough),
new OptionHandler('--report-sdk-use-of-deprecated-language-features',
passThrough),
+ new OptionHandler('--categories=.*', setCategories),
// The following two options must come last.
new OptionHandler('-.*', (String argument) {
@@ -181,7 +217,7 @@
];
parseCommandLine(handlers, argv);
- if (wantHelp) helpAndExit(verbose);
+ if (wantHelp) helpAndExit(diagnosticHandler.verbose);
if (outputLanguage != OUTPUT_LANGUAGE_DART && stripArgumentSet) {
helpAndFail('Error: --force-strip may only be used with '
@@ -195,41 +231,6 @@
helpAndFail('Error: Extra arguments: ${Strings.join(extra, " ")}');
}
- Map<String, SourceFile> sourceFiles = <String, SourceFile>{};
- int dartBytesRead = 0;
-
- Future<String> provider(Uri uri) {
- if (uri.scheme != 'file') {
- throw new ArgumentError(uri);
- }
- String source;
- try {
- source = readAll(uriPathToNative(uri.path));
- } on FileIOException catch (ex) {
- throw 'Error: Cannot read "${relativize(cwd, uri, isWindows)}" '
- '(${ex.osError}).';
- }
- dartBytesRead += source.length;
- sourceFiles[uri.toString()] =
- new SourceFile(relativize(cwd, uri, isWindows), source);
- return new Future.immediate(source);
- }
-
- void info(var message, [api.Diagnostic kind = api.Diagnostic.VERBOSE_INFO]) {
- if (!verbose && identical(kind, api.Diagnostic.VERBOSE_INFO)) return;
- if (enableColors) {
- print('${colors.green("info:")} $message');
- } else {
- print('info: $message');
- }
- }
-
- bool isAborting = false;
-
- final int FATAL = api.Diagnostic.CRASH.ordinal | api.Diagnostic.ERROR.ordinal;
- final int INFO =
- api.Diagnostic.INFO.ordinal | api.Diagnostic.VERBOSE_INFO.ordinal;
-
void handler(Uri uri, int begin, int end, String message,
api.Diagnostic kind) {
if (identical(kind.name, 'source map')) {
@@ -238,45 +239,7 @@
writeString(sourceMapOut, message);
return;
}
-
- if (isAborting) return;
- isAborting = identical(kind, api.Diagnostic.CRASH);
- bool fatal = (kind.ordinal & FATAL) != 0;
- bool isInfo = (kind.ordinal & INFO) != 0;
- if (isInfo && uri == null && !identical(kind, api.Diagnostic.INFO)) {
- info(message, kind);
- return;
- }
- var color;
- if (!enableColors) {
- color = (x) => x;
- } else if (identical(kind, api.Diagnostic.ERROR)) {
- color = colors.red;
- } else if (identical(kind, api.Diagnostic.WARNING)) {
- color = colors.magenta;
- } else if (identical(kind, api.Diagnostic.LINT)) {
- color = colors.magenta;
- } else if (identical(kind, api.Diagnostic.CRASH)) {
- color = colors.red;
- } else if (identical(kind, api.Diagnostic.INFO)) {
- color = colors.green;
- } else {
- throw 'Unknown kind: $kind (${kind.ordinal})';
- }
- if (uri == null) {
- assert(fatal);
- print(color(message));
- } else if (fatal || showWarnings) {
- SourceFile file = sourceFiles[uri.toString()];
- if (file == null) {
- throw '$uri: file is null';
- }
- print(file.getLocationMessage(color(message), begin, end, true, color));
- }
- if (fatal && throwOnError) {
- isAborting = true;
- throw new AbortLeg(message);
- }
+ diagnosticHandler.diagnosticHandler(uri, begin, end, message, kind);
}
Uri uri = cwd.resolve(arguments[0]);
@@ -284,12 +247,17 @@
packageRoot = uri.resolve('./packages/');
}
- info('package root is $packageRoot');
+ diagnosticHandler.info('package root is $packageRoot');
// TODO(ahe): We expect the future to be complete and call value
// directly. In effect, we don't support truly asynchronous API.
String code = deprecatedFutureValue(
- api.compile(uri, libraryRoot, packageRoot, provider, handler, options));
+ api.compile(uri, libraryRoot, packageRoot,
+ inputProvider.readStringFromUri,
+ handler,
+ options));
+ if (analyzeOnly) return;
+
if (code == null) {
fail('Error: Compilation failed.');
}
@@ -297,10 +265,13 @@
sourceMapOut.path.substring(sourceMapOut.path.lastIndexOf('/') + 1);
code = '$code\n//@ sourceMappingURL=${sourceMapFileName}';
writeString(out, code);
- writeString(new Uri.fromString('$out.deps'), getDepsOutput(sourceFiles));
+ writeString(Uri.parse('$out.deps'),
+ getDepsOutput(inputProvider.sourceFiles));
+ int dartBytesRead = inputProvider.dartBytesRead;
int bytesWritten = code.length;
- info('compiled $dartBytesRead bytes Dart -> $bytesWritten bytes '
- '$outputLanguage in ${relativize(cwd, out, isWindows)}');
+ diagnosticHandler.info(
+ 'compiled $dartBytesRead bytes Dart -> $bytesWritten bytes '
+ '$outputLanguage in ${relativize(cwd, out, isWindows)}');
if (!explicitOut) {
String input = uriPathToNative(arguments[0]);
String output = relativize(cwd, out, isWindows);
@@ -323,15 +294,6 @@
file.closeSync();
}
-String readAll(String filename) {
- var file = (new File(filename)).openSync(FileMode.READ);
- var length = file.lengthSync();
- var buffer = new List<int>.fixedLength(length);
- var bytes = file.readListSync(buffer, 0, length);
- file.closeSync();
- return new String.fromCharCodes(new Utf8Decoder(buffer).decodeRest());
-}
-
void fail(String message) {
print(message);
exit(1);
@@ -388,6 +350,9 @@
finding errors in libraries, but using it can result in bigger and
slower output.
+ --analyze-only
+ Analyze but do not generate code.
+
--minify
Generate minified output.
@@ -439,6 +404,13 @@
--reject-deprecated-language-features controls if these usages are
reported as errors or warnings.
+ --categories=<categories>
+
+ A comma separated list of allowed library categories. The default
+ is "Client". Possible categories can be seen by providing an
+ unsupported category, for example, --categories=help. To enable
+ all categories, use --categories=all.
+
'''.trim());
}
diff --git a/sdk/lib/_internal/compiler/implementation/dart2jslib.dart b/sdk/lib/_internal/compiler/implementation/dart2jslib.dart
index 7d31235..a5c63c37 100644
--- a/sdk/lib/_internal/compiler/implementation/dart2jslib.dart
+++ b/sdk/lib/_internal/compiler/implementation/dart2jslib.dart
@@ -5,6 +5,7 @@
library dart2js;
import 'dart:uri';
+import 'dart:collection' show Queue, LinkedHashMap;
import 'closure.dart' as closureMapping;
import 'dart_backend/dart_backend.dart' as dart_backend;
diff --git a/sdk/lib/_internal/compiler/implementation/dart_backend/backend.dart b/sdk/lib/_internal/compiler/implementation/dart_backend/backend.dart
index 2a49c2f..e2be554 100644
--- a/sdk/lib/_internal/compiler/implementation/dart_backend/backend.dart
+++ b/sdk/lib/_internal/compiler/implementation/dart_backend/backend.dart
@@ -161,6 +161,26 @@
}
}
+ void processTypeAnnotationList(Element classElement, NodeList annotations) {
+ for (Link link = annotations.nodes; !link.isEmpty; link = link.tail) {
+ TypeAnnotation typeAnnotation = link.head;
+ NodeList typeArguments = typeAnnotation.typeArguments;
+ processTypeArguments(classElement, typeArguments);
+ }
+ }
+
+ void processSuperclassTypeArguments(Element classElement, Node superclass) {
+ if (superclass == null) return;
+ MixinApplication superMixinApplication = superclass.asMixinApplication();
+ if (superMixinApplication != null) {
+ processTypeAnnotationList(classElement, superMixinApplication.mixins);
+ } else {
+ TypeAnnotation typeAnnotation = superclass;
+ NodeList typeArguments = typeAnnotation.typeArguments;
+ processTypeArguments(classElement, typeArguments);
+ }
+ }
+
while (!workQueue.isEmpty) {
DartType type = workQueue.removeLast();
if (processedTypes.contains(type)) continue;
@@ -168,32 +188,20 @@
if (type is TypedefType) return false;
if (type is InterfaceType) {
ClassElement element = type.element;
- // TODO(kasperl): Deal with mixin applications.
- if (element.isMixinApplication) continue;
- ClassNode node = element.parseNode(compiler);
- // Check class type args.
- processTypeArguments(element, node.typeParameters);
- // Check superclass type args.
- if (node.superclass != null) {
- MixinApplication superMixin = node.superclass.asMixinApplication();
- if (superMixin != null) {
- for (Link<Node> link = superMixin.mixins.nodes;
- !link.isEmpty;
- link = link.tail) {
- TypeAnnotation currentMixin = link.head;
- processTypeArguments(element, currentMixin.typeArguments);
- }
- } else {
- TypeAnnotation superclass = node.superclass;
- NodeList typeArguments = superclass.typeArguments;
- processTypeArguments(element, typeArguments);
+ Node node = element.parseNode(compiler);
+ if (node is ClassNode) {
+ ClassNode classNode = node;
+ processTypeArguments(element, classNode.typeParameters);
+ processSuperclassTypeArguments(element, classNode.superclass);
+ processTypeAnnotationList(element, classNode.interfaces);
+ } else {
+ MixinApplication mixinNode = node;
+ processSuperclassTypeArguments(element, mixinNode.superclass);
+ if (mixinNode is NamedMixinApplication) {
+ NamedMixinApplication namedMixinNode = mixinNode;
+ processTypeArguments(element, namedMixinNode.typeParameters);
}
}
- // Check interfaces type args.
- for (Node interfaceNode in node.interfaces) {
- processTypeArguments(
- element, (interfaceNode as TypeAnnotation).typeArguments);
- }
// Check all supertypes.
if (element.allSupertypes != null) {
workQueue.addAll(element.allSupertypes.toList());
@@ -242,7 +250,7 @@
for (final library in compiler.libraries.values) {
if (!library.isPlatformLibrary) continue;
library.implementation.forEachLocalMember((Element element) {
- if (element is ClassElement) {
+ if (element.isClass()) {
ClassElement classElement = element;
// Make sure we parsed the class to initialize its local members.
// TODO(smok): Figure out if there is a better way to fill local
@@ -312,8 +320,6 @@
}
addClass(classElement) {
- // TODO(kasperl): Deal with mixin applications.
- if (classElement.isMixinApplication) return;
addTopLevel(classElement,
new ElementAst.forClassLike(parse(classElement)));
classMembers.putIfAbsent(classElement, () => new Set());
@@ -377,14 +383,14 @@
// TODO(antonm): check with AAR team if there is better approach.
// As an idea: provide template as a Dart code---class C { C.name(); }---
// and then overwrite necessary parts.
+ ClassNode classNode = classElement.parseNode(compiler);
SynthesizedConstructorElementX constructor =
new SynthesizedConstructorElementX(classElement);
constructor.type = new FunctionType(
compiler.types.voidType, const Link<DartType>(),
constructor);
constructor.cachedNode = new FunctionExpression(
- new Send(classElement.parseNode(compiler).name,
- synthesizedIdentifier),
+ new Send(classNode.name, synthesizedIdentifier),
new NodeList(new StringToken(OPEN_PAREN_INFO, '(', -1),
const Link<Node>(),
new StringToken(CLOSE_PAREN_INFO, ')', -1)),
@@ -404,7 +410,7 @@
collector.unresolvedNodes.add(synthesizedIdentifier);
makePlaceholders(element) {
collector.collect(element);
- if (element is ClassElement) {
+ if (element.isClass()) {
classMembers[element].forEach(makePlaceholders);
}
}
@@ -434,7 +440,7 @@
// Emit XML for AST instead of the program.
for (final topLevel in sortedTopLevels) {
- if (topLevel is ClassElement) {
+ if (topLevel.isClass()) {
// TODO(antonm): add some class info.
sortedClassMembers[topLevel].forEach(outputElement);
} else {
@@ -449,7 +455,7 @@
final memberNodes = new Map<ClassNode, List<Node>>();
for (final element in sortedTopLevels) {
topLevelNodes.add(elementAsts[element].ast);
- if (element is ClassElement) {
+ if (element.isClass() && !element.isMixinApplication) {
final members = <Node>[];
for (final member in sortedClassMembers[element]) {
members.add(elementAsts[member].ast);
@@ -573,7 +579,7 @@
}
compareElements(e0, e1) {
- int result = compareBy((e) => e.getLibrary().uri.toString())(e0, e1);
+ int result = compareBy((e) => e.getLibrary().canonicalUri.toString())(e0, e1);
if (result != 0) return result;
return compareBy((e) => e.position().charOffset)(e0, e1);
}
diff --git a/sdk/lib/_internal/compiler/implementation/dart_backend/emitter.dart b/sdk/lib/_internal/compiler/implementation/dart_backend/emitter.dart
index 4cf87767..c074af4 100644
--- a/sdk/lib/_internal/compiler/implementation/dart_backend/emitter.dart
+++ b/sdk/lib/_internal/compiler/implementation/dart_backend/emitter.dart
@@ -10,7 +10,7 @@
Collection<Node> topLevelNodes,
Map<ClassNode, Collection<Node>> classMembers) {
imports.forEach((libraryElement, prefix) {
- unparser.unparseImportTag('${libraryElement.uri}', prefix);
+ unparser.unparseImportTag('${libraryElement.canonicalUri}', prefix);
});
for (final node in topLevelNodes) {
diff --git a/sdk/lib/_internal/compiler/implementation/dart_backend/placeholder_collector.dart b/sdk/lib/_internal/compiler/implementation/dart_backend/placeholder_collector.dart
index a844975..d184663 100644
--- a/sdk/lib/_internal/compiler/implementation/dart_backend/placeholder_collector.dart
+++ b/sdk/lib/_internal/compiler/implementation/dart_backend/placeholder_collector.dart
@@ -417,8 +417,10 @@
if (Elements.isStaticOrTopLevel(element)) {
// TODO(smok): Worth investigating why sometimes we get getter/setter
// here and sometimes abstract field.
- assert(element is VariableElement || element.isAccessor()
- || element.isAbstractField() || element.isFunction());
+ assert(element.isClass() || element is VariableElement ||
+ element.isAccessor() || element.isAbstractField() ||
+ element.isFunction() || element.isTypedef() ||
+ element is TypeVariableElement);
makeElementPlaceholder(send.selector, element);
} else {
assert(send.selector is Identifier);
diff --git a/sdk/lib/_internal/compiler/implementation/dart_backend/renamer.dart b/sdk/lib/_internal/compiler/implementation/dart_backend/renamer.dart
index 5c2a13e..4b9f3e0 100644
--- a/sdk/lib/_internal/compiler/implementation/dart_backend/renamer.dart
+++ b/sdk/lib/_internal/compiler/implementation/dart_backend/renamer.dart
@@ -134,15 +134,16 @@
}
Function makeElementRenamer(rename, generateUniqueName) => (element) {
- assert(Elements.isStaticOrTopLevel(element)
- || element is TypeVariableElement);
+ assert(Elements.isErroneousElement(element) ||
+ Elements.isStaticOrTopLevel(element) ||
+ element is TypeVariableElement);
// TODO(smok): We may want to reuse class static field and method names.
String originalName = element.name.slowToString();
LibraryElement library = element.getLibrary();
if (identical(element.getLibrary(), compiler.coreLibrary)) {
return originalName;
}
- if (library.isPlatformLibrary) {
+ if (library.isPlatformLibrary && !library.isInternalLibrary) {
assert(element.isTopLevel());
final prefix =
imports.putIfAbsent(library, () => generateUniqueName('p'));
@@ -154,7 +155,7 @@
Function makeRenamer(generateUniqueName) =>
(library, originalName) =>
- renamed.putIfAbsent(library, () => <String>{})
+ renamed.putIfAbsent(library, () => {})
.putIfAbsent(originalName,
() => generateUniqueName(originalName));
diff --git a/sdk/lib/_internal/compiler/implementation/dart_backend/utils.dart b/sdk/lib/_internal/compiler/implementation/dart_backend/utils.dart
index cd0f527..0d421b3 100644
--- a/sdk/lib/_internal/compiler/implementation/dart_backend/utils.dart
+++ b/sdk/lib/_internal/compiler/implementation/dart_backend/utils.dart
@@ -118,12 +118,14 @@
node.token, node.dartString);
visitMixinApplication(MixinApplication node) => new MixinApplication(
- visit(node.modifiers), visit(node.superclass), visit(node.mixins));
+ visit(node.superclass), visit(node.mixins));
visitNamedMixinApplication(NamedMixinApplication node) =>
- new NamedMixinApplication(node.name,
- node.typeParameters,
- node.mixinApplication,
+ new NamedMixinApplication(visit(node.name),
+ visit(node.typeParameters),
+ visit(node.modifiers),
+ visit(node.mixinApplication),
+ visit(node.interfaces),
node.typedefKeyword,
node.endToken);
diff --git a/sdk/lib/_internal/compiler/implementation/elements/elements.dart b/sdk/lib/_internal/compiler/implementation/elements/elements.dart
index 6b29922..8d94a9d 100644
--- a/sdk/lib/_internal/compiler/implementation/elements/elements.dart
+++ b/sdk/lib/_internal/compiler/implementation/elements/elements.dart
@@ -199,6 +199,7 @@
void addMetadata(MetadataAnnotation annotation);
void setNative(String name);
void setFixedBackendName(String name);
+
Scope buildScope();
}
@@ -469,14 +470,30 @@
}
abstract class LibraryElement extends Element implements ScopeContainerElement {
- Uri get uri;
+ /**
+ * The canonical uri for this library.
+ *
+ * For user libraries the canonical uri is the script uri. For platform
+ * libraries the canonical uri is of the form [:dart:x:].
+ */
+ Uri get canonicalUri;
CompilationUnitElement get entryCompilationUnit;
Link<CompilationUnitElement> get compilationUnits;
Link<LibraryTag> get tags;
LibraryName get libraryTag;
Link<Element> get exports;
+ /**
+ * [:true:] if this library is part of the platform, that is its canonical
+ * uri has the scheme 'dart'.
+ */
bool get isPlatformLibrary;
+
+ /**
+ * [:true:] if this library is a platform library whose path starts with
+ * an underscore.
+ */
+ bool get isInternalLibrary;
bool get canUseNative;
bool get exportsHandled;
@@ -665,7 +682,6 @@
bool implementsInterface(ClassElement intrface);
bool isShadowedByField(Element fieldMember);
- ClassNode parseNode(Compiler compiler);
ClassElement ensureResolved(Compiler compiler);
void addMember(Element element, DiagnosticListener listener);
diff --git a/sdk/lib/_internal/compiler/implementation/elements/modelx.dart b/sdk/lib/_internal/compiler/implementation/elements/modelx.dart
index 5fa9a3b0..2d1bf8f 100644
--- a/sdk/lib/_internal/compiler/implementation/elements/modelx.dart
+++ b/sdk/lib/_internal/compiler/implementation/elements/modelx.dart
@@ -507,8 +507,8 @@
partTag = tag;
LibraryName libraryTag = getLibrary().libraryTag;
if (libraryTag != null) {
- String expectedName = tag.name.toString();
- String actualName = libraryTag.name.toString();
+ String actualName = tag.name.toString();
+ String expectedName = libraryTag.name.toString();
if (expectedName != actualName) {
listener.reportMessage(
listener.spanFromSpannable(tag.name),
@@ -522,7 +522,7 @@
}
class LibraryElementX extends ElementX implements LibraryElement {
- final Uri uri;
+ final Uri canonicalUri;
CompilationUnitElement entryCompilationUnit;
Link<CompilationUnitElement> compilationUnits =
const Link<CompilationUnitElement>();
@@ -564,8 +564,8 @@
*/
Link<Element> slotForExports;
- LibraryElementX(Script script, [Uri uri, LibraryElement this.origin])
- : this.uri = ((uri == null) ? script.uri : uri),
+ LibraryElementX(Script script, [Uri canonicalUri, LibraryElement this.origin])
+ : this.canonicalUri = ((canonicalUri == null) ? script.uri : canonicalUri),
importScope = new Map<SourceString, Element>(),
super(new SourceString(script.name), ElementKind.LIBRARY, null) {
entryCompilationUnit = new CompilationUnitElementX(script, this);
@@ -728,14 +728,17 @@
return libraryTag.name.toString();
} else {
// Use the file name as script name.
- String path = uri.path;
+ String path = canonicalUri.path;
return path.substring(path.lastIndexOf('/') + 1);
}
}
Scope buildScope() => new LibraryScope(this);
- bool get isPlatformLibrary => uri.scheme == "dart";
+ bool get isPlatformLibrary => canonicalUri.scheme == "dart";
+
+ bool get isInternalLibrary =>
+ isPlatformLibrary && canonicalUri.path.startsWith('_');
String toString() {
if (origin != null) {
@@ -1367,17 +1370,10 @@
bool get hasBackendMembers => !backendMembers.isEmpty;
- InterfaceType computeType(compiler) {
+ InterfaceType computeType(Compiler compiler) {
if (thisType == null) {
if (origin == null) {
- Link<DartType> parameters = const Link<DartType>();
- // TODO(kasperl): Figure out how to get the type parameters
- // for a mixin application.
- if (!isMixinApplication) {
- ClassNode node = parseNode(compiler);
- parameters = TypeDeclarationElementX.createTypeVariables(
- this, node.typeParameters);
- }
+ Link<DartType> parameters = computeTypeParameters(compiler);
thisType = new InterfaceType(this, parameters);
if (parameters.isEmpty) {
rawType = thisType;
@@ -1397,6 +1393,8 @@
return thisType;
}
+ Link<DartType> computeTypeParameters(Compiler compiler);
+
/**
* Return [:true:] if this element is the [:Object:] class for the [compiler].
*/
@@ -1764,6 +1762,12 @@
addToScope(constructor, compiler);
}
+ Link<DartType> computeTypeParameters(Compiler compiler) {
+ ClassNode node = parseNode(compiler);
+ return TypeDeclarationElementX.createTypeVariables(
+ this, node.typeParameters);
+ }
+
Scope buildScope() => new ClassScope(enclosingElement.buildScope(), this);
String toString() {
@@ -1779,7 +1783,8 @@
class MixinApplicationElementX extends BaseClassElementX
implements MixinApplicationElement {
- final Node cachedNode;
+ final Node node;
+ final Modifiers modifiers;
FunctionElement constructor;
ClassElement mixin;
@@ -1790,24 +1795,29 @@
final ClassElement origin = null;
MixinApplicationElementX(SourceString name, Element enclosing, int id,
- this.cachedNode)
+ this.node, this.modifiers)
: super(name, enclosing, id, STATE_NOT_STARTED);
bool get isMixinApplication => true;
bool get hasConstructor => constructor != null;
bool get hasLocalScopeMembers => false;
- Token position() => cachedNode.getBeginToken();
+ Token position() => node.getBeginToken();
- Node parseNode(DiagnosticListener listener) => cachedNode;
+ Node parseNode(DiagnosticListener listener) => node;
Element localLookup(SourceString name) {
if (this.name == name) return constructor;
- if (mixin != null) return mixin.localLookup(name);
+ if (mixin == null) return null;
+ Element mixedInElement = mixin.localLookup(name);
+ if (mixedInElement == null) return null;
+ return mixedInElement.isInstanceMember() ? mixedInElement : null;
}
void forEachLocalMember(void f(Element member)) {
- if (mixin != null) mixin.forEachLocalMember(f);
+ if (mixin != null) mixin.forEachLocalMember((Element mixedInElement) {
+ if (mixedInElement.isInstanceMember()) f(mixedInElement);
+ });
}
void addMember(Element element, DiagnosticListener listener) {
@@ -1822,6 +1832,13 @@
assert(!hasConstructor);
this.constructor = constructor;
}
+
+ Link<DartType> computeTypeParameters(Compiler compiler) {
+ NamedMixinApplication named = node.asNamedMixinApplication();
+ if (named == null) return const Link<DartType>();
+ return TypeDeclarationElementX.createTypeVariables(
+ this, named.typeParameters);
+ }
}
class LabelElementX extends ElementX implements LabelElement {
diff --git a/sdk/lib/_internal/compiler/implementation/enqueue.dart b/sdk/lib/_internal/compiler/implementation/enqueue.dart
index f88c87e..ea98278 100644
--- a/sdk/lib/_internal/compiler/implementation/enqueue.dart
+++ b/sdk/lib/_internal/compiler/implementation/enqueue.dart
@@ -198,7 +198,7 @@
cls.ensureResolved(compiler);
cls.implementation.forEachMember(processInstantiatedClassMember);
if (isResolutionQueue) {
- compiler.resolver.checkMembers(cls);
+ compiler.resolver.checkClass(cls);
}
if (compiler.enableTypeAssertions) {
@@ -417,7 +417,7 @@
// isolate library, or timers for the async library.
LibraryElement library = element.getLibrary();
if (!compiler.hasIsolateSupport()) {
- String uri = library.uri.toString();
+ String uri = library.canonicalUri.toString();
if (uri == 'dart:isolate') {
enableIsolateSupport(library);
} else if (uri == 'dart:async') {
diff --git a/sdk/lib/_internal/compiler/implementation/js/nodes.dart b/sdk/lib/_internal/compiler/implementation/js/nodes.dart
index 38fb316..8a4960a 100644
--- a/sdk/lib/_internal/compiler/implementation/js/nodes.dart
+++ b/sdk/lib/_internal/compiler/implementation/js/nodes.dart
@@ -865,6 +865,10 @@
return new Binary('==', left, right);
}
+Binary strictEquals(Expression left, Expression right) {
+ return new Binary('===', left, right);
+}
+
LiteralString string(String value) => new LiteralString('"$value"');
If if_(Expression condition, Node then, [Node otherwise]) {
diff --git a/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart b/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
index 8393b4c..a3e2a7e 100644
--- a/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
+++ b/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
@@ -13,9 +13,7 @@
ReturnInfo(HType this.returnType)
: compiledFunctions = new List<Element>();
- ReturnInfo.unknownType()
- : this.returnType = null,
- compiledFunctions = new List<Element>();
+ ReturnInfo.unknownType() : this(null);
void update(HType type, Recompile recompile, Compiler compiler) {
HType newType =
@@ -128,6 +126,7 @@
bool get hasNamedArguments => namedArguments != null;
int get length => types.length;
HType operator[](int index) => types[index];
+ void operator[]=(int index, HType type) { types[index] = type; }
HTypeList union(HTypeList other, Compiler compiler) {
if (allUnknown) return this;
@@ -482,9 +481,7 @@
staticTypeMap[element] = HTypeList.ALL_UNKNOWN;
}
- void registerDynamicInvocation(HInvokeDynamic node,
- Selector selector,
- HTypeMap types) {
+ void registerDynamicInvocation(HTypeList providedTypes, Selector selector) {
if (selector.isClosureCall()) {
// We cannot use the current framework to do optimizations based
// on the 'call' selector because we are also generating closure
@@ -492,8 +489,6 @@
// track parameter types, nor invalidates optimized methods.
return;
}
- HTypeList providedTypes =
- new HTypeList.fromDynamicInvocation(node, selector, types);
if (!selectorTypeMap.containsKey(selector)) {
selectorTypeMap[selector] = providedTypes;
} else {
@@ -643,7 +638,7 @@
Element jsStringConcat;
Element getInterceptorMethod;
Element fixedLengthListConstructor;
- bool _interceptorsAreInitialized = false;
+ bool seenAnyClass = false;
final Namer namer;
@@ -665,8 +660,6 @@
ArgumentTypesRegistry argumentTypes;
FieldTypesRegistry fieldTypes;
- final Interceptors interceptors;
-
/**
* A collection of selectors of intercepted method calls. The
* emitter uses this set to generate the [:ObjectInterceptor:] class
@@ -675,6 +668,12 @@
final Set<Selector> usedInterceptors;
/**
+ * A collection of selectors that must have a one shot interceptor
+ * generated.
+ */
+ final Set<Selector> oneShotInterceptors;
+
+ /**
* The members of instantiated interceptor classes: maps a member
* name to the list of members that have that name. This map is used
* by the codegen to know whether a send must be intercepted or not.
@@ -708,8 +707,8 @@
: namer = determineNamer(compiler),
returnInfo = new Map<Element, ReturnInfo>(),
invalidateAfterCodegen = new List<Element>(),
- interceptors = new Interceptors(compiler),
usedInterceptors = new Set<Selector>(),
+ oneShotInterceptors = new Set<Selector>(),
interceptedElements = new Map<SourceString, Set<Element>>(),
rti = new RuntimeTypeInformation(compiler),
specializedGetInterceptors =
@@ -741,6 +740,10 @@
usedInterceptors.add(selector);
}
+ void addOneShotInterceptor(Selector selector) {
+ oneShotInterceptors.add(selector);
+ }
+
/**
* Returns a set of interceptor classes that contain a member whose
* signature matches the given [selector]. Returns [:null:] if there
@@ -817,12 +820,12 @@
enqueuer.registerInstantiatedClass(cls);
}
- String registerSpecializedGetInterceptor(Set<ClassElement> classes) {
+ void registerSpecializedGetInterceptor(Set<ClassElement> classes) {
compiler.enqueuer.codegen.registerInstantiatedClass(objectInterceptorClass);
+ String name = namer.getInterceptorName(getInterceptorMethod, classes);
if (classes.contains(compiler.objectClass)) {
// We can't use a specialized [getInterceptorMethod], so we make
// sure we emit the one with all checks.
- String name = namer.getName(getInterceptorMethod);
specializedGetInterceptors.putIfAbsent(name, () {
// It is important to take the order provided by the map,
// because we want the int type check to happen before the
@@ -835,20 +838,30 @@
});
return keys;
});
- return namer.isolateAccess(getInterceptorMethod);
} else {
- String name = namer.getSpecializedName(getInterceptorMethod, classes);
specializedGetInterceptors[name] = classes;
- return '${namer.CURRENT_ISOLATE}.$name';
}
}
+ void initializeNoSuchMethod() {
+ // In case the emitter generates noSuchMethod calls, we need to
+ // make sure all [noSuchMethod] methods know they might take a
+ // [JsInvocationMirror] as parameter.
+ HTypeList types = new HTypeList(1);
+ types[0] = new HType.fromBoundedType(
+ compiler.jsInvocationMirrorClass.computeType(compiler),
+ compiler,
+ false);
+ argumentTypes.registerDynamicInvocation(types, new Selector.noSuchMethod());
+ }
+
void registerInstantiatedClass(ClassElement cls, Enqueuer enqueuer) {
- ClassElement result = null;
- if (!_interceptorsAreInitialized) {
+ if (!seenAnyClass) {
initializeInterceptorElements();
- _interceptorsAreInitialized = true;
+ initializeNoSuchMethod();
+ seenAnyClass = true;
}
+ ClassElement result = null;
if (cls == compiler.stringClass) {
addInterceptors(jsStringClass, enqueuer);
} else if (cls == compiler.listClass) {
@@ -932,7 +945,6 @@
invalidateAfterCodegen.clear();
}
-
native.NativeEnqueuer nativeResolutionEnqueuer(Enqueuer world) {
return new native.NativeResolutionEnqueuer(world, compiler);
}
@@ -964,7 +976,9 @@
void registerDynamicInvocation(HInvokeDynamic node,
Selector selector,
HTypeMap types) {
- argumentTypes.registerDynamicInvocation(node, selector, types);
+ HTypeList providedTypes =
+ new HTypeList.fromDynamicInvocation(node, selector, types);
+ argumentTypes.registerDynamicInvocation(providedTypes, selector);
}
/**
@@ -1052,7 +1066,8 @@
assert(invariant(callee, callee.isDeclaration));
returnInfo.putIfAbsent(callee, () => new ReturnInfo.unknownType());
ReturnInfo info = returnInfo[callee];
- if (info.returnType != HType.UNKNOWN && caller != null) {
+ HType returnType = info.returnType;
+ if (returnType != HType.UNKNOWN && returnType != null && caller != null) {
assert(invariant(caller, caller.isDeclaration));
info.addCompiledFunction(caller);
}
@@ -1095,7 +1110,11 @@
Element element = type.element;
bool nativeCheck =
emitter.nativeEmitter.requiresNativeIsCheck(element);
- if (type == compiler.types.voidType) {
+ if (type.isMalformed) {
+ // Check for malformed types first, because the type may be a list type
+ // with a malformed argument type.
+ return const SourceString('malformedTypeCheck');
+ } else if (type == compiler.types.voidType) {
return const SourceString('voidTypeCheck');
} else if (element == compiler.stringClass) {
return const SourceString('stringTypeCheck');
@@ -1119,8 +1138,6 @@
: const SourceString('stringSuperTypeCheck');
} else if (identical(element, compiler.listClass)) {
return const SourceString('listTypeCheck');
- } else if (type.isMalformed) {
- return const SourceString('malformedTypeCheck');
} else {
if (Elements.isListSupertype(element, compiler)) {
return nativeCheck
@@ -1148,4 +1165,42 @@
fieldTypes.dump();
print("");
}
+
+ Element getExceptionUnwrapper() {
+ return compiler.findHelper(const SourceString('unwrapException'));
+ }
+
+ Element getThrowRuntimeError() {
+ return compiler.findHelper(const SourceString('throwRuntimeError'));
+ }
+
+ Element getThrowMalformedSubtypeError() {
+ return compiler.findHelper(
+ const SourceString('throwMalformedSubtypeError'));
+ }
+
+ Element getThrowAbstractClassInstantiationError() {
+ return compiler.findHelper(
+ const SourceString('throwAbstractClassInstantiationError'));
+ }
+
+ Element getClosureConverter() {
+ return compiler.findHelper(const SourceString('convertDartClosureToJS'));
+ }
+
+ Element getTraceFromException() {
+ return compiler.findHelper(const SourceString('getTraceFromException'));
+ }
+
+ Element getMapMaker() {
+ return compiler.findHelper(const SourceString('makeLiteralMap'));
+ }
+
+ Element getSetRuntimeTypeInfo() {
+ return compiler.findHelper(const SourceString('setRuntimeTypeInfo'));
+ }
+
+ Element getGetRuntimeTypeInfo() {
+ return compiler.findHelper(const SourceString('getRuntimeTypeInfo'));
+ }
}
diff --git a/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart b/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart
index c21d162..a9361fa 100644
--- a/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart
+++ b/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart
@@ -479,7 +479,7 @@
// the actual receiver.
int extraArgumentCount = isInterceptorClass ? 1 : 0;
// Use '$receiver' to avoid clashes with other parameter names. Using
- // '$receiver' works because [JsNames.getValid] used for getting parameter
+ // '$receiver' works because [:namer.safeName:] used for getting parameter
// names never returns a name beginning with a single '$'.
String receiverArgumentName = r'$receiver';
@@ -504,7 +504,7 @@
compiler.enqueuer.resolution.getCachedElements(member);
parameters.orderedForEachParameter((Element element) {
- String jsName = JsNames.getValid(element.name.slowToString());
+ String jsName = backend.namer.safeName(element.name.slowToString());
assert(jsName != receiverArgumentName);
int optionalParameterStart = positionalArgumentCount + extraArgumentCount;
if (count < optionalParameterStart) {
@@ -735,14 +735,32 @@
return;
}
+ void visitMember(ClassElement enclosing, Element member) {
+ assert(invariant(classElement, member.isDeclaration));
+ if (member.isInstanceMember()) {
+ addInstanceMember(member, builder);
+ }
+ }
+
+ // TODO(kasperl): We should make sure to only emit one version of
+ // overridden methods. Right now, we rely on the ordering so the
+ // methods pulled in from mixins are replaced with the members
+ // from the class definition.
+
+ // If the class is a native class, we have to add the instance
+ // members defined in the non-native mixin applications used by
+ // the class.
+ visitNativeMixins(classElement, (MixinApplicationElement mixin) {
+ mixin.forEachMember(
+ visitMember,
+ includeBackendMembers: true,
+ includeSuperMembers: false);
+ });
+
classElement.implementation.forEachMember(
- (ClassElement enclosing, Element member) {
- assert(invariant(classElement, member.isDeclaration));
- if (member.isInstanceMember()) {
- addInstanceMember(member, builder);
- }
- },
- includeBackendMembers: true);
+ visitMember,
+ includeBackendMembers: true,
+ includeSuperMembers: false);
generateIsTestsOn(classElement, (Element other) {
js.Expression code;
@@ -765,6 +783,22 @@
emitNoSuchMethodHandlers(builder.addProperty);
}
}
+
+ if (backend.isInterceptorClass(classElement)) {
+ // The operator== method in [:Object:] does not take the same
+ // number of arguments as an intercepted method, therefore we
+ // explicitely add one to all interceptor classes. Note that we
+ // would not have do do that if all intercepted methods had
+ // a calling convention where the receiver is the first
+ // parameter.
+ String name = backend.namer.publicInstanceMethodNameByArity(
+ const SourceString('=='), 1);
+ Function kind = (classElement == backend.jsNullClass)
+ ? js.equals
+ : js.strictEquals;
+ builder.addProperty(name, js.fun(['receiver', 'a'],
+ js.block1(js.return_(kind(js.use('receiver'), js.use('a'))))));
+ }
}
void emitRuntimeClassesAndTests(CodeBuffer buffer) {
@@ -810,6 +844,22 @@
}
}
+ void visitNativeMixins(ClassElement classElement,
+ void visit(MixinApplicationElement mixinApplication)) {
+ if (!classElement.isNative()) return;
+ // Use recursion to make sure to visit the superclasses before the
+ // subclasses. Once we start keeping track of the emitted fields
+ // and members, we're going to want to visit these in the other
+ // order so we get the most specialized definition first.
+ void recurse(ClassElement cls) {
+ if (cls == null || !cls.isMixinApplication) return;
+ recurse(cls.superclass);
+ assert(!cls.isNative());
+ visit(cls);
+ }
+ recurse(classElement.superclass);
+ }
+
/**
* Documentation wanted -- johnniwinther
*
@@ -875,6 +925,20 @@
}
}
+ // TODO(kasperl): We should make sure to only emit one version of
+ // overridden fields. Right now, we rely on the ordering so the
+ // fields pulled in from mixins are replaced with the fields from
+ // the class definition.
+
+ // If the class is a native class, we have to add the fields
+ // defined in the non-native mixin applications used by the class.
+ visitNativeMixins(classElement, (MixinApplicationElement mixin) {
+ mixin.forEachInstanceField(
+ visitField,
+ includeBackendMembers: true,
+ includeSuperMembers: false);
+ });
+
// If a class is not instantiated then we add the field just so we can
// generate the field getter/setter dynamically. Since this is only
// allowed on fields that are in [classElement] we don't need to visit
@@ -1052,7 +1116,13 @@
needsDefineClass = true;
String className = namer.getName(classElement);
+
+ // Find the first non-native superclass.
ClassElement superclass = classElement.superclass;
+ while (superclass != null && superclass.isNative()) {
+ superclass = superclass.superclass;
+ }
+
String superName = "";
if (superclass != null) {
superName = namer.getName(superclass);
@@ -1146,9 +1216,20 @@
getTypedefChecksOn(call.computeType(compiler)).forEach(emitIsTest);
}
}
+
for (DartType interfaceType in cls.interfaces) {
generateInterfacesIsTests(interfaceType.element, emitIsTest, generated);
}
+
+ // For native classes, we also have to run through their mixin
+ // applications and make sure we deal with 'is' tests correctly
+ // for those.
+ visitNativeMixins(cls, (MixinApplicationElement mixin) {
+ for (DartType interfaceType in mixin.interfaces) {
+ ClassElement interfaceElement = interfaceType.element;
+ generateInterfacesIsTests(interfaceType.element, emitIsTest, generated);
+ }
+ });
}
/**
@@ -1315,7 +1396,8 @@
void emitStaticFunctionGetters(CodeBuffer buffer) {
Set<FunctionElement> functionsNeedingGetter =
compiler.codegenWorld.staticFunctionsNeedingGetter;
- for (FunctionElement element in functionsNeedingGetter) {
+ for (FunctionElement element in
+ Elements.sortedByPosition(functionsNeedingGetter)) {
// The static function does not have the correct name. Since
// [addParameterStubs] use the name to create its stubs we simply
// create a fake element with the correct name.
@@ -1577,7 +1659,7 @@
ConstantHandler handler = compiler.constantHandler;
Iterable<VariableElement> staticNonFinalFields =
handler.getStaticNonFinalFieldsForEmission();
- for (Element element in staticNonFinalFields) {
+ for (Element element in Elements.sortedByPosition(staticNonFinalFields)) {
compiler.withCurrentElement(element, () {
Constant initialValue = handler.getInitialValueFor(element);
js.Expression init =
@@ -1598,7 +1680,7 @@
handler.getLazilyInitializedFieldsForEmission();
if (!lazyFields.isEmpty) {
needsLazyInitializer = true;
- for (VariableElement element in lazyFields) {
+ for (VariableElement element in Elements.sortedByPosition(lazyFields)) {
assert(compiler.codegenWorld.generatedBailoutCode[element] == null);
js.Expression code = compiler.codegenWorld.generatedCode[element];
assert(code != null);
@@ -1607,24 +1689,26 @@
// lazyInitializer(prototype, 'name', fieldName, getterName, initial);
// The name is used for error reporting. The 'initial' must be a
// closure that constructs the initial value.
- buffer.add("$lazyInitializerName(");
- buffer.add(isolateProperties);
- buffer.add(",$_'");
- buffer.add(element.name.slowToString());
- buffer.add("',$_'");
- buffer.add(namer.getName(element));
- buffer.add("',$_'");
- buffer.add(namer.getLazyInitializerName(element));
- buffer.add("',$_");
- buffer.add(js.prettyPrint(code, compiler));
- emitLazyInitializedGetter(element, buffer);
- buffer.add(")$N");
+ List<js.Expression> arguments = <js.Expression>[];
+ arguments.add(js.use(isolateProperties));
+ arguments.add(js.string(element.name.slowToString()));
+ arguments.add(js.string(namer.getName(element)));
+ arguments.add(js.string(namer.getLazyInitializerName(element)));
+ arguments.add(code);
+ js.Expression getter = buildLazyInitializedGetter(element);
+ if (getter != null) {
+ arguments.add(getter);
+ }
+ js.Expression init = js.call(js.use(lazyInitializerName), arguments);
+ buffer.add(js.prettyPrint(init, compiler));
+ buffer.add("$N");
}
}
}
- void emitLazyInitializedGetter(VariableElement element, CodeBuffer buffer) {
+ js.Expression buildLazyInitializedGetter(VariableElement element) {
// Nothing to do, the 'lazy' function will create the getter.
+ return null;
}
void emitCompileTimeConstants(CodeBuffer buffer) {
@@ -2079,6 +2163,48 @@
}
}
+ void emitOneShotInterceptors(CodeBuffer buffer) {
+ JavaScriptBackend backend = compiler.backend;
+ for (Selector selector in backend.oneShotInterceptors) {
+ Set<ClassElement> classes = backend.getInterceptedClassesOn(selector);
+ String oneShotInterceptorName = namer.oneShotInterceptorName(selector);
+ String getInterceptorName =
+ namer.getInterceptorName(backend.getInterceptorMethod, classes);
+
+ List<js.Parameter> parameters = <js.Parameter>[];
+ List<js.Expression> arguments = <js.Expression>[];
+ parameters.add(new js.Parameter('receiver'));
+ arguments.add(js.use('receiver'));
+
+ if (selector.isSetter()) {
+ parameters.add(new js.Parameter('value'));
+ arguments.add(js.use('value'));
+ } else {
+ for (int i = 0; i < selector.argumentCount; i++) {
+ String argName = 'a$i';
+ parameters.add(new js.Parameter(argName));
+ arguments.add(js.use(argName));
+ }
+ }
+
+ String invocationName = backend.namer.invocationName(selector);
+ js.Fun function =
+ new js.Fun(parameters,
+ js.block1(js.return_(
+ js.use(isolateProperties)
+ .dot(getInterceptorName)
+ .callWith([js.use('receiver')])
+ .dot(invocationName)
+ .callWith(arguments))));
+
+ js.PropertyAccess property =
+ js.fieldAccess(js.use(isolateProperties), oneShotInterceptorName);
+
+ buffer.add(js.prettyPrint(js.assign(property, function), compiler));
+ buffer.add(N);
+ }
+ }
+
String assembleProgram() {
measure(() {
computeNeededClasses();
@@ -2108,6 +2234,7 @@
// Static field initializations require the classes and compile-time
// constants to be set up.
emitStaticNonFinalFieldInitializations(mainBuffer);
+ emitOneShotInterceptors(mainBuffer);
emitGetInterceptorMethods(mainBuffer);
emitLazilyInitializedStaticFields(mainBuffer);
diff --git a/sdk/lib/_internal/compiler/implementation/js_backend/emitter_no_eval.dart b/sdk/lib/_internal/compiler/implementation/js_backend/emitter_no_eval.dart
index 497ee132..c4ff47f 100644
--- a/sdk/lib/_internal/compiler/implementation/js_backend/emitter_no_eval.dart
+++ b/sdk/lib/_internal/compiler/implementation/js_backend/emitter_no_eval.dart
@@ -67,9 +67,12 @@
}""";
}
- void emitLazyInitializedGetter(VariableElement element, CodeBuffer buffer) {
+ js.Expression buildLazyInitializedGetter(VariableElement element) {
String isolate = namer.CURRENT_ISOLATE;
- buffer.add(', function() { return $isolate.${namer.getName(element)}; }');
+ return js.fun([],
+ js.block1(
+ js.return_(
+ js.fieldAccess(js.use(isolate), namer.getName(element)))));
}
js.Expression buildConstructor(String mangledName, List<String> fieldNames) {
diff --git a/sdk/lib/_internal/compiler/implementation/js_backend/js_backend.dart b/sdk/lib/_internal/compiler/implementation/js_backend/js_backend.dart
index c1d2e0f..077d897 100644
--- a/sdk/lib/_internal/compiler/implementation/js_backend/js_backend.dart
+++ b/sdk/lib/_internal/compiler/implementation/js_backend/js_backend.dart
@@ -4,6 +4,8 @@
library js_backend;
+import 'dart:collection' show LinkedHashMap;
+
import '../closure.dart';
import '../../compiler.dart' as api;
import '../elements/elements.dart';
diff --git a/sdk/lib/_internal/compiler/implementation/js_backend/minify_namer.dart b/sdk/lib/_internal/compiler/implementation/js_backend/minify_namer.dart
index 9a512d8..07ed2f8 100644
--- a/sdk/lib/_internal/compiler/implementation/js_backend/minify_namer.dart
+++ b/sdk/lib/_internal/compiler/implementation/js_backend/minify_namer.dart
@@ -21,7 +21,9 @@
// You can pass an invalid identifier to this and unlike its non-minifying
// counterpart it will never return the proposedName as the new fresh name.
- String getFreshName(String proposedName, Set<String> usedNames) {
+ String getFreshName(String proposedName,
+ Set<String> usedNames,
+ {bool ensureSafe: true}) {
var freshName = _getUnusedName(proposedName, usedNames);
usedNames.add(freshName);
return freshName;
@@ -35,7 +37,9 @@
}
void reserveBackendNames() {
- for (var name in JsNames.reservedNativeProperties) {
+ // TODO(7554): We need a complete list from the DOM.
+ const reservedNativeProperties = const <String>["x", "y", "z"];
+ for (var name in reservedNativeProperties) {
if (name.length < 3) {
instanceNameMap[name] = name;
}
diff --git a/sdk/lib/_internal/compiler/implementation/js_backend/namer.dart b/sdk/lib/_internal/compiler/implementation/js_backend/namer.dart
index 37286e8..6a5067d 100644
--- a/sdk/lib/_internal/compiler/implementation/js_backend/namer.dart
+++ b/sdk/lib/_internal/compiler/implementation/js_backend/namer.dart
@@ -8,12 +8,31 @@
* Assigns JavaScript identifiers to Dart variables, class-names and members.
*/
class Namer implements ClosureNamer {
+
+ static const javaScriptKeywords = const <String>[
+ // These are current keywords.
+ "break", "delete", "function", "return", "typeof", "case", "do", "if",
+ "switch", "var", "catch", "else", "in", "this", "void", "continue",
+ "false", "instanceof", "throw", "while", "debugger", "finally", "new",
+ "true", "with", "default", "for", "null", "try",
+
+ // These are future keywords.
+ "abstract", "double", "goto", "native", "static", "boolean", "enum",
+ "implements", "package", "super", "byte", "export", "import", "private",
+ "synchronized", "char", "extends", "int", "protected", "throws",
+ "class", "final", "interface", "public", "transient", "const", "float",
+ "long", "short", "volatile"
+ ];
+
+ static const reservedPropertySymbols =
+ const <String>["__proto__", "prototype", "constructor"];
+
static Set<String> _jsReserved = null;
Set<String> get jsReserved {
if (_jsReserved == null) {
_jsReserved = new Set<String>();
- _jsReserved.addAll(JsNames.javaScriptKeywords);
- _jsReserved.addAll(JsNames.reservedPropertySymbols);
+ _jsReserved.addAll(javaScriptKeywords);
+ _jsReserved.addAll(reservedPropertySymbols);
}
return _jsReserved;
}
@@ -28,11 +47,13 @@
*/
final Compiler compiler;
final Map<Element, String> globals;
+ final Map<Selector, String> oneShotInterceptorNames;
final Map<String, LibraryElement> shortPrivateNameOwners;
final Set<String> usedGlobalNames;
final Set<String> usedInstanceNames;
final Map<String, String> globalNameMap;
final Map<String, String> instanceNameMap;
+ final Map<String, String> operatorNameMap;
final Map<String, int> popularNameCounters;
/**
@@ -50,12 +71,14 @@
Namer(this.compiler)
: globals = new Map<Element, String>(),
+ oneShotInterceptorNames = new Map<Selector, String>(),
shortPrivateNameOwners = new Map<String, LibraryElement>(),
bailoutNames = new Map<Element, String>(),
usedBailoutInstanceNames = new Set<String>(),
usedGlobalNames = new Set<String>(),
usedInstanceNames = new Set<String>(),
instanceNameMap = new Map<String, String>(),
+ operatorNameMap = new Map<String, String>(),
globalNameMap = new Map<String, String>(),
constantNames = new Map<Constant, String>(),
popularNameCounters = new Map<String, int>();
@@ -93,7 +116,7 @@
} else {
longName = "CONSTANT";
}
- result = getFreshName(longName, usedGlobalNames);
+ result = getFreshName(longName, usedGlobalNames, ensureSafe: true);
constantNames[constant] = result;
}
return result;
@@ -149,7 +172,10 @@
}
String instanceMethodName(FunctionElement element) {
- SourceString name = Elements.operatorNameToIdentifier(element.name);
+ SourceString elementName = element.name;
+ SourceString name = operatorNameToIdentifier(elementName);
+ if (name != elementName) return getMappedOperatorName(name.slowToString());
+
LibraryElement library = element.getLibrary();
if (element.kind == ElementKind.GENERATIVE_CONSTRUCTOR_BODY) {
ConstructorBodyElement bodyElement = element;
@@ -162,7 +188,7 @@
!signature.optionalParameters.isEmpty) {
StringBuffer buffer = new StringBuffer();
signature.orderedOptionalParameters.forEach((Element element) {
- buffer.add('\$${JsNames.getValid(element.name.slowToString())}');
+ buffer.add('\$${safeName(element.name.slowToString())}');
});
methodName = '$methodName$buffer';
}
@@ -171,7 +197,8 @@
}
String publicInstanceMethodNameByArity(SourceString name, int arity) {
- name = Elements.operatorNameToIdentifier(name);
+ SourceString newName = operatorNameToIdentifier(name);
+ if (newName != name) return getMappedOperatorName(newName.slowToString());
assert(!name.isPrivate());
var base = name.slowToString();
// We don't mangle the closure invoking function name because it
@@ -190,7 +217,14 @@
String proposedName = privateName(selector.library, selector.name);
return 'set\$${getMappedInstanceName(proposedName)}';
} else {
- SourceString name = Elements.operatorNameToIdentifier(selector.name);
+ SourceString name = selector.name;
+ if (selector.kind == SelectorKind.OPERATOR
+ || selector.kind == SelectorKind.INDEX) {
+ name = operatorNameToIdentifier(name);
+ assert(name != selector.name);
+ return getMappedOperatorName(name.slowToString());
+ }
+ assert(name == operatorNameToIdentifier(name));
StringBuffer buffer = new StringBuffer();
for (SourceString argumentName in selector.getOrderedNamedArguments()) {
buffer.add(r'$');
@@ -200,11 +234,12 @@
// We don't mangle the closure invoking function name because it
// is generated by string concatenation in applyFunction from
// js_helper.dart.
- if (selector.isCall() && name == closureInvocationSelectorName) {
+ if (selector.isClosureCall()) {
return "${name.slowToString()}$suffix";
+ } else {
+ String proposedName = privateName(selector.library, name);
+ return getMappedInstanceName('$proposedName$suffix');
}
- String proposedName = privateName(selector.library, name);
- return getMappedInstanceName('$proposedName$suffix');
}
}
@@ -228,8 +263,9 @@
// Check for following situation: Native field ${fieldElement.name} has
// fixed JSName ${fieldElement.nativeName()}, but a subclass shadows this
// name. We normally handle that by renaming the superclass field, but we
- // can't do that because native fields have fixed JsNames. In practice
- // this can't happen because we can't inherit from native classes.
+ // can't do that because native fields have fixed JavaScript names.
+ // In practice this can't happen because we can't inherit from native
+ // classes.
assert (!fieldElement.hasFixedBackendName());
String libraryName = getName(fieldElement.getLibrary());
@@ -276,7 +312,7 @@
String getMappedGlobalName(String proposedName) {
var newName = globalNameMap[proposedName];
if (newName == null) {
- newName = getFreshName(proposedName, usedGlobalNames);
+ newName = getFreshName(proposedName, usedGlobalNames, ensureSafe: true);
globalNameMap[proposedName] = newName;
}
return newName;
@@ -285,15 +321,30 @@
String getMappedInstanceName(String proposedName) {
var newName = instanceNameMap[proposedName];
if (newName == null) {
- newName = getFreshName(proposedName, usedInstanceNames);
+ newName = getFreshName(proposedName, usedInstanceNames, ensureSafe: true);
instanceNameMap[proposedName] = newName;
}
return newName;
}
- String getFreshName(String proposedName, Set<String> usedNames) {
+ String getMappedOperatorName(String proposedName) {
+ var newName = operatorNameMap[proposedName];
+ if (newName == null) {
+ newName = getFreshName(
+ proposedName, usedInstanceNames, ensureSafe: false);
+ operatorNameMap[proposedName] = newName;
+ }
+ return newName;
+ }
+
+ String getFreshName(String proposedName,
+ Set<String> usedNames,
+ {bool ensureSafe: true}) {
var candidate;
- proposedName = safeName(proposedName);
+ if (ensureSafe) {
+ proposedName = safeName(proposedName);
+ }
+ assert(!jsReserved.contains(proposedName));
if (!usedNames.contains(proposedName)) {
candidate = proposedName;
} else {
@@ -345,7 +396,12 @@
return name;
}
- String getSpecializedName(Element element, Collection<ClassElement> classes) {
+ String getInterceptorName(Element element, Collection<ClassElement> classes) {
+ if (classes.contains(compiler.objectClass)) {
+ // If the object class is in the set of intercepted classes, we
+ // need to go through the generic getInterceptorMethod.
+ return getName(element);
+ }
// This gets the minified name, but it doesn't really make much difference.
// The important thing is that it is a unique name.
StringBuffer buffer = new StringBuffer('${getName(element)}\$');
@@ -432,8 +488,9 @@
if (Elements.isInstanceField(element)) {
fixedName = element.hasFixedBackendName();
}
- String result =
- fixedName ? guess : getFreshName(guess, usedGlobalNames);
+ String result = fixedName
+ ? guess
+ : getFreshName(guess, usedGlobalNames, ensureSafe: true);
globals[element] = result;
return result;
}
@@ -464,16 +521,84 @@
return "$CURRENT_ISOLATE.${getLazyInitializerName(element)}";
}
+ String operatorIsPrefix() => r'$is';
+
String operatorIs(Element element) {
- // TODO(erikcorry): Reduce from is$x to ix when we are minifying.
- return 'is\$${getName(element)}';
+ // TODO(erikcorry): Reduce from $isx to ix when we are minifying.
+ return '${operatorIsPrefix()}${getName(element)}';
}
+ /*
+ * Returns a name that does not clash with reserved JS keywords,
+ * and also ensures it won't clash with other identifiers.
+ */
String safeName(String name) {
- if (jsReserved.contains(name) || name.startsWith('\$')) {
- name = "\$$name";
- assert(!jsReserved.contains(name));
+ if (jsReserved.contains(name) || name.startsWith(r'$')) {
+ name = '\$$name';
}
+ assert(!jsReserved.contains(name));
return name;
}
+
+ String oneShotInterceptorName(Selector selector) {
+ // TODO(ngeoffray): What to do about typed selectors? We could
+ // filter them out, or keep them and hope the generated one shot
+ // interceptor takes advantage of the type.
+ String cached = oneShotInterceptorNames[selector];
+ if (cached != null) return cached;
+ SourceString name = operatorNameToIdentifier(selector.name);
+ String result = getFreshName(name.slowToString(), usedGlobalNames);
+ oneShotInterceptorNames[selector] = result;
+ return result;
+ }
+
+ SourceString operatorNameToIdentifier(SourceString name) {
+ if (name == null) return null;
+ String value = name.stringValue;
+ if (value == null) {
+ return name;
+ } else if (value == '==') {
+ return const SourceString(r'$eq');
+ } else if (value == '~') {
+ return const SourceString(r'$not');
+ } else if (value == '[]') {
+ return const SourceString(r'$index');
+ } else if (value == '[]=') {
+ return const SourceString(r'$indexSet');
+ } else if (value == '*') {
+ return const SourceString(r'$mul');
+ } else if (value == '/') {
+ return const SourceString(r'$div');
+ } else if (value == '%') {
+ return const SourceString(r'$mod');
+ } else if (value == '~/') {
+ return const SourceString(r'$tdiv');
+ } else if (value == '+') {
+ return const SourceString(r'$add');
+ } else if (value == '<<') {
+ return const SourceString(r'$shl');
+ } else if (value == '>>') {
+ return const SourceString(r'$shr');
+ } else if (value == '>=') {
+ return const SourceString(r'$ge');
+ } else if (value == '>') {
+ return const SourceString(r'$gt');
+ } else if (value == '<=') {
+ return const SourceString(r'$le');
+ } else if (value == '<') {
+ return const SourceString(r'$lt');
+ } else if (value == '&') {
+ return const SourceString(r'$and');
+ } else if (value == '^') {
+ return const SourceString(r'$xor');
+ } else if (value == '|') {
+ return const SourceString(r'$or');
+ } else if (value == '-') {
+ return const SourceString(r'$sub');
+ } else if (value == 'unary-') {
+ return const SourceString(r'$negate');
+ } else {
+ return name;
+ }
+ }
}
diff --git a/sdk/lib/_internal/compiler/implementation/js_backend/native_emitter.dart b/sdk/lib/_internal/compiler/implementation/js_backend/native_emitter.dart
index c12f126..4345861 100644
--- a/sdk/lib/_internal/compiler/implementation/js_backend/native_emitter.dart
+++ b/sdk/lib/_internal/compiler/implementation/js_backend/native_emitter.dart
@@ -101,7 +101,7 @@
}
var hasOwnProperty = Object.prototype.hasOwnProperty;
for (var method in desc) {
- if (method) { """/* Short version of: if (method != '') */"""
+ if (method) {
if (hasOwnProperty.call(desc, method)) {
$dynamicName(method)[cls] = desc[method];
}
@@ -500,6 +500,12 @@
backend.namer.publicGetterName(const SourceString('hashCode'));
addProperty(hashCodeName, makeCallOnThis(hashCodeHelperName));
+ // Same as above, but for operator==.
+ String equalsName = backend.namer.publicInstanceMethodNameByArity(
+ const SourceString('=='), 1);
+ addProperty(equalsName, js.fun(['a'], js.block1(
+ js.return_(js.strictEquals(new js.This(), js.use('a'))))));
+
// If the native emitter has been asked to take care of the
// noSuchMethod handlers, we do that now.
if (handleNoSuchMethod) {
diff --git a/sdk/lib/_internal/compiler/implementation/lib/async_patch.dart b/sdk/lib/_internal/compiler/implementation/lib/async_patch.dart
index 6b6c655..0fccce2 100644
--- a/sdk/lib/_internal/compiler/implementation/lib/async_patch.dart
+++ b/sdk/lib/_internal/compiler/implementation/lib/async_patch.dart
@@ -4,6 +4,8 @@
// Patch file for the dart:async library.
+import 'dart:_isolate_helper' show TimerImpl;
+
patch class Timer {
patch factory Timer(int milliseconds, void callback(Timer timer)) {
return new TimerImpl(milliseconds, callback);
diff --git a/sdk/lib/_internal/compiler/implementation/lib/constant_map.dart b/sdk/lib/_internal/compiler/implementation/lib/constant_map.dart
index fabebbd..625e0ed 100644
--- a/sdk/lib/_internal/compiler/implementation/lib/constant_map.dart
+++ b/sdk/lib/_internal/compiler/implementation/lib/constant_map.dart
@@ -35,7 +35,8 @@
}
Iterable<V> get values {
- return new MappedIterable<String, V>(_keys, (String key) => this[key]);
+ // TODO(floitsch): don't wrap the map twice.
+ return keys.mappedBy((String key) => this[key]);
}
bool get isEmpty => length == 0;
diff --git a/sdk/lib/_internal/compiler/implementation/lib/core_patch.dart b/sdk/lib/_internal/compiler/implementation/lib/core_patch.dart
index 1790162..4297edb 100644
--- a/sdk/lib/_internal/compiler/implementation/lib/core_patch.dart
+++ b/sdk/lib/_internal/compiler/implementation/lib/core_patch.dart
@@ -4,6 +4,16 @@
// Patch file for dart:core classes.
+import 'dart:_interceptors';
+import 'dart:_js_helper' show checkNull,
+ getRuntimeTypeString,
+ isJsArray,
+ JSSyntaxRegExp,
+ Primitives,
+ TypeImpl,
+ stringJoinUnchecked,
+ JsStringBuffer;
+
// Patch for 'print' function.
patch void print(var object) {
if (object is String) {
@@ -95,23 +105,23 @@
}
-// Patch for Date implementation.
-patch class _DateImpl {
- patch _DateImpl(int year,
- int month,
- int day,
- int hour,
- int minute,
- int second,
- int millisecond,
- bool isUtc)
+// Patch for DateTime implementation.
+patch class DateTime {
+ patch DateTime._internal(int year,
+ int month,
+ int day,
+ int hour,
+ int minute,
+ int second,
+ int millisecond,
+ bool isUtc)
: this.isUtc = checkNull(isUtc),
millisecondsSinceEpoch = Primitives.valueFromDecomposedDate(
year, month, day, hour, minute, second, millisecond, isUtc) {
Primitives.lazyAsJsDate(this);
}
- patch _DateImpl.now()
+ patch DateTime._now()
: isUtc = false,
millisecondsSinceEpoch = Primitives.dateNow() {
Primitives.lazyAsJsDate(this);
@@ -256,3 +266,9 @@
patch bool identical(Object a, Object b) {
return Primitives.identicalImplementation(a, b);
}
+
+patch class StringBuffer {
+ patch factory StringBuffer([Object content = ""]) {
+ return new JsStringBuffer(content);
+ }
+}
diff --git a/sdk/lib/_internal/compiler/implementation/lib/foreign_helper.dart b/sdk/lib/_internal/compiler/implementation/lib/foreign_helper.dart
index c2fd831..89c2a58 100644
--- a/sdk/lib/_internal/compiler/implementation/lib/foreign_helper.dart
+++ b/sdk/lib/_internal/compiler/implementation/lib/foreign_helper.dart
@@ -91,16 +91,6 @@
[var arg0, var arg1, var arg2]) {}
/**
- * Invokes a method without the compiler trying to intercept it.
- */
-dynamic UNINTERCEPTED(var expression) {}
-
-/**
- * Returns [:true:] if [object] has its own operator== definition.
- */
-bool JS_HAS_EQUALS(var object) {}
-
-/**
* Returns the isolate in which this code is running.
*/
dynamic JS_CURRENT_ISOLATE() {}
@@ -138,3 +128,8 @@
* Creates an isolate and returns it.
*/
dynamic JS_CREATE_ISOLATE() {}
+
+/**
+ * Returns the prefix used for generated is checks on classes.
+ */
+String JS_OPERATOR_IS_PREFIX() {}
diff --git a/sdk/lib/_internal/compiler/implementation/lib/interceptors.dart b/sdk/lib/_internal/compiler/implementation/lib/interceptors.dart
index 5ac5b19..b133d12 100644
--- a/sdk/lib/_internal/compiler/implementation/lib/interceptors.dart
+++ b/sdk/lib/_internal/compiler/implementation/lib/interceptors.dart
@@ -5,6 +5,26 @@
library _interceptors;
import 'dart:collection';
+import 'dart:collection-dev';
+import 'dart:_js_helper' show allMatchesInStringUnchecked,
+ Null,
+ JSSyntaxRegExp,
+ Primitives,
+ checkGrowable,
+ checkMutable,
+ checkNull,
+ checkNum,
+ checkString,
+ getRuntimeTypeString,
+ listInsertRange,
+ regExpGetNative,
+ stringContainsUnchecked,
+ stringLastIndexOfUnchecked,
+ stringReplaceAllFuncUnchecked,
+ stringReplaceAllUnchecked,
+ stringReplaceFirstUnchecked,
+ TypeImpl;
+import 'dart:_foreign_helper' show JS;
part 'js_array.dart';
part 'js_number.dart';
@@ -45,6 +65,8 @@
*/
class JSBool implements bool {
const JSBool();
+
+ // Note: if you change this, also change the function [S].
String toString() => JS('String', r'String(#)', this);
// The values here are SMIs, co-prime and differ about half of the bit
@@ -59,7 +81,10 @@
*/
class JSNull implements Null {
const JSNull();
+
+ // Note: if you change this, also change the function [S].
String toString() => 'null';
+
int get hashCode => 0;
Type get runtimeType => createRuntimeType('Null');
}
diff --git a/sdk/lib/_internal/compiler/implementation/lib/io_patch.dart b/sdk/lib/_internal/compiler/implementation/lib/io_patch.dart
index 4fd166d..0374de5 100644
--- a/sdk/lib/_internal/compiler/implementation/lib/io_patch.dart
+++ b/sdk/lib/_internal/compiler/implementation/lib/io_patch.dart
@@ -199,6 +199,9 @@
patch static OutputStream _getStdioOutputStream(int fd) {
throw new UnsupportedError("StdIOUtils._getStdioOutputStream");
}
+ patch static int _socketType(Socket socket) {
+ throw new UnsupportedError("StdIOUtils._socketType");
+ }
}
patch class _WindowsCodePageDecoder {
diff --git a/sdk/lib/_internal/compiler/implementation/lib/isolate_helper.dart b/sdk/lib/_internal/compiler/implementation/lib/isolate_helper.dart
index b8f2870..82a80fe 100644
--- a/sdk/lib/_internal/compiler/implementation/lib/isolate_helper.dart
+++ b/sdk/lib/_internal/compiler/implementation/lib/isolate_helper.dart
@@ -5,7 +5,14 @@
library _isolate_helper;
import 'dart:async';
+import 'dart:collection' show Queue, HashMap;
import 'dart:isolate';
+import 'dart:_js_helper' show convertDartClosureToJS,
+ Null;
+import 'dart:_foreign_helper' show DART_CLOSURE_TO_JS,
+ JS,
+ JS_CREATE_ISOLATE,
+ JS_SET_CURRENT_ISOLATE;
ReceivePort lazyPort;
@@ -401,10 +408,11 @@
static String computeThisScript() {
// TODO(7369): Find a cross-platform non-brittle way of getting the
// currently running script.
- var scripts = JS('=List', r"document.getElementsByTagName('script')");
+ var scripts = JS('', r"document.getElementsByTagName('script')");
// The scripts variable only contains the scripts that have already been
// executed. The last one is the currently running script.
- for (var script in scripts) {
+ for (int i = 0, len = JS('int', '#.length', scripts); i < len; i++) {
+ var script = JS('', '#[#]', scripts, i);
var src = JS('String|Null', '# && #.src', script, script);
// Filter out the test controller script, and the Dart
// bootstrap script.
@@ -504,22 +512,6 @@
JS("void", r"#.console.log(#)", globalThis, msg);
}
- /**
- * Extract the constructor of runnable, so it can be allocated in another
- * isolate.
- */
- static dynamic _getJSConstructor(Isolate runnable) {
- return JS("", "#.constructor", runnable);
- }
-
- /** Extract the constructor name of a runnable */
- // TODO(sigmund): find a browser-generic way to support this.
- // TODO(floitsch): is this function still used? If yes, should we use
- // Primitives.objectTypeName instead?
- static dynamic _getJSConstructorName(Isolate runnable) {
- return JS("", "#.constructor.name", runnable);
- }
-
/** Find a constructor given its name. */
static dynamic _getJSConstructorFromName(String factoryName) {
return JS("", r"$[#]", factoryName);
@@ -1282,7 +1274,7 @@
// loop instead of setTimeout, to make sure the futures get executed in
// order.
_globalState.topEventLoop.enqueue(_globalState.currentContext, () {
- callback(this);
+ callback(this);
}, 'timer');
_inEventLoop = true;
} else if (hasTimer()) {
diff --git a/sdk/lib/_internal/compiler/implementation/lib/isolate_patch.dart b/sdk/lib/_internal/compiler/implementation/lib/isolate_patch.dart
index a948a83..a8d3c27 100644
--- a/sdk/lib/_internal/compiler/implementation/lib/isolate_patch.dart
+++ b/sdk/lib/_internal/compiler/implementation/lib/isolate_patch.dart
@@ -4,23 +4,28 @@
// Patch file for the dart:isolate library.
-patch ReceivePort get port {
- if (lazyPort == null) {
- lazyPort = new ReceivePort();
+import 'dart:_isolate_helper' show IsolateNatives,
+ lazyPort,
+ ReceivePortImpl;
+
+patch class _Isolate {
+ patch ReceivePort get port {
+ if (lazyPort == null) {
+ lazyPort = new ReceivePort();
+ }
+ return lazyPort;
}
- return lazyPort;
-}
-patch SendPort spawnFunction(void topLevelFunction(),
- [bool UnhandledExceptionCallback(IsolateUnhandledException e)]) {
- return IsolateNatives.spawnFunction(topLevelFunction);
-}
+ patch SendPort spawnFunction(void topLevelFunction(),
+ [bool UnhandledExceptionCallback(IsolateUnhandledException e)]) {
+ return IsolateNatives.spawnFunction(topLevelFunction);
+ }
-patch SendPort spawnUri(String uri) {
- return IsolateNatives.spawn(null, uri, false);
+ patch SendPort spawnUri(String uri) {
+ return IsolateNatives.spawn(null, uri, false);
+ }
}
-
/** Default factory for receive ports. */
patch class ReceivePort {
patch factory ReceivePort() {
diff --git a/sdk/lib/_internal/compiler/implementation/lib/js_array.dart b/sdk/lib/_internal/compiler/implementation/lib/js_array.dart
index 1c92f24..654edc0 100644
--- a/sdk/lib/_internal/compiler/implementation/lib/js_array.dart
+++ b/sdk/lib/_internal/compiler/implementation/lib/js_array.dart
@@ -44,20 +44,21 @@
}
void removeAll(Iterable elements) {
- Collections.removeAll(this, elements);
+ IterableMixinWorkaround.removeAllList(this, elements);
}
void retainAll(Iterable elements) {
- Collections.retainAll(this, elements);
+ IterableMixinWorkaround.retainAll(this, elements);
}
void removeMatching(bool test(E element)) {
// This could, and should, be optimized.
- Collections.removeMatching(this, test);
+ IterableMixinWorkaround.removeMatchingList(this, test);
}
- void reatainMatching(bool test(E element)) {
- Collections.reatainMatching(this, test);
+ void retainMatching(bool test(E element)) {
+ IterableMixinWorkaround.removeMatchingList(this,
+ (E element) => !test(element));
}
Iterable<E> where(bool f(E element)) {
@@ -221,6 +222,8 @@
bool every(bool f(E element)) => IterableMixinWorkaround.every(this, f);
+ List<E> get reversed => new ReversedListView<E>(this, 0, null);
+
void sort([int compare(E a, E b)]) {
checkMutable(this, 'sort');
IterableMixinWorkaround.sortList(this, compare);
@@ -251,7 +254,7 @@
Set<E> toSet() => new Set<E>.from(this);
- _ArrayIterator get iterator => new _ArrayIterator(this);
+ Iterator<E> get iterator => new ListIterator<E>(this);
int get hashCode => Primitives.objectHashCode(this);
@@ -282,27 +285,3 @@
JS('void', r'#[#] = #', this, index, value);
}
}
-
-/** Iterator for JavaScript Arrays. */
-class _ArrayIterator<T> implements Iterator<T> {
- final List<T> _list;
- int _position;
- T _current;
-
- _ArrayIterator(List<T> this._list) : _position = -1;
-
- T get current => _current;
-
- bool moveNext() {
- int nextPosition = _position + 1;
- int length = _list.length;
- if (nextPosition < length) {
- _position = nextPosition;
- _current = _list[nextPosition];
- return true;
- }
- _position = length;
- _current = null;
- return false;
- }
-}
diff --git a/sdk/lib/_internal/compiler/implementation/lib/js_helper.dart b/sdk/lib/_internal/compiler/implementation/lib/js_helper.dart
index 838842e..1014f04 100644
--- a/sdk/lib/_internal/compiler/implementation/lib/js_helper.dart
+++ b/sdk/lib/_internal/compiler/implementation/lib/js_helper.dart
@@ -6,122 +6,24 @@
import 'dart:collection';
import 'dart:collection-dev';
+import 'dart:_foreign_helper' show DART_CLOSURE_TO_JS,
+ JS,
+ JS_CALL_IN_ISOLATE,
+ JS_CURRENT_ISOLATE,
+ JS_OPERATOR_IS_PREFIX,
+ JS_HAS_EQUALS,
+ RAW_DART_FUNCTION_REF,
+ UNINTERCEPTED;
part 'constant_map.dart';
part 'native_helper.dart';
part 'regexp_helper.dart';
part 'string_helper.dart';
-// Performance critical helper methods.
-gt(var a, var b) => (a is num && b is num)
- ? JS('bool', r'# > #', a, b)
- : gt$slow(a, b);
-
-ge(var a, var b) => (a is num && b is num)
- ? JS('bool', r'# >= #', a, b)
- : ge$slow(a, b);
-
-lt(var a, var b) => (a is num && b is num)
- ? JS('bool', r'# < #', a, b)
- : lt$slow(a, b);
-
-le(var a, var b) => (a is num && b is num)
- ? JS('bool', r'# <= #', a, b)
- : le$slow(a, b);
-
-gtB(var a, var b) => (a is num && b is num)
- ? JS('bool', r'# > #', a, b)
- : identical(gt$slow(a, b), true);
-
-geB(var a, var b) => (a is num && b is num)
- ? JS('bool', r'# >= #', a, b)
- : identical(ge$slow(a, b), true);
-
-ltB(var a, var b) => (a is num && b is num)
- ? JS('bool', r'# < #', a, b)
- : identical(lt$slow(a, b), true);
-
-leB(var a, var b) => (a is num && b is num)
- ? JS('bool', r'# <= #', a, b)
- : identical(le$slow(a, b), true);
-
-/**
- * Returns true if both arguments are numbers.
- *
- * If only the first argument is a number, an
- * [ArgumentError] with the other argument is thrown.
- */
-bool checkNumbers(var a, var b) {
- if (a is num) {
- if (b is num) {
- return true;
- } else {
- throw new ArgumentError(b);
- }
- }
- return false;
-}
-
bool isJsArray(var value) {
return value != null && JS('bool', r'#.constructor === Array', value);
}
-eq(var a, var b) {
- if (JS('bool', r'# == null', a)) return JS('bool', r'# == null', b);
- if (JS('bool', r'# == null', b)) return false;
- if (JS('bool', r'typeof # === "object"', a)) {
- if (JS_HAS_EQUALS(a)) {
- return UNINTERCEPTED(a == b);
- }
- }
- // TODO(lrn): is NaN === NaN ? Is -0.0 === 0.0 ?
- return JS('bool', r'# === #', a, b);
-}
-
-bool eqB(var a, var b) {
- if (JS('bool', r'# == null', a)) return JS('bool', r'# == null', b);
- if (JS('bool', r'# == null', b)) return false;
- if (JS('bool', r'typeof # === "object"', a)) {
- if (JS_HAS_EQUALS(a)) {
- return identical(UNINTERCEPTED(a == b), true);
- }
- }
- // TODO(lrn): is NaN === NaN ? Is -0.0 === 0.0 ?
- return JS('bool', r'# === #', a, b);
-}
-
-eqq(var a, var b) {
- return JS('bool', r'# === #', a, b);
-}
-
-gt$slow(var a, var b) {
- if (checkNumbers(a, b)) {
- return JS('bool', r'# > #', a, b);
- }
- return UNINTERCEPTED(a > b);
-}
-
-ge$slow(var a, var b) {
- if (checkNumbers(a, b)) {
- return JS('bool', r'# >= #', a, b);
- }
- return UNINTERCEPTED(a >= b);
-}
-
-lt$slow(var a, var b) {
- if (checkNumbers(a, b)) {
- return JS('bool', r'# < #', a, b);
- }
- return UNINTERCEPTED(a < b);
-}
-
-le$slow(var a, var b) {
- if (checkNumbers(a, b)) {
- return JS('bool', r'# <= #', a, b);
- }
- return UNINTERCEPTED(a <= b);
-}
-
checkMutable(list, reason) {
if (JS('bool', r'!!(#.immutable$list)', list)) {
throw new UnsupportedError(reason);
@@ -135,6 +37,11 @@
}
String S(value) {
+ if (value is String) return value;
+ if ((value is num && value != 0) || value is bool) {
+ return JS('String', r'String(#)', value);
+ }
+ if (value == null) return 'null';
var res = value.toString();
if (res is !String) throw new ArgumentError(value);
return res;
@@ -1142,12 +1049,12 @@
setRuntimeTypeInfo(target, typeInfo) {
assert(typeInfo == null || isJsArray(typeInfo));
// We have to check for null because factories may return null.
- if (target != null) JS('var', r'#.builtin$typeInfo = #', target, typeInfo);
+ if (target != null) JS('var', r'#.$builtinTypeInfo = #', target, typeInfo);
}
getRuntimeTypeInfo(target) {
if (target == null) return null;
- var res = JS('var', r'#.builtin$typeInfo', target);
+ var res = JS('var', r'#.$builtinTypeInfo', target);
// If the object does not have runtime type information, return an
// empty literal, to avoid null checks.
// TODO(ngeoffray): Make the object a top-level field to avoid
@@ -1551,7 +1458,7 @@
String getRuntimeTypeString(var object) {
String className = isJsArray(object) ? 'List' : getClassName(object);
- var typeInfo = JS('var', r'#.builtin$typeInfo', object);
+ var typeInfo = JS('var', r'#.$builtinTypeInfo', object);
if (typeInfo == null) return className;
return "$className<${joinArguments(typeInfo, 0)}>";
}
@@ -1572,14 +1479,14 @@
*/
bool isSubtype(var s, var t) {
// If either type is dynamic, [s] is a subtype of [t].
- if (s == null || t == null) return true;
+ if (JS('bool', '# == null', s) || JS('bool', '# == null', t)) return true;
// Subtyping is reflexive.
- if (s == t) return true;
+ if (JS('bool', '# === #', s, t)) return true;
// Get the object describing the class and check for the subtyping flag
// constructed from the type of [t].
var typeOfS = isJsArray(s) ? s[0] : s;
var typeOfT = isJsArray(t) ? t[0] : t;
- var test = 'is\$${runtimeTypeToString(typeOfT)}';
+ var test = '${JS_OPERATOR_IS_PREFIX()}${runtimeTypeToString(typeOfT)}';
if (JS('var', r'#[#]', typeOfS, test) == null) return false;
// The class of [s] is a subclass of the class of [t]. If either of the types
// is raw, [s] is a subtype of [t].
diff --git a/sdk/lib/_internal/compiler/implementation/lib/js_number.dart b/sdk/lib/_internal/compiler/implementation/lib/js_number.dart
index e2ae4e8..975c1a5 100644
--- a/sdk/lib/_internal/compiler/implementation/lib/js_number.dart
+++ b/sdk/lib/_internal/compiler/implementation/lib/js_number.dart
@@ -133,6 +133,7 @@
return JS('String', r'#.toString(#)', this, radix);
}
+ // Note: if you change this, also change the function [S].
String toString() {
if (this == 0 && JS('bool', '(1 / #) < 0', this)) {
return '-0.0';
@@ -231,6 +232,26 @@
if (other is !num) throw new ArgumentError(other);
return JS('num', r'(# ^ #) >>> 0', this, other);
}
+
+ bool operator <(num other) {
+ if (other is !num) throw new ArgumentError(other);
+ return JS('num', '# < #', this, other);
+ }
+
+ bool operator >(num other) {
+ if (other is !num) throw new ArgumentError(other);
+ return JS('num', '# > #', this, other);
+ }
+
+ bool operator <=(num other) {
+ if (other is !num) throw new ArgumentError(other);
+ return JS('num', '# <= #', this, other);
+ }
+
+ bool operator >=(num other) {
+ if (other is !num) throw new ArgumentError(other);
+ return JS('num', '# >= #', this, other);
+ }
}
class JSInt extends JSNumber {
diff --git a/sdk/lib/_internal/compiler/implementation/lib/js_string.dart b/sdk/lib/_internal/compiler/implementation/lib/js_string.dart
index 5210b87..d0d857c 100644
--- a/sdk/lib/_internal/compiler/implementation/lib/js_string.dart
+++ b/sdk/lib/_internal/compiler/implementation/lib/js_string.dart
@@ -184,6 +184,7 @@
: JS('bool', r'# < #', this, other) ? -1 : 1;
}
+ // Note: if you change this, also change the function [S].
String toString() => this;
/**
diff --git a/sdk/lib/_internal/compiler/implementation/lib/math_patch.dart b/sdk/lib/_internal/compiler/implementation/lib/math_patch.dart
index b20276e..3bccb2c 100644
--- a/sdk/lib/_internal/compiler/implementation/lib/math_patch.dart
+++ b/sdk/lib/_internal/compiler/implementation/lib/math_patch.dart
@@ -3,6 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
// Patch file for dart:math library.
+import 'dart:_foreign_helper' show JS;
patch double sqrt(num x)
=> JS('double', r'Math.sqrt(#)', checkNum(x));
diff --git a/sdk/lib/_internal/compiler/implementation/lib/mirrors_patch.dart b/sdk/lib/_internal/compiler/implementation/lib/mirrors_patch.dart
index 73328e8..1236507 100644
--- a/sdk/lib/_internal/compiler/implementation/lib/mirrors_patch.dart
+++ b/sdk/lib/_internal/compiler/implementation/lib/mirrors_patch.dart
@@ -4,6 +4,8 @@
// Patch library for dart:mirrors.
+import 'dart:_foreign_helper' show JS;
+
// Yeah, seriously: mirrors in dart2js are experimental...
const String _MIRROR_OPT_IN_MESSAGE = """
diff --git a/sdk/lib/_internal/compiler/implementation/lib/string_helper.dart b/sdk/lib/_internal/compiler/implementation/lib/string_helper.dart
index 6e4dccf..8ac1fa4 100644
--- a/sdk/lib/_internal/compiler/implementation/lib/string_helper.dart
+++ b/sdk/lib/_internal/compiler/implementation/lib/string_helper.dart
@@ -202,3 +202,33 @@
stringJoinUnchecked(array, separator) {
return JS('String', r'#.join(#)', array, separator);
}
+
+class JsStringBuffer implements StringBuffer {
+ String _contents;
+
+ JsStringBuffer(content)
+ : _contents = (content is String) ? content : '$content';
+
+ int get length => _contents.length;
+
+ bool get isEmpty => length == 0;
+
+ void add(Object obj) {
+ _contents = JS('String', '# + #', _contents,
+ (obj is String) ? obj : '$obj');
+ }
+
+ void addAll(Iterable objects) {
+ for (Object obj in objects) add(obj);
+ }
+
+ void addCharCode(int charCode) {
+ add(new String.fromCharCodes([charCode]));
+ }
+
+ void clear() {
+ _contents = "";
+ }
+
+ String toString() => _contents;
+}
diff --git a/sdk/lib/_internal/compiler/implementation/library_loader.dart b/sdk/lib/_internal/compiler/implementation/library_loader.dart
index ccf513c..39c084d 100644
--- a/sdk/lib/_internal/compiler/implementation/library_loader.dart
+++ b/sdk/lib/_internal/compiler/implementation/library_loader.dart
@@ -6,12 +6,103 @@
/**
* [CompilerTask] for loading libraries and setting up the import/export scopes.
+ *
+ * The library loader uses four different kinds of URIs in different parts of
+ * the loading process.
+ *
+ * ## User URI ##
+ *
+ * A 'user URI' is a URI provided by the user in code and as the main entry URI
+ * at the command line. These generally come in 3 versions:
+ *
+ * * A relative URI such as 'foo.dart', '../bar.dart', and 'baz/boz.dart'.
+ *
+ * * A dart URI such as 'dart:core' and 'dart:_js_helper'.
+ *
+ * * A package URI such as 'package:foo.dart' and 'package:bar/baz.dart'.
+ *
+ * A user URI can also be absolute, like 'file:///foo.dart' or
+ * 'http://example.com/bar.dart', but such URIs cannot necessarily be used for
+ * locating source files, since the scheme must be supported by the input
+ * provider. The standard input provider for dart2js only supports the 'file'
+ * scheme.
+ *
+ * ## Resolved URI ##
+ *
+ * A 'resolved URI' is a (user) URI that has been resolved to an absolute URI
+ * based on the readable URI (see below) from which it was loaded. A URI with an
+ * explicit scheme (such as 'dart:', 'package:' or 'file:') is already resolved.
+ * A relative URI like for instance '../foo/bar.dart' is translated into an
+ * resolved URI in one of three ways:
+ *
+ * * If provided as the main entry URI at the command line, the URI is resolved
+ * relative to the current working directory, say
+ * 'file:///current/working/dir/', and the resolved URI is therefore
+ * 'file:///current/working/foo/bar.dart'.
+ *
+ * * If the relative URI is provided in an import, export or part tag, and the
+ * readable URI of the enclosing compilation unit is a file URI,
+ * 'file://some/path/baz.dart', then the resolved URI is
+ * 'file://some/foo/bar.dart'.
+ *
+ * * If the relative URI is provided in an import, export or part tag, and the
+ * readable URI of the enclosing compilation unit is a package URI,
+ * 'package:some/path/baz.dart', then the resolved URI is
+ * 'package:some/foo/bar.dart'.
+ *
+ * The resolved URI thus preserves the scheme through resolution: A readable
+ * file URI results in an resolved file URI and a readable package URI results
+ * in an resolved package URI. Note that since a dart URI is not a readable URI,
+ * import, export or part tags within platform libraries are not interpreted as
+ * dart URIs but instead relative to the library source file location.
+ *
+ * The resolved URI of a library is also used as the canonical URI
+ * ([LibraryElement.canonicalUri]) by which we identify which libraries are
+ * identical. This means that libraries loaded through the 'package' scheme will
+ * resolve to the same library when loaded from within using relative URIs (see
+ * for instance the test 'standalone/package/package1_test.dart'). But loading a
+ * platform library using a relative URI will _not_ result in the same library
+ * as when loaded through the dart URI.
+ *
+ * ## Readable URI ##
+ *
+ * A 'readable URI' is an absolute URI whose scheme is either 'package' or
+ * something supported by the input provider, normally 'file'. Dart URIs such as
+ * 'dart:core' and 'dart:_js_helper' are not readable themselves but are instead
+ * resolved into a readable URI using the library root URI provided from the
+ * command line and the list of platform libraries found in
+ * 'sdk/lib/_internal/libraries.dart'. This is done through the
+ * [Compiler.translateResolvedUri] method which checks whether a library by that
+ * name exists and in case of internal libraries whether access is granted.
+ *
+ * ## Resource URI ##
+ *
+ * A 'resource URI' is an absolute URI with a scheme supported by the input
+ * provider. For the standard implementation this means a URI with the 'file'
+ * scheme. Readable URIs are converted into resource URIs as part of the
+ * [Compiler.readScript] method. In the standard implementation the package URIs
+ * are converted to file URIs using the package root URI provided on the
+ * command line as base. If the package root URI is
+ * 'file:///current/working/dir/' then the package URI 'package:foo/bar.dart'
+ * will be resolved to the resource URI
+ * 'file:///current/working/dir/foo/bar.dart'.
+ *
+ * The distinction between readable URI and resource URI is necessary to ensure
+ * that these imports
+ *
+ * import 'package:foo.dart' as a;
+ * import 'packages/foo.dart' as b;
+ *
+ * do _not_ resolve to the same library when the package root URI happens to
+ * point to the 'packages' folder.
+ *
*/
abstract class LibraryLoader extends CompilerTask {
LibraryLoader(Compiler compiler) : super(compiler);
/**
- * Loads the library located at [uri] and returns its [LibraryElement].
+ * Loads the library specified by the [resolvedUri] and returns its
+ * [LibraryElement].
*
* If the library is not already loaded, the method creates the
* [LibraryElement] for the library and computes the import/export scope,
@@ -20,7 +111,9 @@
*
* This is the main entry point for [LibraryLoader].
*/
- LibraryElement loadLibrary(Uri uri, Node node, Uri canonicalUri);
+ // TODO(johnniwinther): Remove [canonicalUri] together with
+ // [Compiler.scanBuiltinLibrary].
+ LibraryElement loadLibrary(Uri resolvedUri, Node node, Uri canonicalUri);
// TODO(johnniwinther): Remove this when patches don't need special parsing.
void registerLibraryFromTag(LibraryDependencyHandler handler,
@@ -133,12 +226,12 @@
LibraryDependencyHandler currentHandler;
- LibraryElement loadLibrary(Uri uri, Node node, Uri canonicalUri) {
+ LibraryElement loadLibrary(Uri resolvedUri, Node node, Uri canonicalUri) {
return measure(() {
assert(currentHandler == null);
currentHandler = new LibraryDependencyHandler(compiler);
LibraryElement library =
- createLibrary(currentHandler, uri, node, canonicalUri);
+ createLibrary(currentHandler, null, resolvedUri, node, canonicalUri);
currentHandler.computeExports();
currentHandler = null;
return library;
@@ -193,21 +286,21 @@
} else if (tag.isPart) {
Part part = tag;
StringNode uri = part.uri;
- Uri resolved = base.resolve(uri.dartString.slowToString());
+ Uri resolvedUri = base.resolve(uri.dartString.slowToString());
tagState = checkTag(TagState.SOURCE, part);
- scanPart(part, resolved, library);
+ scanPart(part, resolvedUri, library);
} else {
compiler.internalError("Unhandled library tag.", node: tag);
}
}
// Apply patch, if any.
- if (library.uri.scheme == 'dart') {
- patchDartLibrary(handler, library, library.uri.path);
+ if (library.isPlatformLibrary) {
+ patchDartLibrary(handler, library, library.canonicalUri.path);
}
// Import dart:core if not already imported.
- if (!importsDartCore && !isDartCore(library.uri)) {
+ if (!importsDartCore && !isDartCore(library.canonicalUri)) {
handler.registerDependency(library, null, loadCoreLibrary(handler));
}
@@ -245,7 +338,8 @@
LibraryElement loadCoreLibrary(LibraryDependencyHandler handler) {
if (compiler.coreLibrary == null) {
Uri coreUri = new Uri.fromComponents(scheme: 'dart', path: 'core');
- compiler.coreLibrary = createLibrary(handler, coreUri, null, coreUri);
+ compiler.coreLibrary
+ = createLibrary(handler, null, coreUri, null, coreUri);
}
return compiler.coreLibrary;
}
@@ -260,12 +354,13 @@
}
/**
- * Handle a part tag in the scope of [library]. The [path] given is used as
- * is, any URI resolution should be done beforehand.
+ * Handle a part tag in the scope of [library]. The [resolvedUri] given is
+ * used as is, any URI resolution should be done beforehand.
*/
- void scanPart(Part part, Uri path, LibraryElement library) {
- if (!path.isAbsolute()) throw new ArgumentError(path);
- Script sourceScript = compiler.readScript(path, part);
+ void scanPart(Part part, Uri resolvedUri, LibraryElement library) {
+ if (!resolvedUri.isAbsolute()) throw new ArgumentError(resolvedUri);
+ Uri readableUri = compiler.translateResolvedUri(library, resolvedUri, part);
+ Script sourceScript = compiler.readScript(readableUri, part);
CompilationUnitElement unit =
new CompilationUnitElementX(sourceScript, library);
compiler.withCurrentElement(unit, () {
@@ -295,32 +390,40 @@
LibraryElement library,
LibraryDependency tag) {
Uri base = library.entryCompilationUnit.script.uri;
- Uri resolved = base.resolve(tag.uri.dartString.slowToString());
+ Uri resolvedUri = base.resolve(tag.uri.dartString.slowToString());
LibraryElement loadedLibrary =
- createLibrary(handler, resolved, tag.uri, resolved);
+ createLibrary(handler, library, resolvedUri, tag.uri, resolvedUri);
handler.registerDependency(library, tag, loadedLibrary);
if (!loadedLibrary.hasLibraryName()) {
compiler.withCurrentElement(library, () {
compiler.reportError(tag == null ? null : tag.uri,
- 'no library name found in ${loadedLibrary.uri}');
+ 'no library name found in ${loadedLibrary.canonicalUri}');
});
}
}
/**
- * Create (or reuse) a library element for the library located at [uri].
+ * Create (or reuse) a library element for the library specified by the
+ * [resolvedUri].
+ *
* If a new library is created, the [handler] is notified.
*/
+ // TODO(johnniwinther): Remove [canonicalUri] and make [resolvedUri] the
+ // canonical uri when [Compiler.scanBuiltinLibrary] is removed.
LibraryElement createLibrary(LibraryDependencyHandler handler,
- Uri uri, Node node, Uri canonicalUri) {
+ LibraryElement importingLibrary,
+ Uri resolvedUri, Node node, Uri canonicalUri) {
bool newLibrary = false;
+ Uri readableUri =
+ compiler.translateResolvedUri(importingLibrary, resolvedUri, node);
+ if (readableUri == null) return null;
LibraryElement createLibrary() {
newLibrary = true;
- Script script = compiler.readScript(uri, node);
+ Script script = compiler.readScript(readableUri, node);
LibraryElement element = new LibraryElementX(script, canonicalUri);
handler.registerNewLibrary(element);
- native.maybeEnableNative(compiler, element, uri);
+ native.maybeEnableNative(compiler, element);
return element;
}
LibraryElement library;
@@ -335,7 +438,7 @@
compiler.scanner.scanLibrary(library);
processLibraryTags(handler, library);
handler.registerLibraryExports(library);
- compiler.onLibraryScanned(library, uri);
+ compiler.onLibraryScanned(library, resolvedUri);
});
}
return library;
diff --git a/sdk/lib/_internal/compiler/implementation/mirrors/dart2js_mirror.dart b/sdk/lib/_internal/compiler/implementation/mirrors/dart2js_mirror.dart
index e5dab45..8f8689d 100644
--- a/sdk/lib/_internal/compiler/implementation/mirrors/dart2js_mirror.dart
+++ b/sdk/lib/_internal/compiler/implementation/mirrors/dart2js_mirror.dart
@@ -5,6 +5,7 @@
library mirrors_dart2js;
import 'dart:async';
+import 'dart:collection' show LinkedHashMap;
import 'dart:io';
import 'dart:uri';
@@ -22,6 +23,7 @@
import '../util/uri_extras.dart';
import '../dart2js.dart';
import '../util/characters.dart';
+import '../source_file_provider.dart';
import 'mirrors.dart';
import 'mirrors_util.dart';
@@ -287,9 +289,6 @@
for (var uri in uriList) {
elementList.add(libraryLoader.loadLibrary(uri, null, uri));
}
- libraries.forEach((_, library) {
- maybeEnableJSHelper(library);
- });
world.populate();
@@ -303,9 +302,7 @@
void processQueueList(Enqueuer world, List<LibraryElement> elements) {
world.nativeEnqueuer.processNativeClasses(libraries.values);
for (var library in elements) {
- library.forEachLocalMember((element) {
- world.addToWorkList(element);
- });
+ fullyEnqueueLibrary(library);
}
progress.reset();
world.forEach((WorkItem work) {
@@ -674,7 +671,7 @@
LibraryElement get _library => _element;
- Uri get uri => _library.uri;
+ Uri get uri => _library.canonicalUri;
DeclarationMirror get owner => null;
@@ -698,7 +695,7 @@
}
} else {
// Use the file name as script name.
- String path = _library.uri.path;
+ String path = _library.canonicalUri.path;
return path.substring(path.lastIndexOf('/') + 1);
}
}
diff --git a/sdk/lib/_internal/compiler/implementation/mirrors/mirrors_util.dart b/sdk/lib/_internal/compiler/implementation/mirrors/mirrors_util.dart
index 5056f94..d904089 100644
--- a/sdk/lib/_internal/compiler/implementation/mirrors/mirrors_util.dart
+++ b/sdk/lib/_internal/compiler/implementation/mirrors/mirrors_util.dart
@@ -4,6 +4,8 @@
library mirrors_util;
+import 'dart:collection' show Queue;
+
// TODO(rnystrom): Use "package:" URL (#4968).
import 'mirrors.dart';
diff --git a/sdk/lib/_internal/compiler/implementation/native_handler.dart b/sdk/lib/_internal/compiler/implementation/native_handler.dart
index c0af4bf..ccef7f0 100644
--- a/sdk/lib/_internal/compiler/implementation/native_handler.dart
+++ b/sdk/lib/_internal/compiler/implementation/native_handler.dart
@@ -4,6 +4,7 @@
library native;
+import 'dart:collection' show Queue;
import 'dart:uri';
import 'dart2jslib.dart' hide SourceString;
import 'elements/elements.dart';
@@ -223,18 +224,20 @@
}
registerElement(Element element) {
- if (element.isFunction() || element.isGetter() || element.isSetter()) {
- handleMethodAnnotations(element);
- if (element.isNative()) {
- registerMethodUsed(element);
+ compiler.withCurrentElement(element, () {
+ if (element.isFunction() || element.isGetter() || element.isSetter()) {
+ handleMethodAnnotations(element);
+ if (element.isNative()) {
+ registerMethodUsed(element);
+ }
+ } else if (element.isField()) {
+ handleFieldAnnotations(element);
+ if (element.isNative()) {
+ registerFieldLoad(element);
+ registerFieldStore(element);
+ }
}
- } else if (element.isField()) {
- handleFieldAnnotations(element);
- if (element.isNative()) {
- registerFieldLoad(element);
- registerFieldStore(element);
- }
- }
+ });
}
handleFieldAnnotations(Element element) {
@@ -436,8 +439,17 @@
subtypes.add(cls);
}
+ // Skip through all the mixin applications in the super class
+ // chain. That way, the direct subtypes set only contain the
+ // natives classes.
+ ClassElement superclass = cls.superclass;
+ while (superclass != null && superclass.isMixinApplication) {
+ assert(!superclass.isNative());
+ superclass = superclass.superclass;
+ }
+
List<Element> directSubtypes = emitter.directSubtypes.putIfAbsent(
- cls.superclass,
+ superclass,
() => <ClassElement>[]);
directSubtypes.add(cls);
}
@@ -449,9 +461,8 @@
}
void maybeEnableNative(Compiler compiler,
- LibraryElement library,
- Uri uri) {
- String libraryName = uri.toString();
+ LibraryElement library) {
+ String libraryName = library.canonicalUri.toString();
if (library.entryCompilationUnit.script.name.contains(
'dart/tests/compiler/dart2js_native')
|| libraryName == 'dart:async'
@@ -804,7 +815,7 @@
HInstruction arity = builder.graph.addConstant(arityConstant);
// TODO(ngeoffray): For static methods, we could pass a method with a
// defined arity.
- Element helper = builder.interceptors.getClosureConverter();
+ Element helper = builder.backend.getClosureConverter();
builder.pushInvokeHelper2(helper, local, arity);
HInstruction closure = builder.pop();
return closure;
diff --git a/sdk/lib/_internal/compiler/implementation/patch_parser.dart b/sdk/lib/_internal/compiler/implementation/patch_parser.dart
index af1ae5f..57dbd25 100644
--- a/sdk/lib/_internal/compiler/implementation/patch_parser.dart
+++ b/sdk/lib/_internal/compiler/implementation/patch_parser.dart
@@ -136,22 +136,25 @@
Uri patchUri, LibraryElement originLibrary) {
leg.Script script = compiler.readScript(patchUri, null);
- var patchLibrary = new LibraryElementX(script, patchUri, originLibrary);
- handler.registerNewLibrary(patchLibrary);
- LinkBuilder<tree.LibraryTag> imports = new LinkBuilder<tree.LibraryTag>();
- compiler.withCurrentElement(patchLibrary.entryCompilationUnit, () {
- // This patches the elements of the patch library into [library].
- // Injected elements are added directly under the compilation unit.
- // Patch elements are stored on the patched functions or classes.
- scanLibraryElements(patchLibrary.entryCompilationUnit, imports);
+ var patchLibrary = new LibraryElementX(script, null, originLibrary);
+ compiler.withCurrentElement(patchLibrary, () {
+ handler.registerNewLibrary(patchLibrary);
+ LinkBuilder<tree.LibraryTag> imports = new LinkBuilder<tree.LibraryTag>();
+ compiler.withCurrentElement(patchLibrary.entryCompilationUnit, () {
+ // This patches the elements of the patch library into [library].
+ // Injected elements are added directly under the compilation unit.
+ // Patch elements are stored on the patched functions or classes.
+ scanLibraryElements(patchLibrary.entryCompilationUnit, imports);
+ });
+ // After scanning declarations, we handle the import tags in the patch.
+ // TODO(lrn): These imports end up in the original library and are in
+ // scope for the original methods too. This should be fixed.
+ compiler.importHelperLibrary(originLibrary);
+ for (tree.LibraryTag tag in imports.toLink()) {
+ compiler.libraryLoader.registerLibraryFromTag(
+ handler, patchLibrary, tag);
+ }
});
- // After scanning declarations, we handle the import tags in the patch.
- // TODO(lrn): These imports end up in the original library and are in
- // scope for the original methods too. This should be fixed.
- compiler.importHelperLibrary(originLibrary);
- for (tree.LibraryTag tag in imports.toLink()) {
- compiler.libraryLoader.registerLibraryFromTag(handler, patchLibrary, tag);
- }
}
void scanLibraryElements(
diff --git a/sdk/lib/_internal/compiler/implementation/resolution/members.dart b/sdk/lib/_internal/compiler/implementation/resolution/members.dart
index aeef672..a8fa300 100644
--- a/sdk/lib/_internal/compiler/implementation/resolution/members.dart
+++ b/sdk/lib/_internal/compiler/implementation/resolution/members.dart
@@ -9,18 +9,17 @@
Selector getSelector(Send send);
DartType getType(Node node);
bool isParameterChecked(Element element);
+ Set<Node> get superUses;
}
class TreeElementMapping implements TreeElements {
final Element currentElement;
- final Map<Node, Selector> selectors;
- final Map<Node, DartType> types;
- final Set<Element> checkedParameters;
+ final Map<Node, Selector> selectors = new LinkedHashMap<Node, Selector>();
+ final Map<Node, DartType> types = new LinkedHashMap<Node, DartType>();
+ final Set<Element> checkedParameters = new Set<Element>();
+ final Set<Node> superUses = new Set<Node>();
- TreeElementMapping(this.currentElement)
- : selectors = new LinkedHashMap<Node, Selector>(),
- types = new LinkedHashMap<Node, DartType>(),
- checkedParameters = new Set<Element>();
+ TreeElementMapping(this.currentElement);
operator []=(Node node, Element element) {
assert(invariant(node, () {
@@ -268,7 +267,24 @@
}
visitBody(visitor, tree.body);
- return visitor.mapping;
+ // Get the resolution tree and check that the resolved
+ // function doesn't use 'super' if it is mixed into another
+ // class. This is the part of the 'super' mixin check that
+ // happens when a function is resolved after the mixin
+ // application has been performed.
+ TreeElements resolutionTree = visitor.mapping;
+ ClassElement enclosingClass = element.getEnclosingClass();
+ if (enclosingClass != null) {
+ Set<MixinApplicationElement> mixinUses =
+ compiler.world.mixinUses[enclosingClass];
+ if (mixinUses != null) {
+ ClassElement mixin = enclosingClass;
+ for (MixinApplicationElement mixinApplication in mixinUses) {
+ checkMixinSuperUses(resolutionTree, mixinApplication, mixin);
+ }
+ }
+ }
+ return resolutionTree;
});
});
}
@@ -352,6 +368,10 @@
}
ResolverVisitor visitor = visitorFor(element);
initializerDo(tree, visitor.visit);
+
+ // Perform various checks as side effect of "computing" the type.
+ element.computeType(compiler);
+
return visitor.mapping;
}
@@ -489,7 +509,78 @@
}
}
- void checkMembers(ClassElement cls) {
+ void checkClass(ClassElement element) {
+ if (element.isMixinApplication) {
+ checkMixinApplication(element);
+ } else {
+ checkClassMembers(element);
+ }
+ }
+
+ void checkMixinApplication(MixinApplicationElement mixinApplication) {
+ Modifiers modifiers = mixinApplication.modifiers;
+ int illegalFlags = modifiers.flags & ~Modifiers.FLAG_ABSTRACT;
+ if (illegalFlags != 0) {
+ Modifiers illegalModifiers = new Modifiers.withFlags(null, illegalFlags);
+ CompilationError error =
+ MessageKind.ILLEGAL_MIXIN_APPLICATION_MODIFIERS.error(
+ [illegalModifiers]);
+ compiler.reportMessage(compiler.spanFromSpannable(modifiers),
+ error, Diagnostic.ERROR);
+ }
+
+ // In case of cyclic mixin applications, the mixin chain will have
+ // been cut. If so, we have already reported the error to the
+ // user so we just return from here.
+ ClassElement mixin = mixinApplication.mixin;
+ if (mixin == null) return;
+
+ // Check that the mixed in class has Object as its superclass.
+ if (!mixin.superclass.isObject(compiler)) {
+ CompilationError error = MessageKind.ILLEGAL_MIXIN_SUPERCLASS.error();
+ compiler.reportMessage(compiler.spanFromElement(mixin),
+ error, Diagnostic.ERROR);
+ }
+
+ // Check that the mixed in class doesn't have any constructors and
+ // make sure we aren't mixing in methods that use 'super'.
+ mixin.forEachLocalMember((Element member) {
+ if (member.isGenerativeConstructor() && !member.isSynthesized) {
+ CompilationError error = MessageKind.ILLEGAL_MIXIN_CONSTRUCTOR.error();
+ compiler.reportMessage(compiler.spanFromElement(member),
+ error, Diagnostic.ERROR);
+ } else {
+ // Get the resolution tree and check that the resolved member
+ // doesn't use 'super'. This is the part of the 'super' mixin
+ // check that happens when a function is resolved before the
+ // mixin application has been performed.
+ checkMixinSuperUses(
+ compiler.enqueuer.resolution.resolvedElements[member],
+ mixinApplication,
+ mixin);
+ }
+ });
+ }
+
+ void checkMixinSuperUses(TreeElements resolutionTree,
+ MixinApplicationElement mixinApplication,
+ ClassElement mixin) {
+ if (resolutionTree == null) return;
+ Set<Node> superUses = resolutionTree.superUses;
+ if (superUses.isEmpty) return;
+ CompilationError error = MessageKind.ILLEGAL_MIXIN_WITH_SUPER.error(
+ [mixin.name]);
+ compiler.reportMessage(compiler.spanFromElement(mixinApplication),
+ error, Diagnostic.ERROR);
+ // Show the user the problematic uses of 'super' in the mixin.
+ for (Node use in superUses) {
+ CompilationError error = MessageKind.ILLEGAL_MIXIN_SUPER_USE.error();
+ compiler.reportMessage(compiler.spanFromNode(use),
+ error, Diagnostic.INFO);
+ }
+ }
+
+ void checkClassMembers(ClassElement cls) {
assert(invariant(cls, cls.isDeclaration));
if (cls.isObject(compiler)) return;
// TODO(johnniwinther): Should this be done on the implementation element as
@@ -1729,6 +1820,7 @@
Element resolveSend(Send node) {
Selector selector = resolveSelector(node);
+ if (node.isSuperCall) mapping.superUses.add(node);
if (node.receiver == null) {
// If this send is of the form "assert(expr);", then
@@ -2767,44 +2859,7 @@
}
assert(element.interfaces == null);
- Link<DartType> interfaces = const Link<DartType>();
- for (Link<Node> link = node.interfaces.nodes;
- !link.isEmpty;
- link = link.tail) {
- DartType interfaceType = typeResolver.resolveTypeAnnotation(
- link.head, scope, element, onFailure: error);
- if (interfaceType != null) {
- if (identical(interfaceType.kind, TypeKind.MALFORMED_TYPE)) {
- // Error has already been reported.
- } else if (!identical(interfaceType.kind, TypeKind.INTERFACE)) {
- // TODO(johnniwinther): Handle dynamic.
- TypeAnnotation typeAnnotation = link.head;
- error(typeAnnotation.typeName, MessageKind.CLASS_NAME_EXPECTED, []);
- } else {
- if (interfaceType == element.supertype) {
- compiler.reportMessage(
- compiler.spanFromSpannable(node.superclass),
- MessageKind.DUPLICATE_EXTENDS_IMPLEMENTS.error([interfaceType]),
- Diagnostic.ERROR);
- compiler.reportMessage(
- compiler.spanFromSpannable(link.head),
- MessageKind.DUPLICATE_EXTENDS_IMPLEMENTS.error([interfaceType]),
- Diagnostic.ERROR);
- }
- if (interfaces.contains(interfaceType)) {
- compiler.reportMessage(
- compiler.spanFromSpannable(link.head),
- MessageKind.DUPLICATE_IMPLEMENTS.error([interfaceType]),
- Diagnostic.ERROR);
- }
- interfaces = interfaces.prepend(interfaceType);
- if (isBlackListed(interfaceType)) {
- error(link.head, MessageKind.CANNOT_IMPLEMENT, [interfaceType]);
- }
- }
- }
- }
- element.interfaces = interfaces;
+ element.interfaces = resolveInterfaces(node.interfaces, node.superclass);
calculateAllSupertypes(element);
if (node.defaultClause != null) {
@@ -2814,10 +2869,14 @@
return element.computeType(compiler);
}
- DartType visitMixinApplication(MixinApplication node) {
+ DartType visitNamedMixinApplication(NamedMixinApplication node) {
compiler.ensure(element != null);
compiler.ensure(element.resolutionState == STATE_STARTED);
+ InterfaceType type = element.computeType(compiler);
+ scope = new TypeDeclarationScope(scope, element);
+ resolveTypeVariableBounds(node.typeParameters);
+
// Generate anonymous mixin application elements for the
// intermediate mixin applications (excluding the last).
DartType supertype = resolveSupertype(element, node.superclass);
@@ -2837,7 +2896,8 @@
new SourceString("${superName}_${mixinName}"),
element.getCompilationUnit(),
compiler.getNextFreeClassId(),
- element.parseNode(compiler));
+ element.parseNode(compiler),
+ Modifiers.EMPTY); // TODO(kasperl): Should this be abstract?
doApplyMixinTo(mixinApplication, supertype, mixinType);
mixinApplication.resolutionState = STATE_DONE;
mixinApplication.supertypeLoadState = STATE_DONE;
@@ -2850,20 +2910,53 @@
assert(mixinApplication.supertype == null);
mixinApplication.supertype = supertype;
+ // Named mixin application may have an 'implements' clause.
+ NamedMixinApplication namedMixinApplication =
+ mixinApplication.parseNode(compiler).asNamedMixinApplication();
+ Link<DartType> interfaces = (namedMixinApplication != null)
+ ? resolveInterfaces(namedMixinApplication.interfaces,
+ namedMixinApplication.superclass)
+ : const Link<DartType>();
+
// The class that is the result of a mixin application implements
- // the interface of the class that was mixed in.
- Link<DartType> interfaces = const Link<DartType>();
+ // the interface of the class that was mixed in so always prepend
+ // that to the interface list.
interfaces = interfaces.prepend(mixinType);
assert(mixinApplication.interfaces == null);
mixinApplication.interfaces = interfaces;
assert(mixinApplication.mixin == null);
- mixinApplication.mixin = mixinType.element;
- mixinApplication.mixin.ensureResolved(compiler);
+ mixinApplication.mixin = resolveMixinFor(mixinApplication, mixinType);
mixinApplication.addDefaultConstructorIfNeeded(compiler);
calculateAllSupertypes(mixinApplication);
}
+ ClassElement resolveMixinFor(MixinApplicationElement mixinApplication,
+ DartType mixinType) {
+ ClassElement mixin = mixinType.element;
+ mixin.ensureResolved(compiler);
+
+ // Check for cycles in the mixin chain.
+ ClassElement previous = mixinApplication; // For better error messages.
+ ClassElement current = mixin;
+ while (current != null && current.isMixinApplication) {
+ MixinApplicationElement currentMixinApplication = current;
+ if (currentMixinApplication == mixinApplication) {
+ CompilationError error = MessageKind.ILLEGAL_MIXIN_CYCLE.error(
+ [current.name, previous.name]);
+ compiler.reportMessage(compiler.spanFromElement(mixinApplication),
+ error, Diagnostic.ERROR);
+ // We have found a cycle in the mixin chain. Return null as
+ // the mixin for this application to avoid getting into
+ // infinite recursion when traversing members.
+ return null;
+ }
+ previous = current;
+ current = currentMixinApplication.mixin;
+ }
+ compiler.world.registerMixinUse(mixinApplication, mixin);
+ return mixin;
+ }
// TODO(johnniwinther): Remove when default class is no longer supported.
DartType visitTypeAnnotation(TypeAnnotation node) {
@@ -2934,6 +3027,46 @@
return supertype;
}
+ Link<DartType> resolveInterfaces(NodeList interfaces, Node superclass) {
+ Link<DartType> result = const Link<DartType>();
+ if (interfaces == null) return result;
+ for (Link<Node> link = interfaces.nodes; !link.isEmpty; link = link.tail) {
+ DartType interfaceType = typeResolver.resolveTypeAnnotation(
+ link.head, scope, element, onFailure: error);
+ if (interfaceType != null) {
+ if (identical(interfaceType.kind, TypeKind.MALFORMED_TYPE)) {
+ // Error has already been reported.
+ } else if (!identical(interfaceType.kind, TypeKind.INTERFACE)) {
+ // TODO(johnniwinther): Handle dynamic.
+ TypeAnnotation typeAnnotation = link.head;
+ error(typeAnnotation.typeName, MessageKind.CLASS_NAME_EXPECTED, []);
+ } else {
+ if (interfaceType == element.supertype) {
+ compiler.reportMessage(
+ compiler.spanFromSpannable(superclass),
+ MessageKind.DUPLICATE_EXTENDS_IMPLEMENTS.error([interfaceType]),
+ Diagnostic.ERROR);
+ compiler.reportMessage(
+ compiler.spanFromSpannable(link.head),
+ MessageKind.DUPLICATE_EXTENDS_IMPLEMENTS.error([interfaceType]),
+ Diagnostic.ERROR);
+ }
+ if (result.contains(interfaceType)) {
+ compiler.reportMessage(
+ compiler.spanFromSpannable(link.head),
+ MessageKind.DUPLICATE_IMPLEMENTS.error([interfaceType]),
+ Diagnostic.ERROR);
+ }
+ result = result.prepend(interfaceType);
+ if (isBlackListed(interfaceType)) {
+ error(link.head, MessageKind.CANNOT_IMPLEMENT, [interfaceType]);
+ }
+ }
+ }
+ }
+ return result;
+ }
+
void calculateAllSupertypes(ClassElement cls) {
// TODO(karlklose): Check if type arguments match, if a class
// element occurs more than once in the supertypes.
diff --git a/sdk/lib/_internal/compiler/implementation/resolution/resolution.dart b/sdk/lib/_internal/compiler/implementation/resolution/resolution.dart
index e50729d..2f6ce5d 100644
--- a/sdk/lib/_internal/compiler/implementation/resolution/resolution.dart
+++ b/sdk/lib/_internal/compiler/implementation/resolution/resolution.dart
@@ -4,6 +4,8 @@
library resolution;
+import 'dart:collection' show Queue, LinkedHashMap;
+
import '../dart2jslib.dart' hide Diagnostic;
import '../../compiler.dart' show Diagnostic;
import '../tree/tree.dart';
diff --git a/sdk/lib/_internal/compiler/implementation/scanner/listener.dart b/sdk/lib/_internal/compiler/implementation/scanner/listener.dart
index 34408bf..b74cc82 100644
--- a/sdk/lib/_internal/compiler/implementation/scanner/listener.dart
+++ b/sdk/lib/_internal/compiler/implementation/scanner/listener.dart
@@ -172,7 +172,9 @@
void beginNamedMixinApplication(Token token) {
}
- void endNamedMixinApplication(Token typedefKeyword, Token endToken) {
+ void endNamedMixinApplication(Token typedefKeyword,
+ Token implementsKeyword,
+ Token endToken) {
}
void beginHide(Token hideKeyword) {
@@ -826,22 +828,30 @@
rejectBuiltInIdentifier(name);
}
- void endNamedMixinApplication(Token typedefKeyword, Token endToken) {
+ void endNamedMixinApplication(Token typedefKeyword,
+ Token implementsKeyword,
+ Token endToken) {
+ NodeList interfaces = (implementsKeyword != null) ? popNode() : null;
MixinApplication mixinApplication = popNode();
- NodeList typeVariables = popNode();
+ Modifiers modifiers = popNode();
+ NodeList typeParameters = popNode();
Identifier name = popNode();
+ NamedMixinApplication namedMixinApplication = new NamedMixinApplication(
+ name, typeParameters, modifiers, mixinApplication, interfaces,
+ typedefKeyword, endToken);
+
int id = idGenerator();
Element enclosing = compilationUnitElement;
- pushElement(new MixinApplicationElementX(
- name.source, enclosing, id, mixinApplication));
+ pushElement(new MixinApplicationElementX(name.source, enclosing, id,
+ namedMixinApplication,
+ modifiers));
rejectBuiltInIdentifier(name);
}
void endMixinApplication() {
NodeList mixins = popNode();
TypeAnnotation superclass = popNode();
- Modifiers modifiers = popNode();
- pushNode(new MixinApplication(modifiers, superclass, mixins));
+ pushNode(new MixinApplication(superclass, mixins));
}
void handleVoidKeyword(Token token) {
@@ -1210,11 +1220,17 @@
typedefKeyword, endToken));
}
- void endNamedMixinApplication(Token typedefKeyword, Token endToken) {
+ void endNamedMixinApplication(Token typedefKeyword,
+ Token implementsKeyword,
+ Token endToken) {
+ NodeList interfaces = (implementsKeyword != null) ? popNode() : null;
Node mixinApplication = popNode();
+ Modifiers modifiers = popNode();
NodeList typeParameters = popNode();
Identifier name = popNode();
- pushNode(new NamedMixinApplication(name, typeParameters, mixinApplication,
+ pushNode(new NamedMixinApplication(name, typeParameters,
+ modifiers, mixinApplication,
+ interfaces,
typedefKeyword, endToken));
}
diff --git a/sdk/lib/_internal/compiler/implementation/scanner/parser.dart b/sdk/lib/_internal/compiler/implementation/scanner/parser.dart
index 2909cc9..ef0f417 100644
--- a/sdk/lib/_internal/compiler/implementation/scanner/parser.dart
+++ b/sdk/lib/_internal/compiler/implementation/scanner/parser.dart
@@ -266,8 +266,15 @@
token = parseIdentifier(token.next);
token = parseTypeVariablesOpt(token);
token = expect('=', token);
+ token = parseModifiers(token);
token = parseMixinApplication(token);
- listener.endNamedMixinApplication(typedefKeyword, token);
+ Token implementsKeyword = null;
+ if (optional('implements', token)) {
+ implementsKeyword = token;
+ token = parseTypeList(token.next);
+ }
+ listener.endNamedMixinApplication(
+ typedefKeyword, implementsKeyword, token);
} else {
listener.beginFunctionTypeAlias(token);
token = parseReturnTypeOpt(token.next);
@@ -281,7 +288,6 @@
Token parseMixinApplication(Token token) {
listener.beginMixinApplication(token);
- token = parseModifiers(token);
token = parseType(token);
token = expect('with', token);
token = parseTypeList(token);
@@ -484,8 +490,7 @@
Token extendsKeyword;
if (optional('extends', token)) {
extendsKeyword = token;
- if (optional('with', token.next.next)) {
- // TODO(kasperl): Disallow modifiers here.
+ if (optional('with', peekAfterType(token.next))) {
token = parseMixinApplication(token.next);
} else {
token = parseType(token.next);
diff --git a/sdk/lib/_internal/compiler/implementation/scanner/scanner_task.dart b/sdk/lib/_internal/compiler/implementation/scanner/scanner_task.dart
index a1f4a91..0738355 100644
--- a/sdk/lib/_internal/compiler/implementation/scanner/scanner_task.dart
+++ b/sdk/lib/_internal/compiler/implementation/scanner/scanner_task.dart
@@ -10,7 +10,7 @@
void scanLibrary(LibraryElement library) {
var compilationUnit = library.entryCompilationUnit;
- var canonicalUri = library.uri.toString();
+ var canonicalUri = library.canonicalUri.toString();
var resolvedUri = compilationUnit.script.uri.toString();
if (canonicalUri == resolvedUri) {
compiler.log("scanning library $canonicalUri");
diff --git a/sdk/lib/_internal/compiler/implementation/scanner/scannerlib.dart b/sdk/lib/_internal/compiler/implementation/scanner/scannerlib.dart
index 841656b..e3cd591 100644
--- a/sdk/lib/_internal/compiler/implementation/scanner/scannerlib.dart
+++ b/sdk/lib/_internal/compiler/implementation/scanner/scannerlib.dart
@@ -4,6 +4,7 @@
library scanner;
+import 'dart:collection' show LinkedHashMap;
import 'dart:uri';
import 'scanner_implementation.dart';
diff --git a/sdk/lib/_internal/compiler/implementation/script.dart b/sdk/lib/_internal/compiler/implementation/script.dart
index 8383686..b130616 100644
--- a/sdk/lib/_internal/compiler/implementation/script.dart
+++ b/sdk/lib/_internal/compiler/implementation/script.dart
@@ -9,7 +9,14 @@
// implements SourceFile, we should be able to type the [file] field as
// such.
final file;
+
+ /**
+ * The readable URI from which this script was loaded.
+ *
+ * See [LibraryLoader] for terminology on URIs.
+ */
final Uri uri;
+
Script(this.uri, this.file);
String get text => (file == null) ? null : file.text;
diff --git a/sdk/lib/_internal/compiler/implementation/source_file_provider.dart b/sdk/lib/_internal/compiler/implementation/source_file_provider.dart
new file mode 100644
index 0000000..ae56ccf
--- /dev/null
+++ b/sdk/lib/_internal/compiler/implementation/source_file_provider.dart
@@ -0,0 +1,121 @@
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library source_file_provider;
+
+import 'dart:async';
+import 'dart:uri';
+import 'dart:io';
+import 'dart:utf';
+
+import '../compiler.dart' as api show Diagnostic;
+import 'dart2js.dart' show AbortLeg;
+import 'colors.dart' as colors;
+import 'source_file.dart';
+import 'filenames.dart';
+import 'util/uri_extras.dart';
+
+String readAll(String filename) {
+ var file = (new File(filename)).openSync(FileMode.READ);
+ var length = file.lengthSync();
+ var buffer = new List<int>.fixedLength(length);
+ var bytes = file.readListSync(buffer, 0, length);
+ file.closeSync();
+ return new String.fromCharCodes(new Utf8Decoder(buffer).decodeRest());
+}
+
+class SourceFileProvider {
+ bool isWindows = (Platform.operatingSystem == 'windows');
+ Uri cwd = getCurrentDirectory();
+ Map<String, SourceFile> sourceFiles = <String, SourceFile>{};
+ int dartBytesRead = 0;
+
+ Future<String> readStringFromUri(Uri resourceUri) {
+ if (resourceUri.scheme != 'file') {
+ throw new ArgumentError("Unknown scheme in uri '$resourceUri'");
+ }
+ String source;
+ try {
+ source = readAll(uriPathToNative(resourceUri.path));
+ } on FileIOException catch (ex) {
+ throw 'Error: Cannot read "${relativize(cwd, resourceUri, isWindows)}" '
+ '(${ex.osError}).';
+ }
+ dartBytesRead += source.length;
+ sourceFiles[resourceUri.toString()] =
+ new SourceFile(relativize(cwd, resourceUri, isWindows), source);
+ return new Future.immediate(source);
+ }
+}
+
+class FormattingDiagnosticHandler {
+ final SourceFileProvider provider;
+ bool showWarnings = true;
+ bool verbose = false;
+ bool isAborting = false;
+ bool enableColors = false;
+ bool throwOnError = false;
+
+ final int FATAL = api.Diagnostic.CRASH.ordinal | api.Diagnostic.ERROR.ordinal;
+ final int INFO =
+ api.Diagnostic.INFO.ordinal | api.Diagnostic.VERBOSE_INFO.ordinal;
+
+ FormattingDiagnosticHandler(SourceFileProvider this.provider);
+
+ void info(var message, [api.Diagnostic kind = api.Diagnostic.VERBOSE_INFO]) {
+ if (!verbose && identical(kind, api.Diagnostic.VERBOSE_INFO)) return;
+ if (enableColors) {
+ print('${colors.green("info:")} $message');
+ } else {
+ print('info: $message');
+ }
+ }
+
+ void diagnosticHandler(Uri uri, int begin, int end, String message,
+ api.Diagnostic kind) {
+ // TODO(ahe): Remove this when source map is handled differently.
+ if (identical(kind.name, 'source map')) return;
+
+ if (isAborting) return;
+ isAborting = identical(kind, api.Diagnostic.CRASH);
+ bool fatal = (kind.ordinal & FATAL) != 0;
+ bool isInfo = (kind.ordinal & INFO) != 0;
+ if (isInfo && uri == null && !identical(kind, api.Diagnostic.INFO)) {
+ info(message, kind);
+ return;
+ }
+ var color;
+ if (!enableColors) {
+ color = (x) => x;
+ } else if (identical(kind, api.Diagnostic.ERROR)) {
+ color = colors.red;
+ } else if (identical(kind, api.Diagnostic.WARNING)) {
+ color = colors.magenta;
+ } else if (identical(kind, api.Diagnostic.LINT)) {
+ color = colors.magenta;
+ } else if (identical(kind, api.Diagnostic.CRASH)) {
+ color = colors.red;
+ } else if (identical(kind, api.Diagnostic.INFO)) {
+ color = colors.green;
+ } else {
+ throw 'Unknown kind: $kind (${kind.ordinal})';
+ }
+ if (uri == null) {
+ assert(fatal);
+ print(color(message));
+ } else if (fatal || showWarnings) {
+ SourceFile file = provider.sourceFiles[uri.toString()];
+ if (file == null) {
+ throw '$uri: file is null';
+ }
+ print(file.getLocationMessage(color(message), begin, end, true, color));
+ }
+ if (fatal && throwOnError) {
+ isAborting = true;
+ throw new AbortLeg(message);
+ }
+ }
+}
+
+
diff --git a/sdk/lib/_internal/compiler/implementation/ssa/bailout.dart b/sdk/lib/_internal/compiler/implementation/ssa/bailout.dart
index 5c96b6f..162fac5 100644
--- a/sdk/lib/_internal/compiler/implementation/ssa/bailout.dart
+++ b/sdk/lib/_internal/compiler/implementation/ssa/bailout.dart
@@ -397,7 +397,24 @@
final List<HLabeledBlockInformation> labeledBlockInformations;
final Set<HInstruction> generateAtUseSite;
SubGraph subGraph;
- int maxBailoutParameters = 0;
+ /**
+ * Max number of arguments to the bailout (not counting the state).
+ */
+ int bailoutArity;
+ /**
+ * A map from variables to their names. These are the names in the
+ * unoptimized (bailout) version of the function. Their names could be
+ * different in the optimized version.
+ */
+ VariableNames variableNames;
+ /**
+ * Maps from the variable names to their positions in the argument list of the
+ * bailout instruction. Because of the way the variable allocator works,
+ * several variables can end up with the same name (if their live ranges do
+ * not overlap), therefore they can have the same position in the bailout
+ * argument list
+ */
+ Map<String, int> parameterNames;
/**
* If set to true, the graph has either multiple bailouts in
@@ -417,9 +434,13 @@
* version.
*/
- SsaBailoutPropagator(this.compiler, this.generateAtUseSite)
+ SsaBailoutPropagator(this.compiler,
+ this.generateAtUseSite,
+ this.variableNames)
: blocks = <HBasicBlock>[],
- labeledBlockInformations = <HLabeledBlockInformation>[];
+ labeledBlockInformations = <HLabeledBlockInformation>[],
+ bailoutArity = 0,
+ parameterNames = new Map<String, int>();
void visitGraph(HGraph graph) {
subGraph = new SubGraph(graph.entry, graph.exit);
@@ -534,9 +555,14 @@
visitBailoutTarget(HBailoutTarget target) {
int inputLength = target.inputs.length;
- if (inputLength > maxBailoutParameters) {
- maxBailoutParameters = inputLength;
+ for (HInstruction input in target.inputs) {
+ String inputName = variableNames.getName(input);
+ int position = parameterNames[inputName];
+ if (position == null) {
+ position = parameterNames[inputName] = bailoutArity++;
+ }
}
+
if (blocks.isEmpty) {
if (firstBailoutTarget == null) {
firstBailoutTarget = target;
diff --git a/sdk/lib/_internal/compiler/implementation/ssa/builder.dart b/sdk/lib/_internal/compiler/implementation/ssa/builder.dart
index 4d5745f..8150846 100644
--- a/sdk/lib/_internal/compiler/implementation/ssa/builder.dart
+++ b/sdk/lib/_internal/compiler/implementation/ssa/builder.dart
@@ -19,136 +19,7 @@
DartType computeType(Compiler compiler) => ssaType.computeType(compiler);
}
-class Interceptors {
- Compiler compiler;
- Interceptors(Compiler this.compiler);
-
- SourceString mapOperatorToMethodName(Operator op) {
- String name = op.source.stringValue;
- if (identical(name, '+')) return const SourceString('add');
- if (identical(name, '-')) return const SourceString('sub');
- if (identical(name, '*')) return const SourceString('mul');
- if (identical(name, '/')) return const SourceString('div');
- if (identical(name, '~/')) return const SourceString('tdiv');
- if (identical(name, '%')) return const SourceString('mod');
- if (identical(name, '<<')) return const SourceString('shl');
- if (identical(name, '>>')) return const SourceString('shr');
- if (identical(name, '|')) return const SourceString('or');
- if (identical(name, '&')) return const SourceString('and');
- if (identical(name, '^')) return const SourceString('xor');
- if (identical(name, '<')) return const SourceString('lt');
- if (identical(name, '<=')) return const SourceString('le');
- if (identical(name, '>')) return const SourceString('gt');
- if (identical(name, '>=')) return const SourceString('ge');
- if (identical(name, '==')) return const SourceString('eq');
- if (identical(name, '!=')) return const SourceString('eq');
- if (identical(name, '===')) return const SourceString('eqq');
- if (identical(name, '!==')) return const SourceString('eqq');
- if (identical(name, '+=')) return const SourceString('add');
- if (identical(name, '-=')) return const SourceString('sub');
- if (identical(name, '*=')) return const SourceString('mul');
- if (identical(name, '/=')) return const SourceString('div');
- if (identical(name, '~/=')) return const SourceString('tdiv');
- if (identical(name, '%=')) return const SourceString('mod');
- if (identical(name, '<<=')) return const SourceString('shl');
- if (identical(name, '>>=')) return const SourceString('shr');
- if (identical(name, '|=')) return const SourceString('or');
- if (identical(name, '&=')) return const SourceString('and');
- if (identical(name, '^=')) return const SourceString('xor');
- if (identical(name, '++')) return const SourceString('add');
- if (identical(name, '--')) return const SourceString('sub');
- compiler.unimplemented('Unknown operator', node: op);
- }
-
- /**
- * Returns a set of interceptor classes that contain a member whose
- * signature matches the given [selector].
- */
- Set<ClassElement> getInterceptedClassesOn(Selector selector) {
- JavaScriptBackend backend = compiler.backend;
- return backend.getInterceptedClassesOn(selector);
- }
-
- Element getOperatorInterceptor(Operator op) {
- SourceString name = mapOperatorToMethodName(op);
- return compiler.findHelper(name);
- }
-
- Element getBoolifiedVersionOf(Element interceptor) {
- if (interceptor == null) return interceptor;
- String boolifiedName = "${interceptor.name.slowToString()}B";
- return compiler.findHelper(new SourceString(boolifiedName));
- }
-
- Element getPrefixOperatorInterceptor(Operator op) {
- String name = op.source.stringValue;
- if (identical(name, '~')) {
- return compiler.findHelper(const SourceString('not'));
- }
- if (identical(name, '-')) {
- return compiler.findHelper(const SourceString('neg'));
- }
- compiler.unimplemented('Unknown operator', node: op);
- }
-
- Element getIndexInterceptor() {
- return compiler.findHelper(const SourceString('index'));
- }
-
- Element getIndexAssignmentInterceptor() {
- return compiler.findHelper(const SourceString('indexSet'));
- }
-
- Element getExceptionUnwrapper() {
- return compiler.findHelper(const SourceString('unwrapException'));
- }
-
- Element getThrowRuntimeError() {
- return compiler.findHelper(const SourceString('throwRuntimeError'));
- }
-
- Element getThrowMalformedSubtypeError() {
- return compiler.findHelper(
- const SourceString('throwMalformedSubtypeError'));
- }
-
- Element getThrowAbstractClassInstantiationError() {
- return compiler.findHelper(
- const SourceString('throwAbstractClassInstantiationError'));
- }
-
- Element getClosureConverter() {
- return compiler.findHelper(const SourceString('convertDartClosureToJS'));
- }
-
- Element getTraceFromException() {
- return compiler.findHelper(const SourceString('getTraceFromException'));
- }
-
- Element getEqualsInterceptor() {
- return compiler.findHelper(const SourceString('eq'));
- }
-
- Element getTripleEqualsInterceptor() {
- return compiler.findHelper(const SourceString('eqq'));
- }
-
- Element getMapMaker() {
- return compiler.findHelper(const SourceString('makeLiteralMap'));
- }
-
- // TODO(karlklose): move these to different class or rename class?
- Element getSetRuntimeTypeInfo() {
- return compiler.findHelper(const SourceString('setRuntimeTypeInfo'));
- }
-
- Element getGetRuntimeTypeInfo() {
- return compiler.findHelper(const SourceString('getRuntimeTypeInfo'));
- }
-}
-
class SsaBuilderTask extends CompilerTask {
- final Interceptors interceptors;
final CodeEmitterTask emitter;
// Loop tracking information.
final Set<FunctionElement> functionsCalledInLoop;
@@ -158,8 +29,7 @@
String get name => 'SSA builder';
SsaBuilderTask(JavaScriptBackend backend)
- : interceptors = new Interceptors(backend.compiler),
- emitter = backend.emitter,
+ : emitter = backend.emitter,
functionsCalledInLoop = new Set<FunctionElement>(),
selectorsCalledInLoop = new Map<SourceString, Selector>(),
backend = backend,
@@ -920,10 +790,8 @@
class SsaBuilder extends ResolvedVisitor implements Visitor {
final SsaBuilderTask builder;
final JavaScriptBackend backend;
- final Interceptors interceptors;
final CodegenWorkItem work;
final ConstantSystem constantSystem;
- bool methodInterceptionEnabled;
HGraph graph;
LocalsHandler localsHandler;
HInstruction rethrowableException;
@@ -962,8 +830,6 @@
: this.builder = builder,
this.backend = builder.backend,
this.work = work,
- interceptors = builder.interceptors,
- methodInterceptionEnabled = true,
graph = new HGraph(),
stack = new List<HInstruction>(),
activationVariables = new Map<Element, HLocalValue>(),
@@ -983,16 +849,6 @@
DartType returnType;
bool inTryStatement = false;
- void disableMethodInterception() {
- assert(methodInterceptionEnabled);
- methodInterceptionEnabled = false;
- }
-
- void enableMethodInterception() {
- assert(!methodInterceptionEnabled);
- methodInterceptionEnabled = true;
- }
-
/**
* Compiles compile-time constants. Never returns [:null:]. If the
* initial value is not a compile-time constants, it reports an
@@ -1023,6 +879,25 @@
assert(!function.modifiers.isExternal());
assert(elements[function] != null);
openFunction(functionElement, function);
+ SourceString name = functionElement.name;
+ // If [functionElement] is operator== we explicitely add a null
+ // check at the beginning of the method. This is to avoid having
+ // call sites do the null check.
+ if (name == const SourceString('==')) {
+ handleIf(
+ function,
+ () {
+ HParameterValue parameter = parameters.values.first;
+ push(new HIdentity(
+ parameter, graph.addConstantNull(constantSystem)));
+ },
+ () {
+ HReturn ret = new HReturn(
+ graph.addConstantBool(false, constantSystem));
+ close(ret).addSuccessor(graph.exit);
+ },
+ null);
+ }
function.body.accept(this);
return closeFunction();
}
@@ -1546,11 +1421,8 @@
// Emit the equality check with the sentinel.
HConstant sentinel = graph.addConstant(SentinelConstant.SENTINEL);
- Element equalsHelper = interceptors.getTripleEqualsInterceptor();
- HInstruction target = new HStatic(equalsHelper);
- add(target);
HInstruction operand = parameters[element];
- check = new HIdentity(target, sentinel, operand);
+ check = new HIdentity(sentinel, operand);
add(check);
// If the check succeeds, we must update the parameter with the
@@ -2362,52 +2234,42 @@
case "^=":
selector = new Selector.binaryOperator(const SourceString('^'));
break;
+ case "==":
+ case "!=":
+ selector = new Selector.binaryOperator(const SourceString('=='));
+ break;
+ case "<":
+ selector = new Selector.binaryOperator(const SourceString('<'));
+ break;
+ case "<=":
+ selector = new Selector.binaryOperator(const SourceString('<='));
+ break;
+ case ">":
+ selector = new Selector.binaryOperator(const SourceString('>'));
+ break;
+ case ">=":
+ selector = new Selector.binaryOperator(const SourceString('>='));
+ break;
+ case "===":
+ pushWithPosition(new HIdentity(left, right), op);
+ return;
+ case "!==":
+ HIdentity eq = new HIdentity(left, right);
+ add(eq);
+ pushWithPosition(new HNot(eq), op);
+ return;
default:
+ compiler.internalError("Unexpected operator $op", node: op);
break;
}
- if (selector != null) {
- pushWithPosition(
- buildInvokeDynamic(send, selector, left, [right]),
- op);
- return;
- }
- Element element = interceptors.getOperatorInterceptor(op);
- assert(element != null);
- HInstruction target = new HStatic(element);
- add(target);
- switch (op.source.stringValue) {
- case "==":
- pushWithPosition(new HEquals(target, left, right), op);
- break;
- case "===":
- pushWithPosition(new HIdentity(target, left, right), op);
- break;
- case "!==":
- HIdentity eq = new HIdentity(target, left, right);
- add(eq);
- pushWithPosition(new HNot(eq), op);
- break;
- case "<":
- pushWithPosition(new HLess(target, left, right), op);
- break;
- case "<=":
- pushWithPosition(new HLessEqual(target, left, right), op);
- break;
- case ">":
- pushWithPosition(new HGreater(target, left, right), op);
- break;
- case ">=":
- pushWithPosition(new HGreaterEqual(target, left, right), op);
- break;
- case "!=":
- HEquals eq = new HEquals(target, left, right);
- add(eq);
- HBoolify bl = new HBoolify(eq);
- add(bl);
- pushWithPosition(new HNot(bl), op);
- break;
- default: compiler.unimplemented("SsaBuilder.visitBinary");
+ pushWithPosition(
+ buildInvokeDynamic(send, selector, left, [right]),
+ op);
+ if (op.source.stringValue == '!=') {
+ HBoolify bl = new HBoolify(pop());
+ add(bl);
+ pushWithPosition(new HNot(bl), op);
}
}
@@ -2428,9 +2290,12 @@
return result;
}
+ /**
+ * Returns a set of interceptor classes that contain a member whose
+ * signature matches the given [selector].
+ */
Set<ClassElement> getInterceptedClassesOn(Selector selector) {
- if (!methodInterceptionEnabled) return null;
- return interceptors.getInterceptedClassesOn(selector);
+ return backend.getInterceptedClassesOn(selector);
}
void generateInstanceGetterWithCompiledReceiver(Send send,
@@ -2640,7 +2505,7 @@
}
HInstruction getRuntimeTypeInfo(HInstruction target) {
- pushInvokeHelper1(interceptors.getGetRuntimeTypeInfo(), target);
+ pushInvokeHelper1(backend.getGetRuntimeTypeInfo(), target);
return pop();
}
@@ -2688,12 +2553,6 @@
}
visitOperatorSend(node) {
- assert(node.selector is Operator);
- if (!methodInterceptionEnabled) {
- visitDynamicSend(node);
- return;
- }
-
Operator op = node.selector;
if (const SourceString("[]") == op.source) {
visitDynamicSend(node);
@@ -2718,7 +2577,7 @@
}
DartType type = elements.getType(typeAnnotation);
if (type.isMalformed) {
- String reasons = fetchReasonsFromMalformedType(type);
+ String reasons = Types.fetchReasonsFromMalformedType(type);
if (compiler.enableTypeAssertions) {
generateMalformedSubtypeError(node, expression, type, reasons);
} else {
@@ -2764,9 +2623,9 @@
checks.add(call);
index++;
});
- instruction = new HIs.withArgumentChecks(type, expression, checks);
+ instruction = new HIs(type, <HInstruction>[expression]..addAll(checks));
} else {
- instruction = new HIs(type, expression);
+ instruction = new HIs(type, <HInstruction>[expression]);
}
if (isNot) {
add(instruction);
@@ -3010,32 +2869,6 @@
compiler.cancel('JS code must be a string literal', node: code);
}
- void handleForeignUnintercepted(Send node) {
- Link<Node> link = node.arguments;
- if (!link.tail.isEmpty) {
- compiler.cancel(
- 'More than one expression in UNINTERCEPTED()', node: node);
- }
- Expression expression = link.head;
- disableMethodInterception();
- visit(expression);
- enableMethodInterception();
- }
-
- void handleForeignJsHasEquals(Send node) {
- List<HInstruction> inputs = <HInstruction>[];
- if (!node.arguments.tail.isEmpty) {
- compiler.cancel(
- 'More than one expression in JS_HAS_EQUALS()', node: node);
- }
- addGenericSendArgumentsToList(node.arguments, inputs);
- String name = backend.namer.publicInstanceMethodNameByArity(
- const SourceString('=='), 1);
- push(new HForeign(new DartString.literal('!!#.$name'),
- const LiteralDartString('bool'),
- inputs));
- }
-
void handleForeignJsCurrentIsolate(Send node) {
if (!node.arguments.isEmpty) {
compiler.cancel(
@@ -3152,10 +2985,6 @@
SourceString name = selector.name;
if (name == const SourceString('JS')) {
handleForeignJs(node);
- } else if (name == const SourceString('UNINTERCEPTED')) {
- handleForeignUnintercepted(node);
- } else if (name == const SourceString('JS_HAS_EQUALS')) {
- handleForeignJsHasEquals(node);
} else if (name == const SourceString('JS_CURRENT_ISOLATE')) {
handleForeignJsCurrentIsolate(node);
} else if (name == const SourceString('JS_CALL_IN_ISOLATE')) {
@@ -3168,6 +2997,8 @@
handleForeignSetCurrentIsolate(node);
} else if (name == const SourceString('JS_CREATE_ISOLATE')) {
handleForeignCreateIsolate(node);
+ } else if (name == const SourceString('JS_OPERATOR_IS_PREFIX')) {
+ stack.add(addConstantString(node, backend.namer.operatorIsPrefix()));
} else {
throw "Unknown foreign: ${selector}";
}
@@ -3307,7 +3138,7 @@
|| member.isGenerativeConstructor()) {
// The type variable is stored in [this].
if (typeInfo == null) {
- pushInvokeHelper1(interceptors.getGetRuntimeTypeInfo(),
+ pushInvokeHelper1(backend.getGetRuntimeTypeInfo(),
localsHandler.readThis());
typeInfo = pop();
}
@@ -3355,7 +3186,7 @@
add(typeInfo);
// Set the runtime type information on the object.
- Element typeInfoSetterElement = interceptors.getSetRuntimeTypeInfo();
+ Element typeInfoSetterElement = backend.getSetRuntimeTypeInfo();
HInstruction typeInfoSetter = new HStatic(typeInfoSetterElement);
add(typeInfoSetter);
add(new HInvokeStatic(
@@ -3479,7 +3310,7 @@
}
if (isIdenticalFunction) {
- pushWithPosition(new HIdentity(target, inputs[1], inputs[2]), node);
+ pushWithPosition(new HIdentity(inputs[1], inputs[2]), node);
return;
}
@@ -3548,13 +3379,13 @@
}
void generateRuntimeError(Node node, String message) {
- generateError(node, message, interceptors.getThrowRuntimeError());
+ generateError(node, message, backend.getThrowRuntimeError());
}
void generateAbstractClassInstantiationError(Node node, String message) {
generateError(node,
message,
- interceptors.getThrowAbstractClassInstantiationError());
+ backend.getThrowAbstractClassInstantiationError());
}
void generateThrowNoSuchMethod(Node diagnosticNode,
@@ -3621,7 +3452,7 @@
DartType type, String reasons) {
HInstruction typeString = addConstantString(node, type.toString());
HInstruction reasonsString = addConstantString(node, reasons);
- Element helper = interceptors.getThrowMalformedSubtypeError();
+ Element helper = backend.getThrowMalformedSubtypeError();
pushInvokeHelper3(helper, value, typeString, reasonsString);
}
@@ -3649,7 +3480,7 @@
} else {
DartType type = elements.getType(node);
if (compiler.enableTypeAssertions && type.isMalformed) {
- String reasons = fetchReasonsFromMalformedType(type);
+ String reasons = Types.fetchReasonsFromMalformedType(type);
// TODO(johnniwinther): Change to resemble type errors from bounds check
// on type arguments.
generateRuntimeError(node, '$type is malformed: $reasons');
@@ -3699,10 +3530,7 @@
}
push(new HInvokeSuper(inputs, isSetter: true));
} else if (node.isIndex) {
- if (!methodInterceptionEnabled) {
- assert(identical(op.source.stringValue, '='));
- visitDynamicSend(node);
- } else if (const SourceString("=") == op.source) {
+ if (const SourceString("=") == op.source) {
visitDynamicSend(node);
HInvokeDynamicMethod method = pop();
// Push the value.
@@ -4022,8 +3850,7 @@
SourceString iteratorName = const SourceString("iterator");
Selector selector =
new Selector.getter(iteratorName, work.element.getLibrary());
- Set<ClassElement> interceptedClasses =
- interceptors.getInterceptedClassesOn(selector);
+ Set<ClassElement> interceptedClasses = getInterceptedClassesOn(selector);
visit(node.expression);
HInstruction receiver = pop();
bool hasGetter = compiler.world.hasAnyUserDefinedGetter(selector);
@@ -4147,7 +3974,7 @@
}
HLiteralList keyValuePairs = new HLiteralList(inputs);
add(keyValuePairs);
- pushInvokeHelper1(interceptors.getMapMaker(), keyValuePairs);
+ pushInvokeHelper1(backend.getMapMaker(), keyValuePairs);
}
visitLiteralMapEntry(LiteralMapEntry node) {
@@ -4456,9 +4283,6 @@
void buildTests(Link<Node> remainingCases) {
// Build comparison for one case expression.
void left() {
- Element equalsHelper = interceptors.getEqualsInterceptor();
- HInstruction target = new HStatic(equalsHelper);
- add(target);
CaseMatch match = remainingCases.head;
// TODO(lrn): Move the constant resolution to the resolver, so
// we can report an error before reaching the backend.
@@ -4470,7 +4294,7 @@
} else {
visit(match.expression);
}
- push(new HEquals(target, pop(), expression));
+ push(new HIdentity(pop(), expression));
}
// If this is the last expression, just return it.
@@ -4564,7 +4388,7 @@
HInstruction oldRethrowableException = rethrowableException;
rethrowableException = exception;
- pushInvokeHelper1(interceptors.getExceptionUnwrapper(), exception);
+ pushInvokeHelper1(backend.getExceptionUnwrapper(), exception);
HInvokeStatic unwrappedException = pop();
tryInstruction.exception = exception;
Link<Node> link = node.catchBlocks.nodes;
@@ -4576,7 +4400,8 @@
compiler.cancel('On with unresolved type',
node: catchBlock.type);
}
- HInstruction condition = new HIs(type, unwrappedException);
+ HInstruction condition =
+ new HIs(type, <HInstruction>[unwrappedException]);
push(condition);
}
else {
@@ -4594,7 +4419,8 @@
if (type == null) {
compiler.cancel('Catch with unresolved type', node: catchBlock);
}
- condition = new HIs(type, unwrappedException, nullOk: true);
+ condition =
+ new HIs(type, <HInstruction>[unwrappedException], nullOk: true);
push(condition);
}
}
@@ -4609,7 +4435,7 @@
}
Node trace = catchBlock.trace;
if (trace != null) {
- pushInvokeHelper1(interceptors.getTraceFromException(), exception);
+ pushInvokeHelper1(backend.getTraceFromException(), exception);
HInstruction traceInstruction = pop();
localsHandler.updateLocal(elements[trace], traceInstruction);
}
diff --git a/sdk/lib/_internal/compiler/implementation/ssa/codegen.dart b/sdk/lib/_internal/compiler/implementation/ssa/codegen.dart
index bc20ed2..3f0a0b6 100644
--- a/sdk/lib/_internal/compiler/implementation/ssa/codegen.dart
+++ b/sdk/lib/_internal/compiler/implementation/ssa/codegen.dart
@@ -1263,16 +1263,7 @@
push(new js.Binary(op, jsLeft, pop()), node);
}
- visitRelational(HRelational node, String op) {
- if (node.isBuiltin(types)) {
- use(node.left);
- js.Expression jsLeft = pop();
- use(node.right);
- push(new js.Binary(op, jsLeft, pop()), node);
- } else {
- visitInvokeStatic(node);
- }
- }
+ visitRelational(HRelational node, String op) => visitInvokeBinary(node, op);
// We want the outcome of bit-operations to be positive. We use the unsigned
// shift operator to achieve this.
@@ -1320,16 +1311,7 @@
}
}
- visitEquals(HEquals node) {
- if (node.isBuiltin(types)) {
- emitIdentityComparison(node.left, node.right);
- } else {
- visitInvokeStatic(node);
- }
- }
-
visitIdentity(HIdentity node) {
- assert(node.isBuiltin(types));
emitIdentityComparison(node.left, node.right);
}
@@ -1517,12 +1499,13 @@
}
void visitInterceptor(HInterceptor node) {
- String name =
- backend.registerSpecializedGetInterceptor(node.interceptedClasses);
- js.VariableUse interceptor = new js.VariableUse(name);
+ backend.registerSpecializedGetInterceptor(node.interceptedClasses);
+ String name = backend.namer.getInterceptorName(
+ backend.getInterceptorMethod, node.interceptedClasses);
+ var isolate = new js.VariableUse(backend.namer.CURRENT_ISOLATE);
use(node.receiver);
List<js.Expression> arguments = <js.Expression>[pop()];
- push(new js.Call(interceptor, arguments), node);
+ push(jsPropertyCall(isolate, name, arguments), node);
}
visitInvokeDynamicMethod(HInvokeDynamicMethod node) {
@@ -1555,39 +1538,28 @@
if (methodName == null) {
methodName = backend.namer.invocationName(node.selector);
- bool inLoop = node.block.enclosingLoopHeader != null;
-
- Selector selector = getOptimizedSelectorFor(node, node.selector);
- if (node.isInterceptorCall) {
- backend.addInterceptedSelector(selector);
- }
- // Register this invocation to collect the types used at all call sites.
- backend.registerDynamicInvocation(node, selector, types);
-
- // If we don't know what we're calling or if we are calling a getter,
- // we need to register that fact that we may be calling a closure
- // with the same arguments.
- if (target == null || target.isGetter()) {
- // TODO(kasperl): If we have a typed selector for the call, we
- // may know something about the types of closures that need
- // the specific closure call method.
- Selector call = new Selector.callClosureFrom(selector);
- world.registerDynamicInvocation(call.name, call);
- }
-
- if (target != null) {
- // If we know we're calling a specific method, register that
- // method only.
- if (inLoop) backend.builder.functionsCalledInLoop.add(target);
- world.registerDynamicInvocationOf(target);
- } else {
- if (inLoop) backend.builder.selectorsCalledInLoop[name] = selector;
- world.registerDynamicInvocation(name, selector);
- }
+ registerMethodInvoke(node);
}
push(jsPropertyCall(object, methodName, arguments), node);
}
+ void visitOneShotInterceptor(HOneShotInterceptor node) {
+ List<js.Expression> arguments = visitArguments(node.inputs);
+ var isolate = new js.VariableUse(backend.namer.CURRENT_ISOLATE);
+ Selector selector = node.selector;
+ String methodName = backend.namer.oneShotInterceptorName(selector);
+ push(jsPropertyCall(isolate, methodName, arguments), node);
+ backend.registerSpecializedGetInterceptor(node.interceptedClasses);
+ backend.addOneShotInterceptor(selector);
+ if (selector.isGetter()) {
+ registerGetter(node);
+ } else if (selector.isSetter()) {
+ registerSetter(node);
+ } else {
+ registerMethodInvoke(node);
+ }
+ }
+
Selector getOptimizedSelectorFor(HInvokeDynamic node,
Selector defaultSelector) {
// TODO(4434): For private members we need to use the untyped selector.
@@ -1610,21 +1582,75 @@
}
}
+ void registerInvoke(HInvokeDynamic node) {
+ bool inLoop = node.block.enclosingLoopHeader != null;
+ SourceString name = node.selector.name;
+ if (inLoop) {
+ Element target = node.element;
+ if (target != null) {
+ backend.builder.functionsCalledInLoop.add(target);
+ } else {
+ backend.builder.selectorsCalledInLoop[name] = node.selector;
+ }
+ }
+
+ if (node.isInterceptorCall) {
+ backend.addInterceptedSelector(node.selector);
+ }
+ }
+
+ void registerMethodInvoke(HInvokeDynamic node) {
+ Selector selector = getOptimizedSelectorFor(node, node.selector);
+ // Register this invocation to collect the types used at all call sites.
+ backend.registerDynamicInvocation(node, selector, types);
+
+ // If we don't know what we're calling or if we are calling a getter,
+ // we need to register that fact that we may be calling a closure
+ // with the same arguments.
+ Element target = node.element;
+ if (target == null || target.isGetter()) {
+ // TODO(kasperl): If we have a typed selector for the call, we
+ // may know something about the types of closures that need
+ // the specific closure call method.
+ Selector call = new Selector.callClosureFrom(selector);
+ world.registerDynamicInvocation(call.name, call);
+ }
+
+ if (target != null) {
+ // If we know we're calling a specific method, register that
+ // method only.
+ world.registerDynamicInvocationOf(target);
+ } else {
+ SourceString name = node.selector.name;
+ world.registerDynamicInvocation(name, selector);
+ }
+ registerInvoke(node);
+ }
+
+ void registerSetter(HInvokeDynamic node) {
+ Selector selector = getOptimizedSelectorFor(node, node.selector);
+ world.registerDynamicSetter(selector.name, selector);
+ HType valueType = node.isInterceptorCall
+ ? types[node.inputs[2]]
+ : types[node.inputs[1]];
+ backend.addedDynamicSetter(selector, valueType);
+ registerInvoke(node);
+ }
+
+ void registerGetter(HInvokeDynamic node) {
+ Selector getter = node.selector;
+ world.registerDynamicGetter(
+ getter.name, getOptimizedSelectorFor(node, getter));
+ world.registerInstantiatedClass(compiler.functionClass);
+ registerInvoke(node);
+ }
+
visitInvokeDynamicSetter(HInvokeDynamicSetter node) {
use(node.receiver);
Selector setter = node.selector;
String name = backend.namer.invocationName(setter);
push(jsPropertyCall(pop(), name, visitArguments(node.inputs)), node);
- Selector selector = getOptimizedSelectorFor(node, setter);
- world.registerDynamicSetter(setter.name, selector);
- HType valueType;
- if (node.isInterceptorCall) {
- valueType = types[node.inputs[2]];
- backend.addInterceptedSelector(setter);
- } else {
- valueType = types[node.inputs[1]];
- }
- backend.addedDynamicSetter(selector, valueType);
+ registerSetter(node);
}
visitInvokeDynamicGetter(HInvokeDynamicGetter node) {
@@ -1632,12 +1658,7 @@
Selector getter = node.selector;
String name = backend.namer.invocationName(getter);
push(jsPropertyCall(pop(), name, visitArguments(node.inputs)), node);
- world.registerDynamicGetter(
- getter.name, getOptimizedSelectorFor(node, getter));
- if (node.isInterceptorCall) {
- backend.addInterceptedSelector(getter);
- }
- world.registerInstantiatedClass(compiler.functionClass);
+ registerGetter(node);
}
visitInvokeClosure(HInvokeClosure node) {
@@ -1749,7 +1770,7 @@
visitForeign(HForeign node) {
String code = node.code.slowToString();
List<HInstruction> inputs = node.inputs;
- if (node.isJsStatement(types)) {
+ if (node.isJsStatement()) {
if (!inputs.isEmpty) {
compiler.internalError("foreign statement with inputs: $code",
instruction: node);
@@ -1855,7 +1876,6 @@
attachLocationToLast(node);
}
-
void generateNot(HInstruction input) {
bool canGenerateOptimizedComparison(HInstruction instruction) {
if (instruction is !HRelational) return false;
@@ -1864,8 +1884,7 @@
HInstruction right = relational.right;
// This optimization doesn't work for NaN, so we only do it if the
// type is known to be an integer.
- return relational.isBuiltin(types)
- && types[left].isUseful() && left.isInteger(types)
+ return types[left].isUseful() && left.isInteger(types)
&& types[right].isUseful() && right.isInteger(types);
}
@@ -2481,7 +2500,7 @@
} else if (parameterCount == 3) {
// 3 arguments implies that the method is [malformedTypeCheck].
assert(type.isMalformed);
- String reasons = fetchReasonsFromMalformedType(type);
+ String reasons = Types.fetchReasonsFromMalformedType(type);
arguments.add(js.string('$type'));
// TODO(johnniwinther): Handle escaping correctly.
arguments.add(js.string(reasons));
@@ -2499,54 +2518,54 @@
class SsaOptimizedCodeGenerator extends SsaCodeGenerator {
SsaOptimizedCodeGenerator(backend, work) : super(backend, work);
- int maxBailoutParameters;
-
HBasicBlock beginGraph(HGraph graph) {
return graph.entry;
}
void endGraph(HGraph graph) {}
+ // Called by visitTypeGuard to generate the actual bailout call, something
+ // like "return $.foo$bailout(t0, t1);"
js.Statement bailout(HTypeGuard guard, String reason) {
- if (maxBailoutParameters == null) {
- maxBailoutParameters = 0;
- work.guards.forEach((HTypeGuard workGuard) {
- HBailoutTarget target = workGuard.bailoutTarget;
- int inputLength = target.inputs.length;
- if (inputLength > maxBailoutParameters) {
- maxBailoutParameters = inputLength;
- }
- });
- }
- HInstruction input = guard.guarded;
HBailoutTarget target = guard.bailoutTarget;
- Namer namer = backend.namer;
- Element element = work.element;
List<js.Expression> arguments = <js.Expression>[];
arguments.add(new js.LiteralNumber("${guard.state}"));
- // TODO(ngeoffray): try to put a variable at a deterministic
- // location, so that multiple bailout calls put the variable at
- // the same parameter index.
- int i = 0;
- for (; i < target.inputs.length; i++) {
- assert(guard.inputs.indexOf(target.inputs[i]) >= 0);
- use(target.inputs[i]);
+
+ for (int i = 0; i < target.inputs.length; i++) {
+ HInstruction parameter = target.inputs[i];
+ for (int pad = target.padding[i]; pad != 0; pad--) {
+ // This argument will not be used by the bailout function, because
+ // of the control flow (controlled by the state argument passed
+ // above). We need to pass it to get later arguments in the right
+ // position.
+ arguments.add(new js.LiteralNull());
+ }
+ use(parameter);
arguments.add(pop());
}
+ // Don't bother emitting the rest of the pending nulls. Doing so might make
+ // the function invocation a little faster by having the call site and
+ // function defintion have the same number of arguments, but it would be
+ // more verbose and we don't expect the calls to bailout functions to be
+ // hot.
- js.Expression bailoutTarget;
- if (element.isInstanceMember()) {
- String bailoutName = namer.getBailoutName(element);
+ Element method = work.element;
+ js.Expression bailoutTarget; // Receiver of the bailout call.
+ Namer namer = backend.namer;
+ if (method.isInstanceMember()) {
+ String bailoutName = namer.getBailoutName(method);
bailoutTarget = new js.PropertyAccess.field(new js.This(), bailoutName);
} else {
- assert(!element.isField());
- bailoutTarget = new js.VariableUse(namer.isolateBailoutAccess(element));
+ assert(!method.isField());
+ bailoutTarget = new js.VariableUse(namer.isolateBailoutAccess(method));
}
js.Call call = new js.Call(bailoutTarget, arguments);
attachLocation(call, guard);
return new js.Return(call);
}
+ // Generate a type guard, something like "if (typeof t0 == 'number')" and the
+ // corresponding bailout call, something like "return $.foo$bailout(t0, t1);"
void visitTypeGuard(HTypeGuard node) {
HInstruction input = node.guarded;
DartType indexingBehavior =
@@ -2716,38 +2735,29 @@
=> new js.VariableUse(variableNames.stateName);
HBasicBlock beginGraph(HGraph graph) {
- propagator = new SsaBailoutPropagator(compiler, generateAtUseSite);
+ propagator =
+ new SsaBailoutPropagator(compiler, generateAtUseSite, variableNames);
propagator.visitGraph(graph);
// TODO(ngeoffray): We could avoid generating the state at the
// call site for non-complex bailout methods.
newParameters.add(new js.Parameter(variableNames.stateName));
- if (propagator.hasComplexBailoutTargets) {
- // Use generic parameters that will be assigned to
- // the right variables in the setup phase.
- for (int i = 0; i < propagator.maxBailoutParameters; i++) {
- String name = 'env$i';
- declaredLocals.add(name);
- newParameters.add(new js.Parameter(name));
- }
+ List<String> names = new List<String>(propagator.bailoutArity);
+ for (String variable in propagator.parameterNames.keys) {
+ int index = propagator.parameterNames[variable];
+ assert(names[index] == null);
+ names[index] = variable;
+ }
+ for (int i = 0; i < names.length; i++) {
+ declaredLocals.add(names[i]);
+ newParameters.add(new js.Parameter(names[i]));
+ }
+ if (propagator.hasComplexBailoutTargets) {
startBailoutSwitch();
- // The setup phase of a bailout function sets up the environment for
- // each bailout target. Each bailout target will populate this
- // setup phase. It is put at the beginning of the function.
- setup = new js.Switch(generateStateUse(), <js.SwitchClause>[]);
return graph.entry;
} else {
- // We have a simple bailout target, so we can reuse the names that
- // the bailout target expects.
- for (HInstruction input in propagator.firstBailoutTarget.inputs) {
- input = unwrap(input);
- String name = variableNames.getName(input);
- declaredLocals.add(name);
- newParameters.add(new js.Parameter(name));
- }
-
// We change the first instruction of the first guard to be the
// bailout target. We will change it back in the call to [endGraph].
HBasicBlock block = propagator.firstBailoutTarget.block;
@@ -2805,47 +2815,47 @@
}
void visitBailoutTarget(HBailoutTarget node) {
- if (!propagator.hasComplexBailoutTargets) return;
-
- js.Block nextBlock = new js.Block.empty();
- js.Case clause = new js.Case(new js.LiteralNumber('${node.state}'),
- nextBlock);
- currentBailoutSwitch.cases.add(clause);
- currentContainer = nextBlock;
- pushExpressionAsStatement(new js.Assignment(generateStateUse(),
- new js.LiteralNumber('0')));
- js.Block setupBlock = new js.Block.empty();
- List<Copy> copies = <Copy>[];
- for (int i = 0; i < node.inputs.length; i++) {
- HInstruction input = node.inputs[i];
- input = unwrap(input);
- String name = variableNames.getName(input);
- String source = "env$i";
- copies.add(new Copy(source, name));
+ if (propagator.hasComplexBailoutTargets) {
+ js.Block nextBlock = new js.Block.empty();
+ js.Case clause = new js.Case(new js.LiteralNumber('${node.state}'),
+ nextBlock);
+ currentBailoutSwitch.cases.add(clause);
+ currentContainer = nextBlock;
+ pushExpressionAsStatement(new js.Assignment(generateStateUse(),
+ new js.LiteralNumber('0')));
}
- sequentializeCopies(copies,
- variableNames.getSwapTemp(),
- (String target, String source) {
- if (!isVariableDeclared(target) && !shouldGroupVarDeclarations) {
- js.VariableInitialization init =
- new js.VariableInitialization(new js.VariableDeclaration(target),
- new js.VariableUse(source));
- js.Expression varList =
- new js.VariableDeclarationList(<js.VariableInitialization>[init]);
- setupBlock.statements.add(new js.ExpressionStatement(varList));
+ // Here we need to rearrange the inputs of the bailout target, so that they
+ // are output in the correct order, perhaps with interspersed nulls, to
+ // match the order in the bailout function, which is of course common to all
+ // the bailout points.
+ var newInputs = new List<HInstruction>(propagator.bailoutArity);
+ for (HInstruction input in node.inputs) {
+ int index = propagator.parameterNames[variableNames.getName(input)];
+ newInputs[index] = input;
+ }
+ // We record the count of unused arguments instead of just filling in the
+ // inputs list with dummy arguments because it is useful to be able easily
+ // to distinguish between a dummy argument (eg 0 or null) and a real
+ // argument that happens to have the same value. The dummy arguments are
+ // not going to be accessed by the bailout function due to the control flow
+ // implied by the state argument, so we can put anything there, including
+ // just not emitting enough arguments and letting the JS engine insert
+ // undefined for the trailing arguments.
+ node.padding = new List<int>(node.inputs.length);
+ int j = 0;
+ int pendingNulls = 0;
+ for (int i = 0; i < newInputs.length; i++) {
+ HInstruction input = newInputs[i];
+ if (input == null) {
+ pendingNulls++;
} else {
- collectedVariableDeclarations.add(target);
- js.Expression jsTarget = new js.VariableUse(target);
- js.Expression jsSource = new js.VariableUse(source);
- js.Expression assignment = new js.Assignment(jsTarget, jsSource);
- setupBlock.statements.add(new js.ExpressionStatement(assignment));
+ node.padding[j] = pendingNulls;
+ pendingNulls = 0;
+ node.updateInput(j, input);
+ j++;
}
- declaredLocals.add(target);
- });
- setupBlock.statements.add(new js.Break(null));
- js.Case setupClause =
- new js.Case(new js.LiteralNumber('${node.state}'), setupBlock);
- (setup as js.Switch).cases.add(setupClause);
+ }
+ assert(j == node.inputs.length);
}
void startBailoutCase(List<HBailoutTarget> bailouts1,
diff --git a/sdk/lib/_internal/compiler/implementation/ssa/codegen_helpers.dart b/sdk/lib/_internal/compiler/implementation/ssa/codegen_helpers.dart
index 01543cb..625eafb 100644
--- a/sdk/lib/_internal/compiler/implementation/ssa/codegen_helpers.dart
+++ b/sdk/lib/_internal/compiler/implementation/ssa/codegen_helpers.dart
@@ -16,11 +16,21 @@
*/
class SsaInstructionMerger extends HBaseVisitor {
HTypeMap types;
+ /**
+ * List of [HInstruction] that the instruction merger expects in
+ * order when visiting the inputs of an instruction.
+ */
List<HInstruction> expectedInputs;
+ /**
+ * Set of pure [HInstruction] that the instruction merger expects to
+ * find. The order of pure instructions do not matter, as they will
+ * not be affected by side effects.
+ */
+ Set<HInstruction> pureInputs;
Set<HInstruction> generateAtUseSite;
void markAsGenerateAtUseSite(HInstruction instruction) {
- assert(!instruction.isJsStatement(types));
+ assert(!instruction.isJsStatement());
generateAtUseSite.add(instruction);
}
@@ -30,20 +40,40 @@
visitDominatorTree(graph);
}
- void analyzeInput(HInstruction input) {
- if (!generateAtUseSite.contains(input)
- && !input.isCodeMotionInvariant()
- && input.usedBy.length == 1
- && input is !HPhi
- && input is !HLocalValue) {
- expectedInputs.add(input);
+ void analyzeInputs(HInstruction user, int start) {
+ List<HInstruction> inputs = user.inputs;
+ for (int i = start; i < inputs.length; i++) {
+ HInstruction input = inputs[i];
+ if (!generateAtUseSite.contains(input)
+ && !input.isCodeMotionInvariant()
+ && input.usedBy.length == 1
+ && input is !HPhi
+ && input is !HLocalValue
+ && !input.isJsStatement()) {
+ if (input.isPure()) {
+ // Only consider a pure input if it is in the same loop.
+ // Otherwise, we might move GVN'ed instruction back into the
+ // loop.
+ if (user.hasSameLoopHeaderAs(input)) {
+ // Move it closer to [user], so that instructions in
+ // between do not prevent making it generate at use site.
+ input.moveBefore(user);
+ pureInputs.add(input);
+ // Visit the pure input now so that the expected inputs
+ // are after the expected inputs of [user].
+ input.accept(this);
+ }
+ } else {
+ expectedInputs.add(input);
+ }
+ }
}
}
void visitInstruction(HInstruction instruction) {
// A code motion invariant instruction is dealt before visiting it.
assert(!instruction.isCodeMotionInvariant());
- instruction.inputs.forEach(analyzeInput);
+ analyzeInputs(instruction, 0);
}
// The codegen might use the input multiple times, so it must not be
@@ -53,9 +83,7 @@
// A bounds check method must not have its first input generated at use site,
// because it's using it twice.
void visitBoundsCheck(HBoundsCheck instruction) {
- for (int i = 1; i < instruction.inputs.length; i++) {
- analyzeInput(instruction.inputs[i]);
- }
+ analyzeInputs(instruction, 1);
}
// An integer check method must not have its input generated at use site,
@@ -66,19 +94,6 @@
// they would not be alive.
void visitTypeGuard(HTypeGuard instruction) {}
- // If an equality operation is builtin it must only have its inputs generated
- // at use site if it does not require an expression with repeated uses
- // (because of null / undefined).
- void visitEquals(HEquals instruction) {
- HInstruction left = instruction.left;
- HInstruction right = instruction.right;
- if (!instruction.isBuiltin(types) ||
- singleIdentityComparison(left, right, types) != null) {
- super.visitEquals(instruction);
- }
- // Do nothing.
- }
-
// An identity operation must only have its inputs generated at use site if
// does not require an expression with multiple uses (because of null /
// undefined).
@@ -131,10 +146,12 @@
// The expectedInputs list holds non-trivial instructions that may
// be generated at their use site, if they occur in the correct order.
if (expectedInputs == null) expectedInputs = new List<HInstruction>();
+ if (pureInputs == null) pureInputs = new Set<HInstruction>();
// Pop instructions from expectedInputs until instruction is found.
// Return true if it is found, or false if not.
bool findInInputsAndPopNonMatching(HInstruction instruction) {
+ assert(!instruction.isPure());
while (!expectedInputs.isEmpty) {
HInstruction nextInput = expectedInputs.removeLast();
assert(!generateAtUseSite.contains(nextInput));
@@ -147,6 +164,7 @@
}
block.last.accept(this);
+ bool dontVisitPure = false;
for (HInstruction instruction = block.last.previous;
instruction != null;
instruction = instruction.previous) {
@@ -157,17 +175,27 @@
markAsGenerateAtUseSite(instruction);
continue;
}
- if (instruction.isJsStatement(types)) {
+ if (instruction.isJsStatement()) {
expectedInputs.clear();
}
- // See if the current instruction is the next non-trivial
- // expected input.
- if (findInInputsAndPopNonMatching(instruction)) {
- tryGenerateAtUseSite(instruction);
+ if (instruction.isPure()) {
+ if (pureInputs.contains(instruction)) {
+ tryGenerateAtUseSite(instruction);
+ } else {
+ // If the input is not in the [pureInputs] set, it has not
+ // been visited.
+ instruction.accept(this);
+ }
} else {
- assert(expectedInputs.isEmpty);
+ if (findInInputsAndPopNonMatching(instruction)) {
+ // The current instruction is the next non-trivial
+ // expected input.
+ tryGenerateAtUseSite(instruction);
+ } else {
+ assert(expectedInputs.isEmpty);
+ }
+ instruction.accept(this);
}
- instruction.accept(this);
}
if (block.predecessors.length == 1
@@ -176,6 +204,7 @@
tryMergingExpressions(block.predecessors[0]);
} else {
expectedInputs = null;
+ pureInputs = null;
}
}
}
@@ -191,7 +220,7 @@
Set<HInstruction> controlFlowOperators;
void markAsGenerateAtUseSite(HInstruction instruction) {
- assert(!instruction.isJsStatement(types));
+ assert(!instruction.isJsStatement());
generateAtUseSite.add(instruction);
}
@@ -287,8 +316,7 @@
HPhi phi = end.phis.first;
HInstruction thenInput = phi.inputs[0];
HInstruction elseInput = phi.inputs[1];
- if (thenInput.isJsStatement(types) ||
- elseInput.isJsStatement(types)) return;
+ if (thenInput.isJsStatement() || elseInput.isJsStatement()) return;
if (hasAnyStatement(elseBlock, elseInput)) return;
assert(elseBlock.successors.length == 1);
diff --git a/sdk/lib/_internal/compiler/implementation/ssa/invoke_dynamic_specializers.dart b/sdk/lib/_internal/compiler/implementation/ssa/invoke_dynamic_specializers.dart
index 06e8d64..375f617 100644
--- a/sdk/lib/_internal/compiler/implementation/ssa/invoke_dynamic_specializers.dart
+++ b/sdk/lib/_internal/compiler/implementation/ssa/invoke_dynamic_specializers.dart
@@ -13,20 +13,20 @@
class InvokeDynamicSpecializer {
const InvokeDynamicSpecializer();
- HType computeDesiredTypeForInput(HInvokeDynamicMethod instruction,
+ HType computeDesiredTypeForInput(HInvokeDynamic instruction,
HInstruction input,
HTypeMap types,
Compiler compiler) {
return HType.UNKNOWN;
}
- HType computeTypeFromInputTypes(HInvokeDynamicMethod instruction,
+ HType computeTypeFromInputTypes(HInvokeDynamic instruction,
HTypeMap types,
Compiler compiler) {
return HType.UNKNOWN;
}
- HInstruction tryConvertToBuiltin(HInvokeDynamicMethod instruction,
+ HInstruction tryConvertToBuiltin(HInvokeDynamic instruction,
HTypeMap types) {
return null;
}
@@ -65,6 +65,16 @@
return const BitOrSpecializer();
} else if (selector.name == const SourceString('^')) {
return const BitXorSpecializer();
+ } else if (selector.name == const SourceString('==')) {
+ return const EqualsSpecializer();
+ } else if (selector.name == const SourceString('<')) {
+ return const LessSpecializer();
+ } else if (selector.name == const SourceString('<=')) {
+ return const LessEqualSpecializer();
+ } else if (selector.name == const SourceString('>')) {
+ return const GreaterSpecializer();
+ } else if (selector.name == const SourceString('>=')) {
+ return const GreaterEqualSpecializer();
}
}
return const InvokeDynamicSpecializer();
@@ -74,7 +84,7 @@
class IndexAssignSpecializer extends InvokeDynamicSpecializer {
const IndexAssignSpecializer();
- HType computeDesiredTypeForInput(HInvokeDynamicMethod instruction,
+ HType computeDesiredTypeForInput(HInvokeDynamic instruction,
HInstruction input,
HTypeMap types,
Compiler compiler) {
@@ -90,7 +100,7 @@
return HType.UNKNOWN;
}
- HInstruction tryConvertToBuiltin(HInvokeDynamicMethod instruction,
+ HInstruction tryConvertToBuiltin(HInvokeDynamic instruction,
HTypeMap types) {
if (instruction.inputs[1].isMutableArray(types)) {
return new HIndexAssign(instruction.inputs[1],
@@ -104,7 +114,7 @@
class IndexSpecializer extends InvokeDynamicSpecializer {
const IndexSpecializer();
- HType computeDesiredTypeForInput(HInvokeDynamicMethod instruction,
+ HType computeDesiredTypeForInput(HInvokeDynamic instruction,
HInstruction input,
HTypeMap types,
Compiler compiler) {
@@ -120,7 +130,7 @@
return HType.UNKNOWN;
}
- HInstruction tryConvertToBuiltin(HInvokeDynamicMethod instruction,
+ HInstruction tryConvertToBuiltin(HInvokeDynamic instruction,
HTypeMap types) {
if (instruction.inputs[1].isIndexablePrimitive(types)) {
return new HIndex(instruction.inputs[1], instruction.inputs[2]);
@@ -136,7 +146,7 @@
return constantSystem.bitNot;
}
- HType computeDesiredTypeForInput(HInvokeDynamicMethod instruction,
+ HType computeDesiredTypeForInput(HInvokeDynamic instruction,
HInstruction input,
HTypeMap types,
Compiler compiler) {
@@ -149,7 +159,7 @@
return HType.UNKNOWN;
}
- HType computeTypeFromInputTypes(HInvokeDynamicMethod instruction,
+ HType computeTypeFromInputTypes(HInvokeDynamic instruction,
HTypeMap types,
Compiler compiler) {
// All bitwise operations on primitive types either produce an
@@ -158,7 +168,7 @@
return HType.UNKNOWN;
}
- HInstruction tryConvertToBuiltin(HInvokeDynamicMethod instruction,
+ HInstruction tryConvertToBuiltin(HInvokeDynamic instruction,
HTypeMap types) {
HInstruction input = instruction.inputs[1];
if (input.isNumber(types)) return new HBitNot(input);
@@ -173,7 +183,7 @@
return constantSystem.negate;
}
- HType computeDesiredTypeForInput(HInvokeDynamicMethod instruction,
+ HType computeDesiredTypeForInput(HInvokeDynamic instruction,
HInstruction input,
HTypeMap types,
Compiler compiler) {
@@ -188,7 +198,7 @@
return HType.UNKNOWN;
}
- HType computeTypeFromInputTypes(HInvokeDynamicMethod instruction,
+ HType computeTypeFromInputTypes(HInvokeDynamic instruction,
HTypeMap types,
Compiler compiler) {
HType operandType = types[instruction.inputs[1]];
@@ -196,7 +206,7 @@
return HType.UNKNOWN;
}
- HInstruction tryConvertToBuiltin(HInvokeDynamicMethod instruction,
+ HInstruction tryConvertToBuiltin(HInvokeDynamic instruction,
HTypeMap types) {
HInstruction input = instruction.inputs[1];
if (input.isNumber(types)) return new HNegate(input);
@@ -207,7 +217,7 @@
abstract class BinaryArithmeticSpecializer extends InvokeDynamicSpecializer {
const BinaryArithmeticSpecializer();
- HType computeTypeFromInputTypes(HInvokeDynamicMethod instruction,
+ HType computeTypeFromInputTypes(HInvokeDynamic instruction,
HTypeMap types,
Compiler compiler) {
HInstruction left = instruction.inputs[1];
@@ -220,7 +230,7 @@
return HType.UNKNOWN;
}
- HType computeDesiredTypeForInput(HInvokeDynamicMethod instruction,
+ HType computeDesiredTypeForInput(HInvokeDynamic instruction,
HInstruction input,
HTypeMap types,
Compiler compiler) {
@@ -249,15 +259,23 @@
return HType.UNKNOWN;
}
- bool isBuiltin(HInvokeDynamicMethod instruction, HTypeMap types) {
+ bool isBuiltin(HInvokeDynamic instruction, HTypeMap types) {
return instruction.inputs[1].isNumber(types)
&& instruction.inputs[2].isNumber(types);
}
- HInstruction tryConvertToBuiltin(HInvokeDynamicMethod instruction,
+ HInstruction tryConvertToBuiltin(HInvokeDynamic instruction,
HTypeMap types) {
if (isBuiltin(instruction, types)) {
- return newBuiltinVariant(instruction.inputs[1], instruction.inputs[2]);
+ HInstruction builtin =
+ newBuiltinVariant(instruction.inputs[1], instruction.inputs[2]);
+ if (builtin != null) return builtin;
+ // Even if there is no builtin equivalent instruction, we know
+ // the instruction does not have any side effect, and that it
+ // can be GVN'ed.
+ instruction.clearAllSideEffects();
+ instruction.clearAllDependencies();
+ instruction.setUseGvn();
}
return null;
}
@@ -315,15 +333,10 @@
return constantSystem.modulo;
}
- HInstruction tryConvertToBuiltin(HInvokeDynamicMethod instruction,
- HTypeMap types) {
+ HInstruction newBuiltinVariant(HInstruction left, HInstruction right) {
// Modulo cannot be mapped to the native operator (different semantics).
return null;
}
-
- HInstruction newBuiltinVariant(HInstruction left, HInstruction right) {
- throw 'Modulo has no builtin variant';
- }
}
class MultiplySpecializer extends BinaryArithmeticSpecializer {
@@ -357,21 +370,16 @@
return constantSystem.truncatingDivide;
}
- HInstruction tryConvertToBuiltin(HInvokeDynamicMethod instruction,
- HTypeMap types) {
+ HInstruction newBuiltinVariant(HInstruction left, HInstruction right) {
// Truncating divide does not have a JS equivalent.
return null;
}
-
- HInstruction newBuiltinVariant(HInstruction left, HInstruction right) {
- throw 'Truncating divide has no builtin variant';
- }
}
abstract class BinaryBitOpSpecializer extends BinaryArithmeticSpecializer {
const BinaryBitOpSpecializer();
- HType computeTypeFromInputTypes(HInvokeDynamicMethod instruction,
+ HType computeTypeFromInputTypes(HInvokeDynamic instruction,
HTypeMap types,
Compiler compiler) {
// All bitwise operations on primitive types either produce an
@@ -381,7 +389,7 @@
return HType.UNKNOWN;
}
- HType computeDesiredTypeForInput(HInvokeDynamicMethod instruction,
+ HType computeDesiredTypeForInput(HInvokeDynamic instruction,
HInstruction input,
HTypeMap types,
Compiler compiler) {
@@ -404,7 +412,7 @@
return constantSystem.shiftLeft;
}
- HInstruction tryConvertToBuiltin(HInvokeDynamicMethod instruction,
+ HInstruction tryConvertToBuiltin(HInvokeDynamic instruction,
HTypeMap types) {
HInstruction left = instruction.inputs[1];
HInstruction right = instruction.inputs[2];
@@ -426,16 +434,11 @@
class ShiftRightSpecializer extends BinaryBitOpSpecializer {
const ShiftRightSpecializer();
- HInstruction tryConvertToBuiltin(HInvokeDynamicMethod instruction,
- HTypeMap types) {
+ HInstruction newBuiltinVariant(HInstruction left, HInstruction right) {
// Shift right cannot be mapped to the native operator easily.
return null;
}
- HInstruction newBuiltinVariant(HInstruction left, HInstruction right) {
- throw 'Shift right has no builtin variant';
- }
-
BinaryOperation operation(ConstantSystem constantSystem) {
return constantSystem.shiftRight;
}
@@ -476,3 +479,142 @@
return new HBitXor(left, right);
}
}
+
+abstract class RelationalSpecializer extends InvokeDynamicSpecializer {
+ const RelationalSpecializer();
+
+ HType computeTypeFromInputTypes(HInvokeDynamic instruction,
+ HTypeMap types,
+ Compiler compiler) {
+ if (types[instruction.inputs[1]].isPrimitiveOrNull()) return HType.BOOLEAN;
+ return HType.UNKNOWN;
+ }
+
+ HType computeDesiredTypeForInput(HInvokeDynamic instruction,
+ HInstruction input,
+ HTypeMap types,
+ Compiler compiler) {
+ if (input == instruction.inputs[0]) return HType.UNKNOWN;
+ HType propagatedType = types[instruction];
+ // For all relational operations except HIdentity, we expect to get numbers
+ // only. With numbers the outgoing type is a boolean. If something else
+ // is desired, then numbers are incorrect, though.
+ if (propagatedType.isUnknown() || propagatedType.isBoolean()) {
+ HInstruction left = instruction.inputs[1];
+ if (left.isTypeUnknown(types) || left.isNumber(types)) {
+ return HType.NUMBER;
+ }
+ }
+ return HType.UNKNOWN;
+ }
+
+ HInstruction tryConvertToBuiltin(HInvokeDynamic instruction,
+ HTypeMap types) {
+ HInstruction left = instruction.inputs[1];
+ HInstruction right = instruction.inputs[2];
+ if (left.isNumber(types) && right.isNumber(types)) {
+ return newBuiltinVariant(left, right);
+ }
+ return null;
+ }
+
+ HInstruction newBuiltinVariant(HInstruction left, HInstruction right);
+}
+
+class EqualsSpecializer extends RelationalSpecializer {
+ const EqualsSpecializer();
+
+ HType computeDesiredTypeForInput(HInvokeDynamic instruction,
+ HInstruction input,
+ HTypeMap types,
+ Compiler compiler) {
+ HInstruction left = instruction.inputs[1];
+ HInstruction right = instruction.inputs[2];
+ HType propagatedType = types[instruction];
+ if (input == left && types[right].isUseful()) {
+ // All our useful types have 'identical' semantics. But we don't want to
+ // speculatively test for all possible types. Therefore we try to match
+ // the two types. That is, if we see x == 3, then we speculatively test
+ // if x is a number and bailout if it isn't.
+ // If right is a number we don't need more than a number (no need to match
+ // the exact type of right).
+ if (right.isNumber(types)) return HType.NUMBER;
+ return types[right];
+ }
+ // String equality testing is much more common than array equality testing.
+ if (input == left && left.isIndexablePrimitive(types)) {
+ return HType.READABLE_ARRAY;
+ }
+ // String equality testing is much more common than array equality testing.
+ if (input == right && right.isIndexablePrimitive(types)) {
+ return HType.STRING;
+ }
+ return HType.UNKNOWN;
+ }
+
+ HInstruction tryConvertToBuiltin(HInvokeDynamic instruction,
+ HTypeMap types) {
+ HInstruction left = instruction.inputs[1];
+ HInstruction right = instruction.inputs[2];
+ if (types[left].isPrimitiveOrNull() || right.isConstantNull()) {
+ return newBuiltinVariant(left, right);
+ }
+ return null;
+ }
+
+ BinaryOperation operation(ConstantSystem constantSystem) {
+ return constantSystem.equal;
+ }
+
+ HInstruction newBuiltinVariant(HInstruction left, HInstruction right) {
+ return new HIdentity(left, right);
+ }
+}
+
+class LessSpecializer extends RelationalSpecializer {
+ const LessSpecializer();
+
+ BinaryOperation operation(ConstantSystem constantSystem) {
+ return constantSystem.less;
+ }
+
+ HInstruction newBuiltinVariant(HInstruction left, HInstruction right) {
+ return new HLess(left, right);
+ }
+}
+
+class GreaterSpecializer extends RelationalSpecializer {
+ const GreaterSpecializer();
+
+ BinaryOperation operation(ConstantSystem constantSystem) {
+ return constantSystem.greater;
+ }
+
+ HInstruction newBuiltinVariant(HInstruction left, HInstruction right) {
+ return new HGreater(left, right);
+ }
+}
+
+class GreaterEqualSpecializer extends RelationalSpecializer {
+ const GreaterEqualSpecializer();
+
+ BinaryOperation operation(ConstantSystem constantSystem) {
+ return constantSystem.greaterEqual;
+ }
+
+ HInstruction newBuiltinVariant(HInstruction left, HInstruction right) {
+ return new HGreaterEqual(left, right);
+ }
+}
+
+class LessEqualSpecializer extends RelationalSpecializer {
+ const LessEqualSpecializer();
+
+ BinaryOperation operation(ConstantSystem constantSystem) {
+ return constantSystem.lessEqual;
+ }
+
+ HInstruction newBuiltinVariant(HInstruction left, HInstruction right) {
+ return new HLessEqual(left, right);
+ }
+}
diff --git a/sdk/lib/_internal/compiler/implementation/ssa/js_names.dart b/sdk/lib/_internal/compiler/implementation/ssa/js_names.dart
deleted file mode 100644
index 3600a09..0000000
--- a/sdk/lib/_internal/compiler/implementation/ssa/js_names.dart
+++ /dev/null
@@ -1,196 +0,0 @@
-// 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.
-
-part of ssa;
-
-class JsNames {
- static const javaScriptKeywords = const <String>[
- // These are current keywords
- "break", "delete", "function", "return", "typeof", "case", "do", "if",
- "switch", "var", "catch", "else", "in", "this", "void", "continue",
- "false", "instanceof", "throw", "while", "debugger", "finally", "new",
- "true", "with", "default", "for", "null", "try",
-
- // These are future keywords
- "abstract", "double", "goto", "native", "static", "boolean", "enum",
- "implements", "package", "super", "byte", "export", "import", "private",
- "synchronized", "char", "extends", "int", "protected", "throws",
- "class", "final", "interface", "public", "transient", "const", "float",
- "long", "short", "volatile"
- ];
-
- static const reservedGlobalSymbols = const <String>[
- // Section references are from Ecma-262
- // (http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf)
-
- // 15.1.1 Value Properties of the Global Object
- "NaN", "Infinity", "undefined",
-
- // 15.1.2 Function Properties of the Global Object
- "eval", "parseInt", "parseFloat", "isNan", "isFinite",
-
- // 15.1.3 URI Handling Function Properties
- "decodeURI", "decodeURIComponent",
- "encodeURI",
- "encodeURIComponent",
-
- // 15.1.4 Constructor Properties of the Global Object
- "Object", "Function", "Array", "String", "Boolean", "Number", "Date",
- "RegExp", "Error", "EvalError", "RangeError", "ReferenceError",
- "SyntaxError", "TypeError", "URIError",
-
- // 15.1.5 Other Properties of the Global Object
- "Math",
-
- // 10.1.6 Activation Object
- "arguments",
-
- // B.2 Additional Properties (non-normative)
- "escape", "unescape",
-
- // Window props (https://developer.mozilla.org/en/DOM/window)
- "applicationCache", "closed", "Components", "content", "controllers",
- "crypto", "defaultStatus", "dialogArguments", "directories",
- "document", "frameElement", "frames", "fullScreen", "globalStorage",
- "history", "innerHeight", "innerWidth", "length",
- "location", "locationbar", "localStorage", "menubar",
- "mozInnerScreenX", "mozInnerScreenY", "mozScreenPixelsPerCssPixel",
- "name", "navigator", "opener", "outerHeight", "outerWidth",
- "pageXOffset", "pageYOffset", "parent", "personalbar", "pkcs11",
- "returnValue", "screen", "scrollbars", "scrollMaxX", "scrollMaxY",
- "self", "sessionStorage", "sidebar", "status", "statusbar", "toolbar",
- "top", "window",
-
- // Window methods (https://developer.mozilla.org/en/DOM/window)
- "alert", "addEventListener", "atob", "back", "blur", "btoa",
- "captureEvents", "clearInterval", "clearTimeout", "close", "confirm",
- "disableExternalCapture", "dispatchEvent", "dump",
- "enableExternalCapture", "escape", "find", "focus", "forward",
- "GeckoActiveXObject", "getAttention", "getAttentionWithCycleCount",
- "getComputedStyle", "getSelection", "home", "maximize", "minimize",
- "moveBy", "moveTo", "open", "openDialog", "postMessage", "print",
- "prompt", "QueryInterface", "releaseEvents", "removeEventListener",
- "resizeBy", "resizeTo", "restore", "routeEvent", "scroll", "scrollBy",
- "scrollByLines", "scrollByPages", "scrollTo", "setInterval",
- "setResizeable", "setTimeout", "showModalDialog", "sizeToContent",
- "stop", "uuescape", "updateCommands", "XPCNativeWrapper",
- "XPCSafeJSOjbectWrapper",
-
- // Mozilla Window event handlers, same cite
- "onabort", "onbeforeunload", "onchange", "onclick", "onclose",
- "oncontextmenu", "ondragdrop", "onerror", "onfocus", "onhashchange",
- "onkeydown", "onkeypress", "onkeyup", "onload", "onmousedown",
- "onmousemove", "onmouseout", "onmouseover", "onmouseup",
- "onmozorientation", "onpaint", "onreset", "onresize", "onscroll",
- "onselect", "onsubmit", "onunload",
-
- // Safari Web Content Guide
- // http://developer.apple.com/library/safari/#documentation/AppleApplications/Reference/SafariWebContent/SafariWebContent.pdf
- // WebKit Window member data, from WebKit DOM Reference
- // (http://developer.apple.com/safari/library/documentation/AppleApplications/Reference/WebKitDOMRef/DOMWindow_idl/Classes/DOMWindow/index.html)
- "ontouchcancel", "ontouchend", "ontouchmove", "ontouchstart",
- "ongesturestart", "ongesturechange", "ongestureend",
-
- // extra window methods
- "uneval",
-
- // keywords https://developer.mozilla.org/en/New_in_JavaScript_1.7,
- // https://developer.mozilla.org/en/New_in_JavaScript_1.8.1
- "getPrototypeOf", "let", "yield",
-
- // "future reserved words"
- "abstract", "int", "short", "boolean", "interface", "static", "byte",
- "long", "char", "final", "native", "synchronized", "float", "package",
- "throws", "goto", "private", "transient", "implements", "protected",
- "volatile", "double", "public",
-
- // IE methods
- // (http://msdn.microsoft.com/en-us/library/ms535873(VS.85).aspx#)
- "attachEvent", "clientInformation", "clipboardData", "createPopup",
- "dialogHeight", "dialogLeft", "dialogTop", "dialogWidth",
- "onafterprint", "onbeforedeactivate", "onbeforeprint",
- "oncontrolselect", "ondeactivate", "onhelp", "onresizeend",
-
- // Common browser-defined identifiers not defined in ECMAScript
- "event", "external", "Debug", "Enumerator", "Global", "Image",
- "ActiveXObject", "VBArray", "Components",
-
- // Functions commonly defined on Object
- "toString", "getClass", "constructor", "prototype", "valueOf",
-
- // Client-side JavaScript identifiers, which are needed for linkers
- // that don't ensure GWT's window != $wnd, document != $doc, etc.
- // Taken from the Rhino book, pg 715
- "Anchor", "Applet", "Attr", "Canvas", "CanvasGradient",
- "CanvasPattern", "CanvasRenderingContext2D", "CDATASection",
- "CharacterData", "Comment", "CSS2Properties", "CSSRule",
- "CSSStyleSheet", "Document", "DocumentFragment", "DocumentType",
- "DOMException", "DOMImplementation", "DOMParser", "Element", "Event",
- "ExternalInterface", "FlashPlayer", "Form", "Frame", "History",
- "HTMLCollection", "HTMLDocument", "HTMLElement", "IFrame", "Image",
- "Input", "JSObject", "KeyEvent", "Link", "Location", "MimeType",
- "MouseEvent", "Navigator", "Node", "NodeList", "Option", "Plugin",
- "ProcessingInstruction", "Range", "RangeException", "Screen", "Select",
- "Table", "TableCell", "TableRow", "TableSelection", "Text", "TextArea",
- "UIEvent", "Window", "XMLHttpRequest", "XMLSerializer",
- "XPathException", "XPathResult", "XSLTProcessor",
-
- // These keywords trigger the loading of the java-plugin. For the
- // next-generation plugin, this results in starting a new Java process.
- "java", "Packages", "netscape", "sun", "JavaObject", "JavaClass",
- "JavaArray", "JavaMember",
-
- // GWT-defined identifiers
- "\$wnd", "\$doc", "\$entry", "\$moduleName", "\$moduleBase",
- "\$gwt_version", "\$sessionId",
-
- // Identifiers used by JsStackEmulator; later set to obfuscatable
- "\$stack", "\$stackDepth", "\$location",
-
- // TODO: prove why this is necessary or remove it
- "call"
- ];
-
- static const reservedPropertySymbols =
- const <String>["__PROTO__", "prototype", "constructor"];
-
- static Set<String> _reserved;
- static Set<String> _reservedNativeProperties;
-
- static Set<String> get reserved {
- if (_reserved == null) {
- _reserved = new Set<String>();
- _reserved.addAll(reservedPropertySymbols);
- _reserved.addAll(reservedGlobalSymbols);
- _reserved.addAll(javaScriptKeywords);
- }
- return _reserved;
- }
-
- static Set<String> get reservedNativeProperties {
- // TODO(sra): We need a complete list from the DOM.
- if (_reservedNativeProperties == null) {
- const names = const <String>["x", "y", "z"];
- _reservedNativeProperties = new Set<String>();
- _reservedNativeProperties.addAll(names);
- }
- return _reservedNativeProperties;
- }
-
- // TODO(ngeoffray): only the namer should call this method.
- // Eventually move it there.
- /*
- * Returns a name that does not clash with reserved JS keywords,
- * and also ensures it won't clash with other identifiers.
- */
- static String getValid(String name) {
- if (reserved.contains(name)) {
- name = '$name\$';
- assert(!reserved.contains(name));
- } else if (name.contains(r'$')) {
- name = name.replaceAll(r'$', r'$$');
- }
- return name;
- }
-}
diff --git a/sdk/lib/_internal/compiler/implementation/ssa/nodes.dart b/sdk/lib/_internal/compiler/implementation/ssa/nodes.dart
index 7d7e8f3..99329fd 100644
--- a/sdk/lib/_internal/compiler/implementation/ssa/nodes.dart
+++ b/sdk/lib/_internal/compiler/implementation/ssa/nodes.dart
@@ -17,7 +17,6 @@
R visitConstant(HConstant node);
R visitContinue(HContinue node);
R visitDivide(HDivide node);
- R visitEquals(HEquals node);
R visitExit(HExit node);
R visitExitTry(HExitTry node);
R visitFieldGet(HFieldGet node);
@@ -51,6 +50,7 @@
R visitMultiply(HMultiply node);
R visitNegate(HNegate node);
R visitNot(HNot node);
+ R visitOneShotInterceptor(HOneShotInterceptor);
R visitParameterValue(HParameterValue node);
R visitPhi(HPhi node);
R visitRangeConversion(HRangeConversion node);
@@ -263,7 +263,7 @@
visitConditionalBranch(HConditionalBranch node) => visitControlFlow(node);
visitControlFlow(HControlFlow node) => visitInstruction(node);
visitFieldAccess(HFieldAccess node) => visitInstruction(node);
- visitRelational(HRelational node) => visitInvokeStatic(node);
+ visitRelational(HRelational node) => visitInvokeBinary(node);
visitAdd(HAdd node) => visitBinaryArithmetic(node);
visitBailoutTarget(HBailoutTarget node) => visitInstruction(node);
@@ -278,7 +278,6 @@
visitCheck(HCheck node) => visitInstruction(node);
visitConstant(HConstant node) => visitInstruction(node);
visitDivide(HDivide node) => visitBinaryArithmetic(node);
- visitEquals(HEquals node) => visitRelational(node);
visitExit(HExit node) => visitControlFlow(node);
visitExitTry(HExitTry node) => visitControlFlow(node);
visitFieldGet(HFieldGet node) => visitFieldAccess(node);
@@ -305,16 +304,18 @@
visitInvokeStatic(HInvokeStatic node) => visitInvoke(node);
visitInvokeSuper(HInvokeSuper node) => visitInvoke(node);
visitJump(HJump node) => visitControlFlow(node);
- visitLazyStatic(HLazyStatic node) => visitStatic(node);
+ visitLazyStatic(HLazyStatic node) => visitInstruction(node);
visitLess(HLess node) => visitRelational(node);
visitLessEqual(HLessEqual node) => visitRelational(node);
visitLiteralList(HLiteralList node) => visitInstruction(node);
- visitLocalGet(HLocalGet node) => visitFieldGet(node);
- visitLocalSet(HLocalSet node) => visitFieldSet(node);
+ visitLocalGet(HLocalGet node) => visitFieldAccess(node);
+ visitLocalSet(HLocalSet node) => visitFieldAccess(node);
visitLocalValue(HLocalValue node) => visitInstruction(node);
visitLoopBranch(HLoopBranch node) => visitConditionalBranch(node);
visitNegate(HNegate node) => visitInvokeUnary(node);
visitNot(HNot node) => visitInstruction(node);
+ visitOneShotInterceptor(HOneShotInterceptor node)
+ => visitInvokeDynamic(node);
visitPhi(HPhi node) => visitInstruction(node);
visitMultiply(HMultiply node) => visitBinaryArithmetic(node);
visitParameterValue(HParameterValue node) => visitLocalValue(node);
@@ -369,7 +370,7 @@
return first == null;
}
- void addAfter(HInstruction cursor, HInstruction instruction) {
+ void internalAddAfter(HInstruction cursor, HInstruction instruction) {
if (cursor == null) {
assert(isEmpty);
first = last = instruction;
@@ -385,7 +386,7 @@
}
}
- void addBefore(HInstruction cursor, HInstruction instruction) {
+ void internalAddBefore(HInstruction cursor, HInstruction instruction) {
if (cursor == null) {
assert(isEmpty);
first = last = instruction;
@@ -503,7 +504,7 @@
void addAtEntry(HInstruction instruction) {
assert(instruction is !HPhi);
- super.addBefore(first, instruction);
+ internalAddBefore(first, instruction);
instruction.notifyAddedToBlock(this);
}
@@ -511,7 +512,7 @@
assert(isClosed());
assert(last is HControlFlow);
assert(instruction is !HPhi);
- super.addBefore(last, instruction);
+ internalAddBefore(last, instruction);
instruction.notifyAddedToBlock(this);
}
@@ -520,7 +521,7 @@
assert(instruction.isInBasicBlock());
assert(isClosed());
assert(last is HControlFlow);
- super.addBefore(last, instruction);
+ internalAddBefore(last, instruction);
instruction.block = this;
assert(isValid());
}
@@ -528,12 +529,12 @@
void add(HInstruction instruction) {
assert(instruction is !HControlFlow);
assert(instruction is !HPhi);
- super.addAfter(last, instruction);
+ internalAddAfter(last, instruction);
instruction.notifyAddedToBlock(this);
}
void addPhi(HPhi phi) {
- phis.addAfter(phis.last, phi);
+ phis.internalAddAfter(phis.last, phi);
phi.notifyAddedToBlock(this);
}
@@ -547,7 +548,7 @@
assert(cursor is !HPhi);
assert(instruction is !HPhi);
assert(isOpen() || isClosed());
- super.addAfter(cursor, instruction);
+ internalAddAfter(cursor, instruction);
instruction.notifyAddedToBlock(this);
}
@@ -555,7 +556,7 @@
assert(cursor is !HPhi);
assert(instruction is !HPhi);
assert(isOpen() || isClosed());
- super.addBefore(cursor, instruction);
+ internalAddBefore(cursor, instruction);
instruction.notifyAddedToBlock(this);
}
@@ -748,8 +749,7 @@
static const int FLAG_CHANGES_INSTANCE_PROPERTY = FLAG_CHANGES_INDEX + 1;
static const int FLAG_CHANGES_STATIC_PROPERTY
= FLAG_CHANGES_INSTANCE_PROPERTY + 1;
- static const int FLAG_CHANGES_SOMETHING = FLAG_CHANGES_STATIC_PROPERTY + 1;
- static const int FLAG_CHANGES_COUNT = FLAG_CHANGES_SOMETHING + 1;
+ static const int FLAG_CHANGES_COUNT = FLAG_CHANGES_STATIC_PROPERTY + 1;
// Depends flags (one for each changes flag).
static const int FLAG_DEPENDS_ON_INDEX_STORE = FLAG_CHANGES_COUNT;
@@ -757,11 +757,11 @@
FLAG_DEPENDS_ON_INDEX_STORE + 1;
static const int FLAG_DEPENDS_ON_STATIC_PROPERTY_STORE =
FLAG_DEPENDS_ON_INSTANCE_PROPERTY_STORE + 1;
- static const int FLAG_DEPENDS_ON_SOMETHING =
+ static const int FLAG_DEPENDS_ON_COUNT =
FLAG_DEPENDS_ON_STATIC_PROPERTY_STORE + 1;
// Other flags.
- static const int FLAG_USE_GVN = FLAG_DEPENDS_ON_SOMETHING + 1;
+ static const int FLAG_USE_GVN = FLAG_DEPENDS_ON_COUNT;
// Type codes.
static const int UNDEFINED_TYPECODE = -1;
@@ -772,33 +772,31 @@
static const int INTERCEPTOR_TYPECODE = 4;
static const int ADD_TYPECODE = 5;
static const int DIVIDE_TYPECODE = 6;
- static const int MULTIPLY_TYPECODE = 8;
- static const int SUBTRACT_TYPECODE = 9;
- static const int SHIFT_LEFT_TYPECODE = 11;
- static const int BIT_OR_TYPECODE = 13;
- static const int BIT_AND_TYPECODE = 14;
- static const int BIT_XOR_TYPECODE = 15;
- static const int NEGATE_TYPECODE = 16;
- static const int BIT_NOT_TYPECODE = 17;
- static const int NOT_TYPECODE = 18;
- static const int EQUALS_TYPECODE = 19;
- static const int IDENTITY_TYPECODE = 20;
- static const int GREATER_TYPECODE = 21;
- static const int GREATER_EQUAL_TYPECODE = 22;
- static const int LESS_TYPECODE = 23;
- static const int LESS_EQUAL_TYPECODE = 24;
- static const int STATIC_TYPECODE = 25;
- static const int STATIC_STORE_TYPECODE = 26;
- static const int FIELD_GET_TYPECODE = 27;
- static const int TYPE_CONVERSION_TYPECODE = 28;
- static const int BAILOUT_TARGET_TYPECODE = 29;
- static const int INVOKE_STATIC_TYPECODE = 30;
- static const int INVOKE_DYNAMIC_GETTER_TYPECODE = 31;
- static const int INDEX_TYPECODE = 32;
+ static const int MULTIPLY_TYPECODE = 7;
+ static const int SUBTRACT_TYPECODE = 8;
+ static const int SHIFT_LEFT_TYPECODE = 9;
+ static const int BIT_OR_TYPECODE = 10;
+ static const int BIT_AND_TYPECODE = 11;
+ static const int BIT_XOR_TYPECODE = 12;
+ static const int NEGATE_TYPECODE = 13;
+ static const int BIT_NOT_TYPECODE = 14;
+ static const int NOT_TYPECODE = 15;
+ static const int IDENTITY_TYPECODE = 16;
+ static const int GREATER_TYPECODE = 17;
+ static const int GREATER_EQUAL_TYPECODE = 18;
+ static const int LESS_TYPECODE = 19;
+ static const int LESS_EQUAL_TYPECODE = 20;
+ static const int STATIC_TYPECODE = 21;
+ static const int STATIC_STORE_TYPECODE = 22;
+ static const int FIELD_GET_TYPECODE = 23;
+ static const int TYPE_CONVERSION_TYPECODE = 24;
+ static const int BAILOUT_TARGET_TYPECODE = 25;
+ static const int INVOKE_STATIC_TYPECODE = 26;
+ static const int INDEX_TYPECODE = 27;
+ static const int IS_TYPECODE = 28;
+ static const int INVOKE_DYNAMIC_TYPECODE = 29;
- HInstruction(this.inputs)
- : id = idCounter++,
- usedBy = <HInstruction>[];
+ HInstruction(this.inputs) : id = idCounter++, usedBy = <HInstruction>[];
int get hashCode => id;
@@ -809,14 +807,24 @@
static int computeDependsOnFlags(int flags) => flags << FLAG_CHANGES_COUNT;
int getChangesFlags() => flags & ((1 << FLAG_CHANGES_COUNT) - 1);
- bool hasSideEffects(HTypeMap types) => getChangesFlags() != 0;
- void prepareGvn(HTypeMap types) { setAllSideEffects(); }
+ int getDependsOnFlags() {
+ return (flags & ((1 << FLAG_DEPENDS_ON_COUNT) - 1)) >> FLAG_CHANGES_COUNT;
+ }
+
+ bool hasSideEffects() => getChangesFlags() != 0;
+ bool dependsOnSomething() => getDependsOnFlags() != 0;
void setAllSideEffects() { flags |= ((1 << FLAG_CHANGES_COUNT) - 1); }
void clearAllSideEffects() { flags &= ~((1 << FLAG_CHANGES_COUNT) - 1); }
- bool dependsOnSomething() => getFlag(FLAG_DEPENDS_ON_SOMETHING);
- void setDependsOnSomething() { setFlag(FLAG_DEPENDS_ON_SOMETHING); }
+ void setDependsOnSomething() {
+ int count = FLAG_DEPENDS_ON_COUNT - FLAG_CHANGES_COUNT;
+ flags |= (((1 << count) - 1) << FLAG_CHANGES_COUNT);
+ }
+ void clearAllDependencies() {
+ int count = FLAG_DEPENDS_ON_COUNT - FLAG_CHANGES_COUNT;
+ flags &= ~(((1 << count) - 1) << FLAG_CHANGES_COUNT);
+ }
bool dependsOnStaticPropertyStore() {
return getFlag(FLAG_DEPENDS_ON_STATIC_PROPERTY_STORE);
@@ -840,6 +848,21 @@
bool useGvn() => getFlag(FLAG_USE_GVN);
void setUseGvn() { setFlag(FLAG_USE_GVN); }
+
+ void updateInput(int i, HInstruction insn) {
+ inputs[i] = insn;
+ }
+
+ /**
+ * A pure instruction is an instruction that does not have any side
+ * effect, nor any dependency. They can be moved anywhere in the
+ * graph.
+ */
+ bool isPure() => !hasSideEffects() && !dependsOnSomething() && !canThrow();
+
+ // Can this node throw an exception?
+ bool canThrow() => false;
+
// Does this node potentially affect control flow.
bool isControlFlow() => false;
@@ -1071,6 +1094,15 @@
return users;
}
+ void moveBefore(HInstruction other) {
+ assert(this is !HControlFlow);
+ assert(this is !HPhi);
+ assert(other is !HPhi);
+ block.detach(this);
+ other.block.internalAddBefore(other, this);
+ block = other.block;
+ }
+
bool isConstant() => false;
bool isConstantBoolean() => false;
bool isConstantNull() => false;
@@ -1097,7 +1129,7 @@
*/
bool isCodeMotionInvariant() => false;
- bool isJsStatement(HTypeMap types) => false;
+ bool isJsStatement() => false;
bool dominates(HInstruction other) {
// An instruction does not dominates itself.
@@ -1131,12 +1163,19 @@
return new HTypeConversion(convertedType, this, kind);
}
+
+ /**
+ * Return whether the instructions do not belong to a loop or
+ * belong to the same loop.
+ */
+ bool hasSameLoopHeaderAs(HInstruction other) {
+ return block.enclosingLoopHeader == other.block.enclosingLoopHeader;
+ }
}
class HBoolify extends HInstruction {
- HBoolify(HInstruction value) : super(<HInstruction>[value]);
- void prepareGvn(HTypeMap types) {
- assert(!hasSideEffects(types));
+ HBoolify(HInstruction value) : super(<HInstruction>[value]) {
+ assert(!hasSideEffects());
setUseGvn();
}
@@ -1156,26 +1195,29 @@
* instruction itself.
*/
abstract class HCheck extends HInstruction {
- HCheck(inputs) : super(inputs);
- HInstruction get checkedInput => inputs[0];
- bool isJsStatement(HTypeMap types) => true;
- void prepareGvn(HTypeMap types) {
- assert(!hasSideEffects(types));
+ HCheck(inputs) : super(inputs) {
+ assert(!hasSideEffects());
setUseGvn();
}
+ HInstruction get checkedInput => inputs[0];
+ bool isJsStatement() => true;
+ bool canThrow() => true;
}
class HBailoutTarget extends HInstruction {
final int state;
bool isEnabled = true;
- HBailoutTarget(this.state) : super(<HInstruction>[]);
- void prepareGvn(HTypeMap types) {
- assert(!hasSideEffects(types));
+ // For each argument we record how many dummy (unused) arguments should
+ // precede it, to make sure it lands in the correctly named parameter in the
+ // bailout function.
+ List<int> padding;
+ HBailoutTarget(this.state) : super(<HInstruction>[]) {
+ assert(!hasSideEffects());
setUseGvn();
}
bool isControlFlow() => isEnabled;
- bool isJsStatement(HTypeMap types) => isEnabled;
+ bool isJsStatement() => isEnabled;
accept(HVisitor visitor) => visitor.visitBailoutTarget(this);
int typeCode() => HInstruction.BAILOUT_TARGET_TYPECODE;
@@ -1202,7 +1244,8 @@
HType get guaranteedType => isEnabled ? guardedType : HType.UNKNOWN;
bool isControlFlow() => true;
- bool isJsStatement(HTypeMap types) => isEnabled;
+ bool isJsStatement() => isEnabled;
+ bool canThrow() => isEnabled;
accept(HVisitor visitor) => visitor.visitTypeGuard(this);
int typeCode() => HInstruction.TYPE_GUARD_TYPECODE;
@@ -1271,11 +1314,8 @@
abstract class HControlFlow extends HInstruction {
HControlFlow(inputs) : super(inputs);
- void prepareGvn(HTypeMap types) {
- // Control flow does not have side-effects.
- }
bool isControlFlow() => true;
- bool isJsStatement(HTypeMap types) => true;
+ bool isJsStatement() => true;
}
abstract class HInvoke extends HInstruction {
@@ -1284,16 +1324,28 @@
* the receiver of a method-call. The remaining inputs are the arguments
* to the invocation.
*/
- HInvoke(List<HInstruction> inputs) : super(inputs);
+ HInvoke(List<HInstruction> inputs) : super(inputs) {
+ setAllSideEffects();
+ setDependsOnSomething();
+ }
static const int ARGUMENTS_OFFSET = 1;
+ bool canThrow() => true;
}
abstract class HInvokeDynamic extends HInvoke {
+ final InvokeDynamicSpecializer specializer;
final Selector selector;
Element element;
- HInvokeDynamic(this.selector, this.element, List<HInstruction> inputs)
- : super(inputs);
+ HInvokeDynamic(Selector selector,
+ this.element,
+ List<HInstruction> inputs,
+ [bool isIntercepted = false])
+ : super(inputs),
+ this.selector = selector,
+ specializer = isIntercepted
+ ? InvokeDynamicSpecializer.lookupSpecializer(selector)
+ : const InvokeDynamicSpecializer();
toString() => 'invoke dynamic: $selector';
HInstruction get receiver => inputs[0];
@@ -1303,33 +1355,12 @@
// parameter to the call.
return inputs.length - 2 == selector.argumentCount;
}
-}
-class HInvokeClosure extends HInvokeDynamic {
- HInvokeClosure(Selector selector, List<HInstruction> inputs)
- : super(selector, null, inputs) {
- assert(selector.isClosureCall());
- }
- accept(HVisitor visitor) => visitor.visitInvokeClosure(this);
-}
-
-class HInvokeDynamicMethod extends HInvokeDynamic {
- final InvokeDynamicSpecializer specializer;
- HInvokeDynamicMethod(Selector selector,
- List<HInstruction> inputs,
- [bool isIntercepted = false])
- : super(selector, null, inputs),
- specializer = isIntercepted
- ? InvokeDynamicSpecializer.lookupSpecializer(selector)
- : const InvokeDynamicSpecializer();
- String toString() => 'invoke dynamic method: $selector';
- accept(HVisitor visitor) => visitor.visitInvokeDynamicMethod(this);
-
- bool isIndexOperatorOnIndexablePrimitive(HTypeMap types) {
- return isInterceptorCall
- && selector.kind == SelectorKind.INDEX
- && selector.name == const SourceString('[]')
- && inputs[1].isIndexablePrimitive(types);
+ int typeCode() => HInstruction.INVOKE_DYNAMIC_TYPECODE;
+ bool typeEquals(other) => other is HInvokeDynamic;
+ bool dataEquals(HInvokeDynamic other) {
+ return selector == other.selector
+ && element == other.element;
}
HType computeDesiredTypeForInput(HInstruction input,
@@ -1343,6 +1374,31 @@
}
}
+class HInvokeClosure extends HInvokeDynamic {
+ HInvokeClosure(Selector selector, List<HInstruction> inputs)
+ : super(selector, null, inputs) {
+ assert(selector.isClosureCall());
+ }
+ accept(HVisitor visitor) => visitor.visitInvokeClosure(this);
+}
+
+class HInvokeDynamicMethod extends HInvokeDynamic {
+ HInvokeDynamicMethod(Selector selector,
+ List<HInstruction> inputs,
+ [bool isIntercepted = false])
+ : super(selector, null, inputs, isIntercepted);
+
+ String toString() => 'invoke dynamic method: $selector';
+ accept(HVisitor visitor) => visitor.visitInvokeDynamicMethod(this);
+
+ bool isIndexOperatorOnIndexablePrimitive(HTypeMap types) {
+ return isInterceptorCall
+ && selector.kind == SelectorKind.INDEX
+ && selector.name == const SourceString('[]')
+ && inputs[1].isIndexablePrimitive(types);
+ }
+}
+
abstract class HInvokeDynamicField extends HInvokeDynamic {
final bool isSideEffectFree;
HInvokeDynamicField(
@@ -1353,41 +1409,34 @@
}
class HInvokeDynamicGetter extends HInvokeDynamicField {
- HInvokeDynamicGetter(
- selector, element, receiver, isSideEffectFree)
- : super(selector, element, [receiver], isSideEffectFree);
- toString() => 'invoke dynamic getter: $selector';
- accept(HVisitor visitor) => visitor.visitInvokeDynamicGetter(this);
-
- void prepareGvn(HTypeMap types) {
+ HInvokeDynamicGetter(selector, element, receiver, isSideEffectFree)
+ : super(selector, element, [receiver], isSideEffectFree) {
clearAllSideEffects();
if (isSideEffectFree) {
setUseGvn();
setDependsOnInstancePropertyStore();
} else {
+ setDependsOnSomething();
setAllSideEffects();
}
}
-
- int typeCode() => HInstruction.INVOKE_DYNAMIC_GETTER_TYPECODE;
- bool typeEquals(other) => other is HInvokeDynamicGetter;
- bool dataEquals(HInvokeDynamicGetter other) => selector == other.selector;
+ toString() => 'invoke dynamic getter: $selector';
+ accept(HVisitor visitor) => visitor.visitInvokeDynamicGetter(this);
}
class HInvokeDynamicSetter extends HInvokeDynamicField {
HInvokeDynamicSetter(selector, element, receiver, value, isSideEffectFree)
- : super(selector, element, [receiver, value], isSideEffectFree);
- toString() => 'invoke dynamic setter: $selector';
- accept(HVisitor visitor) => visitor.visitInvokeDynamicSetter(this);
-
- void prepareGvn(HTypeMap types) {
+ : super(selector, element, [receiver, value], isSideEffectFree) {
clearAllSideEffects();
if (isSideEffectFree) {
setChangesInstanceProperty();
} else {
setAllSideEffects();
+ setDependsOnSomething();
}
}
+ toString() => 'invoke dynamic setter: $selector';
+ accept(HVisitor visitor) => visitor.visitInvokeDynamicSetter(this);
}
class HInvokeStatic extends HInvoke {
@@ -1401,20 +1450,6 @@
int typeCode() => HInstruction.INVOKE_STATIC_TYPECODE;
Element get element => target.element;
HStatic get target => inputs[0];
-
- HType computeDesiredTypeForInput(HInstruction input,
- HTypeMap types,
- Compiler compiler) {
- // TODO(floitsch): we want the target to be a function.
- if (input == target) return HType.UNKNOWN;
- return computeDesiredTypeForNonTargetInput(input, types, compiler);
- }
-
- HType computeDesiredTypeForNonTargetInput(HInstruction input,
- HTypeMap types,
- Compiler compiler) {
- return HType.UNKNOWN;
- }
}
class HInvokeSuper extends HInvokeStatic {
@@ -1434,8 +1469,9 @@
final Element element;
HFieldAccess(Element element, List<HInstruction> inputs)
- : this.element = element,
- super(inputs);
+ : this.element = element, super(inputs);
+
+ HInstruction get receiver => inputs[0];
}
class HFieldGet extends HFieldAccess {
@@ -1445,20 +1481,19 @@
: this.isAssignable = (isAssignable != null)
? isAssignable
: element.isAssignable(),
- super(element, <HInstruction>[receiver]);
-
- HInstruction get receiver => inputs[0];
-
- accept(HVisitor visitor) => visitor.visitFieldGet(this);
-
- void prepareGvn(HTypeMap types) {
+ super(element, <HInstruction>[receiver]) {
clearAllSideEffects();
setUseGvn();
- if (isAssignable) {
+ if (this.isAssignable) {
setDependsOnInstancePropertyStore();
}
}
+ // TODO(ngeoffray): Only if input can be null.
+ bool canThrow() => true;
+
+ accept(HVisitor visitor) => visitor.visitFieldGet(this);
+
int typeCode() => HInstruction.FIELD_GET_TYPECODE;
bool typeEquals(other) => other is HFieldGet;
bool dataEquals(HFieldGet other) => element == other.element;
@@ -1469,57 +1504,61 @@
HFieldSet(Element element,
HInstruction receiver,
HInstruction value)
- : super(element, <HInstruction>[receiver, value]);
-
- HInstruction get receiver => inputs[0];
- HInstruction get value => inputs[1];
- accept(HVisitor visitor) => visitor.visitFieldSet(this);
-
- void prepareGvn(HTypeMap types) {
+ : super(element, <HInstruction>[receiver, value]) {
clearAllSideEffects();
setChangesInstanceProperty();
}
- bool isJsStatement(HTypeMap types) => true;
+ // TODO(ngeoffray): Only if input can be null.
+ bool canThrow() => true;
+
+ HInstruction get value => inputs[1];
+ accept(HVisitor visitor) => visitor.visitFieldSet(this);
+
+ bool isJsStatement() => true;
String toString() => "FieldSet $element";
}
-class HLocalGet extends HFieldGet {
- HLocalGet(Element element, HLocalValue local) : super(element, local);
+class HLocalGet extends HFieldAccess {
+ // No need to use GVN for a [HLocalGet], it is just a local
+ // access.
+ HLocalGet(Element element, HLocalValue local)
+ : super(element, <HInstruction>[local]);
accept(HVisitor visitor) => visitor.visitLocalGet(this);
HLocalValue get local => inputs[0];
-
- void prepareGvn(HTypeMap types) {
- // No need to use GVN for a [HLocalGet], it is just a local
- // access.
- clearAllSideEffects();
- }
}
-class HLocalSet extends HFieldSet {
+class HLocalSet extends HFieldAccess {
HLocalSet(Element element, HLocalValue local, HInstruction value)
- : super(element, local, value);
+ : super(element, <HInstruction>[local, value]);
accept(HVisitor visitor) => visitor.visitLocalSet(this);
HLocalValue get local => inputs[0];
+ HInstruction get value => inputs[1];
+ bool isJsStatement() => true;
}
class HForeign extends HInstruction {
final DartString code;
final HType foreignType;
- final bool _isStatement;
+ final bool isStatement;
- HForeign(this.code, DartString declaredType, List<HInstruction> inputs)
+ HForeign(this.code,
+ DartString declaredType,
+ List<HInstruction> inputs,
+ {this.isStatement: false})
: foreignType = computeTypeFromDeclaredType(declaredType),
- _isStatement = false,
- super(inputs);
- HForeign.statement(this.code, List<HInstruction> inputs)
- : foreignType = HType.UNKNOWN,
- _isStatement = true,
- super(inputs);
+ super(inputs) {
+ setAllSideEffects();
+ setDependsOnSomething();
+ }
+
+ HForeign.statement(code, List<HInstruction> inputs)
+ : this(code, const LiteralDartString('var'), inputs, isStatement: true);
+
accept(HVisitor visitor) => visitor.visitForeign(this);
static HType computeTypeFromDeclaredType(DartString declaredType) {
@@ -1534,7 +1573,9 @@
HType get guaranteedType => foreignType;
- bool isJsStatement(HTypeMap types) => _isStatement;
+ bool isJsStatement() => isStatement;
+ bool canThrow() => true;
+
}
class HForeignNew extends HForeign {
@@ -1547,7 +1588,10 @@
abstract class HInvokeBinary extends HInstruction {
HInvokeBinary(HInstruction left, HInstruction right)
- : super(<HInstruction>[left, right]);
+ : super(<HInstruction>[left, right]) {
+ clearAllSideEffects();
+ setUseGvn();
+ }
HInstruction get left => inputs[0];
HInstruction get right => inputs[1];
@@ -1558,11 +1602,6 @@
abstract class HBinaryArithmetic extends HInvokeBinary {
HBinaryArithmetic(HInstruction left, HInstruction right) : super(left, right);
- void prepareGvn(HTypeMap types) {
- clearAllSideEffects();
- setUseGvn();
- }
-
HType computeTypeFromInputTypes(HTypeMap types, Compiler compiler) {
if (left.isInteger(types) && right.isInteger(types)) return HType.INTEGER;
if (left.isDouble(types)) return HType.DOUBLE;
@@ -1693,15 +1732,13 @@
}
abstract class HInvokeUnary extends HInstruction {
- HInvokeUnary(HInstruction input) : super(<HInstruction>[input]);
-
- HInstruction get operand => inputs[0];
-
- void prepareGvn(HTypeMap types) {
+ HInvokeUnary(HInstruction input) : super(<HInstruction>[input]) {
clearAllSideEffects();
setUseGvn();
}
+ HInstruction get operand => inputs[0];
+
UnaryOperation operation(ConstantSystem constantSystem);
}
@@ -1778,7 +1815,7 @@
// An [HExitTry] control flow node is used when the body of a try or
// the body of a catch contains a return, break or continue. To build
-// the control flow graph, we explicitely mark the body that
+// the control flow graph, we explicitly mark the body that
// leads to one of this instruction a predecessor of catch and
// finally.
class HExitTry extends HControlFlow {
@@ -1828,10 +1865,6 @@
HConstant.internal(this.constant, HType this.constantType)
: super(<HInstruction>[]);
- void prepareGvn(HTypeMap types) {
- assert(!hasSideEffects(types));
- }
-
toString() => 'literal: $constant';
accept(HVisitor visitor) => visitor.visitConstant(this);
@@ -1854,9 +1887,7 @@
}
class HNot extends HInstruction {
- HNot(HInstruction value) : super(<HInstruction>[value]);
- void prepareGvn(HTypeMap types) {
- assert(!hasSideEffects(types));
+ HNot(HInstruction value) : super(<HInstruction>[value]) {
setUseGvn();
}
@@ -1885,9 +1916,6 @@
sourceElement = element;
}
- void prepareGvn(HTypeMap types) {
- assert(!hasSideEffects(types));
- }
toString() => 'local ${sourceElement.name}';
accept(HVisitor visitor) => visitor.visitLocalValue(this);
}
@@ -1998,125 +2026,16 @@
accept(HVisitor visitor) => visitor.visitPhi(this);
}
-abstract class HRelational extends HInvokeStatic {
+abstract class HRelational extends HInvokeBinary {
bool usesBoolifiedInterceptor = false;
- HRelational(HStatic target, HInstruction left, HInstruction right)
- : super(<HInstruction>[target, left, right]);
-
- void prepareGvn(HTypeMap types) {
- clearAllSideEffects();
- // Relational expressions can take part in global value numbering
- // and do not have any side-effects if we know all the inputs are
- // numbers. This can be improved for at least equality.
- if (isBuiltin(types)) {
- setUseGvn();
- } else {
- setAllSideEffects();
- }
- }
-
- HType computeTypeFromInputTypes(HTypeMap types, Compiler compiler) {
- if (left.isNumber(types) || usesBoolifiedInterceptor) return HType.BOOLEAN;
- return HType.UNKNOWN;
- }
-
- HType get guaranteedType {
- if (usesBoolifiedInterceptor) return HType.BOOLEAN;
- return HType.UNKNOWN;
- }
-
- HType computeDesiredTypeForNonTargetInput(HInstruction input,
- HTypeMap types,
- Compiler compiler) {
- HType propagatedType = types[this];
- // For all relational operations except HEquals, we expect to get numbers
- // only. With numbers the outgoing type is a boolean. If something else
- // is desired, then numbers are incorrect, though.
- if (propagatedType.isUnknown() || propagatedType.isBoolean()) {
- if (left.isTypeUnknown(types) || left.isNumber(types)) {
- return HType.NUMBER;
- }
- }
- return HType.UNKNOWN;
- }
-
- HType computeLikelyType(HTypeMap types, Compiler compiler) => HType.BOOLEAN;
-
- bool isBuiltin(HTypeMap types)
- => left.isNumber(types) && right.isNumber(types);
-
- HInstruction get left => inputs[1];
- HInstruction get right => inputs[2];
-
- BinaryOperation operation(ConstantSystem constantSystem);
-}
-
-class HEquals extends HRelational {
- HEquals(HStatic target, HInstruction left, HInstruction right)
- : super(target, left, right);
- accept(HVisitor visitor) => visitor.visitEquals(this);
-
- bool isBuiltin(HTypeMap types) {
- // All primitive types have 'identical' semantics.
- // Note that this includes all constants except the user-constructed
- // objects.
- return types[left].isPrimitiveOrNull() || right.isConstantNull();
- }
-
- HType computeTypeFromInputTypes(HTypeMap types, Compiler compiler) {
- if (isBuiltin(types) || usesBoolifiedInterceptor) return HType.BOOLEAN;
- return HType.UNKNOWN;
- }
-
- HType computeDesiredTypeForNonTargetInput(HInstruction input,
- HTypeMap types,
- Compiler compiler) {
- HType propagatedType = types[this];
- if (input == left && types[right].isUseful()) {
- // All our useful types have 'identical' semantics. But we don't want to
- // speculatively test for all possible types. Therefore we try to match
- // the two types. That is, if we see x == 3, then we speculatively test
- // if x is a number and bailout if it isn't.
- // If right is a number we don't need more than a number (no need to match
- // the exact type of right).
- if (right.isNumber(types)) return HType.NUMBER;
- return types[right];
- }
- // String equality testing is much more common than array equality testing.
- if (input == left && left.isIndexablePrimitive(types)) {
- return HType.READABLE_ARRAY;
- }
- // String equality testing is much more common than array equality testing.
- if (input == right && right.isIndexablePrimitive(types)) {
- return HType.STRING;
- }
- return HType.UNKNOWN;
- }
-
- BinaryOperation operation(ConstantSystem constantSystem)
- => constantSystem.equal;
- int typeCode() => HInstruction.EQUALS_TYPECODE;
- bool typeEquals(other) => other is HEquals;
- bool dataEquals(HInstruction other) => true;
+ HRelational(HInstruction left, HInstruction right) : super(left, right);
+ HType get guaranteedType => HType.BOOLEAN;
}
class HIdentity extends HRelational {
- HIdentity(HStatic target, HInstruction left, HInstruction right)
- : super(target, left, right);
+ HIdentity(HInstruction left, HInstruction right) : super(left, right);
accept(HVisitor visitor) => visitor.visitIdentity(this);
- bool isBuiltin(HTypeMap types) => true;
-
- HType get guaranteedType => HType.BOOLEAN;
- HType computeTypeFromInputTypes(HTypeMap types, Compiler compiler)
- => HType.BOOLEAN;
- // Note that the identity operator really does not care for its input types.
- HType computeDesiredTypeForInput(HInstruction input,
- HTypeMap types,
- Compiler compiler) {
- return HType.UNKNOWN;
- }
-
BinaryOperation operation(ConstantSystem constantSystem)
=> constantSystem.identity;
int typeCode() => HInstruction.IDENTITY_TYPECODE;
@@ -2125,8 +2044,7 @@
}
class HGreater extends HRelational {
- HGreater(HStatic target, HInstruction left, HInstruction right)
- : super(target, left, right);
+ HGreater(HInstruction left, HInstruction right) : super(left, right);
accept(HVisitor visitor) => visitor.visitGreater(this);
BinaryOperation operation(ConstantSystem constantSystem)
@@ -2137,8 +2055,7 @@
}
class HGreaterEqual extends HRelational {
- HGreaterEqual(HStatic target, HInstruction left, HInstruction right)
- : super(target, left, right);
+ HGreaterEqual(HInstruction left, HInstruction right) : super(left, right);
accept(HVisitor visitor) => visitor.visitGreaterEqual(this);
BinaryOperation operation(ConstantSystem constantSystem)
@@ -2149,8 +2066,7 @@
}
class HLess extends HRelational {
- HLess(HStatic target, HInstruction left, HInstruction right)
- : super(target, left, right);
+ HLess(HInstruction left, HInstruction right) : super(left, right);
accept(HVisitor visitor) => visitor.visitLess(this);
BinaryOperation operation(ConstantSystem constantSystem)
@@ -2161,8 +2077,7 @@
}
class HLessEqual extends HRelational {
- HLessEqual(HStatic target, HInstruction left, HInstruction right)
- : super(target, left, right);
+ HLessEqual(HInstruction left, HInstruction right) : super(left, right);
accept(HVisitor visitor) => visitor.visitLessEqual(this);
BinaryOperation operation(ConstantSystem constantSystem)
@@ -2190,9 +2105,6 @@
HStatic(this.element) : super(<HInstruction>[]) {
assert(element != null);
assert(invariant(this, element.isDeclaration));
- }
-
- void prepareGvn(HTypeMap types) {
clearAllSideEffects();
if (element.isAssignable()) {
setDependsOnStaticPropertyStore();
@@ -2212,15 +2124,13 @@
class HInterceptor extends HInstruction {
Set<ClassElement> interceptedClasses;
HInterceptor(this.interceptedClasses, HInstruction receiver)
- : super(<HInstruction>[receiver]);
- String toString() => 'interceptor on $interceptedClasses';
- accept(HVisitor visitor) => visitor.visitInterceptor(this);
- HInstruction get receiver => inputs[0];
-
- void prepareGvn(HTypeMap types) {
+ : super(<HInstruction>[receiver]) {
clearAllSideEffects();
setUseGvn();
}
+ String toString() => 'interceptor on $interceptedClasses';
+ accept(HVisitor visitor) => visitor.visitInterceptor(this);
+ HInstruction get receiver => inputs[0];
HType computeDesiredTypeForInput(HInstruction input,
HTypeMap types,
@@ -2249,14 +2159,37 @@
}
}
-/** An [HLazyStatic] is a static that is initialized lazily at first read. */
-class HLazyStatic extends HStatic {
- HLazyStatic(Element element) : super(element);
+/**
+ * A "one-shot" interceptor is a call to a synthetized method that
+ * will fetch the interceptor of its first parameter, and make a call
+ * on a given selector with the remaining parameters.
+ *
+ * In order to share the same optimizations with regular interceptor
+ * calls, this class extends [HInvokeDynamic] and also has the null
+ * constant as the first input.
+ */
+class HOneShotInterceptor extends HInvokeDynamic {
+ Set<ClassElement> interceptedClasses;
+ HOneShotInterceptor(Selector selector,
+ List<HInstruction> inputs,
+ this.interceptedClasses)
+ : super(selector, null, inputs, true) {
+ assert(inputs[0] is HConstant);
+ assert(inputs[0].guaranteedType == HType.NULL);
+ }
- void prepareGvn(HTypeMap types) {
+ String toString() => 'one shot interceptor on $selector';
+ accept(HVisitor visitor) => visitor.visitOneShotInterceptor(this);
+}
+
+/** An [HLazyStatic] is a static that is initialized lazily at first read. */
+class HLazyStatic extends HInstruction {
+ final Element element;
+ HLazyStatic(this.element) : super(<HInstruction>[]) {
// TODO(4931): The first access has side-effects, but we afterwards we
// should be able to GVN.
setAllSideEffects();
+ setDependsOnSomething();
}
toString() => 'lazy static ${element.name}';
@@ -2265,23 +2198,23 @@
int typeCode() => 30;
// TODO(4931): can we do better here?
bool isCodeMotionInvariant() => false;
+ bool canThrow() => true;
}
class HStaticStore extends HInstruction {
Element element;
- HStaticStore(this.element, HInstruction value) : super(<HInstruction>[value]);
+ HStaticStore(this.element, HInstruction value)
+ : super(<HInstruction>[value]) {
+ clearAllSideEffects();
+ setChangesStaticProperty();
+ }
toString() => 'static store ${element.name}';
accept(HVisitor visitor) => visitor.visitStaticStore(this);
int typeCode() => HInstruction.STATIC_STORE_TYPECODE;
bool typeEquals(other) => other is HStaticStore;
bool dataEquals(HStaticStore other) => element == other.element;
- bool isJsStatement(HTypeMap types) => true;
-
- void prepareGvn(HTypeMap types) {
- clearAllSideEffects();
- setChangesStaticProperty();
- }
+ bool isJsStatement() => true;
}
class HLiteralList extends HInstruction {
@@ -2290,24 +2223,23 @@
accept(HVisitor visitor) => visitor.visitLiteralList(this);
HType get guaranteedType => HType.EXTENDABLE_ARRAY;
-
- void prepareGvn(HTypeMap types) {
- assert(!hasSideEffects(types));
- }
}
+/**
+ * The primitive array indexing operation. Note that this instruction
+ * does not throw because we generate the checks explicitly.
+ */
class HIndex extends HInstruction {
HIndex(HInstruction receiver, HInstruction index)
- : super(<HInstruction>[receiver, index]);
- String toString() => 'index operator';
- accept(HVisitor visitor) => visitor.visitIndex(this);
-
- void prepareGvn(HTypeMap types) {
+ : super(<HInstruction>[receiver, index]) {
clearAllSideEffects();
setDependsOnIndexStore();
setUseGvn();
}
+ String toString() => 'index operator';
+ accept(HVisitor visitor) => visitor.visitIndex(this);
+
HInstruction get receiver => inputs[0];
HInstruction get index => inputs[1];
@@ -2316,36 +2248,34 @@
bool dataEquals(HIndex other) => true;
}
+/**
+ * The primitive array assignment operation. Note that this instruction
+ * does not throw because we generate the checks explicitly.
+ */
class HIndexAssign extends HInstruction {
HIndexAssign(HInstruction receiver,
HInstruction index,
HInstruction value)
- : super(<HInstruction>[receiver, index, value]);
+ : super(<HInstruction>[receiver, index, value]) {
+ clearAllSideEffects();
+ setChangesIndex();
+ }
String toString() => 'index assign operator';
accept(HVisitor visitor) => visitor.visitIndexAssign(this);
HInstruction get receiver => inputs[0];
HInstruction get index => inputs[1];
HInstruction get value => inputs[2];
-
- void prepareGvn(HTypeMap types) {
- clearAllSideEffects();
- setChangesIndex();
- }
}
class HIs extends HInstruction {
final DartType typeExpression;
final bool nullOk;
- HIs.withArgumentChecks(this.typeExpression,
- HInstruction expression,
- List<HInstruction> checks,
- [this.nullOk = false])
- : super(<HInstruction>[expression]..addAll(checks));
-
- HIs(this.typeExpression, HInstruction expression, {this.nullOk: false})
- : super(<HInstruction>[expression]);
+ HIs(this.typeExpression, List<HInstruction> inputs, {this.nullOk: false})
+ : super(inputs) {
+ setUseGvn();
+ }
HInstruction get expression => inputs[0];
HInstruction getCheck(int index) => inputs[index + 1];
@@ -2358,6 +2288,13 @@
accept(HVisitor visitor) => visitor.visitIs(this);
toString() => "$expression is $typeExpression";
+
+ int typeCode() => HInstruction.IS_TYPECODE;
+ bool typeEquals(HInstruction other) => other is HIs;
+ bool dataEquals(HIs other) {
+ return typeExpression == other.typeExpression
+ && nullOk == other.nullOk;
+ }
}
class HTypeConversion extends HCheck {
@@ -2394,8 +2331,9 @@
accept(HVisitor visitor) => visitor.visitTypeConversion(this);
- bool isJsStatement(HTypeMap types) => kind == ARGUMENT_TYPE_CHECK;
+ bool isJsStatement() => kind == ARGUMENT_TYPE_CHECK;
bool isControlFlow() => kind == ARGUMENT_TYPE_CHECK;
+ bool canThrow() => isChecked;
int typeCode() => HInstruction.TYPE_CONVERSION_TYPECODE;
bool typeEquals(HInstruction other) => other is HTypeConversion;
@@ -2417,7 +2355,10 @@
class HStringConcat extends HInstruction {
final Node node;
HStringConcat(HInstruction left, HInstruction right, this.node)
- : super(<HInstruction>[left, right]);
+ : super(<HInstruction>[left, right]) {
+ setAllSideEffects();
+ setDependsOnSomething();
+ }
HType get guaranteedType => HType.STRING;
HInstruction get left => inputs[0];
diff --git a/sdk/lib/_internal/compiler/implementation/ssa/optimize.dart b/sdk/lib/_internal/compiler/implementation/ssa/optimize.dart
index 769b3ef..ed1f6cf 100644
--- a/sdk/lib/_internal/compiler/implementation/ssa/optimize.dart
+++ b/sdk/lib/_internal/compiler/implementation/ssa/optimize.dart
@@ -41,6 +41,11 @@
new SsaTypeConversionInserter(compiler),
new SsaTypePropagator(compiler, types),
new SsaConstantFolder(constantSystem, backend, work, types),
+ // The constant folder affects the types of instructions, so
+ // we run the type propagator again. Note that this would
+ // not be necessary if types were directly stored on
+ // instructions.
+ new SsaTypePropagator(compiler, types),
new SsaCheckInserter(backend, work, types, context.boundsChecked),
new SsaRedundantPhiEliminator(),
new SsaDeadPhiEliminator(),
@@ -53,6 +58,7 @@
// Previous optimizations may have generated new
// opportunities for constant folding.
new SsaConstantFolder(constantSystem, backend, work, types),
+ new SsaSimplifyInterceptors(constantSystem),
new SsaDeadCodeEliminator(types)];
runPhases(graph, phases);
if (!speculative) {
@@ -214,26 +220,15 @@
return null;
}
- HInstruction handleInterceptorCall(HInvokeDynamicMethod node) {
+ HInstruction handleInterceptorCall(HInvokeDynamic node) {
+ // We only optimize for intercepted method calls in this method.
+ if (node.selector.isGetter() || node.selector.isSetter()) return node;
+
HInstruction input = node.inputs[1];
if (input.isString(types)
&& node.selector.name == const SourceString('toString')) {
return node.inputs[1];
}
- // Check if this call does not need to be intercepted.
- HType type = types[input];
- var interceptor = node.inputs[0];
- if (interceptor is !HThis && !type.canBePrimitive()) {
- // If the type can be null, and the intercepted method can be in
- // the object class, keep the interceptor.
- if (type.canBeNull()
- && interceptor.interceptedClasses.contains(compiler.objectClass)) {
- return node;
- }
- // Change the call to a regular invoke dynamic call.
- return new HInvokeDynamicMethod(
- node.selector, node.inputs.getRange(1, node.inputs.length - 1));
- }
// Try constant folding the instruction.
Operation operation = node.specializer.operation(constantSystem);
@@ -249,6 +244,27 @@
node.specializer.tryConvertToBuiltin(node, types);
if (instruction != null) return instruction;
+ // Check if this call does not need to be intercepted.
+ HType type = types[input];
+ var interceptor = node.inputs[0];
+ if (interceptor is !HThis && !type.canBePrimitive()) {
+ // If the type can be null, and the intercepted method can be in
+ // the object class, keep the interceptor.
+ if (type.canBeNull()) {
+ Set<ClassElement> interceptedClasses;
+ if (interceptor is HInterceptor) {
+ interceptedClasses = interceptor.interceptedClasses;
+ } else if (node is HOneShotInterceptor) {
+ var oneShotInterceptor = node;
+ interceptedClasses = oneShotInterceptor.interceptedClasses;
+ }
+ if (interceptedClasses.contains(compiler.objectClass)) return node;
+ }
+ // Change the call to a regular invoke dynamic call.
+ return new HInvokeDynamicMethod(
+ node.selector, node.inputs.getRange(1, node.inputs.length - 1));
+ }
+
Selector selector = node.selector;
SourceString selectorName = selector.name;
Element target;
@@ -384,14 +400,6 @@
BinaryOperation operation = node.operation(constantSystem);
HConstant folded = foldBinary(operation, left, right);
if (folded != null) return folded;
-
- if (!left.canBePrimitive(types)
- && operation.isUserDefinable()
- // The equals operation is being optimized in visitEquals.
- && node is! HEquals) {
- Selector selector = new Selector.binaryOperator(operation.name);
- return fromPrimitiveInstructionToDynamicInvocation(node, selector);
- }
return node;
}
@@ -406,25 +414,7 @@
HInstruction visitRelational(HRelational node) {
if (allUsersAreBoolifies(node)) {
- Interceptors interceptors = backend.builder.interceptors;
- HStatic oldTarget = node.target;
- Element boolifiedInterceptor =
- interceptors.getBoolifiedVersionOf(oldTarget.element);
- if (boolifiedInterceptor != null) {
- HStatic boolifiedTarget = new HStatic(boolifiedInterceptor);
- // We don't remove the [oldTarget] in case it is used by other
- // instructions. If it is unused it will be treated as dead code and
- // discarded.
- oldTarget.block.addAfter(oldTarget, boolifiedTarget);
- // Remove us as user from the [oldTarget].
- oldTarget.removeUser(node);
- // Replace old target with boolified target.
- assert(node.target == node.inputs[0]);
- node.inputs[0] = boolifiedTarget;
- boolifiedTarget.usedBy.add(node);
- node.usesBoolifiedInterceptor = true;
- types[node] = HType.BOOLEAN;
- }
+ // TODO(ngeoffray): Call a boolified selector.
// This node stays the same, but the Boolify node will go away.
}
// Note that we still have to call [super] to make sure that we end up
@@ -470,61 +460,6 @@
return newInstruction == null ? super.visitIdentity(node) : newInstruction;
}
- HInstruction foldBuiltinEqualsCheck(HEquals node) {
- // TODO(floitsch): cache interceptors.
- HInstruction newInstruction = handleIdentityCheck(node);
- if (newInstruction == null) {
- HStatic target = new HStatic(
- backend.builder.interceptors.getTripleEqualsInterceptor());
- node.block.addBefore(node, target);
- return new HIdentity(target, node.left, node.right);
- } else {
- return newInstruction;
- }
- }
-
- HInstruction visitEquals(HEquals node) {
- HInstruction left = node.left;
- HInstruction right = node.right;
-
- if (node.isBuiltin(types)) {
- return foldBuiltinEqualsCheck(node);
- }
-
- if (left.isConstant() && right.isConstant()) {
- return super.visitEquals(node);
- }
-
- HType leftType = types[left];
- if (leftType.isExact()) {
- HBoundedType type = leftType;
- Element element = type.lookupMember(const SourceString('=='));
- if (element != null) {
- // If the left-hand side is guaranteed to be a non-primitive
- // type and and it defines operator==, we emit a call to that
- // operator.
- return super.visitEquals(node);
- } else if (right.isConstantNull()) {
- return graph.addConstantBool(false, constantSystem);
- } else {
- // We can just emit an identity check because the type does
- // not implement operator=.
- return foldBuiltinEqualsCheck(node);
- }
- }
-
- if (right.isConstantNull()) {
- if (leftType.isPrimitive()) {
- return graph.addConstantBool(false, constantSystem);
- }
- }
-
- // All other cases are dealt with by the [visitRelational] and
- // [visitInvokeBinary], which are visited by invoking the [super]'s
- // visit method.
- return super.visitEquals(node);
- }
-
HInstruction visitTypeGuard(HTypeGuard node) {
HInstruction value = node.guarded;
// If the intersection of the types is still the incoming type then
@@ -744,7 +679,15 @@
HInstruction visitInterceptor(HInterceptor node) {
if (node.isConstant()) return node;
- HType type = types[node.inputs[0]];
+ HInstruction constant = tryComputeConstantInterceptor(
+ node.inputs[0], node.interceptedClasses);
+ if (constant == null) return node;
+ return constant;
+ }
+
+ HInstruction tryComputeConstantInterceptor(HInstruction input,
+ Set<ClassElement> intercepted) {
+ HType type = types[input];
ClassElement constantInterceptor;
if (type.isInteger()) {
constantInterceptor = backend.jsIntClass;
@@ -759,7 +702,6 @@
} else if (type.isNull()) {
constantInterceptor = backend.jsIntClass;
} else if (type.isNumber()) {
- Set<ClassElement> intercepted = node.interceptedClasses;
// If the method being intercepted is not defined in [int] or
// [double] we can safely use the number interceptor.
if (!intercepted.contains(compiler.intClass)
@@ -768,7 +710,7 @@
}
}
- if (constantInterceptor == null) return node;
+ if (constantInterceptor == null) return null;
if (constantInterceptor == work.element.getEnclosingClass()) {
return graph.thisInstruction;
}
@@ -777,6 +719,35 @@
constantInterceptor.computeType(compiler), <Constant>[]);
return graph.addConstant(constant);
}
+
+ HInstruction visitOneShotInterceptor(HOneShotInterceptor node) {
+ HInstruction newInstruction = handleInterceptorCall(node);
+ if (newInstruction != node) return newInstruction;
+
+ HInstruction constant = tryComputeConstantInterceptor(
+ node.inputs[1], node.interceptedClasses);
+
+ if (constant == null) return node;
+
+ Selector selector = node.selector;
+ // TODO(ngeoffray): make one shot interceptors know whether
+ // they have side effects.
+ if (selector.isGetter()) {
+ HInstruction res = new HInvokeDynamicGetter(
+ selector, node.element, constant, false);
+ res.inputs.add(node.inputs[1]);
+ return res;
+ } else if (node.selector.isSetter()) {
+ HInstruction res = new HInvokeDynamicSetter(
+ selector, node.element, constant, node.inputs[1], false);
+ res.inputs.add(node.inputs[2]);
+ return res;
+ } else {
+ List<HInstruction> inputs = new List<HInstruction>.from(node.inputs);
+ inputs[0] = constant;
+ return new HInvokeDynamicMethod(selector, inputs, true);
+ }
+ }
}
class SsaCheckInserter extends HBaseVisitor implements OptimizationPhase {
@@ -869,14 +840,12 @@
SsaDeadCodeEliminator(this.types);
bool isDeadCode(HInstruction instruction) {
- return !instruction.hasSideEffects(types)
+ return !instruction.hasSideEffects()
+ && !instruction.canThrow()
&& instruction.usedBy.isEmpty
- // A dynamic getter that has no side effect can still throw
- // a NoSuchMethodError.
- && instruction is !HInvokeDynamicGetter
- && instruction is !HCheck
&& instruction is !HTypeGuard
&& instruction is !HParameterValue
+ && instruction is !HLocalSet
&& !instruction.isControlFlow();
}
@@ -1137,7 +1106,6 @@
int changesFlags = 0;
HInstruction instruction = block.first;
while (instruction != null) {
- instruction.prepareGvn(types);
changesFlags |= instruction.getChangesFlags();
instruction = instruction.next;
}
@@ -1523,3 +1491,52 @@
// TODO(ngeoffray): Also implement it for non-intercepted calls.
}
+
+/**
+ * This phase replaces all interceptors that are used only once with
+ * one-shot interceptors. It saves code size and makes the receiver of
+ * an intercepted call a candidate for being generated at use site.
+ */
+class SsaSimplifyInterceptors extends HBaseVisitor
+ implements OptimizationPhase {
+ final String name = "SsaSimplifyInterceptors";
+ final ConstantSystem constantSystem;
+ HGraph graph;
+
+ SsaSimplifyInterceptors(this.constantSystem);
+
+ void visitGraph(HGraph graph) {
+ this.graph = graph;
+ visitDominatorTree(graph);
+ }
+
+ void visitInterceptor(HInterceptor node) {
+ if (node.usedBy.length != 1) return;
+ // [HBailoutTarget] instructions might have the interceptor as
+ // input. In such situation we let the dead code analyzer find out
+ // the interceptor is not needed.
+ if (node.usedBy[0] is !HInvokeDynamic) return;
+
+ HInvokeDynamic user = node.usedBy[0];
+
+ // If [node] was loop hoisted, we keep the interceptor.
+ if (!user.hasSameLoopHeaderAs(node)) return;
+
+ // Replace the user with a [HOneShotInterceptor].
+ HConstant nullConstant = graph.addConstantNull(constantSystem);
+ List<HInstruction> inputs = new List<HInstruction>.from(user.inputs);
+ inputs[0] = nullConstant;
+ HOneShotInterceptor interceptor = new HOneShotInterceptor(
+ user.selector, inputs, node.interceptedClasses);
+ interceptor.sourcePosition = user.sourcePosition;
+
+ HBasicBlock block = user.block;
+ block.addAfter(user, interceptor);
+ block.rewrite(user, interceptor);
+ block.remove(user);
+
+ // The interceptor will be removed in the dead code elimination
+ // phase. Note that removing it here would not work because of how
+ // the [visitBasicBlock] is implemented.
+ }
+}
diff --git a/sdk/lib/_internal/compiler/implementation/ssa/ssa.dart b/sdk/lib/_internal/compiler/implementation/ssa/ssa.dart
index 1e57acb..f1e0c71 100644
--- a/sdk/lib/_internal/compiler/implementation/ssa/ssa.dart
+++ b/sdk/lib/_internal/compiler/implementation/ssa/ssa.dart
@@ -4,6 +4,8 @@
library ssa;
+import 'dart:collection';
+
import '../closure.dart';
import '../js/js.dart' as js;
import '../dart2jslib.dart' hide Selector;
@@ -30,7 +32,6 @@
part 'codegen.dart';
part 'codegen_helpers.dart';
part 'invoke_dynamic_specializers.dart';
-part 'js_names.dart';
part 'nodes.dart';
part 'optimize.dart';
part 'types.dart';
diff --git a/sdk/lib/_internal/compiler/implementation/ssa/tracer.dart b/sdk/lib/_internal/compiler/implementation/ssa/tracer.dart
index adb9dd8..7a8f6bc 100644
--- a/sdk/lib/_internal/compiler/implementation/ssa/tracer.dart
+++ b/sdk/lib/_internal/compiler/implementation/ssa/tracer.dart
@@ -37,7 +37,7 @@
tag("compilation", () {
printProperty("name", methodName);
printProperty("method", methodName);
- printProperty("date", new Date.now().millisecondsSinceEpoch);
+ printProperty("date", new DateTime.now().millisecondsSinceEpoch);
});
}
@@ -83,7 +83,7 @@
instruction = instruction.next) {
int bci = 0;
int uses = instruction.usedBy.length;
- String changes = instruction.hasSideEffects(types) ? '!' : ' ';
+ String changes = instruction.hasSideEffects() ? '!' : ' ';
String depends = instruction.dependsOnSomething() ? '?' : '';
addIndent();
String temporaryId = stringifier.temporaryId(instruction);
@@ -225,24 +225,24 @@
return "Boolify: ${temporaryId(node.inputs[0])}";
}
- String handleBinaryArithmetic(HBinaryArithmetic node, String op) {
+ String handleInvokeBinary(HInvokeBinary node, String op) {
String left = temporaryId(node.left);
String right= temporaryId(node.right);
return '$left $op $right';
}
- String visitAdd(HAdd node) => handleBinaryArithmetic(node, '+');
+ String visitAdd(HAdd node) => handleInvokeBinary(node, '+');
- String visitBitAnd(HBitAnd node) => handleBinaryArithmetic(node, '&');
+ String visitBitAnd(HBitAnd node) => handleInvokeBinary(node, '&');
String visitBitNot(HBitNot node) {
String operand = temporaryId(node.operand);
return "~$operand";
}
- String visitBitOr(HBitOr node) => handleBinaryArithmetic(node, '|');
+ String visitBitOr(HBitOr node) => handleInvokeBinary(node, '|');
- String visitBitXor(HBitXor node) => handleBinaryArithmetic(node, '^');
+ String visitBitXor(HBitXor node) => handleInvokeBinary(node, '^');
String visitBoundsCheck(HBoundsCheck node) {
String lengthId = temporaryId(node.length);
@@ -268,35 +268,42 @@
return "Continue: (B${target.id})";
}
- String visitDivide(HDivide node) => handleBinaryArithmetic(node, '/');
-
- String visitEquals(HEquals node) => visitInvokeStatic(node);
+ String visitDivide(HDivide node) => handleInvokeBinary(node, '/');
String visitExit(HExit node) => "exit";
String visitFieldGet(HFieldGet node) {
String fieldName = node.element.name.slowToString();
- return 'get ${temporaryId(node.receiver)}.$fieldName';
+ return 'field get ${temporaryId(node.receiver)}.$fieldName';
}
String visitFieldSet(HFieldSet node) {
String valueId = temporaryId(node.value);
String fieldName = node.element.name.slowToString();
- return 'set ${temporaryId(node.receiver)}.$fieldName to $valueId';
+ return 'field set ${temporaryId(node.receiver)}.$fieldName to $valueId';
}
- String visitLocalGet(HLocalGet node) => visitFieldGet(node);
- String visitLocalSet(HLocalSet node) => visitFieldSet(node);
+ String visitLocalGet(HLocalGet node) {
+ String localName = node.element.name.slowToString();
+ return 'local get ${temporaryId(node.local)}.$localName';
+ }
+
+ String visitLocalSet(HLocalSet node) {
+ String valueId = temporaryId(node.value);
+ String localName = node.element.name.slowToString();
+ return 'local set ${temporaryId(node.local)}.$localName to $valueId';
+ }
String visitGoto(HGoto node) {
HBasicBlock target = currentBlock.successors[0];
return "Goto: (B${target.id})";
}
- String visitGreater(HGreater node) => visitInvokeStatic(node);
- String visitGreaterEqual(HGreaterEqual node) => visitInvokeStatic(node);
-
- String visitIdentity(HIdentity node) => visitInvokeStatic(node);
+ String visitGreater(HGreater node) => handleInvokeBinary(node, '>');
+ String visitGreaterEqual(HGreaterEqual node) {
+ handleInvokeBinary(node, '>=');
+ }
+ String visitIdentity(HIdentity node) => handleInvokeBinary(node, '===');
String visitIf(HIf node) {
HBasicBlock thenBlock = currentBlock.successors[0];
@@ -384,8 +391,8 @@
node.inputs);
}
- String visitLess(HLess node) => visitInvokeStatic(node);
- String visitLessEqual(HLessEqual node) => visitInvokeStatic(node);
+ String visitLess(HLess node) => handleInvokeBinary(node, '<');
+ String visitLessEqual(HLessEqual node) => handleInvokeBinary(node, '<=');
String visitLiteralList(HLiteralList node) {
StringBuffer elementsString = new StringBuffer();
@@ -403,7 +410,7 @@
return "While ($conditionId): (B${bodyBlock.id}) then (B${exitBlock.id})";
}
- String visitMultiply(HMultiply node) => handleBinaryArithmetic(node, '*');
+ String visitMultiply(HMultiply node) => handleInvokeBinary(node, '*');
String visitNegate(HNegate node) {
String operand = temporaryId(node.operand);
@@ -433,7 +440,7 @@
String visitReturn(HReturn node) => "Return ${temporaryId(node.inputs[0])}";
- String visitShiftLeft(HShiftLeft node) => handleBinaryArithmetic(node, '<<');
+ String visitShiftLeft(HShiftLeft node) => handleInvokeBinary(node, '<<');
String visitStatic(HStatic node)
=> "Static ${node.element.name.slowToString()}";
@@ -441,6 +448,9 @@
String visitLazyStatic(HLazyStatic node)
=> "LazyStatic ${node.element.name.slowToString()}";
+ String visitOneShotInterceptor(HOneShotInterceptor node)
+ => visitInvokeDynamic(node, "one shot interceptor");
+
String visitStaticStore(HStaticStore node) {
String lhs = node.element.name.slowToString();
return "Static $lhs = ${temporaryId(node.inputs[0])}";
@@ -452,7 +462,7 @@
return "StringConcat: $leftId + $rightId";
}
- String visitSubtract(HSubtract node) => handleBinaryArithmetic(node, '-');
+ String visitSubtract(HSubtract node) => handleInvokeBinary(node, '-');
String visitSwitch(HSwitch node) {
StringBuffer buf = new StringBuffer();
diff --git a/sdk/lib/_internal/compiler/implementation/ssa/value_range_analyzer.dart b/sdk/lib/_internal/compiler/implementation/ssa/value_range_analyzer.dart
index bbbcea5..c28d5c4 100644
--- a/sdk/lib/_internal/compiler/implementation/ssa/value_range_analyzer.dart
+++ b/sdk/lib/_internal/compiler/implementation/ssa/value_range_analyzer.dart
@@ -428,16 +428,17 @@
final Value upper;
final ValueRangeInfo info;
Range(this.lower, this.upper, this.info);
- Range.unbound(this.info)
- : lower = const MinIntValue(),
- upper = const MaxIntValue();
+
+ Range.unbound(info) : this(const MinIntValue(), const MaxIntValue(), info);
+
/**
* Checks if the given values are unknown, and creates a
* range that does not have any unknown values.
*/
- Range.normalize(Value low, Value up, this.info)
- : lower = low == const UnknownValue() ? const MinIntValue() : low,
- upper = up == const UnknownValue() ? const MaxIntValue() : up;
+ Range.normalize(Value low, Value up, info) : this(
+ low == const UnknownValue() ? const MinIntValue() : low,
+ up == const UnknownValue() ? const MaxIntValue() : up,
+ info);
Range union(Range other) {
return info.newNormalizedRange(
@@ -684,10 +685,10 @@
}
if (!belowLength) {
- // Update the range of the index if using the length bounds
+ // Update the range of the index if using the maximum index
// narrows it.
Range newIndexRange = indexRange.intersection(
- info.newRange(lengthRange.lower, maxIndex));
+ info.newRange(info.intZero, maxIndex));
if (indexRange == newIndexRange) return indexRange;
HInstruction instruction = createRangeConversion(next, check.index);
ranges[instruction] = newIndexRange;
@@ -706,7 +707,7 @@
Range rightRange = ranges[relational.right];
Range leftRange = ranges[relational.left];
- if (relational is HEquals || relational is HIdentity) {
+ if (relational is HIdentity) {
handleEqualityCheck(relational);
} else if (operation.apply(leftRange, rightRange)) {
relational.block.rewrite(
@@ -829,7 +830,6 @@
var condition = branch.condition;
// TODO(ngeoffray): Handle complex conditions.
if (condition is !HRelational) return info.newUnboundRange();
- if (condition is HEquals) return info.newUnboundRange();
if (condition is HIdentity) return info.newUnboundRange();
HInstruction right = condition.right;
HInstruction left = condition.left;
diff --git a/sdk/lib/_internal/compiler/implementation/ssa/variable_allocator.dart b/sdk/lib/_internal/compiler/implementation/ssa/variable_allocator.dart
index b7ab115..1f545d3 100644
--- a/sdk/lib/_internal/compiler/implementation/ssa/variable_allocator.dart
+++ b/sdk/lib/_internal/compiler/implementation/ssa/variable_allocator.dart
@@ -472,9 +472,10 @@
String allocateWithHint(String originalName) {
int i = 0;
- String name = JsNames.getValid(originalName);
+ JavaScriptBackend backend = compiler.backend;
+ String name = backend.namer.safeName(originalName);
while (usedNames.contains(name)) {
- name = JsNames.getValid('$originalName${i++}');
+ name = backend.namer.safeName('$originalName${i++}');
}
return name;
}
diff --git a/sdk/lib/_internal/compiler/implementation/string_validator.dart b/sdk/lib/_internal/compiler/implementation/string_validator.dart
index 076a0c2..ef294bd 100644
--- a/sdk/lib/_internal/compiler/implementation/string_validator.dart
+++ b/sdk/lib/_internal/compiler/implementation/string_validator.dart
@@ -6,6 +6,8 @@
library stringvalidator;
+import "dart:collection";
+
import "dart2jslib.dart";
import "tree/tree.dart";
import "elements/elements.dart";
diff --git a/sdk/lib/_internal/compiler/implementation/tree/nodes.dart b/sdk/lib/_internal/compiler/implementation/tree/nodes.dart
index 2d49054..9875b25 100644
--- a/sdk/lib/_internal/compiler/implementation/tree/nodes.dart
+++ b/sdk/lib/_internal/compiler/implementation/tree/nodes.dart
@@ -51,7 +51,9 @@
R visitMixinApplication(MixinApplication node) => visitNode(node);
R visitModifiers(Modifiers node) => visitNode(node);
R visitNamedArgument(NamedArgument node) => visitExpression(node);
- R visitNamedMixinApplication(NamedMixinApplication node) => visitNode(node);
+ R visitNamedMixinApplication(NamedMixinApplication node) {
+ return visitMixinApplication(node);
+ }
R visitNewExpression(NewExpression node) => visitExpression(node);
R visitNodeList(NodeList node) => visitNode(node);
R visitOperator(Operator node) => visitIdentifier(node);
@@ -170,6 +172,7 @@
MixinApplication asMixinApplication() => null;
Modifiers asModifiers() => null;
NamedArgument asNamedArgument() => null;
+ NamedMixinApplication asNamedMixinApplication() => null;
NodeList asNodeList() => null;
Operator asOperator() => null;
ParenthesizedExpression asParenthesizedExpression() => null;
@@ -239,18 +242,16 @@
}
class MixinApplication extends Node {
- final Modifiers modifiers;
final TypeAnnotation superclass;
final NodeList mixins;
- MixinApplication(this.modifiers, this.superclass, this.mixins);
+ MixinApplication(this.superclass, this.mixins);
MixinApplication asMixinApplication() => this;
accept(Visitor visitor) => visitor.visitMixinApplication(this);
visitChildren(Visitor visitor) {
- if (modifiers != null) modifiers.accept(visitor);
if (superclass != null) superclass.accept(visitor);
if (mixins != null) mixins.accept(visitor);
}
@@ -261,17 +262,25 @@
// TODO(kasperl): Let this share some structure with the typedef for function
// type aliases?
-class NamedMixinApplication extends Node {
+class NamedMixinApplication extends Node implements MixinApplication {
final Identifier name;
final NodeList typeParameters;
+
+ final Modifiers modifiers;
final MixinApplication mixinApplication;
+ final NodeList interfaces;
final Token typedefKeyword;
final Token endToken;
- NamedMixinApplication(this.name, this.typeParameters, this.mixinApplication,
+ NamedMixinApplication(this.name, this.typeParameters,
+ this.modifiers, this.mixinApplication, this.interfaces,
this.typedefKeyword, this.endToken);
+ TypeAnnotation get superclass => mixinApplication.superclass;
+ NodeList get mixins => mixinApplication.mixins;
+
+ MixinApplication asMixinApplication() => this;
NamedMixinApplication asNamedMixinApplication() => this;
accept(Visitor visitor) => visitor.visitNamedMixinApplication(this);
@@ -279,6 +288,8 @@
visitChildren(Visitor visitor) {
name.accept(visitor);
if (typeParameters != null) typeParameters.accept(visitor);
+ if (modifiers != null) modifiers.accept(visitor);
+ if (interfaces != null) interfaces.accept(visitor);
mixinApplication.accept(visitor);
}
diff --git a/sdk/lib/_internal/compiler/implementation/tree/tree.dart b/sdk/lib/_internal/compiler/implementation/tree/tree.dart
index 3222838..316b153 100644
--- a/sdk/lib/_internal/compiler/implementation/tree/tree.dart
+++ b/sdk/lib/_internal/compiler/implementation/tree/tree.dart
@@ -5,6 +5,7 @@
library tree;
import 'dart:math';
+import 'dart:collection';
import '../scanner/scannerlib.dart';
import '../util/util.dart';
diff --git a/sdk/lib/_internal/compiler/implementation/tree/unparser.dart b/sdk/lib/_internal/compiler/implementation/tree/unparser.dart
index 4a0e6e7..eee95d4 100644
--- a/sdk/lib/_internal/compiler/implementation/tree/unparser.dart
+++ b/sdk/lib/_internal/compiler/implementation/tree/unparser.dart
@@ -82,10 +82,6 @@
}
visitMixinApplication(MixinApplication node) {
- if (!node.modifiers.nodes.isEmpty) {
- visit(node.modifiers);
- sb.add(' ');
- }
visit(node.superclass);
sb.add(' with ');
visit(node.mixins);
@@ -98,7 +94,15 @@
visit(node.typeParameters);
}
sb.add(' = ');
+ if (!node.modifiers.nodes.isEmpty) {
+ visit(node.modifiers);
+ sb.add(' ');
+ }
visit(node.mixinApplication);
+ if (node.interfaces != null) {
+ sb.add(' implements ');
+ visit(node.interfaces);
+ }
sb.add(';');
}
diff --git a/sdk/lib/_internal/compiler/implementation/typechecker.dart b/sdk/lib/_internal/compiler/implementation/typechecker.dart
index 4c49b74..c826241 100644
--- a/sdk/lib/_internal/compiler/implementation/typechecker.dart
+++ b/sdk/lib/_internal/compiler/implementation/typechecker.dart
@@ -240,48 +240,6 @@
String toString() => name.slowToString();
}
-/**
- * Helper method for performing substitution of a linked list of types.
- *
- * If no types are changed by the substitution, the [types] is returned instead
- * of a newly created linked list.
- */
-Link<DartType> substTypes(Link<DartType> types,
- Link<DartType> arguments, Link<DartType> parameters) {
- bool changed = false;
- var builder = new LinkBuilder<DartType>();
- Link<DartType> typeLink = types;
- while (!typeLink.isEmpty) {
- var argument = typeLink.head.subst(arguments, parameters);
- if (!changed && !identical(argument, typeLink.head)) {
- changed = true;
- }
- builder.addLast(argument);
- typeLink = typeLink.tail;
- }
- if (changed) {
- // Create a new link only if necessary.
- return builder.toLink();
- }
- return types;
-}
-
-/**
- * Combine error messages in a malformed type to a single message string.
- */
-String fetchReasonsFromMalformedType(DartType type) {
- // TODO(johnniwinther): Figure out how to produce good error message in face
- // of multiple errors, and how to ensure non-localized error messages.
- var reasons = new List<String>();
- type.forEachMalformedType((MalformedType malformedType) {
- ErroneousElement error = malformedType.element;
- Message message = error.messageKind.message(error.messageArguments);
- reasons.add(message.toString());
- return true;
- });
- return Strings.join(reasons, ', ');
-}
-
class MalformedType extends DartType {
final ErroneousElement element;
@@ -379,7 +337,7 @@
return this;
}
Link<DartType> newTypeArguments =
- substTypes(typeArguments, arguments, parameters);
+ Types.substTypes(typeArguments, arguments, parameters);
if (!identical(typeArguments, newTypeArguments)) {
// Create a new type only if necessary.
return new InterfaceType(element, newTypeArguments);
@@ -396,6 +354,24 @@
return true;
}
+ /**
+ * Returns the type as an instance of class [other], if possible, null
+ * otherwise.
+ */
+ DartType asInstanceOf(ClassElement other) {
+ if (element == other) return this;
+ for (InterfaceType supertype in element.allSupertypes) {
+ ClassElement superclass = supertype.element;
+ if (superclass == other) {
+ Link<DartType> arguments = Types.substTypes(supertype.typeArguments,
+ typeArguments,
+ element.typeVariables);
+ return new InterfaceType(superclass, arguments);
+ }
+ }
+ return null;
+ }
+
DartType unalias(Compiler compiler) => this;
String toString() {
@@ -456,7 +432,8 @@
}
var newReturnType = returnType.subst(arguments, parameters);
bool changed = !identical(newReturnType, returnType);
- var newParameterTypes = substTypes(parameterTypes, arguments, parameters);
+ var newParameterTypes = Types.substTypes(parameterTypes, arguments,
+ parameters);
if (!changed && !identical(parameterTypes, newParameterTypes)) {
changed = true;
}
@@ -546,8 +523,8 @@
// Return fast on empty substitutions.
return this;
}
- Link<DartType> newTypeArguments =
- substTypes(typeArguments, arguments, parameters);
+ Link<DartType> newTypeArguments = Types.substTypes(typeArguments, arguments,
+ parameters);
if (!identical(typeArguments, newTypeArguments)) {
// Create a new type only if necessary.
return new TypedefType(element, newTypeArguments);
@@ -674,6 +651,50 @@
bool isAssignable(DartType r, DartType s) {
return isSubtype(r, s) || isSubtype(s, r);
}
+
+
+ /**
+ * Helper method for performing substitution of a linked list of types.
+ *
+ * If no types are changed by the substitution, the [types] is returned
+ * instead of a newly created linked list.
+ */
+ static Link<DartType> substTypes(Link<DartType> types,
+ Link<DartType> arguments,
+ Link<DartType> parameters) {
+ bool changed = false;
+ var builder = new LinkBuilder<DartType>();
+ Link<DartType> typeLink = types;
+ while (!typeLink.isEmpty) {
+ var argument = typeLink.head.subst(arguments, parameters);
+ if (!changed && !identical(argument, typeLink.head)) {
+ changed = true;
+ }
+ builder.addLast(argument);
+ typeLink = typeLink.tail;
+ }
+ if (changed) {
+ // Create a new link only if necessary.
+ return builder.toLink();
+ }
+ return types;
+ }
+
+ /**
+ * Combine error messages in a malformed type to a single message string.
+ */
+ static String fetchReasonsFromMalformedType(DartType type) {
+ // TODO(johnniwinther): Figure out how to produce good error message in face
+ // of multiple errors, and how to ensure non-localized error messages.
+ var reasons = new List<String>();
+ type.forEachMalformedType((MalformedType malformedType) {
+ ErroneousElement error = malformedType.element;
+ Message message = error.messageKind.message(error.messageArguments);
+ reasons.add(message.toString());
+ return true;
+ });
+ return Strings.join(reasons, ', ');
+ }
}
class CancelTypeCheckException {
diff --git a/sdk/lib/_internal/compiler/implementation/types/concrete_types_inferrer.dart b/sdk/lib/_internal/compiler/implementation/types/concrete_types_inferrer.dart
index fae1650..ee7845c 100644
--- a/sdk/lib/_internal/compiler/implementation/types/concrete_types_inferrer.dart
+++ b/sdk/lib/_internal/compiler/implementation/types/concrete_types_inferrer.dart
@@ -277,15 +277,21 @@
* [BaseType] Constants.
*/
class BaseTypes {
- final BaseType intBaseType;
- final BaseType doubleBaseType;
- final BaseType numBaseType;
- final BaseType boolBaseType;
- final BaseType stringBaseType;
- final BaseType listBaseType;
- final BaseType mapBaseType;
- final BaseType objectBaseType;
- final BaseType typeBaseType;
+ final ClassBaseType intBaseType;
+ final ClassBaseType doubleBaseType;
+ final ClassBaseType numBaseType;
+ final ClassBaseType boolBaseType;
+ final ClassBaseType stringBaseType;
+ final ClassBaseType listBaseType;
+ final ClassBaseType mapBaseType;
+ final ClassBaseType objectBaseType;
+ final ClassBaseType typeBaseType;
+
+ static _getNativeListClass(Compiler compiler) {
+ // TODO(polux): switch to other implementations on other backends
+ JavaScriptBackend backend = compiler.backend;
+ return backend.jsArrayClass;
+ }
BaseTypes(Compiler compiler) :
intBaseType = new ClassBaseType(compiler.intClass),
@@ -293,7 +299,8 @@
numBaseType = new ClassBaseType(compiler.numClass),
boolBaseType = new ClassBaseType(compiler.boolClass),
stringBaseType = new ClassBaseType(compiler.stringClass),
- listBaseType = new ClassBaseType(compiler.listClass),
+ // in the Javascript backend, lists are implemented by JsArray
+ listBaseType = new ClassBaseType(_getNativeListClass(compiler)),
mapBaseType = new ClassBaseType(compiler.mapClass),
objectBaseType = new ClassBaseType(compiler.objectClass),
typeBaseType = new ClassBaseType(compiler.typeClass);
@@ -392,7 +399,7 @@
final Compiler compiler;
/**
- * When true, the string litteral [:"__dynamic_for_test":] is inferred to
+ * When true, the string literal [:"__dynamic_for_test":] is inferred to
* have the unknown type.
*/
// TODO(polux): get rid of this hack once we have a natural way of inferring
@@ -400,13 +407,30 @@
bool testMode = false;
/**
- * Constants representing builtin base types. Initialized in [analyzeMain]
+ * Constants representing builtin base types. Initialized in [initialize]
* and not in the constructor because the compiler elements are not yet
* populated.
*/
BaseTypes baseTypes;
/**
+ * Constant representing [:ConcreteList#[]:] where [:ConcreteList:] is the
+ * concrete implmentation of lists for the selected backend.
+ */
+ FunctionElement listIndex;
+
+ /**
+ * Constant representing [:ConcreteList#[]=:] where [:ConcreteList:] is the
+ * concrete implmentation of lists for the selected backend.
+ */
+ FunctionElement listIndexSet;
+
+ /**
+ * Constant representing [:List():].
+ */
+ FunctionElement listConstructor;
+
+ /**
* A cache from (function x argument base types) to concrete types,
* used to memoize [analyzeMonoSend]. Another way of seeing [cache] is as a
* map from [FunctionElement]s to "templates" in the sense of "The Cartesian
@@ -430,6 +454,9 @@
/** [: readers[field] :] is the list of [: field :]'s possible readers. */
final Map<Element, Set<FunctionElement>> readers;
+ /** The inferred type of elements stored in Lists. */
+ ConcreteType listElementType;
+
/**
* A map from parameters to their inferred concrete types. It plays no role
* in the analysis, it is write only.
@@ -445,7 +472,8 @@
inferredParameterTypes = new Map<VariableElement, ConcreteType>(),
workQueue = new Queue<InferenceWorkItem>(),
callers = new Map<FunctionElement, Set<FunctionElement>>(),
- readers = new Map<Element, Set<FunctionElement>>() {
+ readers = new Map<Element, Set<FunctionElement>>(),
+ listElementType = new ConcreteType.empty() {
unknownConcreteType = new ConcreteType.unknown();
emptyConcreteType = new ConcreteType.empty();
}
@@ -533,7 +561,7 @@
* Returns all the members with name [methodName].
*/
List<Element> getMembersByName(SourceString methodName) {
- // TODO(polux): make this faster!
+ // TODO(polux): memoize?
var result = new List<Element>();
for (ClassElement cls in compiler.enqueuer.resolution.seenClasses) {
Element elem = cls.lookupLocalMember(methodName);
@@ -588,6 +616,15 @@
}
}
+ /// Augment the inferred type of elements stored in Lists.
+ void augmentListElementType(ConcreteType type) {
+ ConcreteType newType = union(listElementType, type);
+ if (newType != listElementType) {
+ invalidateCallers(listIndex);
+ listElementType = newType;
+ }
+ }
+
/**
* Sets the concrete type associated to [parameter] to the union of the
* inferred concrete type so far and [type].
@@ -626,6 +663,24 @@
}
}
+ /**
+ * Add callers of [function] to the workqueue.
+ */
+ void invalidateCallers(FunctionElement function) {
+ Set<FunctionElement> methodCallers = callers[function];
+ if (methodCallers == null) return;
+ for (FunctionElement caller in methodCallers) {
+ Map<ConcreteTypesEnvironment, ConcreteType> callerInstances =
+ cache[caller];
+ if (callerInstances != null) {
+ callerInstances.forEach((environment, _) {
+ workQueue.addLast(
+ new InferenceWorkItem(caller, environment));
+ });
+ }
+ }
+ }
+
// -- query --
/**
@@ -759,6 +814,8 @@
ConcreteType getMonomorphicSendReturnType(
FunctionElement function,
ConcreteTypesEnvironment environment) {
+ ConcreteType specialType = getSpecialCaseReturnType(function, environment);
+ if (specialType != null) return specialType;
Map<ConcreteTypesEnvironment, ConcreteType> template = cache[function];
if (template == null) {
@@ -776,6 +833,35 @@
}
}
+ /**
+ * Handles external methods that cannot be cached because they depend on some
+ * other state of [ConcreteTypesInferrer] like [:List#[]:] and
+ * [:List#[]=:]. Returns null if [function] and [environment] don't form a
+ * special case
+ */
+ ConcreteType getSpecialCaseReturnType(FunctionElement function,
+ ConcreteTypesEnvironment environment) {
+ if (function == listIndex) {
+ ConcreteType indexType = environment.lookupType(
+ listIndex.functionSignature.requiredParameters.head);
+ if (!indexType.baseTypes.contains(baseTypes.intBaseType)) {
+ return new ConcreteType.empty();
+ }
+ return listElementType;
+ } else if (function == listIndexSet) {
+ Link<Element> parameters =
+ listIndexSet.functionSignature.requiredParameters;
+ ConcreteType indexType = environment.lookupType(parameters.head);
+ if (!indexType.baseTypes.contains(baseTypes.intBaseType)) {
+ return new ConcreteType.empty();
+ }
+ ConcreteType elementType = environment.lookupType(parameters.tail.head);
+ augmentListElementType(elementType);
+ return new ConcreteType.empty();
+ }
+ return null;
+ }
+
ConcreteType analyze(FunctionElement element,
ConcreteTypesEnvironment environment) {
return element.isGenerativeConstructor()
@@ -785,17 +871,20 @@
ConcreteType analyzeMethod(FunctionElement element,
ConcreteTypesEnvironment environment) {
- FunctionExpression tree = element.parseNode(compiler);
- // This should never happen since we only deal with concrete types, except
- // for external methods whose typing rules have not been hardcoded yet.
- if (!tree.hasBody()) {
- return unknownConcreteType;
- }
TreeElements elements =
compiler.enqueuer.resolution.resolvedElements[element];
- Visitor visitor =
- new TypeInferrerVisitor(elements, element, this, environment);
- return tree.accept(visitor);
+ ConcreteType specialResult = handleSpecialMethod(element, environment);
+ if (specialResult != null) return specialResult;
+ FunctionExpression tree = element.parseNode(compiler);
+ if (tree.hasBody()) {
+ Visitor visitor =
+ new TypeInferrerVisitor(elements, element, this, environment);
+ return tree.accept(visitor);
+ } else {
+ // TODO(polux): implement visitForeingCall and always use the
+ // implementation element instead of this hack
+ return new ConcreteType.unknown();
+ }
}
ConcreteType analyzeConstructor(FunctionElement element,
@@ -846,8 +935,43 @@
return singletonConcreteType(new ClassBaseType(enclosingClass));
}
- void analyzeMain(Element element) {
+ /**
+ * Hook that performs side effects on some special method calls (like
+ * [:List(length):]) and possibly returns a concrete type
+ * (like [:{JsArray}:]).
+ */
+ ConcreteType handleSpecialMethod(FunctionElement element,
+ ConcreteTypesEnvironment environment) {
+ // When List([length]) is called with some length, we must augment
+ // listElementType with {null}.
+ if (element == listConstructor) {
+ Link<Element> parameters =
+ listConstructor.functionSignature.optionalParameters;
+ ConcreteType lengthType = environment.lookupType(parameters.head);
+ if (lengthType.baseTypes.contains(baseTypes.intBaseType)) {
+ augmentListElementType(singletonConcreteType(new NullBaseType()));
+ }
+ return singletonConcreteType(baseTypes.listBaseType);
+ }
+ }
+
+ /* Initialization code that cannot be run in the constructor because it
+ * requires the compiler's elements to be populated.
+ */
+ void initialize() {
baseTypes = new BaseTypes(compiler);
+ ClassElement jsArrayClass = baseTypes.listBaseType.element;
+ listIndex = jsArrayClass.lookupMember(const SourceString('[]'));
+ listIndexSet =
+ jsArrayClass.lookupMember(const SourceString('[]='));
+ listConstructor =
+ compiler.listClass.lookupConstructor(
+ new Selector.callConstructor(const SourceString(''),
+ compiler.listClass.getLibrary()));
+ }
+
+ void analyzeMain(Element element) {
+ initialize();
cache[element] = new Map<ConcreteTypesEnvironment, ConcreteType>();
populateCacheWithBuiltinRules();
try {
@@ -859,21 +983,11 @@
var template = cache[item.method];
if (template[item.environment] == concreteType) continue;
template[item.environment] = concreteType;
- final methodCallers = callers[item.method];
- if (methodCallers == null) continue;
- for (final caller in methodCallers) {
- final callerInstances = cache[caller];
- if (callerInstances != null) {
- callerInstances.forEach((environment, _) {
- workQueue.addLast(
- new InferenceWorkItem(caller, environment));
- });
- }
- }
+ invalidateCallers(item.method);
}
} on CancelTypeInferenceException catch(e) {
if (LOG_FAILURES) {
- compiler.log("'${e.node}': ${e.reason}");
+ compiler.log("'${e.node.toDebugString()}': ${e.reason}");
}
}
}
@@ -1133,7 +1247,6 @@
else return Elements.mapToUserOperatorOrNull(op);
}
- // TODO(polux): handle sendset as expression
ConcreteType visitSendSet(SendSet node) {
// Operator []= has a different behaviour than other send sets: it is
// actually a send whose return type is that of its second argument.
@@ -1222,7 +1335,14 @@
}
ConcreteType visitLiteralList(LiteralList node) {
- visitNodeList(node.elements);
+ ConcreteType elementsType = new ConcreteType.empty();
+ // We compute the union of the types of the list literal's elements.
+ for (Link<Node> link = node.elements.nodes;
+ !link.isEmpty;
+ link = link.tail) {
+ elementsType = inferrer.union(elementsType, analyze(link.head));
+ }
+ inferrer.augmentListElementType(elementsType);
return inferrer.singletonConcreteType(inferrer.baseTypes.listBaseType);
}
diff --git a/sdk/lib/_internal/compiler/implementation/types/types.dart b/sdk/lib/_internal/compiler/implementation/types/types.dart
index 9292025..a2d7edfc 100644
--- a/sdk/lib/_internal/compiler/implementation/types/types.dart
+++ b/sdk/lib/_internal/compiler/implementation/types/types.dart
@@ -4,7 +4,10 @@
library types;
+import 'dart:collection' show Queue;
+
import '../dart2jslib.dart' hide Selector;
+import '../js_backend/js_backend.dart' show JavaScriptBackend;
import '../tree/tree.dart';
import '../elements/elements.dart';
import '../util/util.dart';
diff --git a/sdk/lib/_internal/compiler/implementation/warnings.dart b/sdk/lib/_internal/compiler/implementation/warnings.dart
index 78ed827..3d9c1da 100644
--- a/sdk/lib/_internal/compiler/implementation/warnings.dart
+++ b/sdk/lib/_internal/compiler/implementation/warnings.dart
@@ -303,6 +303,24 @@
static const ILLEGAL_CONSTRUCTOR_MODIFIERS = const MessageKind(
"Error: illegal constructor modifiers: #{1}.");
+ static const ILLEGAL_MIXIN_APPLICATION_MODIFIERS = const MessageKind(
+ "Error: illegal mixin application modifiers: #{1}.");
+
+ static const ILLEGAL_MIXIN_SUPERCLASS = const MessageKind(
+ "Error: class used as mixin must have Object as superclass.");
+
+ static const ILLEGAL_MIXIN_CONSTRUCTOR = const MessageKind(
+ "Error: class used as mixin cannot have non-factory constructor.");
+
+ static const ILLEGAL_MIXIN_CYCLE = const MessageKind(
+ "Error: class used as mixin introduces mixin cycle: #{1} <-> #{2}.");
+
+ static const ILLEGAL_MIXIN_WITH_SUPER = const MessageKind(
+ "Error: cannot use class #{1} as a mixin because it uses super.");
+
+ static const ILLEGAL_MIXIN_SUPER_USE = const MessageKind(
+ "Use of super in class used as mixin.");
+
static const PARAMETER_NAME_EXPECTED = const MessageKind(
"Error: parameter name expected.");
diff --git a/sdk/lib/_internal/compiler/implementation/world.dart b/sdk/lib/_internal/compiler/implementation/world.dart
index 9cdaea8..a40050e 100644
--- a/sdk/lib/_internal/compiler/implementation/world.dart
+++ b/sdk/lib/_internal/compiler/implementation/world.dart
@@ -7,6 +7,7 @@
class World {
final Compiler compiler;
final Map<ClassElement, Set<ClassElement>> subtypes;
+ final Map<ClassElement, Set<MixinApplicationElement>> mixinUses;
final Map<ClassElement, Set<ClassElement>> typesImplementedBySubclasses;
final Set<ClassElement> classesNeedingRti;
final Map<ClassElement, Set<ClassElement>> rtiDependencies;
@@ -15,6 +16,7 @@
World(Compiler compiler)
: subtypes = new Map<ClassElement, Set<ClassElement>>(),
+ mixinUses = new Map<ClassElement, Set<MixinApplicationElement>>(),
typesImplementedBySubclasses =
new Map<ClassElement, Set<ClassElement>>(),
userDefinedGetters = new FunctionSet(compiler),
@@ -93,6 +95,14 @@
return classesNeedingRti.contains(cls) || compiler.enabledRuntimeType;
}
+ void registerMixinUse(MixinApplicationElement mixinApplication,
+ ClassElement mixin) {
+ Set<MixinApplicationElement> users =
+ mixinUses.putIfAbsent(mixin, () =>
+ new Set<MixinApplicationElement>());
+ users.add(mixinApplication);
+ }
+
void registerRtiDependency(Element element, Element dependency) {
// We're not dealing with typedef for now.
if (!element.isClass() || !dependency.isClass()) return;
@@ -133,8 +143,6 @@
return subclasses == null || subclasses.isEmpty;
}
-
-
void registerUsedElement(Element element) {
if (element.isMember()) {
if (element.isGetter()) {
diff --git a/sdk/lib/_internal/compiler/samples/leap/leap_leg.dart b/sdk/lib/_internal/compiler/samples/leap/leap_leg.dart
index c04f674..3969f90 100644
--- a/sdk/lib/_internal/compiler/samples/leap/leap_leg.dart
+++ b/sdk/lib/_internal/compiler/samples/leap/leap_leg.dart
@@ -222,7 +222,7 @@
String get legDirectory => libDir;
LibraryElement scanBuiltinLibrary(String path) {
- Uri base = new Uri.fromString(html.window.location.toString());
+ Uri base = Uri.parse(html.window.location.toString());
Uri libraryRoot = base.resolve(libDir);
Uri resolved = libraryRoot.resolve(DART2JS_LIBRARY_MAP[path]);
LibraryElement library = scanner.loadLibrary(resolved, null);
diff --git a/sdk/lib/_internal/dartdoc/lib/dartdoc.dart b/sdk/lib/_internal/dartdoc/lib/dartdoc.dart
index 9d906b7..6576701 100644
--- a/sdk/lib/_internal/dartdoc/lib/dartdoc.dart
+++ b/sdk/lib/_internal/dartdoc/lib/dartdoc.dart
@@ -31,10 +31,8 @@
import 'src/json_serializer.dart' as json_serializer;
import '../../compiler/implementation/scanner/scannerlib.dart' as dart2js;
import '../../libraries.dart';
+import 'src/dartdoc/nav.dart';
-
-// TODO(rnystrom): Use "package:" URL (#4968).
-part 'src/dartdoc/nav.dart';
part 'src/dartdoc/utils.dart';
/**
@@ -134,7 +132,8 @@
var jsPath = outputDir.append('client-$clientScript.js');
var completer = new Completer<bool>();
- var compilation = new Compilation(dartPath, libPath);
+ var compilation = new Compilation(
+ dartPath, libPath, null, const <String>['--categories=Client,Server']);
Future<String> result = compilation.compileToJavaScript();
result.then((jsCode) {
writeString(new File.fromPath(jsPath), jsCode);
@@ -190,9 +189,6 @@
/** Set this to add footer text to each generated page. */
String footerText = null;
- /** Set this to add content before the footer */
- String preFooterText = '';
-
/** Set this to omit generation timestamp from output */
bool omitGenerationTime = false;
@@ -245,6 +241,9 @@
int get totalTypes => _totalTypes;
int get totalMembers => _totalMembers;
+ static const List<String> COMPILER_OPTIONS =
+ const <String>['--preserve-comments', '--categories=Client,Server'];
+
Dartdoc() {
// Patch in support for [:...:]-style code to the markdown parser.
// TODO(rnystrom): Markdown already has syntax for this. Phase this out?
@@ -305,7 +304,7 @@
String get footerContent{
var footerItems = [];
if (!omitGenerationTime) {
- footerItems.add("This page was generated at ${new Date.now()}");
+ footerItems.add("This page was generated at ${new DateTime.now()}");
}
if (footerText != null) {
footerItems.add(footerText);
@@ -322,13 +321,13 @@
void documentEntryPoint(Path entrypoint, Path libPath, Path pkgPath) {
final compilation = new Compilation(entrypoint, libPath, pkgPath,
- <String>['--preserve-comments']);
+ COMPILER_OPTIONS);
_document(compilation);
}
void documentLibraries(List<Path> libraryList, Path libPath, Path pkgPath) {
final compilation = new Compilation.library(libraryList, libPath, pkgPath,
- <String>['--preserve-comments']);
+ COMPILER_OPTIONS);
_document(compilation);
}
@@ -508,7 +507,6 @@
</div>
<div class="clear"></div>
</div>
- ${preFooterText}
<div class="footer">
$footerContent
</div>
@@ -563,7 +561,8 @@
String dartString = jsonString.replaceAll(r"$", r"\$");
final filePath = tmpPath.append('nav.dart');
writeString(new File.fromPath(filePath),
- 'get json => $dartString;');
+ '''part of client;
+ get json => $dartString;''');
}
Path get tmpPath => dartdocPath.append('tmp');
@@ -1826,7 +1825,7 @@
}
startFile('appcache.manifest');
write("CACHE MANIFEST\n\n");
- write("# VERSION: ${new Date.now()}\n\n");
+ write("# VERSION: ${new DateTime.now()}\n\n");
write("NETWORK:\n*\n\n");
write("CACHE:\n");
var toCache = new Directory.fromPath(outputDir);
@@ -1862,7 +1861,7 @@
/**
* Computes the doc comment for the declaration mirror.
-*
+ *
* Multiple comments are concatenated with newlines in between.
*/
String computeComment(DeclarationMirror mirror) {
@@ -1882,6 +1881,22 @@
return text;
}
+/**
+ * Computes the doc comment for the declaration mirror as a list.
+ */
+List<String> computeUntrimmedCommentAsList(DeclarationMirror mirror) {
+ var text = <String>[];
+ for (InstanceMirror metadata in mirror.metadata) {
+ if (metadata is CommentInstanceMirror) {
+ CommentInstanceMirror comment = metadata;
+ if (comment.isDocComment) {
+ text.add(comment.text);
+ }
+ }
+ }
+ return text;
+}
+
class DocComment {
final String text;
diff --git a/sdk/lib/_internal/dartdoc/lib/src/client/client-live-nav.dart b/sdk/lib/_internal/dartdoc/lib/src/client/client-live-nav.dart
index 4f27fc3..021b7f7 100644
--- a/sdk/lib/_internal/dartdoc/lib/src/client/client-live-nav.dart
+++ b/sdk/lib/_internal/dartdoc/lib/src/client/client-live-nav.dart
@@ -3,7 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
/** Provides client-side behavior for generated docs. */
-library client_live_nav;
+library client;
import 'dart:html';
import 'dart:json' as jsonlib;
@@ -11,6 +11,7 @@
// TODO(rnystrom): Use "package:" URL (#4968).
import '../../classify.dart';
import '../../markdown.dart' as md;
+part '../dartdoc/nav.dart';
// TODO(rnystrom): Use "package:" URL (#4968).
part 'dropdown.dart';
diff --git a/sdk/lib/_internal/dartdoc/lib/src/client/client-shared.dart b/sdk/lib/_internal/dartdoc/lib/src/client/client-shared.dart
index 03bb64c..82a71c7 100644
--- a/sdk/lib/_internal/dartdoc/lib/src/client/client-shared.dart
+++ b/sdk/lib/_internal/dartdoc/lib/src/client/client-shared.dart
@@ -2,7 +2,7 @@
// 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.
-part of client_live_nav;
+part of client;
// Code shared between the different client-side libraries.
diff --git a/sdk/lib/_internal/dartdoc/lib/src/client/client-static.dart b/sdk/lib/_internal/dartdoc/lib/src/client/client-static.dart
index ee47dc6..a411064 100644
--- a/sdk/lib/_internal/dartdoc/lib/src/client/client-static.dart
+++ b/sdk/lib/_internal/dartdoc/lib/src/client/client-static.dart
@@ -3,18 +3,18 @@
// BSD-style license that can be found in the LICENSE file.
/** Provides client-side behavior for generated docs using the static mode. */
-library client_static;
+library client;
import 'dart:html';
import 'dart:json';
import '../../../../compiler/implementation/source_file.dart';
// TODO(rnystrom): Use "package:" URL (#4968).
import '../../classify.dart';
+import '../dartdoc/nav.dart';
// TODO(rnystrom): Use "package:" URL (#4968).
part 'dropdown.dart';
part 'search.dart';
-part '../dartdoc/nav.dart';
part 'client-shared.dart';
part '../../../tmp/nav.dart';
diff --git a/sdk/lib/_internal/dartdoc/lib/src/client/dropdown.dart b/sdk/lib/_internal/dartdoc/lib/src/client/dropdown.dart
index d1db59d..ca0ff81 100644
--- a/sdk/lib/_internal/dartdoc/lib/src/client/dropdown.dart
+++ b/sdk/lib/_internal/dartdoc/lib/src/client/dropdown.dart
@@ -2,7 +2,7 @@
// 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.
-part of client_live_nav;
+part of client;
List libraryList;
InputElement searchInput;
diff --git a/sdk/lib/_internal/dartdoc/lib/src/client/search.dart b/sdk/lib/_internal/dartdoc/lib/src/client/search.dart
index 22d283d..111d333 100644
--- a/sdk/lib/_internal/dartdoc/lib/src/client/search.dart
+++ b/sdk/lib/_internal/dartdoc/lib/src/client/search.dart
@@ -2,7 +2,7 @@
// 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.
-part of client_live_nav;
+part of client;
/**
* [SearchText] represent the search field text. The text is viewed in three
diff --git a/sdk/lib/_internal/dartdoc/lib/src/dartdoc/nav.dart b/sdk/lib/_internal/dartdoc/lib/src/dartdoc/nav.dart
index ec9c7f9..62fd0dc 100644
--- a/sdk/lib/_internal/dartdoc/lib/src/dartdoc/nav.dart
+++ b/sdk/lib/_internal/dartdoc/lib/src/dartdoc/nav.dart
@@ -2,7 +2,7 @@
// 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.
-part of dartdoc;
+library dartdoc_nav;
/*
* Constant values used for encoding navigation info.
diff --git a/sdk/lib/_internal/dartdoc/lib/src/json_serializer.dart b/sdk/lib/_internal/dartdoc/lib/src/json_serializer.dart
index 8039d0c..bcfdf68 100755
--- a/sdk/lib/_internal/dartdoc/lib/src/json_serializer.dart
+++ b/sdk/lib/_internal/dartdoc/lib/src/json_serializer.dart
@@ -19,6 +19,14 @@
return printer.toString();
}
+/// Serialize the object with pretty printing.
+String prettySerialize(Object o) {
+ var printer = new JsonPrinter(_prettyPrint: true);
+ _serialize(null, o, printer);
+ return printer.toString();
+}
+
+
void _serialize(String name, Object o, JsonPrinter printer) {
if (o == null) return;
@@ -80,6 +88,10 @@
}
void _serializeMap(String name, Map m, JsonPrinter printer) {
+ printer.startObject(name);
+ m.forEach((key, value) =>
+ _serialize(key, value, printer));
+ printer.endObject();
}
class JsonPrinter {
@@ -164,7 +176,10 @@
if (_inSet) {
_sb.add(',');
}
- _newline();
+ // Do not print a newline at the beginning of the file.
+ if (!_sb.isEmpty) {
+ _newline();
+ }
if (name != null) {
_sb.add('"$name": ');
}
diff --git a/sdk/lib/_internal/libraries.dart b/sdk/lib/_internal/libraries.dart
index d5c747e..98efa98 100644
--- a/sdk/lib/_internal/libraries.dart
+++ b/sdk/lib/_internal/libraries.dart
@@ -20,7 +20,7 @@
* and extract the necessary information without executing it
* while other tools can access via execution.
*/
-const Map<String, LibraryInfo> LIBRARIES = const <LibraryInfo> {
+const Map<String, LibraryInfo> LIBRARIES = const {
"async": const LibraryInfo(
"async/async.dart",
@@ -35,7 +35,9 @@
"collection": const LibraryInfo("collection/collection.dart"),
- "collection-dev": const LibraryInfo("collection_dev/collection_dev.dart"),
+ "collection-dev": const LibraryInfo(
+ "collection_dev/collection_dev.dart",
+ documented: false),
"core": const LibraryInfo(
"core/core.dart",
diff --git a/sdk/lib/async/async.dart b/sdk/lib/async/async.dart
index 279dbfa..9e0fefd 100644
--- a/sdk/lib/async/async.dart
+++ b/sdk/lib/async/async.dart
@@ -12,5 +12,4 @@
part 'stream_controller.dart';
part 'stream_impl.dart';
part 'stream_pipe.dart';
-part 'string_transform.dart';
part 'timer.dart';
diff --git a/sdk/lib/async/async_sources.gypi b/sdk/lib/async/async_sources.gypi
index fee4a98..74daf49 100644
--- a/sdk/lib/async/async_sources.gypi
+++ b/sdk/lib/async/async_sources.gypi
@@ -13,7 +13,6 @@
'stream_controller.dart',
'stream_impl.dart',
'stream_pipe.dart',
- 'string_transform.dart',
'timer.dart',
],
}
diff --git a/sdk/lib/async/future_impl.dart b/sdk/lib/async/future_impl.dart
index ac7b46e..e91da2b 100644
--- a/sdk/lib/async/future_impl.dart
+++ b/sdk/lib/async/future_impl.dart
@@ -359,7 +359,7 @@
/** Test used by [Future.catchError] to handle skip some errors. */
typedef bool _FutureErrorTest(var error);
/** Used by [WhenFuture]. */
-typedef void _FutureAction();
+typedef _FutureAction();
/** Future returned by [Future.then] with no [:onError:] parameter. */
class _ThenFuture<S, T> extends _TransformFuture<S, T> {
diff --git a/sdk/lib/async/stream.dart b/sdk/lib/async/stream.dart
index 8fd9272..ed4ab1a 100644
--- a/sdk/lib/async/stream.dart
+++ b/sdk/lib/async/stream.dart
@@ -19,7 +19,7 @@
* you receive a [StreamSubscription] object that can be used to stop listening,
* or to temporarily pause events from the stream.
*
- * When an event is fired, all listeners at that time are informed.
+ * When an event is fired, the listeners at that time are informed.
* If a listener is added or removed while an event is being fired, the change
* will only take effect after the event is completely fired.
*
@@ -27,25 +27,25 @@
* their input, but often, and preferably, they can simply request their input
* to pause too.
*
- * There are two kinds of streams: Single-subscription streams and
- * multi-subscription streams.
+ * There are two kinds of streams: The normal "single-subscription" streams and
+ * "broadcast" streams.
*
- * A single-subscription stream allows only a single listener in its entire
- * life-cycle. It holds back events until it gets a listener, and it exhausts
+ * A single-subscription stream allows only a single listener at a time.
+ * It holds back events until it gets a listener, and it may exhaust
* itself when the listener is unsubscribed, even if the stream wasn't done.
*
* Single-subscription streams are generally used for streaming parts of
* contiguous data like file I/O.
*
- * A multi-subscription stream allows any number of listeners, and it fires
+ * A broadcast stream allows any number of listeners, and it fires
* its events when they are ready, whether there are listeners or not.
*
- * Multi-subscription streams are used for independent events/observers.
+ * Braodcast streams are used for independent events/observers.
*
- * The default implementation of [isSingleSubscription] and
- * [asMultiSubscriptionStream] are assuming this is a single-subscription stream
- * and a multi-subscription stream inheriting from [Stream] must override these
- * to return [:false:] and [:this:] respectively.
+ * The default implementation of [isBroadcast] and
+ * [asBroadcastStream] are assuming this is a single-subscription stream
+ * and a broadcast stream inheriting from [Stream] must override these
+ * to return [:true:] and [:this:] respectively.
*/
abstract class Stream<T> {
Stream();
@@ -78,9 +78,9 @@
}
/**
- * Whether the stream is a single-subscription stream.
+ * Whether the stream is a broadcast stream.
*/
- bool get isSingleSubscription => true;
+ bool get isBroadcast => false;
/**
* Returns a multi-subscription stream that produces the same events as this.
@@ -90,9 +90,9 @@
* subscriber is added, and unsubscribe again when the last subscription is
* cancelled.
*
- * If this stream is already multi-subscriber, it is returned unmodified.
+ * If this stream is already a broadcast stream, it is returned unmodified.
*/
- Stream<T> asMultiSubscriberStream() {
+ Stream<T> asBroadcastStream() {
return new _SingleStreamMultiplexer<T>(this);
}
@@ -842,7 +842,9 @@
StreamView(this._stream);
- bool get isSingleSubscription => _stream.isSingleSubscription;
+ bool get isBroadcast => _stream.isBroadcast;
+
+ Stream<T> asBroadcastStream() => _stream.asBroadcastStream();
StreamSubscription<T> listen(void onData(T value),
{ void onError(AsyncError error),
@@ -902,40 +904,3 @@
Stream<T> bind(Stream<S> stream);
}
-
-
-// TODO(lrn): Remove this class.
-/**
- * A base class for configuration objects for [TransformStream].
- *
- * A default implementation forwards all incoming events to the output sink.
- */
-abstract class _StreamTransformer<S, T> implements StreamTransformer<S, T> {
- const _StreamTransformer();
-
- Stream<T> bind(Stream<S> input) {
- return input.transform(new TransformStream<S, T>(this));
- }
-
- /**
- * Handle an incoming data event.
- */
- void handleData(S data, StreamSink<T> sink) {
- var outData = data;
- return sink.add(outData);
- }
-
- /**
- * Handle an incoming error event.
- */
- void handleError(AsyncError error, StreamSink<T> sink) {
- sink.signalError(error);
- }
-
- /**
- * Handle an incoming done event.
- */
- void handleDone(StreamSink<T> sink) {
- sink.close();
- }
-}
diff --git a/sdk/lib/async/stream_controller.dart b/sdk/lib/async/stream_controller.dart
index 98a45783..e5b8b45 100644
--- a/sdk/lib/async/stream_controller.dart
+++ b/sdk/lib/async/stream_controller.dart
@@ -5,12 +5,11 @@
part of dart.async;
// -------------------------------------------------------------------
-// Default implementation of a stream with a controller for adding
-// events to the stream.
+// Controller for creating and adding events to a stream.
// -------------------------------------------------------------------
/**
- * A controller and the stream it controls.
+ * A controller with the stream it controls.
*
* This controller allows sending data, error and done events on
* its [stream].
@@ -21,40 +20,43 @@
* it has subscribers or not, as well as getting a callback when either of
* these change.
*/
-class StreamController<T> extends Stream<T> implements StreamSink<T> {
- _StreamImpl<T> _stream;
- Stream<T> get stream => _stream;
+class StreamController<T> implements StreamSink<T> {
+ final _StreamImpl<T> stream;
/**
- * A controller with a [stream] that supports multiple subscribers.
+ * A controller with a broadcast [stream]..
+ *
+ * The [onPauseStateChange] function is called when the stream becomes
+ * paused or resumes after being paused. The current pause state can
+ * be read from [isPaused]. Ignored if [:null:].
+ *
+ * The [onSubscriptionStateChange] function is called when the stream
+ * receives its first listener or loses its last. The current subscription
+ * state can be read from [hasSubscribers]. Ignored if [:null:].
*/
- StreamController.multiSubscription() {
- _stream = new _MultiControllerStream<T>(onSubscriptionStateChange,
- onPauseStateChange);
- }
+ StreamController.broadcast({void onPauseStateChange(),
+ void onSubscriptionStateChange()})
+ : stream = new _MultiControllerStream<T>(onSubscriptionStateChange,
+ onPauseStateChange);
+
/**
* A controller with a [stream] that supports only one single subscriber.
+ *
* The controller will buffer all incoming events until the subscriber is
* registered.
+ *
+ * The [onPauseStateChange] function is called when the stream becomes
+ * paused or resumes after being paused. The current pause state can
+ * be read from [isPaused]. Ignored if [:null:].
+ *
+ * The [onSubscriptionStateChange] function is called when the stream
+ * receives its first listener or loses its last. The current subscription
+ * state can be read from [hasSubscribers]. Ignored if [:null:].
*/
- StreamController() {
- _stream = new _SingleControllerStream<T>(onSubscriptionStateChange,
- onPauseStateChange);
- }
-
- bool get isSingleSubscription => _stream.isSingleSubscription;
-
- Stream<T> asMultiSubscriptionStream() => _stream.asMultiSubscriptionStream();
-
- StreamSubscription listen(void onData(T data),
- { void onError(AsyncError error),
- void onDone(),
- bool unsubscribeOnError}) {
- return _stream.listen(onData,
- onError: onError,
- onDone: onDone,
- unsubscribeOnError: unsubscribeOnError);
- }
+ StreamController({void onPauseStateChange(),
+ void onSubscriptionStateChange()})
+ : stream = new _SingleControllerStream<T>(onSubscriptionStateChange,
+ onPauseStateChange);
/**
* Returns a view of this object that only exposes the [StreamSink] interface.
@@ -62,15 +64,15 @@
StreamSink<T> get sink => new StreamSinkView<T>(this);
/** Whether one or more active subscribers have requested a pause. */
- bool get isPaused => _stream._isPaused;
+ bool get isPaused => stream._isPaused;
/** Whether there are currently any subscribers on this [Stream]. */
- bool get hasSubscribers => _stream._hasSubscribers;
+ bool get hasSubscribers => stream._hasSubscribers;
/**
* Send or queue a data event.
*/
- void add(T value) => _stream._add(value);
+ void add(T value) => stream._add(value);
/**
* Send or enqueue an error event.
@@ -91,7 +93,7 @@
} else {
asyncError = new AsyncError(error, stackTrace);
}
- _stream._signalError(asyncError);
+ stream._signalError(asyncError);
}
/**
@@ -100,33 +102,7 @@
* The "done" message should be sent at most once by a stream, and it
* should be the last message sent.
*/
- void close() { _stream._close(); }
-
- /**
- * Called when the first subscriber requests a pause or the last a resume.
- *
- * Read [isPaused] to see the new state.
- */
- void onPauseStateChange() {}
-
- /**
- * Called when the first listener subscribes or the last unsubscribes.
- *
- * Read [hasSubscribers] to see what the new state is.
- */
- void onSubscriptionStateChange() {}
-
- void forEachSubscriber(void action(_StreamSubscriptionImpl<T> subscription)) {
- _stream._forEachSubscriber(() {
- try {
- action();
- } on AsyncError catch (e) {
- e.throwDelayed();
- } catch (e, s) {
- new AsyncError(e, s).throwDelayed();
- }
- });
- }
+ void close() { stream._close(); }
}
typedef void _NotificationHandler();
@@ -138,11 +114,11 @@
_MultiControllerStream(this._subscriptionHandler, this._pauseHandler);
void _onSubscriptionStateChange() {
- _subscriptionHandler();
+ if (_subscriptionHandler != null) _subscriptionHandler();
}
void _onPauseStateChange() {
- _pauseHandler();
+ if (_pauseHandler != null) _pauseHandler();
}
}
@@ -153,10 +129,10 @@
_SingleControllerStream(this._subscriptionHandler, this._pauseHandler);
void _onSubscriptionStateChange() {
- _subscriptionHandler();
+ if (_subscriptionHandler != null) _subscriptionHandler();
}
void _onPauseStateChange() {
- _pauseHandler();
+ if (_pauseHandler != null) _pauseHandler();
}
}
diff --git a/sdk/lib/async/stream_impl.dart b/sdk/lib/async/stream_impl.dart
index 0ca98e1..28c41b0 100644
--- a/sdk/lib/async/stream_impl.dart
+++ b/sdk/lib/async/stream_impl.dart
@@ -544,9 +544,9 @@
_nextLink = _previousLink = this;
}
- bool get isSingleSubscription => false;
+ bool get isBroadcast => true;
- Stream<T> asMultiSubscriberStream() => this;
+ Stream<T> asBroadcastStream() => this;
// ------------------------------------------------------------------
// Helper functions that can be overridden in subclasses.
@@ -721,17 +721,17 @@
/**
* The subscription class that the [StreamController] uses.
*
- * The [StreamController.createSubscription] method should
+ * The [_StreamImpl.createSubscription] method should
* create an object of this type, or another subclass of [_StreamListener].
- * A subclass of [StreamController] can specify which subclass
+ * A subclass of [_StreamImpl] can specify which subclass
* of [_StreamSubscriptionImpl] it uses by overriding
- * [StreamController.createSubscription].
+ * [_StreamImpl.createSubscription].
*
* The subscription is in one of three states:
* * Subscribed.
* * Paused-and-subscribed.
* * Unsubscribed.
- * Unsubscribing also unpauses.
+ * Unsubscribing also resumes any pauses started by the subscription.
*/
class _StreamSubscriptionImpl<T> extends _StreamListener<T>
implements StreamSubscription<T> {
diff --git a/sdk/lib/async/stream_pipe.dart b/sdk/lib/async/stream_pipe.dart
index d145d1f..1945bb2 100644
--- a/sdk/lib/async/stream_pipe.dart
+++ b/sdk/lib/async/stream_pipe.dart
@@ -51,7 +51,9 @@
_ForwardingStream(this._source);
- bool get isSingleSubscription => _source.isSingleSubscription;
+ bool get isBroadcast => _source.isBroadcast;
+
+ bool asBroadcastStream() => _source.asBroadcastStream;
StreamSubscription listen(void onData(T value),
{ void onError(AsyncError error),
@@ -112,23 +114,17 @@
// StreamSubscription interface.
void onData(void handleData(T event)) {
- if (handleData == null) {
- handleData = _StreamSubscriptionImpl._nullDataHandler;
- }
+ if (handleData == null) handleData = _nullDataHandler;
_onData = handleData;
}
void onError(void handleError(AsyncError error)) {
- if (handleError == null) {
- handleError = _StreamSubscriptionImpl._nullErrorHandler;
- }
+ if (handleError == null) handleError = _nullErrorHandler;
_onError = handleError;
}
void onDone(void handleDone()) {
- if (handleDone == null) {
- handleDone = _StreamSubscriptionImpl._nullDoneHandler;
- }
+ if (handleDone == null) handleDone = _nullDoneHandler;
_onDone = handleDone;
}
diff --git a/sdk/lib/async/string_transform.dart b/sdk/lib/async/string_transform.dart
deleted file mode 100644
index be9ee86..0000000
--- a/sdk/lib/async/string_transform.dart
+++ /dev/null
@@ -1,127 +0,0 @@
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-part of dart.async;
-
-abstract class _StringDecoder extends _StreamTransformer<List<int>, String> {
-
- handleData(List<int> bytes, StreamSink<String> sink) {
- var data = _carry;
- data.addAll(bytes);
- _carry = [];
- var buffer = new StringBuffer();
- int pos = 0;
- while (pos < data.length) {
- int currentPos = pos;
- int getNext() {
- if (pos < data.length) {
- return data[pos++];
- }
- return -1;
- }
- _chars = [];
- if (_processByte(data[pos++], getNext)) {
- _chars.forEach(buffer.addCharCode);
- } else {
- _carry = data.getRange(currentPos, data.length - currentPos);
- break;
- }
- }
- sink.add(buffer.toString());
- }
-
- void handleDone(StreamSink<String> sink) {
- if (!_carry.isEmpty) {
- sink.signalError(new AsyncError(
- new StateError("Unhandled tailing utf8 chars")));
- }
- sink.close();
- }
-
- bool _processByte(int byte, int getNext());
-
- void addChar(int char) {
- _chars.add(char);
- }
-
- List<int> _carry = [];
- List<int> _chars;
-}
-
-/**
- * StringTransformer class that decodes a utf8 encoded bytes.
- */
-class Utf8DecoderTransformer extends _StringDecoder {
- bool _processByte(int byte, int getNext()) {
- int value = byte & 0xFF;
- if ((value & 0x80) == 0x80) {
- int additionalBytes;
- if ((value & 0xe0) == 0xc0) { // 110xxxxx
- value = value & 0x1F;
- additionalBytes = 1;
- } else if ((value & 0xf0) == 0xe0) { // 1110xxxx
- value = value & 0x0F;
- additionalBytes = 2;
- } else { // 11110xxx
- value = value & 0x07;
- additionalBytes = 3;
- }
- for (int i = 0; i < additionalBytes; i++) {
- int next = getNext();
- if (next < 0) return false;
- value = value << 6 | (next & 0x3F);
- }
- }
- addChar(value);
- return true;
- }
-}
-
-
-abstract class _StringEncoder extends _StreamTransformer<String, List<int>> {
- handleData(String string, StreamSink<List<int>> sink) {
- sink.add(_processString(string));
- }
-
- List<int> _processString(String string);
-}
-
-/**
- * StringTransformer class that utf8 encodes a string.
- */
-class Utf8EncoderTransformer extends _StringEncoder {
- List<int> _processString(String string) {
- var bytes = [];
- int pos = 0;
- int length = string.length;
- for (int i = 0; i < length; i++) {
- int additionalBytes;
- int charCode = string.charCodeAt(i);
- if (charCode <= 0x007F) {
- additionalBytes = 0;
- bytes.add(charCode);
- } else if (charCode <= 0x07FF) {
- // 110xxxxx (xxxxx is top 5 bits).
- bytes.add(((charCode >> 6) & 0x1F) | 0xC0);
- additionalBytes = 1;
- } else if (charCode <= 0xFFFF) {
- // 1110xxxx (xxxx is top 4 bits)
- bytes.add(((charCode >> 12) & 0x0F)| 0xE0);
- additionalBytes = 2;
- } else {
- // 11110xxx (xxx is top 3 bits)
- bytes.add(((charCode >> 18) & 0x07) | 0xF0);
- additionalBytes = 3;
- }
- for (int i = additionalBytes; i > 0; i--) {
- // 10xxxxxx (xxxxxx is next 6 bits from the top).
- bytes.add(((charCode >> (6 * (i - 1))) & 0x3F) | 0x80);
- }
- pos += additionalBytes + 1;
- }
- return bytes;
- }
-}
-
-
diff --git a/sdk/lib/chrome/dart2js/chrome_dart2js.dart b/sdk/lib/chrome/dart2js/chrome_dart2js.dart
index 9ab5df7..bba2925 100644
--- a/sdk/lib/chrome/dart2js/chrome_dart2js.dart
+++ b/sdk/lib/chrome/dart2js/chrome_dart2js.dart
@@ -1,5 +1,6 @@
library chrome;
+import 'dart:_foreign_helper' show JS;
// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
@@ -8,6 +9,7 @@
// Auto-generated dart:chrome library.
+
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
diff --git a/sdk/lib/collection/collection.dart b/sdk/lib/collection/collection.dart
index 7c9e6a3..5d4b81c 100644
--- a/sdk/lib/collection/collection.dart
+++ b/sdk/lib/collection/collection.dart
@@ -8,6 +8,10 @@
part 'arrays.dart';
part 'collections.dart';
+part 'iterator.dart';
+part 'map.dart';
part 'maps.dart';
+part 'queue.dart';
+part 'set.dart';
part 'sort.dart';
part 'splay_tree.dart';
diff --git a/sdk/lib/collection/collection_sources.gypi b/sdk/lib/collection/collection_sources.gypi
index f2137e7..3f1c117 100644
--- a/sdk/lib/collection/collection_sources.gypi
+++ b/sdk/lib/collection/collection_sources.gypi
@@ -7,9 +7,12 @@
'sources': [
'arrays.dart',
'collections.dart',
+ 'iterator.dart',
+ 'map.dart',
'maps.dart',
+ 'queue.dart',
+ 'set.dart',
'sort.dart',
'splay_tree.dart',
],
}
-
diff --git a/sdk/lib/collection/collections.dart b/sdk/lib/collection/collections.dart
index 9a34944..a8e89cc 100644
--- a/sdk/lib/collection/collections.dart
+++ b/sdk/lib/collection/collections.dart
@@ -68,13 +68,13 @@
*/
static void removeAllList(Collection collection, Iterable elementsToRemove) {
Set setToRemove;
- // Assume contains is efficient on a Set.
+ // Assume [contains] is efficient on a Set.
if (elementsToRemove is Set) {
setToRemove = elementsToRemove;
} else {
setToRemove = elementsToRemove.toSet();
}
- collection.removeMatching(setToRemve.contains);
+ collection.removeMatching(setToRemove.contains);
}
/**
@@ -90,6 +90,10 @@
} else {
lookup = elementsToRetain.toSet();
}
+ if (lookup.isEmpty) {
+ collection.clear();
+ return;
+ }
collection.retainMatching(lookup.contains);
}
@@ -108,6 +112,32 @@
}
/**
+ * Removes elements matching [test] from [list].
+ *
+ * This is performed in two steps, to avoid exposing an inconsistent state
+ * to the [test] function. First the elements to ratain are found, and then
+ * the original list is updated to contain those elements.
+ */
+ static void removeMatchingList(List list, bool test(var element)) {
+ List retained = [];
+ int length = list.length;
+ for (int i = 0; i < length; i++) {
+ var element = list[i];
+ if (!test(element)) {
+ retained.add(element);
+ }
+ if (length != list.length) {
+ throw new ConcurrentModificationError(list);
+ }
+ }
+ if (retained.length == length) return;
+ for (int i = 0; i < retained.length; i++) {
+ list[i] = retained[i];
+ }
+ list.length = retained.length;
+ }
+
+ /**
* Simple implemenation for [Collection.retainMatching].
*
* This implementation assumes that [Collecton.removeAll] on [collection] is
@@ -120,6 +150,7 @@
}
collection.removeAll(elementsToRemove);
}
+
static bool isEmpty(Iterable iterable) {
return !iterable.iterator.moveNext();
}
diff --git a/sdk/lib/collection/iterator.dart b/sdk/lib/collection/iterator.dart
new file mode 100644
index 0000000..1fe49cd
--- /dev/null
+++ b/sdk/lib/collection/iterator.dart
@@ -0,0 +1,45 @@
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+part of dart.collection;
+
+/**
+ * The [HasNextIterator] class wraps an [Iterator] and provides methods to
+ * iterate over an object using `hasNext` and `next`.
+ *
+ * An [HasNextIterator] does not implement the [Iterator] interface.
+ */
+class HasNextIterator<E> {
+ static const int _HAS_NEXT_AND_NEXT_IN_CURRENT = 0;
+ static const int _NO_NEXT = 1;
+ static const int _NOT_MOVED_YET = 2;
+
+ Iterator _iterator;
+ int _state = _NOT_MOVED_YET;
+
+ HasNextIterator(this._iterator);
+
+ bool get hasNext {
+ if (_state == _NOT_MOVED_YET) _move();
+ return _state == _HAS_NEXT_AND_NEXT_IN_CURRENT;
+ }
+
+ E next() {
+ // Call to hasNext is necessary to make sure we are positioned at the first
+ // element when we start iterating.
+ if (!hasNext) throw new StateError("No more elements");
+ assert(_state == _HAS_NEXT_AND_NEXT_IN_CURRENT);
+ E result = _iterator.current;
+ _move();
+ return result;
+ }
+
+ void _move() {
+ if (_iterator.moveNext()) {
+ _state = _HAS_NEXT_AND_NEXT_IN_CURRENT;
+ } else {
+ _state = _NO_NEXT;
+ }
+ }
+}
diff --git a/sdk/lib/collection/map.dart b/sdk/lib/collection/map.dart
new file mode 100644
index 0000000..1beaf2b
--- /dev/null
+++ b/sdk/lib/collection/map.dart
@@ -0,0 +1,474 @@
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+part of dart.collection;
+
+
+/**
+ * Hash map version of the [Map] interface. A [HashMap] does not
+ * provide any guarantees on the order of keys and values in [keys]
+ * and [values].
+ */
+abstract class HashMap<K, V> extends Map<K, V> {
+ /**
+ * Creates a map with the default implementation.
+ */
+ factory HashMap() => new _HashMapImpl<K, V>();
+
+ /**
+ * Creates a [HashMap] that contains all key value pairs of [other].
+ */
+ factory HashMap.from(Map<K, V> other) => new _HashMapImpl<K, V>.from(other);
+}
+
+/**
+ * Hash map version of the [Map] interface that preserves insertion
+ * order.
+ */
+abstract class LinkedHashMap<K, V> extends HashMap<K, V> {
+ /**
+ * Creates a map with the default implementation.
+ */
+ factory LinkedHashMap() => new _LinkedHashMapImpl<K, V>();
+
+ /**
+ * Creates a [LinkedHashMap] that contains all key value pairs of [other].
+ */
+ factory LinkedHashMap.from(Map<K, V> other)
+ => new _LinkedHashMapImpl<K, V>.from(other);
+}
+
+
+// Hash map implementation with open addressing and quadratic probing.
+class _HashMapImpl<K, V> implements HashMap<K, V> {
+
+ // The [_keys] list contains the keys inserted in the map.
+ // The [_keys] list must be a raw list because it
+ // will contain both elements of type K, and the [_DELETED_KEY] of type
+ // [_DeletedKeySentinel].
+ // The alternative of declaring the [_keys] list as of type Object
+ // does not work, because the HashSetIterator constructor would fail:
+ // HashSetIterator(HashSet<E> set)
+ // : _nextValidIndex = -1,
+ // _entries = set_._backingMap._keys {
+ // _advance();
+ // }
+ // With K being type int, for example, it would fail because
+ // List<Object> is not assignable to type List<int> of entries.
+ List _keys;
+
+ // The values inserted in the map. For a filled entry index in this
+ // list, there is always the corresponding key in the [keys_] list
+ // at the same entry index.
+ List<V> _values;
+
+ // The load limit is the number of entries we allow until we double
+ // the size of the lists.
+ int _loadLimit;
+
+ // The current number of entries in the map. Will never be greater
+ // than [_loadLimit].
+ int _numberOfEntries;
+
+ // The current number of deleted entries in the map.
+ int _numberOfDeleted;
+
+ // The sentinel when a key is deleted from the map.
+ static const _DeletedKeySentinel _DELETED_KEY = const _DeletedKeySentinel();
+
+ // The initial capacity of a hash map.
+ static const int _INITIAL_CAPACITY = 8; // must be power of 2
+
+ _HashMapImpl() {
+ _numberOfEntries = 0;
+ _numberOfDeleted = 0;
+ _loadLimit = _computeLoadLimit(_INITIAL_CAPACITY);
+ _keys = new List.fixedLength(_INITIAL_CAPACITY);
+ _values = new List<V>.fixedLength(_INITIAL_CAPACITY);
+ }
+
+ factory _HashMapImpl.from(Map<K, V> other) {
+ Map<K, V> result = new _HashMapImpl<K, V>();
+ other.forEach((K key, V value) { result[key] = value; });
+ return result;
+ }
+
+ static int _computeLoadLimit(int capacity) {
+ return (capacity * 3) ~/ 4;
+ }
+
+ static int _firstProbe(int hashCode, int length) {
+ return hashCode & (length - 1);
+ }
+
+ static int _nextProbe(int currentProbe, int numberOfProbes, int length) {
+ return (currentProbe + numberOfProbes) & (length - 1);
+ }
+
+ int _probeForAdding(K key) {
+ if (key == null) throw new ArgumentError(null);
+ int hash = _firstProbe(key.hashCode, _keys.length);
+ int numberOfProbes = 1;
+ int initialHash = hash;
+ // insertionIndex points to a slot where a key was deleted.
+ int insertionIndex = -1;
+ while (true) {
+ // [existingKey] can be either of type [K] or [_DeletedKeySentinel].
+ Object existingKey = _keys[hash];
+ if (existingKey == null) {
+ // We are sure the key is not already in the set.
+ // If the current slot is empty and we didn't find any
+ // insertion slot before, return this slot.
+ if (insertionIndex < 0) return hash;
+ // If we did find an insertion slot before, return it.
+ return insertionIndex;
+ } else if (existingKey == key) {
+ // The key is already in the map. Return its slot.
+ return hash;
+ } else if ((insertionIndex < 0) &&
+ (identical(existingKey, _DELETED_KEY))) {
+ // The slot contains a deleted element. Because previous calls to this
+ // method may not have had this slot deleted, we must continue iterate
+ // to find if there is a slot with the given key.
+ insertionIndex = hash;
+ }
+
+ // We did not find an insertion slot. Look at the next one.
+ hash = _nextProbe(hash, numberOfProbes++, _keys.length);
+ // _ensureCapacity has guaranteed the following cannot happen.
+ // assert(hash != initialHash);
+ }
+ }
+
+ int _probeForLookup(K key) {
+ if (key == null) throw new ArgumentError(null);
+ int hash = _firstProbe(key.hashCode, _keys.length);
+ int numberOfProbes = 1;
+ int initialHash = hash;
+ while (true) {
+ // [existingKey] can be either of type [K] or [_DeletedKeySentinel].
+ Object existingKey = _keys[hash];
+ // If the slot does not contain anything (in particular, it does not
+ // contain a deleted key), we know the key is not in the map.
+ if (existingKey == null) return -1;
+ // The key is in the map, return its index.
+ if (existingKey == key) return hash;
+ // Go to the next probe.
+ hash = _nextProbe(hash, numberOfProbes++, _keys.length);
+ // _ensureCapacity has guaranteed the following cannot happen.
+ // assert(hash != initialHash);
+ }
+ }
+
+ void _ensureCapacity() {
+ int newNumberOfEntries = _numberOfEntries + 1;
+ // Test if adding an element will reach the load limit.
+ if (newNumberOfEntries >= _loadLimit) {
+ _grow(_keys.length * 2);
+ return;
+ }
+
+ // Make sure that we don't have poor performance when a map
+ // contains lots of deleted entries: we _grow if
+ // there are more deleted entried than free entries.
+ int capacity = _keys.length;
+ int numberOfFreeOrDeleted = capacity - newNumberOfEntries;
+ int numberOfFree = numberOfFreeOrDeleted - _numberOfDeleted;
+ // assert(numberOfFree > 0);
+ if (_numberOfDeleted > numberOfFree) {
+ _grow(_keys.length);
+ }
+ }
+
+ static bool _isPowerOfTwo(int x) {
+ return ((x & (x - 1)) == 0);
+ }
+
+ void _grow(int newCapacity) {
+ assert(_isPowerOfTwo(newCapacity));
+ int capacity = _keys.length;
+ _loadLimit = _computeLoadLimit(newCapacity);
+ List oldKeys = _keys;
+ List<V> oldValues = _values;
+ _keys = new List.fixedLength(newCapacity);
+ _values = new List<V>.fixedLength(newCapacity);
+ for (int i = 0; i < capacity; i++) {
+ // [key] can be either of type [K] or [_DeletedKeySentinel].
+ Object key = oldKeys[i];
+ // If there is no key, we don't need to deal with the current slot.
+ if (key == null || identical(key, _DELETED_KEY)) {
+ continue;
+ }
+ V value = oldValues[i];
+ // Insert the {key, value} pair in their new slot.
+ int newIndex = _probeForAdding(key);
+ _keys[newIndex] = key;
+ _values[newIndex] = value;
+ }
+ _numberOfDeleted = 0;
+ }
+
+ void clear() {
+ _numberOfEntries = 0;
+ _numberOfDeleted = 0;
+ int length = _keys.length;
+ for (int i = 0; i < length; i++) {
+ _keys[i] = null;
+ _values[i] = null;
+ }
+ }
+
+ void operator []=(K key, V value) {
+ _ensureCapacity();
+ int index = _probeForAdding(key);
+ if ((_keys[index] == null) || (identical(_keys[index], _DELETED_KEY))) {
+ _numberOfEntries++;
+ }
+ _keys[index] = key;
+ _values[index] = value;
+ }
+
+ V operator [](K key) {
+ int index = _probeForLookup(key);
+ if (index < 0) return null;
+ return _values[index];
+ }
+
+ V putIfAbsent(K key, V ifAbsent()) {
+ int index = _probeForLookup(key);
+ if (index >= 0) return _values[index];
+
+ V value = ifAbsent();
+ this[key] = value;
+ return value;
+ }
+
+ V remove(K key) {
+ int index = _probeForLookup(key);
+ if (index >= 0) {
+ _numberOfEntries--;
+ V value = _values[index];
+ _values[index] = null;
+ // Set the key to the sentinel to not break the probing chain.
+ _keys[index] = _DELETED_KEY;
+ _numberOfDeleted++;
+ return value;
+ }
+ return null;
+ }
+
+ bool get isEmpty {
+ return _numberOfEntries == 0;
+ }
+
+ int get length {
+ return _numberOfEntries;
+ }
+
+ void forEach(void f(K key, V value)) {
+ Iterator<int> it = new _HashMapImplIndexIterator(this);
+ while (it.moveNext()) {
+ f(_keys[it.current], _values[it.current]);
+ }
+ }
+
+ Iterable<K> get keys => new _HashMapImplKeyIterable<K>(this);
+
+ Iterable<V> get values => new _HashMapImplValueIterable<V>(this);
+
+ bool containsKey(K key) {
+ return (_probeForLookup(key) != -1);
+ }
+
+ bool containsValue(V value) => values.contains(value);
+
+ String toString() {
+ return Maps.mapToString(this);
+ }
+}
+
+class _HashMapImplKeyIterable<E> extends Iterable<E> {
+ final _HashMapImpl _map;
+ _HashMapImplKeyIterable(this._map);
+
+ Iterator<E> get iterator => new _HashMapImplKeyIterator<E>(_map);
+}
+
+class _HashMapImplValueIterable<E> extends Iterable<E> {
+ final _HashMapImpl _map;
+ _HashMapImplValueIterable(this._map);
+
+ Iterator<E> get iterator => new _HashMapImplValueIterator<E>(_map);
+}
+
+abstract class _HashMapImplIterator<E> implements Iterator<E> {
+ final _HashMapImpl _map;
+ int _index = -1;
+ E _current;
+
+ _HashMapImplIterator(this._map);
+
+ E _computeCurrentFromIndex(int index, List keys, List values);
+
+ bool moveNext() {
+ int length = _map._keys.length;
+ int newIndex = _index + 1;
+ while (newIndex < length) {
+ var key = _map._keys[newIndex];
+ if ((key != null) && (!identical(key, _HashMapImpl._DELETED_KEY))) {
+ _current = _computeCurrentFromIndex(newIndex, _map._keys, _map._values);
+ _index = newIndex;
+ return true;
+ }
+ newIndex++;
+ }
+ _index = length;
+ _current = null;
+ return false;
+ }
+
+ E get current => _current;
+}
+
+class _HashMapImplKeyIterator<E> extends _HashMapImplIterator<E> {
+ _HashMapImplKeyIterator(_HashMapImpl map) : super(map);
+
+ E _computeCurrentFromIndex(int index, List keys, List values) {
+ return keys[index];
+ }
+}
+
+class _HashMapImplValueIterator<E> extends _HashMapImplIterator<E> {
+ _HashMapImplValueIterator(_HashMapImpl map) : super(map);
+
+ E _computeCurrentFromIndex(int index, List keys, List values) {
+ return values[index];
+ }
+}
+
+class _HashMapImplIndexIterator extends _HashMapImplIterator<int> {
+ _HashMapImplIndexIterator(_HashMapImpl map) : super(map);
+
+ int _computeCurrentFromIndex(int index, List keys, List values) {
+ return index;
+ }
+}
+
+/**
+ * A singleton sentinel used to represent when a key is deleted from the map.
+ * We can't use [: const Object() :] as a sentinel because it would end up
+ * canonicalized and then we cannot distinguish the deleted key from the
+ * canonicalized [: Object() :].
+ */
+class _DeletedKeySentinel {
+ const _DeletedKeySentinel();
+}
+
+
+/**
+ * This class represents a pair of two objects, used by LinkedHashMap
+ * to store a {key, value} in a list.
+ */
+class _KeyValuePair<K, V> {
+ _KeyValuePair(this.key, this.value) {}
+
+ final K key;
+ V value;
+}
+
+/**
+ * A LinkedHashMap is a hash map that preserves the insertion order
+ * when iterating over the keys or the values. Updating the value of a
+ * key does not change the order.
+ */
+class _LinkedHashMapImpl<K, V> implements LinkedHashMap<K, V> {
+ DoubleLinkedQueue<_KeyValuePair<K, V>> _list;
+ HashMap<K, DoubleLinkedQueueEntry<_KeyValuePair<K, V>>> _map;
+
+ _LinkedHashMapImpl() {
+ _map = new HashMap<K, DoubleLinkedQueueEntry<_KeyValuePair<K, V>>>();
+ _list = new DoubleLinkedQueue<_KeyValuePair<K, V>>();
+ }
+
+ factory _LinkedHashMapImpl.from(Map<K, V> other) {
+ Map<K, V> result = new _LinkedHashMapImpl<K, V>();
+ other.forEach((K key, V value) { result[key] = value; });
+ return result;
+ }
+
+ void operator []=(K key, V value) {
+ if (_map.containsKey(key)) {
+ _map[key].element.value = value;
+ } else {
+ _list.addLast(new _KeyValuePair<K, V>(key, value));
+ _map[key] = _list.lastEntry();
+ }
+ }
+
+ V operator [](K key) {
+ DoubleLinkedQueueEntry<_KeyValuePair<K, V>> entry = _map[key];
+ if (entry == null) return null;
+ return entry.element.value;
+ }
+
+ V remove(K key) {
+ DoubleLinkedQueueEntry<_KeyValuePair<K, V>> entry = _map.remove(key);
+ if (entry == null) return null;
+ entry.remove();
+ return entry.element.value;
+ }
+
+ V putIfAbsent(K key, V ifAbsent()) {
+ V value = this[key];
+ if ((this[key] == null) && !(containsKey(key))) {
+ value = ifAbsent();
+ this[key] = value;
+ }
+ return value;
+ }
+
+ Iterable<K> get keys {
+ return new MappedIterable<_KeyValuePair<K, V>, K>(
+ _list, (_KeyValuePair<K, V> entry) => entry.key);
+ }
+
+
+ Iterable<V> get values {
+ return new MappedIterable<_KeyValuePair<K, V>, V>(
+ _list, (_KeyValuePair<K, V> entry) => entry.value);
+ }
+
+ void forEach(void f(K key, V value)) {
+ _list.forEach((_KeyValuePair<K, V> entry) {
+ f(entry.key, entry.value);
+ });
+ }
+
+ bool containsKey(K key) {
+ return _map.containsKey(key);
+ }
+
+ bool containsValue(V value) {
+ return _list.any((_KeyValuePair<K, V> entry) {
+ return (entry.value == value);
+ });
+ }
+
+ int get length {
+ return _map.length;
+ }
+
+ bool get isEmpty {
+ return length == 0;
+ }
+
+ void clear() {
+ _map.clear();
+ _list.clear();
+ }
+
+ String toString() {
+ return Maps.mapToString(this);
+ }
+}
diff --git a/sdk/lib/core/queue.dart b/sdk/lib/collection/queue.dart
similarity index 99%
rename from sdk/lib/core/queue.dart
rename to sdk/lib/collection/queue.dart
index 8f20efd..f5dea8b 100644
--- a/sdk/lib/core/queue.dart
+++ b/sdk/lib/collection/queue.dart
@@ -2,7 +2,7 @@
// 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.
-part of dart.core;
+part of dart.collection;
/**
* A [Queue] is a collection that can be manipulated at both ends. One
diff --git a/sdk/lib/collection/set.dart b/sdk/lib/collection/set.dart
new file mode 100644
index 0000000..9363676
--- /dev/null
+++ b/sdk/lib/collection/set.dart
@@ -0,0 +1,110 @@
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+part of dart.collection;
+
+
+
+class HashSet<E> extends Collection<E> implements Set<E> {
+ // The map backing this set. The associations in this map are all
+ // of the form element -> element. If a value is not in the map,
+ // then it is not in the set.
+ final _HashMapImpl<E, E> _backingMap;
+
+ HashSet() : _backingMap = new _HashMapImpl<E, E>();
+
+ /**
+ * Creates a [Set] that contains all elements of [other].
+ */
+ factory HashSet.from(Iterable<E> other) {
+ Set<E> set = new HashSet<E>();
+ for (final e in other) {
+ set.add(e);
+ }
+ return set;
+ }
+
+ void clear() {
+ _backingMap.clear();
+ }
+
+ void add(E value) {
+ _backingMap[value] = value;
+ }
+
+ bool remove(Object value) {
+ if (!_backingMap.containsKey(value)) return false;
+ _backingMap.remove(value);
+ return true;
+ }
+
+ bool contains(E value) {
+ return _backingMap.containsKey(value);
+ }
+
+ Set<E> intersection(Collection<E> collection) {
+ Set<E> result = new Set<E>();
+ collection.forEach((E value) {
+ if (contains(value)) result.add(value);
+ });
+ return result;
+ }
+
+ bool isSubsetOf(Collection<E> other) {
+ return new Set<E>.from(other).containsAll(this);
+ }
+
+ bool containsAll(Collection<E> collection) {
+ return collection.every((E value) {
+ return contains(value);
+ });
+ }
+
+ void forEach(void f(E element)) {
+ _backingMap.forEach((E key, E value) {
+ f(key);
+ });
+ }
+
+ bool get isEmpty {
+ return _backingMap.isEmpty;
+ }
+
+ int get length {
+ return _backingMap.length;
+ }
+
+ Iterator<E> get iterator => new _HashSetIterator<E>(this);
+
+ String toString() {
+ return Collections.collectionToString(this);
+ }
+}
+
+class _HashSetIterator<E> implements Iterator<E> {
+
+ _HashSetIterator(HashSet<E> set)
+ : _keysIterator = set._backingMap._keys.iterator;
+
+ E get current {
+ var result = _keysIterator.current;
+ if (identical(result, _HashMapImpl._DELETED_KEY)) {
+ // TODO(floitsch): improve the error reporting.
+ throw new StateError("Concurrent modification.");
+ }
+ return result;
+ }
+
+ bool moveNext() {
+ bool result;
+ do {
+ result = _keysIterator.moveNext();
+ } while (result &&
+ (_keysIterator.current == null ||
+ identical(_keysIterator.current, _HashMapImpl._DELETED_KEY)));
+ return result;
+ }
+
+ Iterator _keysIterator;
+}
diff --git a/sdk/lib/collection_dev/list.dart b/sdk/lib/collection_dev/list.dart
index 48b31fa..10facd6 100644
--- a/sdk/lib/collection_dev/list.dart
+++ b/sdk/lib/collection_dev/list.dart
@@ -5,11 +5,12 @@
part of dart.collection.dev;
/**
- * Skeleton class for an unmodifiable [List].
+ * Class implementing the read-operations on [List].
+ *
+ * Implements all read-only operations, except [:operator[]:] and [:length:],
+ * in terms of those two operations.
*/
-abstract class NonExtensibleListMixin<E>
- extends Iterable<E> implements List<E> {
-
+abstract class ListBase<E> extends Collection<E> implements List<E> {
Iterator<E> get iterator => new ListIterator(this);
void forEach(f(E element)) {
@@ -92,6 +93,112 @@
return result;
}
+ List mappedBy(f(E element)) {
+ return new MappedList(this, f);
+ }
+
+ List<E> take(int n) {
+ return new ListView(this, 0, n);
+ }
+
+ List<E> skip(int n) {
+ return new ListView(this, n, null);
+ }
+
+ String toString() => Collections.collectionToString(this);
+}
+
+/**
+ * Abstract class implementing the non-length changing operations of [List].
+ */
+abstract class FixedLengthListBase<E> extends ListBase<E> {
+ void operator[]=(int index, E value);
+
+ List<E> get reversed => new ReversedListView<E>(this, 0, null);
+
+ void sort([Comparator<E> compare]) {
+ coreSort(this, compare);
+ }
+
+ void setRange(int start, int length, List<E> from, [int startFrom]) {
+ if (length < 0) throw new ArgumentError("length: $length");
+ if (startFrom == null) startFrom = 0;
+ for (int i = 0; i < length; i++) {
+ this[start + i] = from[startFrom + i];
+ }
+ }
+
+ void set length(int newLength) {
+ throw new UnsupportedError(
+ "Cannot change the length of a fixed-length list");
+ }
+
+ void add(E value) {
+ throw new UnsupportedError(
+ "Cannot add to a fixed-length list");
+ }
+
+ void addLast(E value) {
+ throw new UnsupportedError(
+ "Cannot add to a fixed-length list");
+ }
+
+ void addAll(Iterable<E> iterable) {
+ throw new UnsupportedError(
+ "Cannot add to a fixed-length list");
+ }
+
+ void remove(E element) {
+ throw new UnsupportedError(
+ "Cannot remove from a fixed-length list");
+ }
+
+ void removeAll(Iterable elements) {
+ throw new UnsupportedError(
+ "Cannot remove from a fixed-length list");
+ }
+
+ void retainAll(Iterable elements) {
+ throw new UnsupportedError(
+ "Cannot remove from a fixed-length list");
+ }
+
+ void removeMatching(bool test(E element)) {
+ throw new UnsupportedError(
+ "Cannot remove from a fixed-length list");
+ }
+
+ void clear() {
+ throw new UnsupportedError(
+ "Cannot clear a fixed-length list");
+ }
+
+ E removeAt(int index) {
+ throw new UnsupportedError(
+ "Cannot remove from a fixed-length list");
+ }
+
+ E removeLast() {
+ throw new UnsupportedError(
+ "Cannot remove from a fixed-length list");
+ }
+
+ void removeRange(int start, int length) {
+ throw new UnsupportedError(
+ "Cannot remove from a fixed-length list");
+ }
+
+ void insertRange(int start, int length, [E initialValue]) {
+ throw new UnsupportedError(
+ "Cannot insert range in a fixed-length list");
+ }
+}
+
+/**
+ * An unmodifiable [List].
+ */
+abstract class UnmodifiableListBase<E> extends ListBase<E> {
+
void operator []=(int index, E value) {
throw new UnsupportedError(
"Cannot modify an unmodifiable list");
@@ -136,6 +243,7 @@
throw new UnsupportedError(
"Cannot remove from an unmodifiable list");
}
+
void sort([Comparator<E> compare]) {
throw new UnsupportedError(
"Cannot modify an unmodifiable list");
@@ -177,19 +285,23 @@
*/
class ListIterator<E> implements Iterator<E> {
final List<E> _list;
+ final int _length;
int _position;
E _current;
- ListIterator(this._list) : _position = -1;
+ ListIterator(List<E> list)
+ : _list = list, _position = -1, _length = list.length;
bool moveNext() {
+ if (_list.length != _length) {
+ throw new ConcurrentModificationError(_list);
+ }
int nextPosition = _position + 1;
- if (nextPosition < _list.length) {
- _current = _list[nextPosition];
+ if (nextPosition < _length) {
_position = nextPosition;
+ _current = _list[nextPosition];
return true;
}
- _position = _list.length;
_current = null;
return false;
}
@@ -197,7 +309,7 @@
E get current => _current;
}
-class MappedList<S, T> extends NonExtensibleListMixin<T> {
+class MappedList<S, T> extends UnmodifiableListBase<T> {
final List<S> _list;
// TODO(ahe): Restore type when feature is implemented in dart2js
// checked mode. http://dartbug.com/7733
@@ -209,59 +321,223 @@
int get length => _list.length;
}
+/** An empty fixed-length list. */
+class EmptyList<E> extends FixedLengthListBase<E> {
+ int get length => 0;
+ E operator[](int index) { throw new RangeError.value(index); }
+ void operator []=(int index, E value) { throw new RangeError.value(index); }
+ List<E> skip(int count) => this;
+ List<E> take(int count) => this;
+ List<E> get reversed => this;
+ void sort([int compare(E a, E b)]) {}
+}
+
/**
- * An immutable view of a [List].
+ * A fixed-length view of a sub-range of another [List].
+ *
+ * The range is described by start and end points relative
+ * to the other List's start or end.
+ *
+ * The range changes dynamically as the underlying list changes
+ * its length.
*/
-class ListView<E> extends NonExtensibleListMixin<E> {
+abstract class SubListView<E> extends UnmodifiableListBase<E> {
final List<E> _list;
- final int _offset;
- final int _length;
+ final int _start;
+ final int _end;
/**
- * If the given length is `null` then the ListView's length is bound by
- * the backed [list].
+ * Create a sub-list view.
+ *
+ * Both [_start] and [_end] can be given as positions
+ * relative to the start of [_list] (a non-negative integer)
+ * or relative to the end of [_list] (a negative integer or
+ * null, with null being at the end of the list).
*/
- ListView(List<E> list, this._offset, this._length) : _list = list {
- if (_offset is! int || _offset < 0) {
- throw new ArgumentError(_offset);
+ SubListView(this._list, this._start, this._end);
+
+ int _absoluteIndex(int relativeIndex) {
+ if (relativeIndex == null) return _list.length;
+ if (relativeIndex < 0) {
+ int result = _list.length + relativeIndex;
+ if (result < 0) return 0;
+ return result;
}
- if (_length != null &&
- (_length is! int || _length < 0)) {
- throw new ArgumentError(_length);
+ if (relativeIndex > _list.length) {
+ return _list.length;
}
+ return relativeIndex;
}
int get length {
- int originalLength = _list.length;
- int skipLength = originalLength - _offset;
- if (skipLength < 0) return 0;
- if (_length == null || _length > skipLength) return skipLength;
- return _length;
+ int result = _absoluteIndex(_end) - _absoluteIndex(_start);
+ if (result >= 0) return result;
+ return 0;
}
+ _createListView(int start, int end) {
+ if (start == null) return new EmptyList<E>();
+ if (end != null) {
+ if (start < 0) {
+ if (end <= start) return new EmptyList<E>();
+ } else {
+ if (end >= 0 && end <= start) return new EmptyList<E>();
+ }
+ }
+ return new ListView(_list, start, end);
+ }
+
+ _createReversedListView(int start, int end) {
+ if (start == null) return new EmptyList<E>();
+ if (end != null) {
+ if (start < 0) {
+ if (end <= start) return new EmptyList<E>();
+ } else {
+ if (end >= 0 && end <= start) return new EmptyList<E>();
+ }
+ }
+ return new ReversedListView(_list, start, end);
+ }
+}
+
+
+/**
+ * A fixed-length view of a sub-range of a [List].
+ */
+class ListView<E> extends SubListView<E> {
+
+ ListView(List<E> list, int start, int end) : super(list, start, end);
+
E operator[](int index) {
- int skipIndex = index + _offset;
- if (index < 0 ||
- (_length != null && index >= _length) ||
- index + _offset >= _list.length) {
- throw new RangeError.value(index);
+ int start = _absoluteIndex(_start);
+ int end = _absoluteIndex(_end);
+ int length = end - start;
+ if (index < 0 || index >= length) {
+ throw new RangeError.range(index, 0, length);
}
- return _list[index + _offset];
+ return _list[start + index];
}
- ListView<E> skip(int skipCount) {
- if (skipCount is! int || skipCount < 0) {
- throw new ArgumentError(skipCount);
+ List<E> skip(int count) {
+ if (count is! int || count < 0) {
+ throw new ArgumentError(count);
}
- return new ListView(_list, _offset + skipCount, _length);
+ if (_start == null) {
+ return new EmptyList<E>();
+ }
+ int newStart = _start + count;
+ if (_start < 0 && newStart >= 0) {
+ return new EmptyList<E>();
+ }
+ return _createListView(newStart, _end);
}
- ListView<E> take(int takeCount) {
- if (takeCount is! int || takeCount < 0) {
- throw new ArgumentError(takeCount);
+ List<E> take(int count) {
+ if (count is! int || count < 0) {
+ throw new ArgumentError(count);
}
- int newLength = takeCount;
- if (_length != null && takeCount > _length) newLength = _length;
- return new ListView(_list, _offset, newLength);
+ if (_start == null) {
+ return new EmptyList<E>();
+ }
+ int newEnd = _start + count;
+ if (_start < 0 && newEnd >= 0) {
+ newEnd = null;
+ }
+ return _createListView(_start, newEnd);
}
+
+ List<E> get reversed => new ReversedListView(_list, _start, _end);
+}
+
+/**
+ * Reversed view of a [List], or a slice of a list.
+ *
+ * The view is fixed-length and becomes invalid if the underlying
+ * list changes its length below the slice used by this reversed list.
+ *
+ * Start index and end index can be either positive, negative or null.
+ * Positive means an index relative to the start of the list,
+ * negative means an index relative to the end of the list, and null
+ * means at the end of the list (since there is no -0 integer).
+ */
+class ReversedListView<E> extends SubListView<E> {
+
+ ReversedListView(List<E> list, int start, int end)
+ : super(list, start, end);
+
+ E operator[](int index) {
+ int start = _absoluteIndex(_start);
+ int end = _absoluteIndex(_end);
+ int length = end - start;
+ if (index < 0 || index >= length) {
+ throw new RangeError.range(index, 0, length);
+ }
+ return _list[end - index - 1];
+ }
+
+ List<E> skip(int count) {
+ if (count is! int || count < 0) {
+ throw new ArgumentError(count);
+ }
+ if (_end == null) {
+ return _createReversedListView(_start, -count);
+ }
+ int newEnd = _end - count;
+ if (_end >= 0 && newEnd < 0) {
+ return new EmptyList<E>();
+ }
+ return _createReversedListView(_start, newEnd);
+ }
+
+ List<E> take(int count) {
+ if (count is! int || count < 0) {
+ throw new ArgumentError(count);
+ }
+ int newStart;
+ if (_end == null) {
+ newStart = -count;
+ } else {
+ newStart = _end - count;
+ if (_end >= 0 && newStart < 0) {
+ return new EmptyList<E>();
+ }
+ }
+ return _createReversedListView(newStart, _end);
+ }
+
+ Iterator<E> get iterator => new ReverseListIterator<E>(
+ _list, _absoluteIndex(_start), _absoluteIndex(_end));
+
+ List<E> get reversed {
+ return new ListView(_list, _start, _end);
+ }
+}
+
+/**
+ * An [Iterator] over a slice of a list that access elements in reverse order.
+ */
+class ReverseListIterator<E> implements Iterator<E> {
+ final List<E> _list;
+ final int _start;
+ final int _originalLength;
+ int _index;
+ E _current;
+
+ ReverseListIterator(List<E> list, int start, int end)
+ : _list = list,
+ _start = start,
+ _index = end,
+ _originalLength = list.length;
+
+ bool moveNext() {
+ if (_list.length != _originalLength) {
+ throw new ConcurrentModificationError(list);
+ }
+ if (_index <= _start) return false;
+ _index -= 1;
+ _current = _list[_index];
+ return true;
+ }
+
+ E get current => _current;
}
diff --git a/sdk/lib/core/collection.dart b/sdk/lib/core/collection.dart
index 48ab1de..7222b06 100644
--- a/sdk/lib/core/collection.dart
+++ b/sdk/lib/core/collection.dart
@@ -84,4 +84,11 @@
void retainMatching(bool test(E element)) {
IterableMixinWorkaround.retainMatching(this, test);
}
+
+ /**
+ * Removes all elements of this collection.
+ */
+ void clear() {
+ IterableMixinWorkaround.removeMatching(this, (E e) => true);
+ }
}
diff --git a/sdk/lib/core/core.dart b/sdk/lib/core/core.dart
index 706b92d..1d4e4b0 100644
--- a/sdk/lib/core/core.dart
+++ b/sdk/lib/core/core.dart
@@ -10,7 +10,7 @@
part "bool.dart";
part "collection.dart";
part "comparable.dart";
-part "date.dart";
+part "date_time.dart";
part "double.dart";
part "duration.dart";
part "errors.dart";
@@ -30,7 +30,6 @@
part "options.dart";
part "pattern.dart";
part "print.dart";
-part "queue.dart";
part "regexp.dart";
part "set.dart";
part "sink.dart";
diff --git a/sdk/lib/core/corelib_sources.gypi b/sdk/lib/core/corelib_sources.gypi
index b502e96..0506c5d 100644
--- a/sdk/lib/core/corelib_sources.gypi
+++ b/sdk/lib/core/corelib_sources.gypi
@@ -7,7 +7,7 @@
'bool.dart',
'collection.dart',
'comparable.dart',
- 'date.dart',
+ 'date_time.dart',
'double.dart',
'duration.dart',
'exceptions.dart',
@@ -27,7 +27,6 @@
'options.dart',
'pattern.dart',
'print.dart',
- 'queue.dart',
'regexp.dart',
'set.dart',
'sink.dart',
diff --git a/sdk/lib/core/date.dart b/sdk/lib/core/date_time.dart
similarity index 62%
rename from sdk/lib/core/date.dart
rename to sdk/lib/core/date_time.dart
index d0c0f01..92321f6 100644
--- a/sdk/lib/core/date.dart
+++ b/sdk/lib/core/date_time.dart
@@ -5,13 +5,7 @@
part of dart.core;
/**
- * Date is the public interface to a point in time.
- *
- * It can represent time values that are at a distance of at most
- * 8,640,000,000,000,000ms (100,000,000 days) from epoch (1970-01-01 UTC). In
- * other words: [:millisecondsSinceEpoch.abs() <= 8640000000000000:].
- *
- * Also see [Stopwatch] for means to measure time-spans.
+ * Deprecated class. Please use [DateTime] instead.
*/
abstract class Date implements Comparable {
// Weekday constants that are returned by [weekday] method:
@@ -38,13 +32,6 @@
static const int NOV = 11;
static const int DEC = 12;
- /**
- * Constructs a [Date] instance based on the individual parts. The date is
- * in the local time zone.
- *
- * [month] and [day] are one-based. For example
- * [:new Date(1938, 1, 10):] represents the 10th of January 1938.
- */
factory Date(int year,
[int month = 1,
int day = 1,
@@ -52,18 +39,9 @@
int minute = 0,
int second = 0,
int millisecond = 0]) {
- return new _DateImpl(
- year, month, day, hour, minute, second, millisecond, false);
+ return new DateTime(year, month, day, hour, minute, second, millisecond);
}
- /**
- * Constructs a [Date] instance based on the individual parts. The date is
- * in the UTC time zone.
- *
- * [month] and [day] are one-based. For example
- * [:new Date.utc(1938, 1, 10):] represents the 10th of January 1938 in
- * Coordinated Universal Time.
- */
factory Date.utc(int year,
[int month = 1,
int day = 1,
@@ -71,206 +49,176 @@
int minute = 0,
int second = 0,
int millisecond = 0]) {
- return new _DateImpl(
- year, month, day, hour, minute, second, millisecond, true);
+ return
+ new DateTime.utc(year, month, day, hour, minute, second, millisecond);
}
- /**
- * Constructs a new [Date] instance with current date time value in the
- * local time zone.
- */
- factory Date.now() => new _DateImpl.now();
+ factory Date.now() => new DateTime.now();
- /**
- * Constructs a new [Date] instance based on [formattedString].
- */
factory Date.fromString(String formattedString)
- => new _DateImpl.fromString(formattedString);
+ => DateTime.parse(formattedString);
- /**
- * Constructs a new [Date] instance with the given [millisecondsSinceEpoch].
- * If [isUtc] is false then the date is in the local time zone.
- *
- * The constructed [Date] represents
- * 1970-01-01T00:00:00Z + [millisecondsSinceEpoch]ms in the given
- * time zone (local or UTC).
- */
- // TODO(floitsch): the spec allows default values in interfaces, but our
- // tools don't yet. Eventually we want to have default values here.
- // TODO(lrn): Have two constructors instead of taking an optional bool.
factory Date.fromMillisecondsSinceEpoch(int millisecondsSinceEpoch,
{bool isUtc: false}) {
- return new _DateImpl.fromMillisecondsSinceEpoch(millisecondsSinceEpoch,
- isUtc);
+ return new DateTime.fromMillisecondsSinceEpoch(millisecondsSinceEpoch,
+ isUtc: isUtc);
}
- /**
- * Returns true if [this] occurs at the same time as [other]. The
- * comparison is independent of whether the time is utc or in the local
- * time zone.
- */
- bool operator ==(Date other);
- /**
- * Returns true if [this] occurs before [other]. The comparison is independent
- * of whether the time is utc or in the local time zone.
- */
- bool operator <(Date other);
- /**
- * Returns true if [this] occurs at the same time or before [other]. The
- * comparison is independent of whether the time is utc or in the local
- * time zone.
- */
- bool operator <=(Date other);
- /**
- * Returns true if [this] occurs after [other]. The comparison is independent
- * of whether the time is utc or in the local time zone.
- */
- bool operator >(Date other);
- /**
- * Returns true if [this] occurs at the same time or after [other]. The
- * comparison is independent of whether the time is utc or in the local
- * time zone.
- */
- bool operator >=(Date other);
+ bool operator ==(DateTime other);
+ bool operator <(DateTime other);
+ bool operator <=(DateTime other);
+ bool operator >(DateTime other);
+ bool operator >=(DateTime other);
- /**
- * Returns [this] in the local time zone. Returns itself if it is already in
- * the local time zone. Otherwise, this method is equivalent to
- * [:new Date.fromMillisecondsSinceEpoch(millisecondsSinceEpoch,
- * isUtc: false):].
- */
- Date toLocal();
+ DateTime toLocal();
+ DateTime toUtc();
- /**
- * Returns [this] in UTC. Returns itself if it is already in UTC. Otherwise,
- * this method is equivalent to
- * [:new Date.fromMillisecondsSinceEpoch(millisecondsSinceEpoch,
- * isUtc: true):].
- */
- Date toUtc();
-
- /**
- * Returns the abbreviated time-zone name.
- *
- * Examples: [:"CET":] or [:"CEST":].
- */
String get timeZoneName;
-
- /**
- * The time-zone offset is the difference between local time and UTC. That is,
- * the offset is positive for time zones west of UTC.
- *
- * Note, that JavaScript, Python and C return the difference between UTC and
- * local time. Java, C# and Ruby return the difference between local time and
- * UTC.
- */
Duration get timeZoneOffset;
- /**
- * Returns the year.
- */
int get year;
-
- /**
- * Returns the month into the year [1..12].
- */
int get month;
-
- /**
- * Returns the day into the month [1..31].
- */
int get day;
-
- /**
- * Returns the hour into the day [0..23].
- */
int get hour;
-
- /**
- * Returns the minute into the hour [0...59].
- */
int get minute;
-
- /**
- * Returns the second into the minute [0...59].
- */
int get second;
-
- /**
- * Returns the millisecond into the second [0...999].
- */
int get millisecond;
- /**
- * Returns the week day [MON..SUN]. In accordance with ISO 8601
- * a week starts with Monday which has the value 1.
- */
int get weekday;
+ int get millisecondsSinceEpoch;
+
+ bool get isUtc;
+
+ String toString();
+
+ DateTime add(Duration duration);
+ DateTime subtract(Duration duration);
+ Duration difference(DateTime other);
+}
+
+/**
+ * Date is the public interface to a point in time.
+ *
+ * It can represent time values that are at a distance of at most
+ * 8,640,000,000,000,000ms (100,000,000 days) from epoch (1970-01-01 UTC). In
+ * other words: [:millisecondsSinceEpoch.abs() <= 8640000000000000:].
+ *
+ * Also see [Stopwatch] for means to measure time-spans.
+ */
+class DateTime implements Date {
+ // Weekday constants that are returned by [weekday] method:
+ static const int MON = 1;
+ static const int TUE = 2;
+ static const int WED = 3;
+ static const int THU = 4;
+ static const int FRI = 5;
+ static const int SAT = 6;
+ static const int SUN = 7;
+ static const int DAYS_IN_WEEK = 7;
+
+ // Month constants that are returned by the [month] getter.
+ static const int JAN = 1;
+ static const int FEB = 2;
+ static const int MAR = 3;
+ static const int APR = 4;
+ static const int MAY = 5;
+ static const int JUN = 6;
+ static const int JUL = 7;
+ static const int AUG = 8;
+ static const int SEP = 9;
+ static const int OCT = 10;
+ static const int NOV = 11;
+ static const int DEC = 12;
+
/**
* The milliseconds since 1970-01-01T00:00:00Z (UTC). This value is
* independent of the time zone.
*
* See [Stopwatch] for means to measure time-spans.
*/
- int get millisecondsSinceEpoch;
-
- /**
- * True if this [Date] is set to UTC time.
- */
- bool get isUtc;
-
- /**
- * Returns a human readable string for this instance.
- * The returned string is constructed for the time zone of this instance.
- */
- String toString();
-
- /**
- * Returns a new [Date] with the [duration] added to this instance.
- */
- Date add(Duration duration);
-
- /**
- * Returns a new [Date] with the [duration] subtracted from this instance.
- */
- Date subtract(Duration duration);
-
- /**
- * Returns a [Duration] with the difference of [:this:] and [other].
- */
- Duration difference(Date other);
-}
-
-class _DateImpl implements Date {
final int millisecondsSinceEpoch;
+
+ /**
+ * True if this [DateTime] is set to UTC time.
+ */
final bool isUtc;
- factory _DateImpl.fromString(String formattedString) {
- // Read in (a subset of) ISO 8601.
- // Examples:
- // - "2012-02-27 13:27:00"
- // - "2012-02-27 13:27:00.423z"
- // - "20120227 13:27:00"
- // - "20120227T132700"
- // - "20120227"
- // - "2012-02-27T14Z"
- // - "-123450101 00:00:00 Z" // In the year -12345.
+ /**
+ * Constructs a [DateTime] instance based on the individual parts. The date is
+ * in the local time zone.
+ *
+ * [month] and [day] are one-based. For example
+ * [:new DateTime(1938, 1, 10):] represents the 10th of January 1938.
+ */
+ // TODO(8042): This should be a redirecting constructor and not a factory.
+ factory DateTime(int year,
+ [int month = 1,
+ int day = 1,
+ int hour = 0,
+ int minute = 0,
+ int second = 0,
+ int millisecond = 0]) {
+ return new DateTime._internal(
+ year, month, day, hour, minute, second, millisecond, false);
+ }
+
+ /**
+ * Constructs a [DateTime] instance based on the individual parts. The date is
+ * in the UTC time zone.
+ *
+ * [month] and [day] are one-based. For example
+ * [:new DateTime.utc(1938, 1, 10):] represents the 10th of January 1938 in
+ * Coordinated Universal Time.
+ */
+ // TODO(8042): This should be a redirecting constructor and not a factory.
+ factory DateTime.utc(int year,
+ [int month = 1,
+ int day = 1,
+ int hour = 0,
+ int minute = 0,
+ int second = 0,
+ int millisecond = 0]) {
+ return new DateTime._internal(
+ year, month, day, hour, minute, second, millisecond, true);
+ }
+
+ /**
+ * Constructs a new [DateTime] instance with current date time value in the
+ * local time zone.
+ */
+ // TODO(8042): This should be a redirecting constructor and not a factory.
+ factory DateTime.now() { return new DateTime._now(); }
+
+ /**
+ * Constructs a new [DateTime] instance based on [formattedString].
+ *
+ * The function parses a subset of ISO 8601. Examples of accepted strings:
+ *
+ * * `"2012-02-27 13:27:00"`
+ * * `"2012-02-27 13:27:00.123456z"`
+ * * `"20120227 13:27:00"`
+ * * `"20120227T132700"`
+ * * `"20120227"`
+ * * `"+20120227"`
+ * * `"2012-02-27T14Z"`
+ * * `"-123450101 00:00:00 Z"`: in the year -12345.
+ */
+ // TODO(floitsch): specify grammar.
+ static DateTime parse(String formattedString) {
final RegExp re = new RegExp(
r'^([+-]?\d?\d\d\d\d)-?(\d\d)-?(\d\d)' // The day part.
r'(?:[ T](\d\d)(?::?(\d\d)(?::?(\d\d)(.\d{1,6})?)?)? ?([zZ])?)?$');
Match match = re.firstMatch(formattedString);
if (match != null) {
int parseIntOrZero(String matched) {
- // TODO(floitsch): we should not need to test against the empty string.
- if (matched == null || matched == "") return 0;
+ if (matched == null) return 0;
return int.parse(matched);
}
double parseDoubleOrZero(String matched) {
- // TODO(floitsch): we should not need to test against the empty string.
- if (matched == null || matched == "") return 0.0;
+ if (matched == null) return 0.0;
return double.parse(matched);
}
@@ -294,8 +242,8 @@
throw new ArgumentError(formattedString);
}
if (addOneMillisecond) millisecondsSinceEpoch++;
- return new Date.fromMillisecondsSinceEpoch(millisecondsSinceEpoch,
- isUtc: isUtc);
+ return new DateTime.fromMillisecondsSinceEpoch(millisecondsSinceEpoch,
+ isUtc: isUtc);
} else {
throw new ArgumentError(formattedString);
}
@@ -303,50 +251,102 @@
static const int _MAX_MILLISECONDS_SINCE_EPOCH = 8640000000000000;
- _DateImpl.fromMillisecondsSinceEpoch(this.millisecondsSinceEpoch,
- this.isUtc) {
+ /**
+ * Constructs a new [DateTime] instance with the given [millisecondsSinceEpoch].
+ * If [isUtc] is false then the date is in the local time zone.
+ *
+ * The constructed [DateTime] represents
+ * 1970-01-01T00:00:00Z + [millisecondsSinceEpoch]ms in the given
+ * time zone (local or UTC).
+ */
+ // TODO(lrn): Have two constructors instead of taking an optional bool.
+ DateTime.fromMillisecondsSinceEpoch(int millisecondsSinceEpoch,
+ {bool isUtc: false})
+ : this.millisecondsSinceEpoch = millisecondsSinceEpoch,
+ this.isUtc = isUtc {
if (millisecondsSinceEpoch.abs() > _MAX_MILLISECONDS_SINCE_EPOCH) {
throw new ArgumentError(millisecondsSinceEpoch);
}
if (isUtc == null) throw new ArgumentError(isUtc);
}
+ /**
+ * Returns true if [this] occurs at the same time as [other]. The
+ * comparison is independent of whether the time is utc or in the local
+ * time zone.
+ */
bool operator ==(other) {
- if (!(other is Date)) return false;
+ if (!(other is DateTime)) return false;
return (millisecondsSinceEpoch == other.millisecondsSinceEpoch);
}
- bool operator <(Date other)
+ /**
+ * Returns true if [this] occurs before [other]. The comparison is independent
+ * of whether the time is utc or in the local time zone.
+ */
+ bool operator <(DateTime other)
=> millisecondsSinceEpoch < other.millisecondsSinceEpoch;
- bool operator <=(Date other)
+ /**
+ * Returns true if [this] occurs at the same time or before [other]. The
+ * comparison is independent of whether the time is utc or in the local
+ * time zone.
+ */
+ bool operator <=(DateTime other)
=> millisecondsSinceEpoch <= other.millisecondsSinceEpoch;
- bool operator >(Date other)
+ /**
+ * Returns true if [this] occurs after [other]. The comparison is independent
+ * of whether the time is utc or in the local time zone.
+ */
+ bool operator >(DateTime other)
=> millisecondsSinceEpoch > other.millisecondsSinceEpoch;
- bool operator >=(Date other)
+ /**
+ * Returns true if [this] occurs at the same time or after [other]. The
+ * comparison is independent of whether the time is utc or in the local
+ * time zone.
+ */
+ bool operator >=(DateTime other)
=> millisecondsSinceEpoch >= other.millisecondsSinceEpoch;
- int compareTo(Date other)
+ int compareTo(DateTime other)
=> millisecondsSinceEpoch.compareTo(other.millisecondsSinceEpoch);
int get hashCode => millisecondsSinceEpoch;
- Date toLocal() {
+ /**
+ * Returns [this] in the local time zone. Returns itself if it is already in
+ * the local time zone. Otherwise, this method is equivalent to
+ *
+ * new DateTime.fromMillisecondsSinceEpoch(millisecondsSinceEpoch,
+ * isUtc: false)
+ */
+ DateTime toLocal() {
if (isUtc) {
- return new Date.fromMillisecondsSinceEpoch(millisecondsSinceEpoch,
- isUtc: false);
+ return new DateTime.fromMillisecondsSinceEpoch(millisecondsSinceEpoch,
+ isUtc: false);
}
return this;
}
- Date toUtc() {
+ /**
+ * Returns [this] in UTC. Returns itself if it is already in UTC. Otherwise,
+ * this method is equivalent to
+ *
+ * new DateTime.fromMillisecondsSinceEpoch(millisecondsSinceEpoch,
+ * isUtc: true)
+ */
+ DateTime toUtc() {
if (isUtc) return this;
- return new Date.fromMillisecondsSinceEpoch(millisecondsSinceEpoch,
- isUtc: true);
+ return new DateTime.fromMillisecondsSinceEpoch(millisecondsSinceEpoch,
+ isUtc: true);
}
+ /**
+ * Returns a human readable string for this instance.
+ * The returned string is constructed for the time zone of this instance.
+ */
String toString() {
String fourDigits(int n) {
int absN = n.abs();
@@ -382,47 +382,95 @@
}
}
- /** Returns a new [Date] with the [duration] added to [this]. */
- Date add(Duration duration) {
+ /** Returns a new [DateTime] with the [duration] added to [this]. */
+ DateTime add(Duration duration) {
int ms = millisecondsSinceEpoch;
- return new Date.fromMillisecondsSinceEpoch(
+ return new DateTime.fromMillisecondsSinceEpoch(
ms + duration.inMilliseconds, isUtc: isUtc);
}
- /** Returns a new [Date] with the [duration] subtracted from [this]. */
- Date subtract(Duration duration) {
+ /** Returns a new [DateTime] with the [duration] subtracted from [this]. */
+ DateTime subtract(Duration duration) {
int ms = millisecondsSinceEpoch;
- return new Date.fromMillisecondsSinceEpoch(
+ return new DateTime.fromMillisecondsSinceEpoch(
ms - duration.inMilliseconds, isUtc: isUtc);
}
/** Returns a [Duration] with the difference of [this] and [other]. */
- Duration difference(Date other) {
+ Duration difference(DateTime other) {
int ms = millisecondsSinceEpoch;
int otherMs = other.millisecondsSinceEpoch;
return new Duration(milliseconds: ms - otherMs);
}
- external _DateImpl(int year,
- int month,
- int day,
- int hour,
- int minute,
- int second,
- int millisecond,
- bool isUtc);
- external _DateImpl.now();
+ external DateTime._internal(int year,
+ int month,
+ int day,
+ int hour,
+ int minute,
+ int second,
+ int millisecond,
+ bool isUtc);
+ external DateTime._now();
external static int _brokenDownDateToMillisecondsSinceEpoch(
int year, int month, int day, int hour, int minute, int second,
int millisecond, bool isUtc);
+
+ /**
+ * Returns the abbreviated time-zone name.
+ *
+ * Examples: [:"CET":] or [:"CEST":].
+ */
external String get timeZoneName;
+
+ /**
+ * The time-zone offset is the difference between local time and UTC. That is,
+ * the offset is positive for time zones west of UTC.
+ *
+ * Note, that JavaScript, Python and C return the difference between UTC and
+ * local time. Java, C# and Ruby return the difference between local time and
+ * UTC.
+ */
external Duration get timeZoneOffset;
+
+ /**
+ * Returns the year.
+ */
external int get year;
+
+ /**
+ * Returns the month into the year [1..12].
+ */
external int get month;
+
+ /**
+ * Returns the day into the month [1..31].
+ */
external int get day;
+
+ /**
+ * Returns the hour into the day [0..23].
+ */
external int get hour;
+
+ /**
+ * Returns the minute into the hour [0...59].
+ */
external int get minute;
+
+ /**
+ * Returns the second into the minute [0...59].
+ */
external int get second;
+
+ /**
+ * Returns the millisecond into the second [0...999].
+ */
external int get millisecond;
+
+ /**
+ * Returns the week day [MON..SUN]. In accordance with ISO 8601
+ * a week starts with Monday which has the value 1.
+ */
external int get weekday;
}
diff --git a/sdk/lib/core/errors.dart b/sdk/lib/core/errors.dart
index 59f30d0..92f313f 100644
--- a/sdk/lib/core/errors.dart
+++ b/sdk/lib/core/errors.dart
@@ -93,6 +93,10 @@
/** Create a new [RangeError] with a message for the given [value]. */
RangeError.value(num value) : super("value $value");
+ /** Create a new [RangeError] with a message for a value and a range. */
+ RangeError.range(num value, num start, num end)
+ : super("value $value not in range $start..$end");
+
String toString() => "RangeError: $message";
}
@@ -238,6 +242,29 @@
}
+/**
+ * Error occurring when a collection is modified during iteration.
+ *
+ * Some modifications may be allowed for some collections, so each collection
+ * ([Iterable] or similar collection of values) should declare which operations
+ * are allowed during an iteration.
+ */
+class ConcurrentModificationError implements Error {
+ /** The object that was modified in an incompatible way. */
+ final Object modifiedObject;
+
+ const ConcurrentModificationError([this.modifiedObject]);
+
+ String toString() {
+ if (modifiedObject == null) {
+ return "Concurrent modification during iteration.";
+ }
+ return "Concurrent modification during iteration: "
+ "${Error.safeToString(modifiedObject)}.";
+ }
+}
+
+
class OutOfMemoryError implements Error {
const OutOfMemoryError();
String toString() => "Out of Memory";
diff --git a/sdk/lib/core/iterable.dart b/sdk/lib/core/iterable.dart
index 896d356..e13f2fe 100644
--- a/sdk/lib/core/iterable.dart
+++ b/sdk/lib/core/iterable.dart
@@ -19,6 +19,16 @@
abstract class Iterable<E> {
const Iterable();
+ /**
+ * Create an [Iterable] that generates its elements dynamically.
+ *
+ * The [Iterators] created by the [Iterable] will count from
+ * zero to [:count - 1:] while iterating, and call [generator]
+ * with that index to create the next value.
+ *
+ * As an [Iterable], [:new Iterable.generate(n, generator)):] is equivalent to
+ * [:const [0, ..., n - 1].mappedBy(generator):]
+ */
factory Iterable.generate(int count, E generator(int index)) {
return new _GeneratorIterable<E>(count, generator);
}
diff --git a/sdk/lib/core/iterator.dart b/sdk/lib/core/iterator.dart
index 12c4a72..e251df6 100644
--- a/sdk/lib/core/iterator.dart
+++ b/sdk/lib/core/iterator.dart
@@ -16,6 +16,13 @@
* accessing the first element the iterator must thus be advanced ([moveNext])
* to point to the first element. If there is no element left, then [moveNext]
* returns false.
+ *
+ * A typical usage of an [Iterator] looks as follows:
+ *
+ * var it = obj.iterator;
+ * while (it.moveNext()) {
+ * use(it.current);
+ * }
*/
abstract class Iterator<E> {
/**
@@ -36,37 +43,3 @@
*/
E get current;
}
-
-class HasNextIterator<E> {
- static const int _HAS_NEXT_AND_NEXT_IN_CURRENT = 0;
- static const int _NO_NEXT = 1;
- static const int _NOT_MOVED_YET = 2;
-
- Iterator _iterator;
- int _state = _NOT_MOVED_YET;
-
- HasNextIterator(this._iterator);
-
- bool get hasNext {
- if (_state == _NOT_MOVED_YET) _move();
- return _state == _HAS_NEXT_AND_NEXT_IN_CURRENT;
- }
-
- E next() {
- // Call to hasNext is necessary to make sure we are positioned at the first
- // element when we start iterating.
- if (!hasNext) throw new StateError("No more elements");
- assert(_state == _HAS_NEXT_AND_NEXT_IN_CURRENT);
- E result = _iterator.current;
- _move();
- return result;
- }
-
- void _move() {
- if (_iterator.moveNext()) {
- _state = _HAS_NEXT_AND_NEXT_IN_CURRENT;
- } else {
- _state = _NO_NEXT;
- }
- }
-}
diff --git a/sdk/lib/core/list.dart b/sdk/lib/core/list.dart
index 2ab0a06..b98743c 100644
--- a/sdk/lib/core/list.dart
+++ b/sdk/lib/core/list.dart
@@ -85,6 +85,15 @@
void addAll(Iterable<E> iterable);
/**
+ * Returns a reversed fixed-length view of this [List].
+ *
+ * The reversed list has elements in the opposite order of this list.
+ * It is backed by this list, but will stop working if this list
+ * becomes shorter than its current length.
+ */
+ List<E> get reversed;
+
+ /**
* Sorts the list according to the order specified by the [compare] function.
*
* The [compare] function must act as a [Comparator].
@@ -189,4 +198,36 @@
* [start] is greater than the length of the list.
*/
void insertRange(int start, int length, [E fill]);
+
+ /**
+ * Returns a lazy unmodifiable [List] where each element [:e:] of [:this:] is
+ * replaced by the result of [:f(e):].
+ *
+ * This method returns a view of the mapped elements. As long as the
+ * returned [List] is not indexed or iterated over, the supplied function [f]
+ * will not be invoked. The transformed elements will not be cached. Accessing
+ * elements multiple times will invoke the supplied function [f] multiple
+ * times.
+ */
+ List mappedBy(f(E element));
+
+ /**
+ * Returns an unmodifiable [List] that hides the first [n] elements.
+ *
+ * The returned list is a view backed by [:this:].
+ *
+ * While [:this:] has fewer than [n] elements, then the resulting [List]
+ * will be empty.
+ */
+ List<E> skip(int n);
+
+ /**
+ * Returns an unmodifiable [List] with at most [n] elements.
+ *
+ * The returned list is a view backed by this.
+ *
+ * The returned [List] may contain fewer than [n] elements, while [:this:]
+ * contains fewer than [n] elements.
+ */
+ List<E> take(int n);
}
diff --git a/sdk/lib/core/map.dart b/sdk/lib/core/map.dart
index 9b2b666..8b27b3e 100644
--- a/sdk/lib/core/map.dart
+++ b/sdk/lib/core/map.dart
@@ -12,12 +12,12 @@
/**
* Creates a map with the default implementation.
*/
- factory Map() => new _HashMapImpl<K, V>();
+ factory Map() => new HashMap<K, V>();
/**
* Creates a [Map] that contains all key value pairs of [other].
*/
- factory Map.from(Map<K, V> other) => new _HashMapImpl<K, V>.from(other);
+ factory Map.from(Map<K, V> other) => new HashMap<K, V>.from(other);
/**
@@ -89,472 +89,3 @@
*/
bool get isEmpty;
}
-
-/**
- * Hash map version of the [Map] interface. A [HashMap] does not
- * provide any guarantees on the order of keys and values in [keys]
- * and [values].
- */
-abstract class HashMap<K, V> extends Map<K, V> {
- /**
- * Creates a map with the default implementation.
- */
- factory HashMap() => new _HashMapImpl<K, V>();
-
- /**
- * Creates a [HashMap] that contains all key value pairs of [other].
- */
- factory HashMap.from(Map<K, V> other) => new _HashMapImpl<K, V>.from(other);
-}
-
-/**
- * Hash map version of the [Map] interface that preserves insertion
- * order.
- */
-abstract class LinkedHashMap<K, V> extends HashMap<K, V> {
- /**
- * Creates a map with the default implementation.
- */
- factory LinkedHashMap() => new _LinkedHashMapImpl<K, V>();
-
- /**
- * Creates a [LinkedHashMap] that contains all key value pairs of [other].
- */
- factory LinkedHashMap.from(Map<K, V> other)
- => new _LinkedHashMapImpl<K, V>.from(other);
-}
-
-
-// Hash map implementation with open addressing and quadratic probing.
-class _HashMapImpl<K, V> implements HashMap<K, V> {
-
- // The [_keys] list contains the keys inserted in the map.
- // The [_keys] list must be a raw list because it
- // will contain both elements of type K, and the [_DELETED_KEY] of type
- // [_DeletedKeySentinel].
- // The alternative of declaring the [_keys] list as of type Object
- // does not work, because the HashSetIterator constructor would fail:
- // HashSetIterator(HashSet<E> set)
- // : _nextValidIndex = -1,
- // _entries = set_._backingMap._keys {
- // _advance();
- // }
- // With K being type int, for example, it would fail because
- // List<Object> is not assignable to type List<int> of entries.
- List _keys;
-
- // The values inserted in the map. For a filled entry index in this
- // list, there is always the corresponding key in the [keys_] list
- // at the same entry index.
- List<V> _values;
-
- // The load limit is the number of entries we allow until we double
- // the size of the lists.
- int _loadLimit;
-
- // The current number of entries in the map. Will never be greater
- // than [_loadLimit].
- int _numberOfEntries;
-
- // The current number of deleted entries in the map.
- int _numberOfDeleted;
-
- // The sentinel when a key is deleted from the map.
- static const _DeletedKeySentinel _DELETED_KEY = const _DeletedKeySentinel();
-
- // The initial capacity of a hash map.
- static const int _INITIAL_CAPACITY = 8; // must be power of 2
-
- _HashMapImpl() {
- _numberOfEntries = 0;
- _numberOfDeleted = 0;
- _loadLimit = _computeLoadLimit(_INITIAL_CAPACITY);
- _keys = new List.fixedLength(_INITIAL_CAPACITY);
- _values = new List<V>.fixedLength(_INITIAL_CAPACITY);
- }
-
- factory _HashMapImpl.from(Map<K, V> other) {
- Map<K, V> result = new _HashMapImpl<K, V>();
- other.forEach((K key, V value) { result[key] = value; });
- return result;
- }
-
- static int _computeLoadLimit(int capacity) {
- return (capacity * 3) ~/ 4;
- }
-
- static int _firstProbe(int hashCode, int length) {
- return hashCode & (length - 1);
- }
-
- static int _nextProbe(int currentProbe, int numberOfProbes, int length) {
- return (currentProbe + numberOfProbes) & (length - 1);
- }
-
- int _probeForAdding(K key) {
- if (key == null) throw new ArgumentError(null);
- int hash = _firstProbe(key.hashCode, _keys.length);
- int numberOfProbes = 1;
- int initialHash = hash;
- // insertionIndex points to a slot where a key was deleted.
- int insertionIndex = -1;
- while (true) {
- // [existingKey] can be either of type [K] or [_DeletedKeySentinel].
- Object existingKey = _keys[hash];
- if (existingKey == null) {
- // We are sure the key is not already in the set.
- // If the current slot is empty and we didn't find any
- // insertion slot before, return this slot.
- if (insertionIndex < 0) return hash;
- // If we did find an insertion slot before, return it.
- return insertionIndex;
- } else if (existingKey == key) {
- // The key is already in the map. Return its slot.
- return hash;
- } else if ((insertionIndex < 0) &&
- (identical(existingKey, _DELETED_KEY))) {
- // The slot contains a deleted element. Because previous calls to this
- // method may not have had this slot deleted, we must continue iterate
- // to find if there is a slot with the given key.
- insertionIndex = hash;
- }
-
- // We did not find an insertion slot. Look at the next one.
- hash = _nextProbe(hash, numberOfProbes++, _keys.length);
- // _ensureCapacity has guaranteed the following cannot happen.
- // assert(hash != initialHash);
- }
- }
-
- int _probeForLookup(K key) {
- if (key == null) throw new ArgumentError(null);
- int hash = _firstProbe(key.hashCode, _keys.length);
- int numberOfProbes = 1;
- int initialHash = hash;
- while (true) {
- // [existingKey] can be either of type [K] or [_DeletedKeySentinel].
- Object existingKey = _keys[hash];
- // If the slot does not contain anything (in particular, it does not
- // contain a deleted key), we know the key is not in the map.
- if (existingKey == null) return -1;
- // The key is in the map, return its index.
- if (existingKey == key) return hash;
- // Go to the next probe.
- hash = _nextProbe(hash, numberOfProbes++, _keys.length);
- // _ensureCapacity has guaranteed the following cannot happen.
- // assert(hash != initialHash);
- }
- }
-
- void _ensureCapacity() {
- int newNumberOfEntries = _numberOfEntries + 1;
- // Test if adding an element will reach the load limit.
- if (newNumberOfEntries >= _loadLimit) {
- _grow(_keys.length * 2);
- return;
- }
-
- // Make sure that we don't have poor performance when a map
- // contains lots of deleted entries: we _grow if
- // there are more deleted entried than free entries.
- int capacity = _keys.length;
- int numberOfFreeOrDeleted = capacity - newNumberOfEntries;
- int numberOfFree = numberOfFreeOrDeleted - _numberOfDeleted;
- // assert(numberOfFree > 0);
- if (_numberOfDeleted > numberOfFree) {
- _grow(_keys.length);
- }
- }
-
- static bool _isPowerOfTwo(int x) {
- return ((x & (x - 1)) == 0);
- }
-
- void _grow(int newCapacity) {
- assert(_isPowerOfTwo(newCapacity));
- int capacity = _keys.length;
- _loadLimit = _computeLoadLimit(newCapacity);
- List oldKeys = _keys;
- List<V> oldValues = _values;
- _keys = new List.fixedLength(newCapacity);
- _values = new List<V>.fixedLength(newCapacity);
- for (int i = 0; i < capacity; i++) {
- // [key] can be either of type [K] or [_DeletedKeySentinel].
- Object key = oldKeys[i];
- // If there is no key, we don't need to deal with the current slot.
- if (key == null || identical(key, _DELETED_KEY)) {
- continue;
- }
- V value = oldValues[i];
- // Insert the {key, value} pair in their new slot.
- int newIndex = _probeForAdding(key);
- _keys[newIndex] = key;
- _values[newIndex] = value;
- }
- _numberOfDeleted = 0;
- }
-
- void clear() {
- _numberOfEntries = 0;
- _numberOfDeleted = 0;
- int length = _keys.length;
- for (int i = 0; i < length; i++) {
- _keys[i] = null;
- _values[i] = null;
- }
- }
-
- void operator []=(K key, V value) {
- _ensureCapacity();
- int index = _probeForAdding(key);
- if ((_keys[index] == null) || (identical(_keys[index], _DELETED_KEY))) {
- _numberOfEntries++;
- }
- _keys[index] = key;
- _values[index] = value;
- }
-
- V operator [](K key) {
- int index = _probeForLookup(key);
- if (index < 0) return null;
- return _values[index];
- }
-
- V putIfAbsent(K key, V ifAbsent()) {
- int index = _probeForLookup(key);
- if (index >= 0) return _values[index];
-
- V value = ifAbsent();
- this[key] = value;
- return value;
- }
-
- V remove(K key) {
- int index = _probeForLookup(key);
- if (index >= 0) {
- _numberOfEntries--;
- V value = _values[index];
- _values[index] = null;
- // Set the key to the sentinel to not break the probing chain.
- _keys[index] = _DELETED_KEY;
- _numberOfDeleted++;
- return value;
- }
- return null;
- }
-
- bool get isEmpty {
- return _numberOfEntries == 0;
- }
-
- int get length {
- return _numberOfEntries;
- }
-
- void forEach(void f(K key, V value)) {
- Iterator<int> it = new _HashMapImplIndexIterator(this);
- while (it.moveNext()) {
- f(_keys[it.current], _values[it.current]);
- }
- }
-
- Iterable<K> get keys => new _HashMapImplKeyIterable<K>(this);
-
- Iterable<V> get values => new _HashMapImplValueIterable<V>(this);
-
- bool containsKey(K key) {
- return (_probeForLookup(key) != -1);
- }
-
- bool containsValue(V value) => values.contains(value);
-
- String toString() {
- return Maps.mapToString(this);
- }
-}
-
-class _HashMapImplKeyIterable<E> extends Iterable<E> {
- final _HashMapImpl _map;
- _HashMapImplKeyIterable(this._map);
-
- Iterator<E> get iterator => new _HashMapImplKeyIterator<E>(_map);
-}
-
-class _HashMapImplValueIterable<E> extends Iterable<E> {
- final _HashMapImpl _map;
- _HashMapImplValueIterable(this._map);
-
- Iterator<E> get iterator => new _HashMapImplValueIterator<E>(_map);
-}
-
-abstract class _HashMapImplIterator<E> implements Iterator<E> {
- final _HashMapImpl _map;
- int _index = -1;
- E _current;
-
- _HashMapImplIterator(this._map);
-
- E _computeCurrentFromIndex(int index, List keys, List values);
-
- bool moveNext() {
- int length = _map._keys.length;
- int newIndex = _index + 1;
- while (newIndex < length) {
- var key = _map._keys[newIndex];
- if ((key != null) && (!identical(key, _HashMapImpl._DELETED_KEY))) {
- _current = _computeCurrentFromIndex(newIndex, _map._keys, _map._values);
- _index = newIndex;
- return true;
- }
- newIndex++;
- }
- _index = length;
- _current = null;
- return false;
- }
-
- E get current => _current;
-}
-
-class _HashMapImplKeyIterator<E> extends _HashMapImplIterator<E> {
- _HashMapImplKeyIterator(_HashMapImpl map) : super(map);
-
- E _computeCurrentFromIndex(int index, List keys, List values) {
- return keys[index];
- }
-}
-
-class _HashMapImplValueIterator<E> extends _HashMapImplIterator<E> {
- _HashMapImplValueIterator(_HashMapImpl map) : super(map);
-
- E _computeCurrentFromIndex(int index, List keys, List values) {
- return values[index];
- }
-}
-
-class _HashMapImplIndexIterator extends _HashMapImplIterator<int> {
- _HashMapImplIndexIterator(_HashMapImpl map) : super(map);
-
- int _computeCurrentFromIndex(int index, List keys, List values) {
- return index;
- }
-}
-
-/**
- * A singleton sentinel used to represent when a key is deleted from the map.
- * We can't use [: const Object() :] as a sentinel because it would end up
- * canonicalized and then we cannot distinguish the deleted key from the
- * canonicalized [: Object() :].
- */
-class _DeletedKeySentinel {
- const _DeletedKeySentinel();
-}
-
-
-/**
- * This class represents a pair of two objects, used by LinkedHashMap
- * to store a {key, value} in a list.
- */
-class _KeyValuePair<K, V> {
- _KeyValuePair(this.key, this.value) {}
-
- final K key;
- V value;
-}
-
-/**
- * A LinkedHashMap is a hash map that preserves the insertion order
- * when iterating over the keys or the values. Updating the value of a
- * key does not change the order.
- */
-class _LinkedHashMapImpl<K, V> implements LinkedHashMap<K, V> {
- DoubleLinkedQueue<_KeyValuePair<K, V>> _list;
- HashMap<K, DoubleLinkedQueueEntry<_KeyValuePair<K, V>>> _map;
-
- _LinkedHashMapImpl() {
- _map = new HashMap<K, DoubleLinkedQueueEntry<_KeyValuePair<K, V>>>();
- _list = new DoubleLinkedQueue<_KeyValuePair<K, V>>();
- }
-
- factory _LinkedHashMapImpl.from(Map<K, V> other) {
- Map<K, V> result = new _LinkedHashMapImpl<K, V>();
- other.forEach((K key, V value) { result[key] = value; });
- return result;
- }
-
- void operator []=(K key, V value) {
- if (_map.containsKey(key)) {
- _map[key].element.value = value;
- } else {
- _list.addLast(new _KeyValuePair<K, V>(key, value));
- _map[key] = _list.lastEntry();
- }
- }
-
- V operator [](K key) {
- DoubleLinkedQueueEntry<_KeyValuePair<K, V>> entry = _map[key];
- if (entry == null) return null;
- return entry.element.value;
- }
-
- V remove(K key) {
- DoubleLinkedQueueEntry<_KeyValuePair<K, V>> entry = _map.remove(key);
- if (entry == null) return null;
- entry.remove();
- return entry.element.value;
- }
-
- V putIfAbsent(K key, V ifAbsent()) {
- V value = this[key];
- if ((this[key] == null) && !(containsKey(key))) {
- value = ifAbsent();
- this[key] = value;
- }
- return value;
- }
-
- Iterable<K> get keys {
- return new MappedIterable<_KeyValuePair<K, V>, K>(
- _list, (_KeyValuePair<K, V> entry) => entry.key);
- }
-
-
- Iterable<V> get values {
- return new MappedIterable<_KeyValuePair<K, V>, V>(
- _list, (_KeyValuePair<K, V> entry) => entry.value);
- }
-
- void forEach(void f(K key, V value)) {
- _list.forEach((_KeyValuePair<K, V> entry) {
- f(entry.key, entry.value);
- });
- }
-
- bool containsKey(K key) {
- return _map.containsKey(key);
- }
-
- bool containsValue(V value) {
- return _list.any((_KeyValuePair<K, V> entry) {
- return (entry.value == value);
- });
- }
-
- int get length {
- return _map.length;
- }
-
- bool get isEmpty {
- return length == 0;
- }
-
- void clear() {
- _map.clear();
- _list.clear();
- }
-
- String toString() {
- return Maps.mapToString(this);
- }
-}
-
diff --git a/sdk/lib/core/set.dart b/sdk/lib/core/set.dart
index 556c1fa..7977986 100644
--- a/sdk/lib/core/set.dart
+++ b/sdk/lib/core/set.dart
@@ -57,107 +57,3 @@
*/
void clear();
}
-
-
-class HashSet<E> extends Collection<E> implements Set<E> {
- // The map backing this set. The associations in this map are all
- // of the form element -> element. If a value is not in the map,
- // then it is not in the set.
- final _HashMapImpl<E, E> _backingMap;
-
- HashSet() : _backingMap = new _HashMapImpl<E, E>();
-
- /**
- * Creates a [Set] that contains all elements of [other].
- */
- factory HashSet.from(Iterable<E> other) {
- Set<E> set = new HashSet<E>();
- for (final e in other) {
- set.add(e);
- }
- return set;
- }
-
- void clear() {
- _backingMap.clear();
- }
-
- void add(E value) {
- _backingMap[value] = value;
- }
-
- bool remove(Object value) {
- if (!_backingMap.containsKey(value)) return false;
- _backingMap.remove(value);
- return true;
- }
-
- bool contains(E value) {
- return _backingMap.containsKey(value);
- }
-
- Set<E> intersection(Collection<E> collection) {
- Set<E> result = new Set<E>();
- collection.forEach((E value) {
- if (contains(value)) result.add(value);
- });
- return result;
- }
-
- bool isSubsetOf(Collection<E> other) {
- return new Set<E>.from(other).containsAll(this);
- }
-
- bool containsAll(Collection<E> collection) {
- return collection.every((E value) {
- return contains(value);
- });
- }
-
- void forEach(void f(E element)) {
- _backingMap.forEach((E key, E value) {
- f(key);
- });
- }
-
- bool get isEmpty {
- return _backingMap.isEmpty;
- }
-
- int get length {
- return _backingMap.length;
- }
-
- Iterator<E> get iterator => new _HashSetIterator<E>(this);
-
- String toString() {
- return Collections.collectionToString(this);
- }
-}
-
-class _HashSetIterator<E> implements Iterator<E> {
-
- _HashSetIterator(HashSet<E> set)
- : _keysIterator = set._backingMap._keys.iterator;
-
- E get current {
- var result = _keysIterator.current;
- if (identical(result, _HashMapImpl._DELETED_KEY)) {
- // TODO(floitsch): improve the error reporting.
- throw new StateError("Concurrent modification.");
- }
- return result;
- }
-
- bool moveNext() {
- bool result;
- do {
- result = _keysIterator.moveNext();
- } while (result &&
- (_keysIterator.current == null ||
- identical(_keysIterator.current, _HashMapImpl._DELETED_KEY)));
- return result;
- }
-
- Iterator _keysIterator;
-}
diff --git a/sdk/lib/core/string_buffer.dart b/sdk/lib/core/string_buffer.dart
index 71bf31d..d8b3935 100644
--- a/sdk/lib/core/string_buffer.dart
+++ b/sdk/lib/core/string_buffer.dart
@@ -12,7 +12,7 @@
abstract class StringBuffer {
/// Creates the string buffer with an initial content.
- factory StringBuffer([Object content = ""]) => new _StringBufferImpl(content);
+ external factory StringBuffer([Object content = ""]);
/// Returns the length of the buffer.
int get length;
@@ -35,61 +35,3 @@
/// Returns the contents of buffer as a concatenated string.
String toString();
}
-
-class _StringBufferImpl implements StringBuffer {
-
- List<String> _buffer;
- int _length;
-
- /// Creates the string buffer with an initial content.
- _StringBufferImpl(Object content) {
- clear();
- add(content);
- }
-
- /// Returns the length of the buffer.
- int get length => _length;
-
- bool get isEmpty => _length == 0;
-
- /// Adds [obj] to the buffer.
- void add(Object obj) {
- // TODO(srdjan): The following four lines could be replaced by
- // '$obj', but apparently this is too slow on the Dart VM.
- String str = obj.toString();
- if (str is !String) {
- throw new ArgumentError('toString() did not return a string');
- }
- if (str.isEmpty) return;
- _buffer.add(str);
- _length += str.length;
- }
-
- /// Adds all items in [objects] to the buffer.
- void addAll(Iterable objects) {
- for (Object obj in objects) add(obj);
- }
-
- /// Adds the string representation of [charCode] to the buffer.
- void addCharCode(int charCode) {
- add(new String.fromCharCodes([charCode]));
- }
-
- /// Clears the string buffer.
- void clear() {
- _buffer = new List<String>();
- _length = 0;
- }
-
- /// Returns the contents of buffer as a concatenated string.
- String toString() {
- if (_buffer.length == 0) return "";
- if (_buffer.length == 1) return _buffer[0];
- String result = Strings.concatAll(_buffer);
- _buffer.clear();
- _buffer.add(result);
- // Since we track the length at each add operation, there is no
- // need to update it in this function.
- return result;
- }
-}
diff --git a/sdk/lib/html/dart2js/html_dart2js.dart b/sdk/lib/html/dart2js/html_dart2js.dart
index 01a6bfe..e1340e2 100644
--- a/sdk/lib/html/dart2js/html_dart2js.dart
+++ b/sdk/lib/html/dart2js/html_dart2js.dart
@@ -10,6 +10,9 @@
import 'dart:math';
import 'dart:svg' as svg;
import 'dart:web_audio' as web_audio;
+import 'dart:_js_helper' show convertDartClosureToJS, Creates, JavaScriptIndexingBehavior, JSName, Null, Returns;
+import 'dart:_isolate_helper' show IsolateNatives;
+import 'dart:_foreign_helper' show JS;
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
@@ -55,34 +58,41 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('AbstractWorker')
class AbstractWorker extends EventTarget native "*AbstractWorker" {
+ @DomName('AbstractWorker.error')
+ @DocsEditable
static const EventStreamProvider<Event> errorEvent = const EventStreamProvider<Event>('error');
@DocsEditable
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
+ @deprecated
AbstractWorkerEvents get on =>
new AbstractWorkerEvents(this);
@JSName('addEventListener')
- @DocsEditable @DomName('AbstractWorker.addEventListener')
+ @DomName('AbstractWorker.addEventListener')
+ @DocsEditable
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native;
- @JSName('dispatchEvent')
- @DocsEditable @DomName('AbstractWorker.dispatchEvent')
- bool $dom_dispatchEvent(Event evt) native;
+ @DomName('AbstractWorker.dispatchEvent')
+ @DocsEditable
+ bool dispatchEvent(Event evt) native;
@JSName('removeEventListener')
- @DocsEditable @DomName('AbstractWorker.removeEventListener')
+ @DomName('AbstractWorker.removeEventListener')
+ @DocsEditable
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native;
+ @DomName('AbstractWorker.error')
+ @DocsEditable
Stream<Event> get onError => errorEvent.forTarget(this);
}
@DocsEditable
+@deprecated
class AbstractWorkerEvents extends Events {
@DocsEditable
AbstractWorkerEvents(EventTarget _ptr) : super(_ptr);
@@ -95,7 +105,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('HTMLAnchorElement')
class AnchorElement extends Element native "*HTMLAnchorElement" {
@@ -107,55 +116,72 @@
return e;
}
- @DocsEditable @DomName('HTMLAnchorElement.download')
+ @DomName('HTMLAnchorElement.download')
+ @DocsEditable
String download;
- @DocsEditable @DomName('HTMLAnchorElement.hash')
+ @DomName('HTMLAnchorElement.hash')
+ @DocsEditable
String hash;
- @DocsEditable @DomName('HTMLAnchorElement.host')
+ @DomName('HTMLAnchorElement.host')
+ @DocsEditable
String host;
- @DocsEditable @DomName('HTMLAnchorElement.hostname')
+ @DomName('HTMLAnchorElement.hostname')
+ @DocsEditable
String hostname;
- @DocsEditable @DomName('HTMLAnchorElement.href')
+ @DomName('HTMLAnchorElement.href')
+ @DocsEditable
String href;
- @DocsEditable @DomName('HTMLAnchorElement.hreflang')
+ @DomName('HTMLAnchorElement.hreflang')
+ @DocsEditable
String hreflang;
- @DocsEditable @DomName('HTMLAnchorElement.name')
+ @DomName('HTMLAnchorElement.name')
+ @DocsEditable
String name;
- @DocsEditable @DomName('HTMLAnchorElement.origin')
+ @DomName('HTMLAnchorElement.origin')
+ @DocsEditable
final String origin;
- @DocsEditable @DomName('HTMLAnchorElement.pathname')
+ @DomName('HTMLAnchorElement.pathname')
+ @DocsEditable
String pathname;
- @DocsEditable @DomName('HTMLAnchorElement.ping')
+ @DomName('HTMLAnchorElement.ping')
+ @DocsEditable
String ping;
- @DocsEditable @DomName('HTMLAnchorElement.port')
+ @DomName('HTMLAnchorElement.port')
+ @DocsEditable
String port;
- @DocsEditable @DomName('HTMLAnchorElement.protocol')
+ @DomName('HTMLAnchorElement.protocol')
+ @DocsEditable
String protocol;
- @DocsEditable @DomName('HTMLAnchorElement.rel')
+ @DomName('HTMLAnchorElement.rel')
+ @DocsEditable
String rel;
- @DocsEditable @DomName('HTMLAnchorElement.search')
+ @DomName('HTMLAnchorElement.search')
+ @DocsEditable
String search;
- @DocsEditable @DomName('HTMLAnchorElement.target')
+ @DomName('HTMLAnchorElement.target')
+ @DocsEditable
String target;
- @DocsEditable @DomName('HTMLAnchorElement.type')
+ @DomName('HTMLAnchorElement.type')
+ @DocsEditable
String type;
- @DocsEditable @DomName('HTMLAnchorElement.toString')
+ @DomName('HTMLAnchorElement.toString')
+ @DocsEditable
String toString() native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -163,15 +189,16 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('WebKitAnimationEvent')
class AnimationEvent extends Event native "*WebKitAnimationEvent" {
- @DocsEditable @DomName('WebKitAnimationEvent.animationName')
+ @DomName('WebKitAnimationEvent.animationName')
+ @DocsEditable
final String animationName;
- @DocsEditable @DomName('WebKitAnimationEvent.elapsedTime')
+ @DomName('WebKitAnimationEvent.elapsedTime')
+ @DocsEditable
final num elapsedTime;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -179,7 +206,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('DOMApplicationCache')
@SupportedBrowser(SupportedBrowser.CHROME)
@@ -189,20 +215,36 @@
@SupportedBrowser(SupportedBrowser.SAFARI)
class ApplicationCache extends EventTarget native "*DOMApplicationCache" {
+ @DomName('DOMApplicationCache.cached')
+ @DocsEditable
static const EventStreamProvider<Event> cachedEvent = const EventStreamProvider<Event>('cached');
+ @DomName('DOMApplicationCache.checking')
+ @DocsEditable
static const EventStreamProvider<Event> checkingEvent = const EventStreamProvider<Event>('checking');
+ @DomName('DOMApplicationCache.downloading')
+ @DocsEditable
static const EventStreamProvider<Event> downloadingEvent = const EventStreamProvider<Event>('downloading');
+ @DomName('DOMApplicationCache.error')
+ @DocsEditable
static const EventStreamProvider<Event> errorEvent = const EventStreamProvider<Event>('error');
+ @DomName('DOMApplicationCache.noupdate')
+ @DocsEditable
static const EventStreamProvider<Event> noUpdateEvent = const EventStreamProvider<Event>('noupdate');
+ @DomName('DOMApplicationCache.obsolete')
+ @DocsEditable
static const EventStreamProvider<Event> obsoleteEvent = const EventStreamProvider<Event>('obsolete');
+ @DomName('DOMApplicationCache.progress')
+ @DocsEditable
static const EventStreamProvider<Event> progressEvent = const EventStreamProvider<Event>('progress');
+ @DomName('DOMApplicationCache.updateready')
+ @DocsEditable
static const EventStreamProvider<Event> updateReadyEvent = const EventStreamProvider<Event>('updateready');
/// Checks if this type is supported on the current platform.
@@ -210,6 +252,7 @@
@DocsEditable
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
+ @deprecated
ApplicationCacheEvents get on =>
new ApplicationCacheEvents(this);
@@ -225,48 +268,71 @@
static const int UPDATEREADY = 4;
- @DocsEditable @DomName('DOMApplicationCache.status')
+ @DomName('DOMApplicationCache.status')
+ @DocsEditable
final int status;
- @DocsEditable @DomName('DOMApplicationCache.abort')
+ @DomName('DOMApplicationCache.abort')
+ @DocsEditable
void abort() native;
@JSName('addEventListener')
- @DocsEditable @DomName('DOMApplicationCache.addEventListener')
+ @DomName('DOMApplicationCache.addEventListener')
+ @DocsEditable
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native;
- @JSName('dispatchEvent')
- @DocsEditable @DomName('DOMApplicationCache.dispatchEvent')
- bool $dom_dispatchEvent(Event evt) native;
+ @DomName('DOMApplicationCache.dispatchEvent')
+ @DocsEditable
+ bool dispatchEvent(Event evt) native;
@JSName('removeEventListener')
- @DocsEditable @DomName('DOMApplicationCache.removeEventListener')
+ @DomName('DOMApplicationCache.removeEventListener')
+ @DocsEditable
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native;
- @DocsEditable @DomName('DOMApplicationCache.swapCache')
+ @DomName('DOMApplicationCache.swapCache')
+ @DocsEditable
void swapCache() native;
- @DocsEditable @DomName('DOMApplicationCache.update')
+ @DomName('DOMApplicationCache.update')
+ @DocsEditable
void update() native;
+ @DomName('DOMApplicationCache.cached')
+ @DocsEditable
Stream<Event> get onCached => cachedEvent.forTarget(this);
+ @DomName('DOMApplicationCache.checking')
+ @DocsEditable
Stream<Event> get onChecking => checkingEvent.forTarget(this);
+ @DomName('DOMApplicationCache.downloading')
+ @DocsEditable
Stream<Event> get onDownloading => downloadingEvent.forTarget(this);
+ @DomName('DOMApplicationCache.error')
+ @DocsEditable
Stream<Event> get onError => errorEvent.forTarget(this);
+ @DomName('DOMApplicationCache.noupdate')
+ @DocsEditable
Stream<Event> get onNoUpdate => noUpdateEvent.forTarget(this);
+ @DomName('DOMApplicationCache.obsolete')
+ @DocsEditable
Stream<Event> get onObsolete => obsoleteEvent.forTarget(this);
+ @DomName('DOMApplicationCache.progress')
+ @DocsEditable
Stream<Event> get onProgress => progressEvent.forTarget(this);
+ @DomName('DOMApplicationCache.updateready')
+ @DocsEditable
Stream<Event> get onUpdateReady => updateReadyEvent.forTarget(this);
}
@DocsEditable
+@deprecated
class ApplicationCacheEvents extends Events {
@DocsEditable
ApplicationCacheEvents(EventTarget _ptr) : super(_ptr);
@@ -300,7 +366,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('HTMLAreaElement')
class AreaElement extends Element native "*HTMLAreaElement" {
@@ -308,43 +373,56 @@
@DocsEditable
factory AreaElement() => document.$dom_createElement("area");
- @DocsEditable @DomName('HTMLAreaElement.alt')
+ @DomName('HTMLAreaElement.alt')
+ @DocsEditable
String alt;
- @DocsEditable @DomName('HTMLAreaElement.coords')
+ @DomName('HTMLAreaElement.coords')
+ @DocsEditable
String coords;
- @DocsEditable @DomName('HTMLAreaElement.hash')
+ @DomName('HTMLAreaElement.hash')
+ @DocsEditable
final String hash;
- @DocsEditable @DomName('HTMLAreaElement.host')
+ @DomName('HTMLAreaElement.host')
+ @DocsEditable
final String host;
- @DocsEditable @DomName('HTMLAreaElement.hostname')
+ @DomName('HTMLAreaElement.hostname')
+ @DocsEditable
final String hostname;
- @DocsEditable @DomName('HTMLAreaElement.href')
+ @DomName('HTMLAreaElement.href')
+ @DocsEditable
String href;
- @DocsEditable @DomName('HTMLAreaElement.pathname')
+ @DomName('HTMLAreaElement.pathname')
+ @DocsEditable
final String pathname;
- @DocsEditable @DomName('HTMLAreaElement.ping')
+ @DomName('HTMLAreaElement.ping')
+ @DocsEditable
String ping;
- @DocsEditable @DomName('HTMLAreaElement.port')
+ @DomName('HTMLAreaElement.port')
+ @DocsEditable
final String port;
- @DocsEditable @DomName('HTMLAreaElement.protocol')
+ @DomName('HTMLAreaElement.protocol')
+ @DocsEditable
final String protocol;
- @DocsEditable @DomName('HTMLAreaElement.search')
+ @DomName('HTMLAreaElement.search')
+ @DocsEditable
final String search;
- @DocsEditable @DomName('HTMLAreaElement.shape')
+ @DomName('HTMLAreaElement.shape')
+ @DocsEditable
String shape;
- @DocsEditable @DomName('HTMLAreaElement.target')
+ @DomName('HTMLAreaElement.target')
+ @DocsEditable
String target;
}
// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
@@ -352,7 +430,6 @@
// BSD-style license that can be found in the LICENSE file.
-@DocsEditable
@DomName('ArrayBuffer')
@SupportedBrowser(SupportedBrowser.CHROME)
@SupportedBrowser(SupportedBrowser.FIREFOX)
@@ -367,7 +444,8 @@
/// Checks if this type is supported on the current platform.
static bool get supported => JS('bool', 'typeof window.ArrayBuffer != "undefined"');
- @DocsEditable @DomName('ArrayBuffer.byteLength')
+ @DomName('ArrayBuffer.byteLength')
+ @DocsEditable
final int byteLength;
@DomName('ArrayBuffer.slice')
@@ -404,7 +482,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('ArrayBufferView')
@SupportedBrowser(SupportedBrowser.CHROME)
@@ -413,13 +490,16 @@
@SupportedBrowser(SupportedBrowser.SAFARI)
class ArrayBufferView native "*ArrayBufferView" {
- @DocsEditable @DomName('ArrayBufferView.buffer')
+ @DomName('ArrayBufferView.buffer')
+ @DocsEditable
final ArrayBuffer buffer;
- @DocsEditable @DomName('ArrayBufferView.byteLength')
+ @DomName('ArrayBufferView.byteLength')
+ @DocsEditable
final int byteLength;
- @DocsEditable @DomName('ArrayBufferView.byteOffset')
+ @DomName('ArrayBufferView.byteOffset')
+ @DocsEditable
final int byteOffset;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -427,7 +507,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('Attr')
class Attr extends Node native "*Attr" {
@@ -437,7 +516,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('HTMLAudioElement')
class AudioElement extends MediaElement native "*HTMLAudioElement" {
@@ -461,7 +539,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('HTMLBRElement')
class BRElement extends Element native "*HTMLBRElement" {
@@ -474,12 +551,12 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('BarInfo')
class BarInfo native "*BarInfo" {
- @DocsEditable @DomName('BarInfo.visible')
+ @DomName('BarInfo.visible')
+ @DocsEditable
final bool visible;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -487,7 +564,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('HTMLBaseElement')
class BaseElement extends Element native "*HTMLBaseElement" {
@@ -495,10 +571,12 @@
@DocsEditable
factory BaseElement() => document.$dom_createElement("base");
- @DocsEditable @DomName('HTMLBaseElement.href')
+ @DomName('HTMLBaseElement.href')
+ @DocsEditable
String href;
- @DocsEditable @DomName('HTMLBaseElement.target')
+ @DomName('HTMLBaseElement.target')
+ @DocsEditable
String target;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -506,58 +584,81 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('BatteryManager')
class BatteryManager extends EventTarget native "*BatteryManager" {
+ @DomName('BatteryManager.chargingchange')
+ @DocsEditable
static const EventStreamProvider<Event> chargingChangeEvent = const EventStreamProvider<Event>('chargingchange');
+ @DomName('BatteryManager.chargingtimechange')
+ @DocsEditable
static const EventStreamProvider<Event> chargingTimeChangeEvent = const EventStreamProvider<Event>('chargingtimechange');
+ @DomName('BatteryManager.dischargingtimechange')
+ @DocsEditable
static const EventStreamProvider<Event> dischargingTimeChangeEvent = const EventStreamProvider<Event>('dischargingtimechange');
+ @DomName('BatteryManager.levelchange')
+ @DocsEditable
static const EventStreamProvider<Event> levelChangeEvent = const EventStreamProvider<Event>('levelchange');
@DocsEditable
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
+ @deprecated
BatteryManagerEvents get on =>
new BatteryManagerEvents(this);
- @DocsEditable @DomName('BatteryManager.charging')
+ @DomName('BatteryManager.charging')
+ @DocsEditable
final bool charging;
- @DocsEditable @DomName('BatteryManager.chargingTime')
+ @DomName('BatteryManager.chargingTime')
+ @DocsEditable
final num chargingTime;
- @DocsEditable @DomName('BatteryManager.dischargingTime')
+ @DomName('BatteryManager.dischargingTime')
+ @DocsEditable
final num dischargingTime;
- @DocsEditable @DomName('BatteryManager.level')
+ @DomName('BatteryManager.level')
+ @DocsEditable
final num level;
@JSName('addEventListener')
- @DocsEditable @DomName('BatteryManager.addEventListener')
+ @DomName('BatteryManager.addEventListener')
+ @DocsEditable
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native;
- @JSName('dispatchEvent')
- @DocsEditable @DomName('BatteryManager.dispatchEvent')
- bool $dom_dispatchEvent(Event event) native;
+ @DomName('BatteryManager.dispatchEvent')
+ @DocsEditable
+ bool dispatchEvent(Event event) native;
@JSName('removeEventListener')
- @DocsEditable @DomName('BatteryManager.removeEventListener')
+ @DomName('BatteryManager.removeEventListener')
+ @DocsEditable
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native;
+ @DomName('BatteryManager.chargingchange')
+ @DocsEditable
Stream<Event> get onChargingChange => chargingChangeEvent.forTarget(this);
+ @DomName('BatteryManager.chargingtimechange')
+ @DocsEditable
Stream<Event> get onChargingTimeChange => chargingTimeChangeEvent.forTarget(this);
+ @DomName('BatteryManager.dischargingtimechange')
+ @DocsEditable
Stream<Event> get onDischargingTimeChange => dischargingTimeChangeEvent.forTarget(this);
+ @DomName('BatteryManager.levelchange')
+ @DocsEditable
Stream<Event> get onLevelChange => levelChangeEvent.forTarget(this);
}
@DocsEditable
+@deprecated
class BatteryManagerEvents extends Events {
@DocsEditable
BatteryManagerEvents(EventTarget _ptr) : super(_ptr);
@@ -579,12 +680,12 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('BeforeLoadEvent')
class BeforeLoadEvent extends Event native "*BeforeLoadEvent" {
- @DocsEditable @DomName('BeforeLoadEvent.url')
+ @DomName('BeforeLoadEvent.url')
+ @DocsEditable
final String url;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -592,7 +693,6 @@
// BSD-style license that can be found in the LICENSE file.
-@DocsEditable
@DomName('Blob')
class Blob native "*Blob" {
@@ -607,13 +707,16 @@
return Blob._create(blobParts, type, endings);
}
- @DocsEditable @DomName('Blob.size')
+ @DomName('Blob.size')
+ @DocsEditable
final int size;
- @DocsEditable @DomName('Blob.type')
+ @DomName('Blob.type')
+ @DocsEditable
final String type;
- @DocsEditable @DomName('Blob.slice')
+ @DomName('Blob.slice')
+ @DocsEditable
Blob slice([int start, int end, String contentType]) native;
static Blob _create([List blobParts = null, String type, String endings]) {
@@ -641,35 +744,60 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('HTMLBodyElement')
class BodyElement extends Element native "*HTMLBodyElement" {
+ @DomName('HTMLBodyElement.beforeunload')
+ @DocsEditable
static const EventStreamProvider<Event> beforeUnloadEvent = const EventStreamProvider<Event>('beforeunload');
+ @DomName('HTMLBodyElement.blur')
+ @DocsEditable
static const EventStreamProvider<Event> blurEvent = const EventStreamProvider<Event>('blur');
+ @DomName('HTMLBodyElement.error')
+ @DocsEditable
static const EventStreamProvider<Event> errorEvent = const EventStreamProvider<Event>('error');
+ @DomName('HTMLBodyElement.focus')
+ @DocsEditable
static const EventStreamProvider<Event> focusEvent = const EventStreamProvider<Event>('focus');
- static const EventStreamProvider<HashChangeEvent> hashChangeEvent = const EventStreamProvider<HashChangeEvent>('hashchange');
+ @DomName('HTMLBodyElement.hashchange')
+ @DocsEditable
+ static const EventStreamProvider<Event> hashChangeEvent = const EventStreamProvider<Event>('hashchange');
+ @DomName('HTMLBodyElement.load')
+ @DocsEditable
static const EventStreamProvider<Event> loadEvent = const EventStreamProvider<Event>('load');
+ @DomName('HTMLBodyElement.message')
+ @DocsEditable
static const EventStreamProvider<MessageEvent> messageEvent = const EventStreamProvider<MessageEvent>('message');
+ @DomName('HTMLBodyElement.offline')
+ @DocsEditable
static const EventStreamProvider<Event> offlineEvent = const EventStreamProvider<Event>('offline');
+ @DomName('HTMLBodyElement.online')
+ @DocsEditable
static const EventStreamProvider<Event> onlineEvent = const EventStreamProvider<Event>('online');
+ @DomName('HTMLBodyElement.popstate')
+ @DocsEditable
static const EventStreamProvider<PopStateEvent> popStateEvent = const EventStreamProvider<PopStateEvent>('popstate');
+ @DomName('HTMLBodyElement.resize')
+ @DocsEditable
static const EventStreamProvider<Event> resizeEvent = const EventStreamProvider<Event>('resize');
+ @DomName('HTMLBodyElement.storage')
+ @DocsEditable
static const EventStreamProvider<StorageEvent> storageEvent = const EventStreamProvider<StorageEvent>('storage');
+ @DomName('HTMLBodyElement.unload')
+ @DocsEditable
static const EventStreamProvider<Event> unloadEvent = const EventStreamProvider<Event>('unload');
@DocsEditable
@@ -677,37 +805,65 @@
@DocsEditable
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
+ @deprecated
BodyElementEvents get on =>
new BodyElementEvents(this);
+ @DomName('HTMLBodyElement.beforeunload')
+ @DocsEditable
Stream<Event> get onBeforeUnload => beforeUnloadEvent.forTarget(this);
+ @DomName('HTMLBodyElement.blur')
+ @DocsEditable
Stream<Event> get onBlur => blurEvent.forTarget(this);
+ @DomName('HTMLBodyElement.error')
+ @DocsEditable
Stream<Event> get onError => errorEvent.forTarget(this);
+ @DomName('HTMLBodyElement.focus')
+ @DocsEditable
Stream<Event> get onFocus => focusEvent.forTarget(this);
- Stream<HashChangeEvent> get onHashChange => hashChangeEvent.forTarget(this);
+ @DomName('HTMLBodyElement.hashchange')
+ @DocsEditable
+ Stream<Event> get onHashChange => hashChangeEvent.forTarget(this);
+ @DomName('HTMLBodyElement.load')
+ @DocsEditable
Stream<Event> get onLoad => loadEvent.forTarget(this);
+ @DomName('HTMLBodyElement.message')
+ @DocsEditable
Stream<MessageEvent> get onMessage => messageEvent.forTarget(this);
+ @DomName('HTMLBodyElement.offline')
+ @DocsEditable
Stream<Event> get onOffline => offlineEvent.forTarget(this);
+ @DomName('HTMLBodyElement.online')
+ @DocsEditable
Stream<Event> get onOnline => onlineEvent.forTarget(this);
+ @DomName('HTMLBodyElement.popstate')
+ @DocsEditable
Stream<PopStateEvent> get onPopState => popStateEvent.forTarget(this);
+ @DomName('HTMLBodyElement.resize')
+ @DocsEditable
Stream<Event> get onResize => resizeEvent.forTarget(this);
+ @DomName('HTMLBodyElement.storage')
+ @DocsEditable
Stream<StorageEvent> get onStorage => storageEvent.forTarget(this);
+ @DomName('HTMLBodyElement.unload')
+ @DocsEditable
Stream<Event> get onUnload => unloadEvent.forTarget(this);
}
@DocsEditable
+@deprecated
class BodyElementEvents extends ElementEvents {
@DocsEditable
BodyElementEvents(EventTarget _ptr) : super(_ptr);
@@ -756,7 +912,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('HTMLButtonElement')
class ButtonElement extends Element native "*HTMLButtonElement" {
@@ -764,56 +919,74 @@
@DocsEditable
factory ButtonElement() => document.$dom_createElement("button");
- @DocsEditable @DomName('HTMLButtonElement.autofocus')
+ @DomName('HTMLButtonElement.autofocus')
+ @DocsEditable
bool autofocus;
- @DocsEditable @DomName('HTMLButtonElement.disabled')
+ @DomName('HTMLButtonElement.disabled')
+ @DocsEditable
bool disabled;
- @DocsEditable @DomName('HTMLButtonElement.form')
+ @DomName('HTMLButtonElement.form')
+ @DocsEditable
final FormElement form;
- @DocsEditable @DomName('HTMLButtonElement.formAction')
+ @DomName('HTMLButtonElement.formAction')
+ @DocsEditable
String formAction;
- @DocsEditable @DomName('HTMLButtonElement.formEnctype')
+ @DomName('HTMLButtonElement.formEnctype')
+ @DocsEditable
String formEnctype;
- @DocsEditable @DomName('HTMLButtonElement.formMethod')
+ @DomName('HTMLButtonElement.formMethod')
+ @DocsEditable
String formMethod;
- @DocsEditable @DomName('HTMLButtonElement.formNoValidate')
+ @DomName('HTMLButtonElement.formNoValidate')
+ @DocsEditable
bool formNoValidate;
- @DocsEditable @DomName('HTMLButtonElement.formTarget')
+ @DomName('HTMLButtonElement.formTarget')
+ @DocsEditable
String formTarget;
- @DocsEditable @DomName('HTMLButtonElement.labels')
- @Returns('NodeList') @Creates('NodeList')
+ @DomName('HTMLButtonElement.labels')
+ @DocsEditable
+ @Returns('NodeList')
+ @Creates('NodeList')
final List<Node> labels;
- @DocsEditable @DomName('HTMLButtonElement.name')
+ @DomName('HTMLButtonElement.name')
+ @DocsEditable
String name;
- @DocsEditable @DomName('HTMLButtonElement.type')
+ @DomName('HTMLButtonElement.type')
+ @DocsEditable
String type;
- @DocsEditable @DomName('HTMLButtonElement.validationMessage')
+ @DomName('HTMLButtonElement.validationMessage')
+ @DocsEditable
final String validationMessage;
- @DocsEditable @DomName('HTMLButtonElement.validity')
+ @DomName('HTMLButtonElement.validity')
+ @DocsEditable
final ValidityState validity;
- @DocsEditable @DomName('HTMLButtonElement.value')
+ @DomName('HTMLButtonElement.value')
+ @DocsEditable
String value;
- @DocsEditable @DomName('HTMLButtonElement.willValidate')
+ @DomName('HTMLButtonElement.willValidate')
+ @DocsEditable
final bool willValidate;
- @DocsEditable @DomName('HTMLButtonElement.checkValidity')
+ @DomName('HTMLButtonElement.checkValidity')
+ @DocsEditable
bool checkValidity() native;
- @DocsEditable @DomName('HTMLButtonElement.setCustomValidity')
+ @DomName('HTMLButtonElement.setCustomValidity')
+ @DocsEditable
void setCustomValidity(String error) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -821,7 +994,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('CDATASection')
class CDataSection extends Text native "*CDATASection" {
@@ -831,7 +1003,6 @@
// BSD-style license that can be found in the LICENSE file.
-@DocsEditable
@DomName('HTMLCanvasElement')
class CanvasElement extends Element native "*HTMLCanvasElement" {
@@ -843,14 +1014,17 @@
return e;
}
- @DocsEditable @DomName('HTMLCanvasElement.height')
+ @DomName('HTMLCanvasElement.height')
+ @DocsEditable
int height;
- @DocsEditable @DomName('HTMLCanvasElement.width')
+ @DomName('HTMLCanvasElement.width')
+ @DocsEditable
int width;
@JSName('toDataURL')
- @DocsEditable @DomName('HTMLCanvasElement.toDataURL')
+ @DomName('HTMLCanvasElement.toDataURL')
+ @DocsEditable
String toDataUrl(String type, [num quality]) native;
@@ -862,12 +1036,12 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('CanvasGradient')
class CanvasGradient native "*CanvasGradient" {
- @DocsEditable @DomName('CanvasGradient.addColorStop')
+ @DomName('CanvasGradient.addColorStop')
+ @DocsEditable
void addColorStop(num offset, String color) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -875,7 +1049,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('CanvasPattern')
class CanvasPattern native "*CanvasPattern" {
@@ -885,12 +1058,12 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('CanvasRenderingContext')
class CanvasRenderingContext native "*CanvasRenderingContext" {
- @DocsEditable @DomName('CanvasRenderingContext.canvas')
+ @DomName('CanvasRenderingContext.canvas')
+ @DocsEditable
final CanvasElement canvas;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -898,94 +1071,123 @@
// BSD-style license that can be found in the LICENSE file.
-@DocsEditable
@DomName('CanvasRenderingContext2D')
class CanvasRenderingContext2D extends CanvasRenderingContext native "*CanvasRenderingContext2D" {
- @DocsEditable @DomName('CanvasRenderingContext2D.fillStyle') @Creates('String|CanvasGradient|CanvasPattern') @Returns('String|CanvasGradient|CanvasPattern')
+ @DomName('CanvasRenderingContext2D.fillStyle')
+ @DocsEditable
+ @Creates('String|CanvasGradient|CanvasPattern')
+ @Returns('String|CanvasGradient|CanvasPattern')
dynamic fillStyle;
- @DocsEditable @DomName('CanvasRenderingContext2D.font')
+ @DomName('CanvasRenderingContext2D.font')
+ @DocsEditable
String font;
- @DocsEditable @DomName('CanvasRenderingContext2D.globalAlpha')
+ @DomName('CanvasRenderingContext2D.globalAlpha')
+ @DocsEditable
num globalAlpha;
- @DocsEditable @DomName('CanvasRenderingContext2D.globalCompositeOperation')
+ @DomName('CanvasRenderingContext2D.globalCompositeOperation')
+ @DocsEditable
String globalCompositeOperation;
- @DocsEditable @DomName('CanvasRenderingContext2D.lineCap')
+ @DomName('CanvasRenderingContext2D.lineCap')
+ @DocsEditable
String lineCap;
- @DocsEditable @DomName('CanvasRenderingContext2D.lineDashOffset')
+ @DomName('CanvasRenderingContext2D.lineDashOffset')
+ @DocsEditable
num lineDashOffset;
- @DocsEditable @DomName('CanvasRenderingContext2D.lineJoin')
+ @DomName('CanvasRenderingContext2D.lineJoin')
+ @DocsEditable
String lineJoin;
- @DocsEditable @DomName('CanvasRenderingContext2D.lineWidth')
+ @DomName('CanvasRenderingContext2D.lineWidth')
+ @DocsEditable
num lineWidth;
- @DocsEditable @DomName('CanvasRenderingContext2D.miterLimit')
+ @DomName('CanvasRenderingContext2D.miterLimit')
+ @DocsEditable
num miterLimit;
- @DocsEditable @DomName('CanvasRenderingContext2D.shadowBlur')
+ @DomName('CanvasRenderingContext2D.shadowBlur')
+ @DocsEditable
num shadowBlur;
- @DocsEditable @DomName('CanvasRenderingContext2D.shadowColor')
+ @DomName('CanvasRenderingContext2D.shadowColor')
+ @DocsEditable
String shadowColor;
- @DocsEditable @DomName('CanvasRenderingContext2D.shadowOffsetX')
+ @DomName('CanvasRenderingContext2D.shadowOffsetX')
+ @DocsEditable
num shadowOffsetX;
- @DocsEditable @DomName('CanvasRenderingContext2D.shadowOffsetY')
+ @DomName('CanvasRenderingContext2D.shadowOffsetY')
+ @DocsEditable
num shadowOffsetY;
- @DocsEditable @DomName('CanvasRenderingContext2D.strokeStyle') @Creates('String|CanvasGradient|CanvasPattern') @Returns('String|CanvasGradient|CanvasPattern')
+ @DomName('CanvasRenderingContext2D.strokeStyle')
+ @DocsEditable
+ @Creates('String|CanvasGradient|CanvasPattern')
+ @Returns('String|CanvasGradient|CanvasPattern')
dynamic strokeStyle;
- @DocsEditable @DomName('CanvasRenderingContext2D.textAlign')
+ @DomName('CanvasRenderingContext2D.textAlign')
+ @DocsEditable
String textAlign;
- @DocsEditable @DomName('CanvasRenderingContext2D.textBaseline')
+ @DomName('CanvasRenderingContext2D.textBaseline')
+ @DocsEditable
String textBaseline;
- @DocsEditable @DomName('CanvasRenderingContext2D.webkitBackingStorePixelRatio')
+ @DomName('CanvasRenderingContext2D.webkitBackingStorePixelRatio')
+ @DocsEditable
final num webkitBackingStorePixelRatio;
- @DocsEditable @DomName('CanvasRenderingContext2D.webkitImageSmoothingEnabled')
+ @DomName('CanvasRenderingContext2D.webkitImageSmoothingEnabled')
+ @DocsEditable
bool webkitImageSmoothingEnabled;
- @DocsEditable @DomName('CanvasRenderingContext2D.webkitLineDash')
+ @DomName('CanvasRenderingContext2D.webkitLineDash')
+ @DocsEditable
List webkitLineDash;
- @DocsEditable @DomName('CanvasRenderingContext2D.webkitLineDashOffset')
+ @DomName('CanvasRenderingContext2D.webkitLineDashOffset')
+ @DocsEditable
num webkitLineDashOffset;
- @DocsEditable @DomName('CanvasRenderingContext2D.arc')
+ @DomName('CanvasRenderingContext2D.arc')
+ @DocsEditable
void arc(num x, num y, num radius, num startAngle, num endAngle, bool anticlockwise) native;
- @DocsEditable @DomName('CanvasRenderingContext2D.arcTo')
+ @DomName('CanvasRenderingContext2D.arcTo')
+ @DocsEditable
void arcTo(num x1, num y1, num x2, num y2, num radius) native;
- @DocsEditable @DomName('CanvasRenderingContext2D.beginPath')
+ @DomName('CanvasRenderingContext2D.beginPath')
+ @DocsEditable
void beginPath() native;
- @DocsEditable @DomName('CanvasRenderingContext2D.bezierCurveTo')
+ @DomName('CanvasRenderingContext2D.bezierCurveTo')
+ @DocsEditable
void bezierCurveTo(num cp1x, num cp1y, num cp2x, num cp2y, num x, num y) native;
- @DocsEditable @DomName('CanvasRenderingContext2D.clearRect')
+ @DomName('CanvasRenderingContext2D.clearRect')
+ @DocsEditable
void clearRect(num x, num y, num width, num height) native;
- @DocsEditable @DomName('CanvasRenderingContext2D.clip')
+ @DomName('CanvasRenderingContext2D.clip')
+ @DocsEditable
void clip() native;
- @DocsEditable @DomName('CanvasRenderingContext2D.closePath')
+ @DomName('CanvasRenderingContext2D.closePath')
+ @DocsEditable
void closePath() native;
ImageData createImageData(imagedata_OR_sw, [num sh]) {
- if ((imagedata_OR_sw is ImageData || imagedata_OR_sw == null) &&
- !?sh) {
+ if ((imagedata_OR_sw is ImageData || imagedata_OR_sw == null) && !?sh) {
var imagedata_1 = _convertDartToNative_ImageData(imagedata_OR_sw);
return _convertNativeToDart_ImageData(_createImageData_1(imagedata_1));
}
@@ -995,60 +1197,75 @@
throw new ArgumentError("Incorrect number or type of arguments");
}
@JSName('createImageData')
- @DocsEditable @DomName('CanvasRenderingContext2D.createImageData') @Creates('ImageData|=Object')
+ @DomName('CanvasRenderingContext2D.createImageData')
+ @DocsEditable
+ @Creates('ImageData|=Object')
_createImageData_1(imagedata) native;
@JSName('createImageData')
- @DocsEditable @DomName('CanvasRenderingContext2D.createImageData') @Creates('ImageData|=Object')
+ @DomName('CanvasRenderingContext2D.createImageData')
+ @DocsEditable
+ @Creates('ImageData|=Object')
_createImageData_2(num sw, sh) native;
- @DocsEditable @DomName('CanvasRenderingContext2D.createLinearGradient')
+ @DomName('CanvasRenderingContext2D.createLinearGradient')
+ @DocsEditable
CanvasGradient createLinearGradient(num x0, num y0, num x1, num y1) native;
- @DocsEditable @DomName('CanvasRenderingContext2D.createPattern')
+ @DomName('CanvasRenderingContext2D.createPattern')
+ @DocsEditable
CanvasPattern createPattern(canvas_OR_image, String repetitionType) native;
- @DocsEditable @DomName('CanvasRenderingContext2D.createRadialGradient')
+ @DomName('CanvasRenderingContext2D.createRadialGradient')
+ @DocsEditable
CanvasGradient createRadialGradient(num x0, num y0, num r0, num x1, num y1, num r1) native;
- @DocsEditable @DomName('CanvasRenderingContext2D.drawImage')
+ @DomName('CanvasRenderingContext2D.drawImage')
+ @DocsEditable
void drawImage(canvas_OR_image_OR_video, num sx_OR_x, num sy_OR_y, [num sw_OR_width, num height_OR_sh, num dx, num dy, num dw, num dh]) native;
- @DocsEditable @DomName('CanvasRenderingContext2D.fill')
+ @DomName('CanvasRenderingContext2D.fill')
+ @DocsEditable
void fill() native;
- @DocsEditable @DomName('CanvasRenderingContext2D.fillRect')
+ @DomName('CanvasRenderingContext2D.fillRect')
+ @DocsEditable
void fillRect(num x, num y, num width, num height) native;
- @DocsEditable @DomName('CanvasRenderingContext2D.fillText')
+ @DomName('CanvasRenderingContext2D.fillText')
+ @DocsEditable
void fillText(String text, num x, num y, [num maxWidth]) native;
ImageData getImageData(num sx, num sy, num sw, num sh) {
return _convertNativeToDart_ImageData(_getImageData_1(sx, sy, sw, sh));
}
@JSName('getImageData')
- @DocsEditable @DomName('CanvasRenderingContext2D.getImageData') @Creates('ImageData|=Object')
+ @DomName('CanvasRenderingContext2D.getImageData')
+ @DocsEditable
+ @Creates('ImageData|=Object')
_getImageData_1(sx, sy, sw, sh) native;
- @DocsEditable @DomName('CanvasRenderingContext2D.getLineDash')
+ @DomName('CanvasRenderingContext2D.getLineDash')
+ @DocsEditable
List<num> getLineDash() native;
- @DocsEditable @DomName('CanvasRenderingContext2D.isPointInPath')
+ @DomName('CanvasRenderingContext2D.isPointInPath')
+ @DocsEditable
bool isPointInPath(num x, num y) native;
- @DocsEditable @DomName('CanvasRenderingContext2D.lineTo')
+ @DomName('CanvasRenderingContext2D.lineTo')
+ @DocsEditable
void lineTo(num x, num y) native;
- @DocsEditable @DomName('CanvasRenderingContext2D.measureText')
+ @DomName('CanvasRenderingContext2D.measureText')
+ @DocsEditable
TextMetrics measureText(String text) native;
- @DocsEditable @DomName('CanvasRenderingContext2D.moveTo')
+ @DomName('CanvasRenderingContext2D.moveTo')
+ @DocsEditable
void moveTo(num x, num y) native;
void putImageData(ImageData imagedata, num dx, num dy, [num dirtyX, num dirtyY, num dirtyWidth, num dirtyHeight]) {
- if (!?dirtyX &&
- !?dirtyY &&
- !?dirtyWidth &&
- !?dirtyHeight) {
+ if (!?dirtyX && !?dirtyY && !?dirtyWidth && !?dirtyHeight) {
var imagedata_1 = _convertDartToNative_ImageData(imagedata);
_putImageData_1(imagedata_1, dx, dy);
return;
@@ -1059,63 +1276,77 @@
throw new ArgumentError("Incorrect number or type of arguments");
}
@JSName('putImageData')
- @DocsEditable @DomName('CanvasRenderingContext2D.putImageData')
+ @DomName('CanvasRenderingContext2D.putImageData')
+ @DocsEditable
void _putImageData_1(imagedata, dx, dy) native;
@JSName('putImageData')
- @DocsEditable @DomName('CanvasRenderingContext2D.putImageData')
+ @DomName('CanvasRenderingContext2D.putImageData')
+ @DocsEditable
void _putImageData_2(imagedata, dx, dy, dirtyX, dirtyY, dirtyWidth, dirtyHeight) native;
- @DocsEditable @DomName('CanvasRenderingContext2D.quadraticCurveTo')
+ @DomName('CanvasRenderingContext2D.quadraticCurveTo')
+ @DocsEditable
void quadraticCurveTo(num cpx, num cpy, num x, num y) native;
- @DocsEditable @DomName('CanvasRenderingContext2D.rect')
+ @DomName('CanvasRenderingContext2D.rect')
+ @DocsEditable
void rect(num x, num y, num width, num height) native;
- @DocsEditable @DomName('CanvasRenderingContext2D.restore')
+ @DomName('CanvasRenderingContext2D.restore')
+ @DocsEditable
void restore() native;
- @DocsEditable @DomName('CanvasRenderingContext2D.rotate')
+ @DomName('CanvasRenderingContext2D.rotate')
+ @DocsEditable
void rotate(num angle) native;
- @DocsEditable @DomName('CanvasRenderingContext2D.save')
+ @DomName('CanvasRenderingContext2D.save')
+ @DocsEditable
void save() native;
- @DocsEditable @DomName('CanvasRenderingContext2D.scale')
+ @DomName('CanvasRenderingContext2D.scale')
+ @DocsEditable
void scale(num sx, num sy) native;
- @DocsEditable @DomName('CanvasRenderingContext2D.setLineDash')
+ @DomName('CanvasRenderingContext2D.setLineDash')
+ @DocsEditable
void setLineDash(List<num> dash) native;
- @DocsEditable @DomName('CanvasRenderingContext2D.setTransform')
+ @DomName('CanvasRenderingContext2D.setTransform')
+ @DocsEditable
void setTransform(num m11, num m12, num m21, num m22, num dx, num dy) native;
- @DocsEditable @DomName('CanvasRenderingContext2D.stroke')
+ @DomName('CanvasRenderingContext2D.stroke')
+ @DocsEditable
void stroke() native;
- @DocsEditable @DomName('CanvasRenderingContext2D.strokeRect')
+ @DomName('CanvasRenderingContext2D.strokeRect')
+ @DocsEditable
void strokeRect(num x, num y, num width, num height, [num lineWidth]) native;
- @DocsEditable @DomName('CanvasRenderingContext2D.strokeText')
+ @DomName('CanvasRenderingContext2D.strokeText')
+ @DocsEditable
void strokeText(String text, num x, num y, [num maxWidth]) native;
- @DocsEditable @DomName('CanvasRenderingContext2D.transform')
+ @DomName('CanvasRenderingContext2D.transform')
+ @DocsEditable
void transform(num m11, num m12, num m21, num m22, num dx, num dy) native;
- @DocsEditable @DomName('CanvasRenderingContext2D.translate')
+ @DomName('CanvasRenderingContext2D.translate')
+ @DocsEditable
void translate(num tx, num ty) native;
ImageData webkitGetImageDataHD(num sx, num sy, num sw, num sh) {
return _convertNativeToDart_ImageData(_webkitGetImageDataHD_1(sx, sy, sw, sh));
}
@JSName('webkitGetImageDataHD')
- @DocsEditable @DomName('CanvasRenderingContext2D.webkitGetImageDataHD') @Creates('ImageData|=Object')
+ @DomName('CanvasRenderingContext2D.webkitGetImageDataHD')
+ @DocsEditable
+ @Creates('ImageData|=Object')
_webkitGetImageDataHD_1(sx, sy, sw, sh) native;
void webkitPutImageDataHD(ImageData imagedata, num dx, num dy, [num dirtyX, num dirtyY, num dirtyWidth, num dirtyHeight]) {
- if (!?dirtyX &&
- !?dirtyY &&
- !?dirtyWidth &&
- !?dirtyHeight) {
+ if (!?dirtyX && !?dirtyY && !?dirtyWidth && !?dirtyHeight) {
var imagedata_1 = _convertDartToNative_ImageData(imagedata);
_webkitPutImageDataHD_1(imagedata_1, dx, dy);
return;
@@ -1126,10 +1357,12 @@
throw new ArgumentError("Incorrect number or type of arguments");
}
@JSName('webkitPutImageDataHD')
- @DocsEditable @DomName('CanvasRenderingContext2D.webkitPutImageDataHD')
+ @DomName('CanvasRenderingContext2D.webkitPutImageDataHD')
+ @DocsEditable
void _webkitPutImageDataHD_1(imagedata, dx, dy) native;
@JSName('webkitPutImageDataHD')
- @DocsEditable @DomName('CanvasRenderingContext2D.webkitPutImageDataHD')
+ @DomName('CanvasRenderingContext2D.webkitPutImageDataHD')
+ @DocsEditable
void _webkitPutImageDataHD_2(imagedata, dx, dy, dirtyX, dirtyY, dirtyWidth, dirtyHeight) native;
@@ -1174,33 +1407,40 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('CharacterData')
class CharacterData extends Node native "*CharacterData" {
- @DocsEditable @DomName('CharacterData.data')
+ @DomName('CharacterData.data')
+ @DocsEditable
String data;
- @DocsEditable @DomName('CharacterData.length')
+ @DomName('CharacterData.length')
+ @DocsEditable
final int length;
- @DocsEditable @DomName('CharacterData.appendData')
+ @DomName('CharacterData.appendData')
+ @DocsEditable
void appendData(String data) native;
- @DocsEditable @DomName('CharacterData.deleteData')
+ @DomName('CharacterData.deleteData')
+ @DocsEditable
void deleteData(int offset, int length) native;
- @DocsEditable @DomName('CharacterData.insertData')
+ @DomName('CharacterData.insertData')
+ @DocsEditable
void insertData(int offset, String data) native;
- @DocsEditable @DomName('CharacterData.remove')
+ @DomName('CharacterData.remove')
+ @DocsEditable
void remove() native;
- @DocsEditable @DomName('CharacterData.replaceData')
+ @DomName('CharacterData.replaceData')
+ @DocsEditable
void replaceData(int offset, int length, String data) native;
- @DocsEditable @DomName('CharacterData.substringData')
+ @DomName('CharacterData.substringData')
+ @DocsEditable
String substringData(int offset, int length) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -1208,27 +1448,32 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('ClientRect')
class ClientRect native "*ClientRect" {
- @DocsEditable @DomName('ClientRect.bottom')
+ @DomName('ClientRect.bottom')
+ @DocsEditable
final num bottom;
- @DocsEditable @DomName('ClientRect.height')
+ @DomName('ClientRect.height')
+ @DocsEditable
final num height;
- @DocsEditable @DomName('ClientRect.left')
+ @DomName('ClientRect.left')
+ @DocsEditable
final num left;
- @DocsEditable @DomName('ClientRect.right')
+ @DomName('ClientRect.right')
+ @DocsEditable
final num right;
- @DocsEditable @DomName('ClientRect.top')
+ @DomName('ClientRect.top')
+ @DocsEditable
final num top;
- @DocsEditable @DomName('ClientRect.width')
+ @DomName('ClientRect.width')
+ @DocsEditable
final num width;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -1236,37 +1481,46 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('Clipboard')
class Clipboard native "*Clipboard" {
- @DocsEditable @DomName('Clipboard.dropEffect')
+ @DomName('Clipboard.dropEffect')
+ @DocsEditable
String dropEffect;
- @DocsEditable @DomName('Clipboard.effectAllowed')
+ @DomName('Clipboard.effectAllowed')
+ @DocsEditable
String effectAllowed;
- @DocsEditable @DomName('Clipboard.files')
- @Returns('FileList') @Creates('FileList')
+ @DomName('Clipboard.files')
+ @DocsEditable
+ @Returns('FileList')
+ @Creates('FileList')
final List<File> files;
- @DocsEditable @DomName('Clipboard.items')
+ @DomName('Clipboard.items')
+ @DocsEditable
final DataTransferItemList items;
- @DocsEditable @DomName('Clipboard.types')
+ @DomName('Clipboard.types')
+ @DocsEditable
final List types;
- @DocsEditable @DomName('Clipboard.clearData')
+ @DomName('Clipboard.clearData')
+ @DocsEditable
void clearData([String type]) native;
- @DocsEditable @DomName('Clipboard.getData')
+ @DomName('Clipboard.getData')
+ @DocsEditable
String getData(String type) native;
- @DocsEditable @DomName('Clipboard.setData')
+ @DomName('Clipboard.setData')
+ @DocsEditable
bool setData(String type, String data) native;
- @DocsEditable @DomName('Clipboard.setDragImage')
+ @DomName('Clipboard.setDragImage')
+ @DocsEditable
void setDragImage(ImageElement image, int x, int y) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -1274,18 +1528,20 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('CloseEvent')
class CloseEvent extends Event native "*CloseEvent" {
- @DocsEditable @DomName('CloseEvent.code')
+ @DomName('CloseEvent.code')
+ @DocsEditable
final int code;
- @DocsEditable @DomName('CloseEvent.reason')
+ @DomName('CloseEvent.reason')
+ @DocsEditable
final String reason;
- @DocsEditable @DomName('CloseEvent.wasClean')
+ @DomName('CloseEvent.wasClean')
+ @DocsEditable
final bool wasClean;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -1293,33 +1549,45 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('Comment')
class Comment extends CharacterData native "*Comment" {
}
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
+// WARNING: Do not edit - generated code.
-@DocsEditable
@DomName('CompositionEvent')
class CompositionEvent extends UIEvent native "*CompositionEvent" {
+ factory CompositionEvent(String type,
+ {bool canBubble: false, bool cancelable: false, Window view,
+ String data}) {
+ if (view == null) {
+ view = window;
+ }
+ var e = document.$dom_createEvent("CompositionEvent");
+ e.$dom_initCompositionEvent(type, canBubble, cancelable, view, data);
+ return e;
+ }
- @DocsEditable @DomName('CompositionEvent.data')
+ @DomName('CompositionEvent.data')
+ @DocsEditable
final String data;
- @DocsEditable @DomName('CompositionEvent.initCompositionEvent')
- void initCompositionEvent(String typeArg, bool canBubbleArg, bool cancelableArg, Window viewArg, String dataArg) native;
+ @JSName('initCompositionEvent')
+ @DomName('CompositionEvent.initCompositionEvent')
+ @DocsEditable
+ void $dom_initCompositionEvent(String typeArg, bool canBubbleArg, bool cancelableArg, Window viewArg, String dataArg) native;
+
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-@DocsEditable
@DomName('Console')
class Console {
@@ -1411,7 +1679,8 @@
void warn(Object arg) => _isConsoleDefined ?
JS('void', 'console.warn(#)', arg) : null;
- @DocsEditable @DomName('Console.clear')
+ @DomName('Console.clear')
+ @DocsEditable
void clear(Object arg) native;
}
@@ -1420,11 +1689,10 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('HTMLContentElement')
@SupportedBrowser(SupportedBrowser.CHROME, '25')
-@Experimental()
+@Experimental
class ContentElement extends Element native "*HTMLContentElement" {
@DocsEditable
@@ -1433,14 +1701,18 @@
/// Checks if this type is supported on the current platform.
static bool get supported => Element.isTagSupported('content');
- @DocsEditable @DomName('HTMLContentElement.resetStyleInheritance')
+ @DomName('HTMLContentElement.resetStyleInheritance')
+ @DocsEditable
bool resetStyleInheritance;
- @DocsEditable @DomName('HTMLContentElement.select')
+ @DomName('HTMLContentElement.select')
+ @DocsEditable
String select;
- @DocsEditable @DomName('HTMLContentElement.getDistributedNodes')
- @Returns('NodeList') @Creates('NodeList')
+ @DomName('HTMLContentElement.getDistributedNodes')
+ @DocsEditable
+ @Returns('NodeList')
+ @Creates('NodeList')
List<Node> getDistributedNodes() native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -1448,30 +1720,36 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('Coordinates')
class Coordinates native "*Coordinates" {
- @DocsEditable @DomName('Coordinates.accuracy')
+ @DomName('Coordinates.accuracy')
+ @DocsEditable
final num accuracy;
- @DocsEditable @DomName('Coordinates.altitude')
+ @DomName('Coordinates.altitude')
+ @DocsEditable
final num altitude;
- @DocsEditable @DomName('Coordinates.altitudeAccuracy')
+ @DomName('Coordinates.altitudeAccuracy')
+ @DocsEditable
final num altitudeAccuracy;
- @DocsEditable @DomName('Coordinates.heading')
+ @DomName('Coordinates.heading')
+ @DocsEditable
final num heading;
- @DocsEditable @DomName('Coordinates.latitude')
+ @DomName('Coordinates.latitude')
+ @DocsEditable
final num latitude;
- @DocsEditable @DomName('Coordinates.longitude')
+ @DomName('Coordinates.longitude')
+ @DocsEditable
final num longitude;
- @DocsEditable @DomName('Coordinates.speed')
+ @DomName('Coordinates.speed')
+ @DocsEditable
final num speed;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -1479,18 +1757,20 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('Counter')
class Counter native "*Counter" {
- @DocsEditable @DomName('Counter.identifier')
+ @DomName('Counter.identifier')
+ @DocsEditable
final String identifier;
- @DocsEditable @DomName('Counter.listStyle')
+ @DomName('Counter.listStyle')
+ @DocsEditable
final String listStyle;
- @DocsEditable @DomName('Counter.separator')
+ @DomName('Counter.separator')
+ @DocsEditable
final String separator;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -1498,12 +1778,12 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('Crypto')
class Crypto native "*Crypto" {
- @DocsEditable @DomName('Crypto.getRandomValues')
+ @DomName('Crypto.getRandomValues')
+ @DocsEditable
ArrayBufferView getRandomValues(ArrayBufferView array) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -1511,12 +1791,12 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('CSSCharsetRule')
class CssCharsetRule extends CssRule native "*CSSCharsetRule" {
- @DocsEditable @DomName('CSSCharsetRule.encoding')
+ @DomName('CSSCharsetRule.encoding')
+ @DocsEditable
String encoding;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -1524,12 +1804,12 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('CSSFontFaceRule')
class CssFontFaceRule extends CssRule native "*CSSFontFaceRule" {
- @DocsEditable @DomName('CSSFontFaceRule.style')
+ @DomName('CSSFontFaceRule.style')
+ @DocsEditable
final CssStyleDeclaration style;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -1537,18 +1817,20 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('CSSImportRule')
class CssImportRule extends CssRule native "*CSSImportRule" {
- @DocsEditable @DomName('CSSImportRule.href')
+ @DomName('CSSImportRule.href')
+ @DocsEditable
final String href;
- @DocsEditable @DomName('CSSImportRule.media')
+ @DomName('CSSImportRule.media')
+ @DocsEditable
final MediaList media;
- @DocsEditable @DomName('CSSImportRule.styleSheet')
+ @DomName('CSSImportRule.styleSheet')
+ @DocsEditable
final CssStyleSheet styleSheet;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -1556,15 +1838,16 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('WebKitCSSKeyframeRule')
class CssKeyframeRule extends CssRule native "*WebKitCSSKeyframeRule" {
- @DocsEditable @DomName('WebKitCSSKeyframeRule.keyText')
+ @DomName('WebKitCSSKeyframeRule.keyText')
+ @DocsEditable
String keyText;
- @DocsEditable @DomName('WebKitCSSKeyframeRule.style')
+ @DomName('WebKitCSSKeyframeRule.style')
+ @DocsEditable
final CssStyleDeclaration style;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -1572,25 +1855,30 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('WebKitCSSKeyframesRule')
class CssKeyframesRule extends CssRule native "*WebKitCSSKeyframesRule" {
- @DocsEditable @DomName('WebKitCSSKeyframesRule.cssRules')
- @Returns('_CssRuleList') @Creates('_CssRuleList')
+ @DomName('WebKitCSSKeyframesRule.cssRules')
+ @DocsEditable
+ @Returns('_CssRuleList')
+ @Creates('_CssRuleList')
final List<CssRule> cssRules;
- @DocsEditable @DomName('WebKitCSSKeyframesRule.name')
+ @DomName('WebKitCSSKeyframesRule.name')
+ @DocsEditable
String name;
- @DocsEditable @DomName('WebKitCSSKeyframesRule.deleteRule')
+ @DomName('WebKitCSSKeyframesRule.deleteRule')
+ @DocsEditable
void deleteRule(String key) native;
- @DocsEditable @DomName('WebKitCSSKeyframesRule.findRule')
+ @DomName('WebKitCSSKeyframesRule.findRule')
+ @DocsEditable
CssKeyframeRule findRule(String key) native;
- @DocsEditable @DomName('WebKitCSSKeyframesRule.insertRule')
+ @DomName('WebKitCSSKeyframesRule.insertRule')
+ @DocsEditable
void insertRule(String rule) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -1598,7 +1886,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('WebKitCSSMatrix')
class CssMatrix native "*WebKitCSSMatrix" {
@@ -1617,100 +1904,132 @@
return JS('CssMatrix', 'new WebKitCSSMatrix(#)', cssValue);
}
- @DocsEditable @DomName('WebKitCSSMatrix.a')
+ @DomName('WebKitCSSMatrix.a')
+ @DocsEditable
num a;
- @DocsEditable @DomName('WebKitCSSMatrix.b')
+ @DomName('WebKitCSSMatrix.b')
+ @DocsEditable
num b;
- @DocsEditable @DomName('WebKitCSSMatrix.c')
+ @DomName('WebKitCSSMatrix.c')
+ @DocsEditable
num c;
- @DocsEditable @DomName('WebKitCSSMatrix.d')
+ @DomName('WebKitCSSMatrix.d')
+ @DocsEditable
num d;
- @DocsEditable @DomName('WebKitCSSMatrix.e')
+ @DomName('WebKitCSSMatrix.e')
+ @DocsEditable
num e;
- @DocsEditable @DomName('WebKitCSSMatrix.f')
+ @DomName('WebKitCSSMatrix.f')
+ @DocsEditable
num f;
- @DocsEditable @DomName('WebKitCSSMatrix.m11')
+ @DomName('WebKitCSSMatrix.m11')
+ @DocsEditable
num m11;
- @DocsEditable @DomName('WebKitCSSMatrix.m12')
+ @DomName('WebKitCSSMatrix.m12')
+ @DocsEditable
num m12;
- @DocsEditable @DomName('WebKitCSSMatrix.m13')
+ @DomName('WebKitCSSMatrix.m13')
+ @DocsEditable
num m13;
- @DocsEditable @DomName('WebKitCSSMatrix.m14')
+ @DomName('WebKitCSSMatrix.m14')
+ @DocsEditable
num m14;
- @DocsEditable @DomName('WebKitCSSMatrix.m21')
+ @DomName('WebKitCSSMatrix.m21')
+ @DocsEditable
num m21;
- @DocsEditable @DomName('WebKitCSSMatrix.m22')
+ @DomName('WebKitCSSMatrix.m22')
+ @DocsEditable
num m22;
- @DocsEditable @DomName('WebKitCSSMatrix.m23')
+ @DomName('WebKitCSSMatrix.m23')
+ @DocsEditable
num m23;
- @DocsEditable @DomName('WebKitCSSMatrix.m24')
+ @DomName('WebKitCSSMatrix.m24')
+ @DocsEditable
num m24;
- @DocsEditable @DomName('WebKitCSSMatrix.m31')
+ @DomName('WebKitCSSMatrix.m31')
+ @DocsEditable
num m31;
- @DocsEditable @DomName('WebKitCSSMatrix.m32')
+ @DomName('WebKitCSSMatrix.m32')
+ @DocsEditable
num m32;
- @DocsEditable @DomName('WebKitCSSMatrix.m33')
+ @DomName('WebKitCSSMatrix.m33')
+ @DocsEditable
num m33;
- @DocsEditable @DomName('WebKitCSSMatrix.m34')
+ @DomName('WebKitCSSMatrix.m34')
+ @DocsEditable
num m34;
- @DocsEditable @DomName('WebKitCSSMatrix.m41')
+ @DomName('WebKitCSSMatrix.m41')
+ @DocsEditable
num m41;
- @DocsEditable @DomName('WebKitCSSMatrix.m42')
+ @DomName('WebKitCSSMatrix.m42')
+ @DocsEditable
num m42;
- @DocsEditable @DomName('WebKitCSSMatrix.m43')
+ @DomName('WebKitCSSMatrix.m43')
+ @DocsEditable
num m43;
- @DocsEditable @DomName('WebKitCSSMatrix.m44')
+ @DomName('WebKitCSSMatrix.m44')
+ @DocsEditable
num m44;
- @DocsEditable @DomName('WebKitCSSMatrix.inverse')
+ @DomName('WebKitCSSMatrix.inverse')
+ @DocsEditable
CssMatrix inverse() native;
- @DocsEditable @DomName('WebKitCSSMatrix.multiply')
+ @DomName('WebKitCSSMatrix.multiply')
+ @DocsEditable
CssMatrix multiply(CssMatrix secondMatrix) native;
- @DocsEditable @DomName('WebKitCSSMatrix.rotate')
+ @DomName('WebKitCSSMatrix.rotate')
+ @DocsEditable
CssMatrix rotate(num rotX, num rotY, num rotZ) native;
- @DocsEditable @DomName('WebKitCSSMatrix.rotateAxisAngle')
+ @DomName('WebKitCSSMatrix.rotateAxisAngle')
+ @DocsEditable
CssMatrix rotateAxisAngle(num x, num y, num z, num angle) native;
- @DocsEditable @DomName('WebKitCSSMatrix.scale')
+ @DomName('WebKitCSSMatrix.scale')
+ @DocsEditable
CssMatrix scale(num scaleX, num scaleY, num scaleZ) native;
- @DocsEditable @DomName('WebKitCSSMatrix.setMatrixValue')
+ @DomName('WebKitCSSMatrix.setMatrixValue')
+ @DocsEditable
void setMatrixValue(String string) native;
- @DocsEditable @DomName('WebKitCSSMatrix.skewX')
+ @DomName('WebKitCSSMatrix.skewX')
+ @DocsEditable
CssMatrix skewX(num angle) native;
- @DocsEditable @DomName('WebKitCSSMatrix.skewY')
+ @DomName('WebKitCSSMatrix.skewY')
+ @DocsEditable
CssMatrix skewY(num angle) native;
- @DocsEditable @DomName('WebKitCSSMatrix.toString')
+ @DomName('WebKitCSSMatrix.toString')
+ @DocsEditable
String toString() native;
- @DocsEditable @DomName('WebKitCSSMatrix.translate')
+ @DomName('WebKitCSSMatrix.translate')
+ @DocsEditable
CssMatrix translate(num x, num y, num z) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -1718,22 +2037,26 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('CSSMediaRule')
class CssMediaRule extends CssRule native "*CSSMediaRule" {
- @DocsEditable @DomName('CSSMediaRule.cssRules')
- @Returns('_CssRuleList') @Creates('_CssRuleList')
+ @DomName('CSSMediaRule.cssRules')
+ @DocsEditable
+ @Returns('_CssRuleList')
+ @Creates('_CssRuleList')
final List<CssRule> cssRules;
- @DocsEditable @DomName('CSSMediaRule.media')
+ @DomName('CSSMediaRule.media')
+ @DocsEditable
final MediaList media;
- @DocsEditable @DomName('CSSMediaRule.deleteRule')
+ @DomName('CSSMediaRule.deleteRule')
+ @DocsEditable
void deleteRule(int index) native;
- @DocsEditable @DomName('CSSMediaRule.insertRule')
+ @DomName('CSSMediaRule.insertRule')
+ @DocsEditable
int insertRule(String rule, int index) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -1741,15 +2064,16 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('CSSPageRule')
class CssPageRule extends CssRule native "*CSSPageRule" {
- @DocsEditable @DomName('CSSPageRule.selectorText')
+ @DomName('CSSPageRule.selectorText')
+ @DocsEditable
String selectorText;
- @DocsEditable @DomName('CSSPageRule.style')
+ @DomName('CSSPageRule.style')
+ @DocsEditable
final CssStyleDeclaration style;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -1757,7 +2081,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('CSSPrimitiveValue')
class CssPrimitiveValue extends CssValue native "*CSSPrimitiveValue" {
@@ -1820,29 +2143,37 @@
static const int CSS_VW = 26;
- @DocsEditable @DomName('CSSPrimitiveValue.primitiveType')
+ @DomName('CSSPrimitiveValue.primitiveType')
+ @DocsEditable
final int primitiveType;
- @DocsEditable @DomName('CSSPrimitiveValue.getCounterValue')
+ @DomName('CSSPrimitiveValue.getCounterValue')
+ @DocsEditable
Counter getCounterValue() native;
- @DocsEditable @DomName('CSSPrimitiveValue.getFloatValue')
+ @DomName('CSSPrimitiveValue.getFloatValue')
+ @DocsEditable
num getFloatValue(int unitType) native;
@JSName('getRGBColorValue')
- @DocsEditable @DomName('CSSPrimitiveValue.getRGBColorValue')
+ @DomName('CSSPrimitiveValue.getRGBColorValue')
+ @DocsEditable
RgbColor getRgbColorValue() native;
- @DocsEditable @DomName('CSSPrimitiveValue.getRectValue')
+ @DomName('CSSPrimitiveValue.getRectValue')
+ @DocsEditable
Rect getRectValue() native;
- @DocsEditable @DomName('CSSPrimitiveValue.getStringValue')
+ @DomName('CSSPrimitiveValue.getStringValue')
+ @DocsEditable
String getStringValue() native;
- @DocsEditable @DomName('CSSPrimitiveValue.setFloatValue')
+ @DomName('CSSPrimitiveValue.setFloatValue')
+ @DocsEditable
void setFloatValue(int unitType, num floatValue) native;
- @DocsEditable @DomName('CSSPrimitiveValue.setStringValue')
+ @DomName('CSSPrimitiveValue.setStringValue')
+ @DocsEditable
void setStringValue(int stringType, String stringValue) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -1850,7 +2181,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('CSSRule')
class CssRule native "*CSSRule" {
@@ -1873,16 +2203,20 @@
static const int WEBKIT_KEYFRAME_RULE = 8;
- @DocsEditable @DomName('CSSRule.cssText')
+ @DomName('CSSRule.cssText')
+ @DocsEditable
String cssText;
- @DocsEditable @DomName('CSSRule.parentRule')
+ @DomName('CSSRule.parentRule')
+ @DocsEditable
final CssRule parentRule;
- @DocsEditable @DomName('CSSRule.parentStyleSheet')
+ @DomName('CSSRule.parentStyleSheet')
+ @DocsEditable
final CssStyleSheet parentStyleSheet;
- @DocsEditable @DomName('CSSRule.type')
+ @DomName('CSSRule.type')
+ @DocsEditable
final int type;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -1907,7 +2241,6 @@
return _cachedBrowserPrefix;
}
-@DocsEditable
@DomName('CSSStyleDeclaration')
class CssStyleDeclaration native "*CSSStyleDeclaration" {
factory CssStyleDeclaration() => _CssStyleDeclarationFactoryProvider.createCssStyleDeclaration();
@@ -1915,36 +2248,46 @@
_CssStyleDeclarationFactoryProvider.createCssStyleDeclaration_css(css);
- @DocsEditable @DomName('CSSStyleDeclaration.cssText')
+ @DomName('CSSStyleDeclaration.cssText')
+ @DocsEditable
String cssText;
- @DocsEditable @DomName('CSSStyleDeclaration.length')
+ @DomName('CSSStyleDeclaration.length')
+ @DocsEditable
final int length;
- @DocsEditable @DomName('CSSStyleDeclaration.parentRule')
+ @DomName('CSSStyleDeclaration.parentRule')
+ @DocsEditable
final CssRule parentRule;
@JSName('getPropertyCSSValue')
- @DocsEditable @DomName('CSSStyleDeclaration.getPropertyCSSValue')
+ @DomName('CSSStyleDeclaration.getPropertyCSSValue')
+ @DocsEditable
CssValue getPropertyCssValue(String propertyName) native;
- @DocsEditable @DomName('CSSStyleDeclaration.getPropertyPriority')
+ @DomName('CSSStyleDeclaration.getPropertyPriority')
+ @DocsEditable
String getPropertyPriority(String propertyName) native;
- @DocsEditable @DomName('CSSStyleDeclaration.getPropertyShorthand')
+ @DomName('CSSStyleDeclaration.getPropertyShorthand')
+ @DocsEditable
String getPropertyShorthand(String propertyName) native;
@JSName('getPropertyValue')
- @DocsEditable @DomName('CSSStyleDeclaration.getPropertyValue')
+ @DomName('CSSStyleDeclaration.getPropertyValue')
+ @DocsEditable
String _getPropertyValue(String propertyName) native;
- @DocsEditable @DomName('CSSStyleDeclaration.isPropertyImplicit')
+ @DomName('CSSStyleDeclaration.isPropertyImplicit')
+ @DocsEditable
bool isPropertyImplicit(String propertyName) native;
- @DocsEditable @DomName('CSSStyleDeclaration.item')
+ @DomName('CSSStyleDeclaration.item')
+ @DocsEditable
String item(int index) native;
- @DocsEditable @DomName('CSSStyleDeclaration.removeProperty')
+ @DomName('CSSStyleDeclaration.removeProperty')
+ @DocsEditable
String removeProperty(String propertyName) native;
@@ -5117,15 +5460,16 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('CSSStyleRule')
class CssStyleRule extends CssRule native "*CSSStyleRule" {
- @DocsEditable @DomName('CSSStyleRule.selectorText')
+ @DomName('CSSStyleRule.selectorText')
+ @DocsEditable
String selectorText;
- @DocsEditable @DomName('CSSStyleRule.style')
+ @DomName('CSSStyleRule.style')
+ @DocsEditable
final CssStyleDeclaration style;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -5133,32 +5477,40 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('CSSStyleSheet')
class CssStyleSheet extends StyleSheet native "*CSSStyleSheet" {
- @DocsEditable @DomName('CSSStyleSheet.cssRules')
- @Returns('_CssRuleList') @Creates('_CssRuleList')
+ @DomName('CSSStyleSheet.cssRules')
+ @DocsEditable
+ @Returns('_CssRuleList')
+ @Creates('_CssRuleList')
final List<CssRule> cssRules;
- @DocsEditable @DomName('CSSStyleSheet.ownerRule')
+ @DomName('CSSStyleSheet.ownerRule')
+ @DocsEditable
final CssRule ownerRule;
- @DocsEditable @DomName('CSSStyleSheet.rules')
- @Returns('_CssRuleList') @Creates('_CssRuleList')
+ @DomName('CSSStyleSheet.rules')
+ @DocsEditable
+ @Returns('_CssRuleList')
+ @Creates('_CssRuleList')
final List<CssRule> rules;
- @DocsEditable @DomName('CSSStyleSheet.addRule')
+ @DomName('CSSStyleSheet.addRule')
+ @DocsEditable
int addRule(String selector, String style, [int index]) native;
- @DocsEditable @DomName('CSSStyleSheet.deleteRule')
+ @DomName('CSSStyleSheet.deleteRule')
+ @DocsEditable
void deleteRule(int index) native;
- @DocsEditable @DomName('CSSStyleSheet.insertRule')
+ @DomName('CSSStyleSheet.insertRule')
+ @DocsEditable
int insertRule(String rule, int index) native;
- @DocsEditable @DomName('CSSStyleSheet.removeRule')
+ @DomName('CSSStyleSheet.removeRule')
+ @DocsEditable
void removeRule(int index) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -5166,7 +5518,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('WebKitCSSTransformValue')
class CssTransformValue extends _CssValueList native "*WebKitCSSTransformValue" {
@@ -5213,7 +5564,8 @@
static const int CSS_TRANSLATEZ = 12;
- @DocsEditable @DomName('WebKitCSSTransformValue.operationType')
+ @DomName('WebKitCSSTransformValue.operationType')
+ @DocsEditable
final int operationType;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -5221,7 +5573,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('CSSUnknownRule')
class CssUnknownRule extends CssRule native "*CSSUnknownRule" {
@@ -5231,7 +5582,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('CSSValue')
class CssValue native "*CSSValue" {
@@ -5244,10 +5594,12 @@
static const int CSS_VALUE_LIST = 2;
- @DocsEditable @DomName('CSSValue.cssText')
+ @DomName('CSSValue.cssText')
+ @DocsEditable
String cssText;
- @DocsEditable @DomName('CSSValue.cssValueType')
+ @DomName('CSSValue.cssValueType')
+ @DocsEditable
final int cssValueType;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -5257,18 +5609,24 @@
// WARNING: Do not edit - generated code.
-@DocsEditable
@DomName('CustomEvent')
class CustomEvent extends Event native "*CustomEvent" {
- factory CustomEvent(String type, [bool canBubble = true, bool cancelable = true,
- Object detail]) => _CustomEventFactoryProvider.createCustomEvent(
- type, canBubble, cancelable, detail);
+ factory CustomEvent(String type,
+ {bool canBubble: true, bool cancelable: true, Object detail}) {
- @DocsEditable @DomName('CustomEvent.detail')
+ final CustomEvent e = document.$dom_createEvent("CustomEvent");
+ e.$dom_initCustomEvent(type, canBubble, cancelable, detail);
+
+ return e;
+ }
+
+ @DomName('CustomEvent.detail')
+ @DocsEditable
final Object detail;
@JSName('initCustomEvent')
- @DocsEditable @DomName('CustomEvent.initCustomEvent')
+ @DomName('CustomEvent.initCustomEvent')
+ @DocsEditable
void $dom_initCustomEvent(String typeArg, bool canBubbleArg, bool cancelableArg, Object detailArg) native;
}
@@ -5277,7 +5635,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('HTMLDListElement')
class DListElement extends Element native "*HTMLDListElement" {
@@ -5290,7 +5647,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('HTMLDataListElement')
@SupportedBrowser(SupportedBrowser.CHROME)
@@ -5305,7 +5661,8 @@
/// Checks if this type is supported on the current platform.
static bool get supported => Element.isTagSupported('datalist');
- @DocsEditable @DomName('HTMLDataListElement.options')
+ @DomName('HTMLDataListElement.options')
+ @DocsEditable
final HtmlCollection options;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -5313,24 +5670,28 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('DataTransferItem')
class DataTransferItem native "*DataTransferItem" {
- @DocsEditable @DomName('DataTransferItem.kind')
+ @DomName('DataTransferItem.kind')
+ @DocsEditable
final String kind;
- @DocsEditable @DomName('DataTransferItem.type')
+ @DomName('DataTransferItem.type')
+ @DocsEditable
final String type;
- @DocsEditable @DomName('DataTransferItem.getAsFile')
+ @DomName('DataTransferItem.getAsFile')
+ @DocsEditable
Blob getAsFile() native;
- @DocsEditable @DomName('DataTransferItem.getAsString')
+ @DomName('DataTransferItem.getAsString')
+ @DocsEditable
void getAsString([StringCallback callback]) native;
- @DocsEditable @DomName('DataTransferItem.webkitGetAsEntry')
+ @DomName('DataTransferItem.webkitGetAsEntry')
+ @DocsEditable
Entry webkitGetAsEntry() native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -5338,21 +5699,24 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('DataTransferItemList')
class DataTransferItemList native "*DataTransferItemList" {
- @DocsEditable @DomName('DataTransferItemList.length')
+ @DomName('DataTransferItemList.length')
+ @DocsEditable
final int length;
- @DocsEditable @DomName('DataTransferItemList.add')
+ @DomName('DataTransferItemList.add')
+ @DocsEditable
void add(data_OR_file, [String type]) native;
- @DocsEditable @DomName('DataTransferItemList.clear')
+ @DomName('DataTransferItemList.clear')
+ @DocsEditable
void clear() native;
- @DocsEditable @DomName('DataTransferItemList.item')
+ @DomName('DataTransferItemList.item')
+ @DocsEditable
DataTransferItem item(int index) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -5360,7 +5724,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('DataView')
class DataView extends ArrayBufferView native "*DataView" {
@@ -5385,52 +5748,68 @@
return JS('DataView', 'new DataView(#,#,#)', buffer, byteOffset, byteLength);
}
- @DocsEditable @DomName('DataView.getFloat32')
+ @DomName('DataView.getFloat32')
+ @DocsEditable
num getFloat32(int byteOffset, {bool littleEndian}) native;
- @DocsEditable @DomName('DataView.getFloat64')
+ @DomName('DataView.getFloat64')
+ @DocsEditable
num getFloat64(int byteOffset, {bool littleEndian}) native;
- @DocsEditable @DomName('DataView.getInt16')
+ @DomName('DataView.getInt16')
+ @DocsEditable
int getInt16(int byteOffset, {bool littleEndian}) native;
- @DocsEditable @DomName('DataView.getInt32')
+ @DomName('DataView.getInt32')
+ @DocsEditable
int getInt32(int byteOffset, {bool littleEndian}) native;
- @DocsEditable @DomName('DataView.getInt8')
+ @DomName('DataView.getInt8')
+ @DocsEditable
int getInt8(int byteOffset) native;
- @DocsEditable @DomName('DataView.getUint16')
+ @DomName('DataView.getUint16')
+ @DocsEditable
int getUint16(int byteOffset, {bool littleEndian}) native;
- @DocsEditable @DomName('DataView.getUint32')
+ @DomName('DataView.getUint32')
+ @DocsEditable
int getUint32(int byteOffset, {bool littleEndian}) native;
- @DocsEditable @DomName('DataView.getUint8')
+ @DomName('DataView.getUint8')
+ @DocsEditable
int getUint8(int byteOffset) native;
- @DocsEditable @DomName('DataView.setFloat32')
+ @DomName('DataView.setFloat32')
+ @DocsEditable
void setFloat32(int byteOffset, num value, {bool littleEndian}) native;
- @DocsEditable @DomName('DataView.setFloat64')
+ @DomName('DataView.setFloat64')
+ @DocsEditable
void setFloat64(int byteOffset, num value, {bool littleEndian}) native;
- @DocsEditable @DomName('DataView.setInt16')
+ @DomName('DataView.setInt16')
+ @DocsEditable
void setInt16(int byteOffset, int value, {bool littleEndian}) native;
- @DocsEditable @DomName('DataView.setInt32')
+ @DomName('DataView.setInt32')
+ @DocsEditable
void setInt32(int byteOffset, int value, {bool littleEndian}) native;
- @DocsEditable @DomName('DataView.setInt8')
+ @DomName('DataView.setInt8')
+ @DocsEditable
void setInt8(int byteOffset, int value) native;
- @DocsEditable @DomName('DataView.setUint16')
+ @DomName('DataView.setUint16')
+ @DocsEditable
void setUint16(int byteOffset, int value, {bool littleEndian}) native;
- @DocsEditable @DomName('DataView.setUint32')
+ @DomName('DataView.setUint32')
+ @DocsEditable
void setUint32(int byteOffset, int value, {bool littleEndian}) native;
- @DocsEditable @DomName('DataView.setUint8')
+ @DomName('DataView.setUint8')
+ @DocsEditable
void setUint8(int byteOffset, int value) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -5438,21 +5817,24 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('Database')
class Database native "*Database" {
- @DocsEditable @DomName('Database.version')
+ @DomName('Database.version')
+ @DocsEditable
final String version;
- @DocsEditable @DomName('Database.changeVersion')
+ @DomName('Database.changeVersion')
+ @DocsEditable
void changeVersion(String oldVersion, String newVersion, [SqlTransactionCallback callback, SqlTransactionErrorCallback errorCallback, VoidCallback successCallback]) native;
- @DocsEditable @DomName('Database.readTransaction')
+ @DomName('Database.readTransaction')
+ @DocsEditable
void readTransaction(SqlTransactionCallback callback, [SqlTransactionErrorCallback errorCallback, VoidCallback successCallback]) native;
- @DocsEditable @DomName('Database.transaction')
+ @DomName('Database.transaction')
+ @DocsEditable
void transaction(SqlTransactionCallback callback, [SqlTransactionErrorCallback errorCallback, VoidCallback successCallback]) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -5468,24 +5850,28 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('DatabaseSync')
class DatabaseSync native "*DatabaseSync" {
- @DocsEditable @DomName('DatabaseSync.lastErrorMessage')
+ @DomName('DatabaseSync.lastErrorMessage')
+ @DocsEditable
final String lastErrorMessage;
- @DocsEditable @DomName('DatabaseSync.version')
+ @DomName('DatabaseSync.version')
+ @DocsEditable
final String version;
- @DocsEditable @DomName('DatabaseSync.changeVersion')
+ @DomName('DatabaseSync.changeVersion')
+ @DocsEditable
void changeVersion(String oldVersion, String newVersion, [SqlTransactionSyncCallback callback]) native;
- @DocsEditable @DomName('DatabaseSync.readTransaction')
+ @DomName('DatabaseSync.readTransaction')
+ @DocsEditable
void readTransaction(SqlTransactionSyncCallback callback) native;
- @DocsEditable @DomName('DatabaseSync.transaction')
+ @DomName('DatabaseSync.transaction')
+ @DocsEditable
void transaction(SqlTransactionSyncCallback callback) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -5493,15 +5879,17 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('DedicatedWorkerContext')
class DedicatedWorkerContext extends WorkerContext native "*DedicatedWorkerContext" {
+ @DomName('DedicatedWorkerContext.message')
+ @DocsEditable
static const EventStreamProvider<MessageEvent> messageEvent = const EventStreamProvider<MessageEvent>('message');
@DocsEditable
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
+ @deprecated
DedicatedWorkerContextEvents get on =>
new DedicatedWorkerContextEvents(this);
@@ -5516,16 +5904,21 @@
return;
}
@JSName('postMessage')
- @DocsEditable @DomName('DedicatedWorkerContext.postMessage')
+ @DomName('DedicatedWorkerContext.postMessage')
+ @DocsEditable
void _postMessage_1(message, List messagePorts) native;
@JSName('postMessage')
- @DocsEditable @DomName('DedicatedWorkerContext.postMessage')
+ @DomName('DedicatedWorkerContext.postMessage')
+ @DocsEditable
void _postMessage_2(message) native;
+ @DomName('DedicatedWorkerContext.message')
+ @DocsEditable
Stream<MessageEvent> get onMessage => messageEvent.forTarget(this);
}
@DocsEditable
+@deprecated
class DedicatedWorkerContextEvents extends WorkerContextEvents {
@DocsEditable
DedicatedWorkerContextEvents(EventTarget _ptr) : super(_ptr);
@@ -5538,12 +5931,11 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('HTMLDetailsElement')
@SupportedBrowser(SupportedBrowser.CHROME)
@SupportedBrowser(SupportedBrowser.SAFARI)
-@Experimental()
+@Experimental
class DetailsElement extends Element native "*HTMLDetailsElement" {
@DocsEditable
@@ -5552,7 +5944,8 @@
/// Checks if this type is supported on the current platform.
static bool get supported => Element.isTagSupported('details');
- @DocsEditable @DomName('HTMLDetailsElement.open')
+ @DomName('HTMLDetailsElement.open')
+ @DocsEditable
bool open;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -5560,50 +5953,65 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('DeviceMotionEvent')
class DeviceMotionEvent extends Event native "*DeviceMotionEvent" {
- @DocsEditable @DomName('DeviceMotionEvent.interval')
+ @DomName('DeviceMotionEvent.interval')
+ @DocsEditable
final num interval;
}
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
+// WARNING: Do not edit - generated code.
-
-@DocsEditable
@DomName('DeviceOrientationEvent')
-class DeviceOrientationEvent extends Event native "*DeviceOrientationEvent" {
- @DocsEditable @DomName('DeviceOrientationEvent.absolute')
+class DeviceOrientationEvent extends Event native "*DeviceOrientationEvent" {
+ factory DeviceOrientationEvent(String type,
+ {bool canBubble: true, bool cancelable: true, num alpha: 0, num beta: 0,
+ num gamma: 0, bool absolute: false}) {
+ var e = document.$dom_createEvent("DeviceOrientationEvent");
+ e.$dom_initDeviceOrientationEvent(type, canBubble, cancelable, alpha, beta,
+ gamma, absolute);
+ return e;
+ }
+
+ @DomName('DeviceOrientationEvent.absolute')
+ @DocsEditable
final bool absolute;
- @DocsEditable @DomName('DeviceOrientationEvent.alpha')
+ @DomName('DeviceOrientationEvent.alpha')
+ @DocsEditable
final num alpha;
- @DocsEditable @DomName('DeviceOrientationEvent.beta')
+ @DomName('DeviceOrientationEvent.beta')
+ @DocsEditable
final num beta;
- @DocsEditable @DomName('DeviceOrientationEvent.gamma')
+ @DomName('DeviceOrientationEvent.gamma')
+ @DocsEditable
final num gamma;
- @DocsEditable @DomName('DeviceOrientationEvent.initDeviceOrientationEvent')
- void initDeviceOrientationEvent(String type, bool bubbles, bool cancelable, num alpha, num beta, num gamma, bool absolute) native;
+ @JSName('initDeviceOrientationEvent')
+ @DomName('DeviceOrientationEvent.initDeviceOrientationEvent')
+ @DocsEditable
+ void $dom_initDeviceOrientationEvent(String type, bool bubbles, bool cancelable, num alpha, num beta, num gamma, bool absolute) native;
+
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('DirectoryEntry')
class DirectoryEntry extends Entry native "*DirectoryEntry" {
- @DocsEditable @DomName('DirectoryEntry.createReader')
+ @DomName('DirectoryEntry.createReader')
+ @DocsEditable
DirectoryReader createReader() native;
void getDirectory(String path, {Map options, EntryCallback successCallback, ErrorCallback errorCallback}) {
@@ -5626,16 +6034,20 @@
return;
}
@JSName('getDirectory')
- @DocsEditable @DomName('DirectoryEntry.getDirectory')
+ @DomName('DirectoryEntry.getDirectory')
+ @DocsEditable
void _getDirectory_1(path, options, EntryCallback successCallback, ErrorCallback errorCallback) native;
@JSName('getDirectory')
- @DocsEditable @DomName('DirectoryEntry.getDirectory')
+ @DomName('DirectoryEntry.getDirectory')
+ @DocsEditable
void _getDirectory_2(path, options, EntryCallback successCallback) native;
@JSName('getDirectory')
- @DocsEditable @DomName('DirectoryEntry.getDirectory')
+ @DomName('DirectoryEntry.getDirectory')
+ @DocsEditable
void _getDirectory_3(path, options) native;
@JSName('getDirectory')
- @DocsEditable @DomName('DirectoryEntry.getDirectory')
+ @DomName('DirectoryEntry.getDirectory')
+ @DocsEditable
void _getDirectory_4(path) native;
void getFile(String path, {Map options, EntryCallback successCallback, ErrorCallback errorCallback}) {
@@ -5658,19 +6070,24 @@
return;
}
@JSName('getFile')
- @DocsEditable @DomName('DirectoryEntry.getFile')
+ @DomName('DirectoryEntry.getFile')
+ @DocsEditable
void _getFile_1(path, options, EntryCallback successCallback, ErrorCallback errorCallback) native;
@JSName('getFile')
- @DocsEditable @DomName('DirectoryEntry.getFile')
+ @DomName('DirectoryEntry.getFile')
+ @DocsEditable
void _getFile_2(path, options, EntryCallback successCallback) native;
@JSName('getFile')
- @DocsEditable @DomName('DirectoryEntry.getFile')
+ @DomName('DirectoryEntry.getFile')
+ @DocsEditable
void _getFile_3(path, options) native;
@JSName('getFile')
- @DocsEditable @DomName('DirectoryEntry.getFile')
+ @DomName('DirectoryEntry.getFile')
+ @DocsEditable
void _getFile_4(path) native;
- @DocsEditable @DomName('DirectoryEntry.removeRecursively')
+ @DomName('DirectoryEntry.removeRecursively')
+ @DocsEditable
void removeRecursively(VoidCallback successCallback, [ErrorCallback errorCallback]) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -5678,12 +6095,12 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('DirectoryEntrySync')
class DirectoryEntrySync extends EntrySync native "*DirectoryEntrySync" {
- @DocsEditable @DomName('DirectoryEntrySync.createReader')
+ @DomName('DirectoryEntrySync.createReader')
+ @DocsEditable
DirectoryReaderSync createReader() native;
DirectoryEntrySync getDirectory(String path, Map flags) {
@@ -5691,7 +6108,8 @@
return _getDirectory_1(path, flags_1);
}
@JSName('getDirectory')
- @DocsEditable @DomName('DirectoryEntrySync.getDirectory')
+ @DomName('DirectoryEntrySync.getDirectory')
+ @DocsEditable
DirectoryEntrySync _getDirectory_1(path, flags) native;
FileEntrySync getFile(String path, Map flags) {
@@ -5699,10 +6117,12 @@
return _getFile_1(path, flags_1);
}
@JSName('getFile')
- @DocsEditable @DomName('DirectoryEntrySync.getFile')
+ @DomName('DirectoryEntrySync.getFile')
+ @DocsEditable
FileEntrySync _getFile_1(path, flags) native;
- @DocsEditable @DomName('DirectoryEntrySync.removeRecursively')
+ @DomName('DirectoryEntrySync.removeRecursively')
+ @DocsEditable
void removeRecursively() native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -5710,12 +6130,12 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('DirectoryReader')
class DirectoryReader native "*DirectoryReader" {
- @DocsEditable @DomName('DirectoryReader.readEntries')
+ @DomName('DirectoryReader.readEntries')
+ @DocsEditable
void readEntries(EntriesCallback successCallback, [ErrorCallback errorCallback]) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -5723,13 +6143,14 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('DirectoryReaderSync')
class DirectoryReaderSync native "*DirectoryReaderSync" {
- @DocsEditable @DomName('DirectoryReaderSync.readEntries')
- @Returns('_EntryArraySync') @Creates('_EntryArraySync')
+ @DomName('DirectoryReaderSync.readEntries')
+ @DocsEditable
+ @Returns('_EntryArraySync')
+ @Creates('_EntryArraySync')
List<EntrySync> readEntries() native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -5737,7 +6158,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('HTMLDivElement')
class DivElement extends Element native "*HTMLDivElement" {
@@ -5750,8 +6170,6 @@
// BSD-style license that can be found in the LICENSE file.
-@DocsEditable
-@DomName('Document')
/**
* The base class for all documents.
*
@@ -5761,132 +6179,174 @@
* If you aren't comfortable with DOM concepts, see the Dart tutorial
* [Target 2: Connect Dart & HTML](http://www.dartlang.org/docs/tutorials/connect-dart-html/).
*/
+@DomName('Document')
class Document extends Node native "*Document"
{
+ @DomName('Document.readystatechange')
+ @DocsEditable
static const EventStreamProvider<Event> readyStateChangeEvent = const EventStreamProvider<Event>('readystatechange');
+ @DomName('Document.selectionchange')
+ @DocsEditable
static const EventStreamProvider<Event> selectionChangeEvent = const EventStreamProvider<Event>('selectionchange');
+ @DomName('Document.webkitpointerlockchange')
+ @DocsEditable
static const EventStreamProvider<Event> pointerLockChangeEvent = const EventStreamProvider<Event>('webkitpointerlockchange');
+ @DomName('Document.webkitpointerlockerror')
+ @DocsEditable
static const EventStreamProvider<Event> pointerLockErrorEvent = const EventStreamProvider<Event>('webkitpointerlockerror');
@DocsEditable
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
+ @deprecated
DocumentEvents get on =>
new DocumentEvents(this);
@JSName('body')
- @DocsEditable @DomName('Document.body')
+ @DomName('Document.body')
+ @DocsEditable
Element $dom_body;
- @DocsEditable @DomName('Document.charset')
+ @DomName('Document.charset')
+ @DocsEditable
String charset;
- @DocsEditable @DomName('Document.cookie')
+ @DomName('Document.cookie')
+ @DocsEditable
String cookie;
WindowBase get window => _convertNativeToDart_Window(this._window);
@JSName('defaultView')
- @DocsEditable @DomName('Document.window') @Creates('Window|=Object') @Returns('Window|=Object')
+ @DomName('Document.window')
+ @DocsEditable
+ @Creates('Window|=Object')
+ @Returns('Window|=Object')
final dynamic _window;
- @DocsEditable @DomName('Document.documentElement')
+ @DomName('Document.documentElement')
+ @DocsEditable
final Element documentElement;
- @DocsEditable @DomName('Document.domain')
+ @DomName('Document.domain')
+ @DocsEditable
final String domain;
@JSName('head')
- @DocsEditable @DomName('Document.head')
+ @DomName('Document.head')
+ @DocsEditable
final HeadElement $dom_head;
- @DocsEditable @DomName('Document.implementation')
+ @DomName('Document.implementation')
+ @DocsEditable
final DomImplementation implementation;
@JSName('lastModified')
- @DocsEditable @DomName('Document.lastModified')
+ @DomName('Document.lastModified')
+ @DocsEditable
final String $dom_lastModified;
@JSName('preferredStylesheetSet')
- @DocsEditable @DomName('Document.preferredStylesheetSet')
+ @DomName('Document.preferredStylesheetSet')
+ @DocsEditable
final String $dom_preferredStylesheetSet;
- @DocsEditable @DomName('Document.readyState')
+ @DomName('Document.readyState')
+ @DocsEditable
final String readyState;
@JSName('referrer')
- @DocsEditable @DomName('Document.referrer')
+ @DomName('Document.referrer')
+ @DocsEditable
final String $dom_referrer;
@JSName('selectedStylesheetSet')
- @DocsEditable @DomName('Document.selectedStylesheetSet')
+ @DomName('Document.selectedStylesheetSet')
+ @DocsEditable
String $dom_selectedStylesheetSet;
@JSName('styleSheets')
- @DocsEditable @DomName('Document.styleSheets')
- @Returns('_StyleSheetList') @Creates('_StyleSheetList')
+ @DomName('Document.styleSheets')
+ @DocsEditable
+ @Returns('_StyleSheetList')
+ @Creates('_StyleSheetList')
final List<StyleSheet> $dom_styleSheets;
@JSName('title')
- @DocsEditable @DomName('Document.title')
+ @DomName('Document.title')
+ @DocsEditable
String $dom_title;
@JSName('webkitFullscreenElement')
- @DocsEditable @DomName('Document.webkitFullscreenElement')
+ @DomName('Document.webkitFullscreenElement')
+ @DocsEditable
final Element $dom_webkitFullscreenElement;
@JSName('webkitFullscreenEnabled')
- @DocsEditable @DomName('Document.webkitFullscreenEnabled')
+ @DomName('Document.webkitFullscreenEnabled')
+ @DocsEditable
final bool $dom_webkitFullscreenEnabled;
@JSName('webkitHidden')
- @DocsEditable @DomName('Document.webkitHidden')
+ @DomName('Document.webkitHidden')
+ @DocsEditable
final bool $dom_webkitHidden;
@JSName('webkitIsFullScreen')
- @DocsEditable @DomName('Document.webkitIsFullScreen')
+ @DomName('Document.webkitIsFullScreen')
+ @DocsEditable
final bool $dom_webkitIsFullScreen;
@JSName('webkitPointerLockElement')
- @DocsEditable @DomName('Document.webkitPointerLockElement')
+ @DomName('Document.webkitPointerLockElement')
+ @DocsEditable
final Element $dom_webkitPointerLockElement;
@JSName('webkitVisibilityState')
- @DocsEditable @DomName('Document.webkitVisibilityState')
+ @DomName('Document.webkitVisibilityState')
+ @DocsEditable
final String $dom_webkitVisibilityState;
@JSName('caretRangeFromPoint')
- @DocsEditable @DomName('Document.caretRangeFromPoint')
+ @DomName('Document.caretRangeFromPoint')
+ @DocsEditable
Range $dom_caretRangeFromPoint(int x, int y) native;
@JSName('createCDATASection')
- @DocsEditable @DomName('Document.createCDATASection')
+ @DomName('Document.createCDATASection')
+ @DocsEditable
CDataSection createCDataSection(String data) native;
- @DocsEditable @DomName('Document.createDocumentFragment')
+ @DomName('Document.createDocumentFragment')
+ @DocsEditable
DocumentFragment createDocumentFragment() native;
@JSName('createElement')
- @DocsEditable @DomName('Document.createElement')
+ @DomName('Document.createElement')
+ @DocsEditable
Element $dom_createElement(String tagName) native;
@JSName('createElementNS')
- @DocsEditable @DomName('Document.createElementNS')
+ @DomName('Document.createElementNS')
+ @DocsEditable
Element $dom_createElementNS(String namespaceURI, String qualifiedName) native;
@JSName('createEvent')
- @DocsEditable @DomName('Document.createEvent')
+ @DomName('Document.createEvent')
+ @DocsEditable
Event $dom_createEvent(String eventType) native;
@JSName('createRange')
- @DocsEditable @DomName('Document.createRange')
+ @DomName('Document.createRange')
+ @DocsEditable
Range $dom_createRange() native;
@JSName('createTextNode')
- @DocsEditable @DomName('Document.createTextNode')
+ @DomName('Document.createTextNode')
+ @DocsEditable
Text $dom_createTextNode(String data) native;
Touch $dom_createTouch(Window window, EventTarget target, int identifier, int pageX, int pageY, int screenX, int screenY, int webkitRadiusX, int webkitRadiusY, num webkitRotationAngle, num webkitForce) {
@@ -5894,175 +6354,296 @@
return _$dom_createTouch_1(window, target_1, identifier, pageX, pageY, screenX, screenY, webkitRadiusX, webkitRadiusY, webkitRotationAngle, webkitForce);
}
@JSName('createTouch')
- @DocsEditable @DomName('Document.createTouch')
+ @DomName('Document.createTouch')
+ @DocsEditable
Touch _$dom_createTouch_1(Window window, target, identifier, pageX, pageY, screenX, screenY, webkitRadiusX, webkitRadiusY, webkitRotationAngle, webkitForce) native;
@JSName('createTouchList')
- @DocsEditable @DomName('Document.createTouchList')
+ @DomName('Document.createTouchList')
+ @DocsEditable
TouchList $dom_createTouchList() native;
@JSName('elementFromPoint')
- @DocsEditable @DomName('Document.elementFromPoint')
+ @DomName('Document.elementFromPoint')
+ @DocsEditable
Element $dom_elementFromPoint(int x, int y) native;
- @DocsEditable @DomName('Document.execCommand')
+ @DomName('Document.execCommand')
+ @DocsEditable
bool execCommand(String command, bool userInterface, String value) native;
@JSName('getCSSCanvasContext')
- @DocsEditable @DomName('Document.getCSSCanvasContext')
+ @DomName('Document.getCSSCanvasContext')
+ @DocsEditable
CanvasRenderingContext $dom_getCssCanvasContext(String contextId, String name, int width, int height) native;
@JSName('getElementById')
- @DocsEditable @DomName('Document.getElementById')
+ @DomName('Document.getElementById')
+ @DocsEditable
Element $dom_getElementById(String elementId) native;
@JSName('getElementsByClassName')
- @DocsEditable @DomName('Document.getElementsByClassName')
- @Returns('NodeList') @Creates('NodeList')
+ @DomName('Document.getElementsByClassName')
+ @DocsEditable
+ @Returns('NodeList')
+ @Creates('NodeList')
List<Node> $dom_getElementsByClassName(String tagname) native;
@JSName('getElementsByName')
- @DocsEditable @DomName('Document.getElementsByName')
- @Returns('NodeList') @Creates('NodeList')
+ @DomName('Document.getElementsByName')
+ @DocsEditable
+ @Returns('NodeList')
+ @Creates('NodeList')
List<Node> $dom_getElementsByName(String elementName) native;
@JSName('getElementsByTagName')
- @DocsEditable @DomName('Document.getElementsByTagName')
- @Returns('NodeList') @Creates('NodeList')
+ @DomName('Document.getElementsByTagName')
+ @DocsEditable
+ @Returns('NodeList')
+ @Creates('NodeList')
List<Node> $dom_getElementsByTagName(String tagname) native;
- @DocsEditable @DomName('Document.queryCommandEnabled')
+ @DomName('Document.queryCommandEnabled')
+ @DocsEditable
bool queryCommandEnabled(String command) native;
- @DocsEditable @DomName('Document.queryCommandIndeterm')
+ @DomName('Document.queryCommandIndeterm')
+ @DocsEditable
bool queryCommandIndeterm(String command) native;
- @DocsEditable @DomName('Document.queryCommandState')
+ @DomName('Document.queryCommandState')
+ @DocsEditable
bool queryCommandState(String command) native;
- @DocsEditable @DomName('Document.queryCommandSupported')
+ @DomName('Document.queryCommandSupported')
+ @DocsEditable
bool queryCommandSupported(String command) native;
- @DocsEditable @DomName('Document.queryCommandValue')
+ @DomName('Document.queryCommandValue')
+ @DocsEditable
String queryCommandValue(String command) native;
@JSName('querySelector')
- @DocsEditable @DomName('Document.querySelector')
+ @DomName('Document.querySelector')
+ @DocsEditable
Element $dom_querySelector(String selectors) native;
@JSName('querySelectorAll')
- @DocsEditable @DomName('Document.querySelectorAll')
- @Returns('NodeList') @Creates('NodeList')
+ @DomName('Document.querySelectorAll')
+ @DocsEditable
+ @Returns('NodeList')
+ @Creates('NodeList')
List<Node> $dom_querySelectorAll(String selectors) native;
@JSName('webkitCancelFullScreen')
- @DocsEditable @DomName('Document.webkitCancelFullScreen')
+ @DomName('Document.webkitCancelFullScreen')
+ @DocsEditable
void $dom_webkitCancelFullScreen() native;
@JSName('webkitExitFullscreen')
- @DocsEditable @DomName('Document.webkitExitFullscreen')
+ @DomName('Document.webkitExitFullscreen')
+ @DocsEditable
void $dom_webkitExitFullscreen() native;
@JSName('webkitExitPointerLock')
- @DocsEditable @DomName('Document.webkitExitPointerLock')
+ @DomName('Document.webkitExitPointerLock')
+ @DocsEditable
void $dom_webkitExitPointerLock() native;
+ @DomName('Document.abort')
+ @DocsEditable
Stream<Event> get onAbort => Element.abortEvent.forTarget(this);
+ @DomName('Document.beforecopy')
+ @DocsEditable
Stream<Event> get onBeforeCopy => Element.beforeCopyEvent.forTarget(this);
+ @DomName('Document.beforecut')
+ @DocsEditable
Stream<Event> get onBeforeCut => Element.beforeCutEvent.forTarget(this);
+ @DomName('Document.beforepaste')
+ @DocsEditable
Stream<Event> get onBeforePaste => Element.beforePasteEvent.forTarget(this);
+ @DomName('Document.blur')
+ @DocsEditable
Stream<Event> get onBlur => Element.blurEvent.forTarget(this);
+ @DomName('Document.change')
+ @DocsEditable
Stream<Event> get onChange => Element.changeEvent.forTarget(this);
+ @DomName('Document.click')
+ @DocsEditable
Stream<MouseEvent> get onClick => Element.clickEvent.forTarget(this);
+ @DomName('Document.contextmenu')
+ @DocsEditable
Stream<MouseEvent> get onContextMenu => Element.contextMenuEvent.forTarget(this);
+ @DomName('Document.copy')
+ @DocsEditable
Stream<Event> get onCopy => Element.copyEvent.forTarget(this);
+ @DomName('Document.cut')
+ @DocsEditable
Stream<Event> get onCut => Element.cutEvent.forTarget(this);
+ @DomName('Document.dblclick')
+ @DocsEditable
Stream<Event> get onDoubleClick => Element.doubleClickEvent.forTarget(this);
+ @DomName('Document.drag')
+ @DocsEditable
Stream<MouseEvent> get onDrag => Element.dragEvent.forTarget(this);
+ @DomName('Document.dragend')
+ @DocsEditable
Stream<MouseEvent> get onDragEnd => Element.dragEndEvent.forTarget(this);
+ @DomName('Document.dragenter')
+ @DocsEditable
Stream<MouseEvent> get onDragEnter => Element.dragEnterEvent.forTarget(this);
+ @DomName('Document.dragleave')
+ @DocsEditable
Stream<MouseEvent> get onDragLeave => Element.dragLeaveEvent.forTarget(this);
+ @DomName('Document.dragover')
+ @DocsEditable
Stream<MouseEvent> get onDragOver => Element.dragOverEvent.forTarget(this);
+ @DomName('Document.dragstart')
+ @DocsEditable
Stream<MouseEvent> get onDragStart => Element.dragStartEvent.forTarget(this);
+ @DomName('Document.drop')
+ @DocsEditable
Stream<MouseEvent> get onDrop => Element.dropEvent.forTarget(this);
+ @DomName('Document.error')
+ @DocsEditable
Stream<Event> get onError => Element.errorEvent.forTarget(this);
+ @DomName('Document.focus')
+ @DocsEditable
Stream<Event> get onFocus => Element.focusEvent.forTarget(this);
+ @DomName('Document.input')
+ @DocsEditable
Stream<Event> get onInput => Element.inputEvent.forTarget(this);
+ @DomName('Document.invalid')
+ @DocsEditable
Stream<Event> get onInvalid => Element.invalidEvent.forTarget(this);
+ @DomName('Document.keydown')
+ @DocsEditable
Stream<KeyboardEvent> get onKeyDown => Element.keyDownEvent.forTarget(this);
+ @DomName('Document.keypress')
+ @DocsEditable
Stream<KeyboardEvent> get onKeyPress => Element.keyPressEvent.forTarget(this);
+ @DomName('Document.keyup')
+ @DocsEditable
Stream<KeyboardEvent> get onKeyUp => Element.keyUpEvent.forTarget(this);
+ @DomName('Document.load')
+ @DocsEditable
Stream<Event> get onLoad => Element.loadEvent.forTarget(this);
+ @DomName('Document.mousedown')
+ @DocsEditable
Stream<MouseEvent> get onMouseDown => Element.mouseDownEvent.forTarget(this);
+ @DomName('Document.mousemove')
+ @DocsEditable
Stream<MouseEvent> get onMouseMove => Element.mouseMoveEvent.forTarget(this);
+ @DomName('Document.mouseout')
+ @DocsEditable
Stream<MouseEvent> get onMouseOut => Element.mouseOutEvent.forTarget(this);
+ @DomName('Document.mouseover')
+ @DocsEditable
Stream<MouseEvent> get onMouseOver => Element.mouseOverEvent.forTarget(this);
+ @DomName('Document.mouseup')
+ @DocsEditable
Stream<MouseEvent> get onMouseUp => Element.mouseUpEvent.forTarget(this);
+ @DomName('Document.mousewheel')
+ @DocsEditable
Stream<WheelEvent> get onMouseWheel => Element.mouseWheelEvent.forTarget(this);
+ @DomName('Document.paste')
+ @DocsEditable
Stream<Event> get onPaste => Element.pasteEvent.forTarget(this);
+ @DomName('Document.readystatechange')
+ @DocsEditable
Stream<Event> get onReadyStateChange => readyStateChangeEvent.forTarget(this);
+ @DomName('Document.reset')
+ @DocsEditable
Stream<Event> get onReset => Element.resetEvent.forTarget(this);
+ @DomName('Document.scroll')
+ @DocsEditable
Stream<Event> get onScroll => Element.scrollEvent.forTarget(this);
+ @DomName('Document.search')
+ @DocsEditable
Stream<Event> get onSearch => Element.searchEvent.forTarget(this);
+ @DomName('Document.select')
+ @DocsEditable
Stream<Event> get onSelect => Element.selectEvent.forTarget(this);
+ @DomName('Document.selectionchange')
+ @DocsEditable
Stream<Event> get onSelectionChange => selectionChangeEvent.forTarget(this);
+ @DomName('Document.selectstart')
+ @DocsEditable
Stream<Event> get onSelectStart => Element.selectStartEvent.forTarget(this);
+ @DomName('Document.submit')
+ @DocsEditable
Stream<Event> get onSubmit => Element.submitEvent.forTarget(this);
+ @DomName('Document.touchcancel')
+ @DocsEditable
Stream<TouchEvent> get onTouchCancel => Element.touchCancelEvent.forTarget(this);
+ @DomName('Document.touchend')
+ @DocsEditable
Stream<TouchEvent> get onTouchEnd => Element.touchEndEvent.forTarget(this);
+ @DomName('Document.touchmove')
+ @DocsEditable
Stream<TouchEvent> get onTouchMove => Element.touchMoveEvent.forTarget(this);
+ @DomName('Document.touchstart')
+ @DocsEditable
Stream<TouchEvent> get onTouchStart => Element.touchStartEvent.forTarget(this);
+ @DomName('Document.webkitfullscreenchange')
+ @DocsEditable
Stream<Event> get onFullscreenChange => Element.fullscreenChangeEvent.forTarget(this);
+ @DomName('Document.webkitfullscreenerror')
+ @DocsEditable
Stream<Event> get onFullscreenError => Element.fullscreenErrorEvent.forTarget(this);
+ @DomName('Document.webkitpointerlockchange')
+ @DocsEditable
Stream<Event> get onPointerLockChange => pointerLockChangeEvent.forTarget(this);
+ @DomName('Document.webkitpointerlockerror')
+ @DocsEditable
Stream<Event> get onPointerLockError => pointerLockErrorEvent.forTarget(this);
@@ -6129,6 +6710,7 @@
}
@DocsEditable
+@deprecated
class DocumentEvents extends ElementEvents {
@DocsEditable
DocumentEvents(EventTarget _ptr) : super(_ptr);
@@ -6150,22 +6732,6 @@
// BSD-style license that can be found in the LICENSE file.
-Future<CssStyleDeclaration> _emptyStyleFuture() {
- return _createMeasurementFuture(() => new Element.tag('div').style,
- new Completer<CssStyleDeclaration>());
-}
-
-class _FrozenCssClassSet extends CssClassSet {
- void writeClasses(Set s) {
- throw new UnsupportedError(
- 'frozen class set cannot be modified');
- }
- Set<String> readClasses() => new Set<String>();
-
- bool get frozen => true;
-}
-
-@DocsEditable
@DomName('DocumentFragment')
class DocumentFragment extends Node native "*DocumentFragment" {
factory DocumentFragment() => _DocumentFragmentFactoryProvider.createDocumentFragment();
@@ -6216,8 +6782,6 @@
return e.innerHtml;
}
- String get outerHtml => innerHtml;
-
// TODO(nweiz): Do we want to support some variant of innerHtml for XML and/or
// SVG strings?
void set innerHtml(String value) {
@@ -6231,201 +6795,35 @@
this.nodes.addAll(nodes);
}
- Node _insertAdjacentNode(String where, Node node) {
- switch (where.toLowerCase()) {
- case "beforebegin": return null;
- case "afterend": return null;
- case "afterbegin":
- var first = this.nodes.length > 0 ? this.nodes[0] : null;
- this.insertBefore(node, first);
- return node;
- case "beforeend":
- this.nodes.add(node);
- return node;
- default:
- throw new ArgumentError("Invalid position ${where}");
- }
- }
-
- Element insertAdjacentElement(String where, Element element)
- => this._insertAdjacentNode(where, element);
-
- void insertAdjacentText(String where, String text) {
- this._insertAdjacentNode(where, new Text(text));
- }
-
- void insertAdjacentHtml(String where, String text) {
- this._insertAdjacentNode(where, new DocumentFragment.html(text));
- }
-
void append(Element element) {
this.children.add(element);
}
void appendText(String text) {
- this.insertAdjacentText('beforeend', text);
+ this.nodes.add(new Text(text));
}
void appendHtml(String text) {
- this.insertAdjacentHtml('beforeend', text);
- }
-
- // If we can come up with a semi-reasonable default value for an Element
- // getter, we'll use it. In general, these return the same values as an
- // element that has no parent.
- String get contentEditable => "false";
- bool get isContentEditable => false;
- bool get draggable => false;
- bool get hidden => false;
- bool get spellcheck => false;
- bool get translate => false;
- int get tabIndex => -1;
- String get id => "";
- String get title => "";
- String get tagName => "";
- String get webkitdropzone => "";
- String get webkitRegionOverflow => "";
- Element get $m_firstElementChild {
- if (children.length > 0) {
- return children[0];
- }
- return null;
- }
- Element get $m_lastElementChild => children.last;
- Element get nextElementSibling => null;
- Element get previousElementSibling => null;
- Element get offsetParent => null;
- Element get parent => null;
- Map<String, String> get attributes => const {};
- CssClassSet get classes => new _FrozenCssClassSet();
- Map<String, String> get dataAttributes => const {};
- CssStyleDeclaration get style => new Element.tag('div').style;
- Future<CssStyleDeclaration> get computedStyle =>
- _emptyStyleFuture();
- Future<CssStyleDeclaration> getComputedStyle(String pseudoElement) =>
- _emptyStyleFuture();
-
- // Imperative Element methods are made into no-ops, as they are on parentless
- // elements.
- void blur() {}
- void focus() {}
- void click() {}
- void scrollByLines(int lines) {}
- void scrollByPages(int pages) {}
- void scrollIntoView([bool centerIfNeeded]) {}
- void webkitRequestFullScreen(int flags) {}
- void webkitRequestFullscreen() {}
-
- // Setters throw errors rather than being no-ops because we aren't going to
- // retain the values that were set, and erroring out seems clearer.
- void set attributes(Map<String, String> value) {
- throw new UnsupportedError(
- "Attributes can't be set for document fragments.");
- }
-
- void set classes(Collection<String> value) {
- throw new UnsupportedError(
- "Classes can't be set for document fragments.");
- }
-
- void set dataAttributes(Map<String, String> value) {
- throw new UnsupportedError(
- "Data attributes can't be set for document fragments.");
- }
-
- void set contentEditable(String value) {
- throw new UnsupportedError(
- "Content editable can't be set for document fragments.");
- }
-
- String get dir {
- throw new UnsupportedError(
- "Document fragments don't support text direction.");
- }
-
- void set dir(String value) {
- throw new UnsupportedError(
- "Document fragments don't support text direction.");
- }
-
- void set draggable(bool value) {
- throw new UnsupportedError(
- "Draggable can't be set for document fragments.");
- }
-
- void set hidden(bool value) {
- throw new UnsupportedError(
- "Hidden can't be set for document fragments.");
- }
-
- void set id(String value) {
- throw new UnsupportedError(
- "ID can't be set for document fragments.");
- }
-
- String get lang {
- throw new UnsupportedError(
- "Document fragments don't support language.");
- }
-
- void set lang(String value) {
- throw new UnsupportedError(
- "Document fragments don't support language.");
- }
-
- void set scrollLeft(int value) {
- throw new UnsupportedError(
- "Document fragments don't support scrolling.");
- }
-
- void set scrollTop(int value) {
- throw new UnsupportedError(
- "Document fragments don't support scrolling.");
- }
-
- void set spellcheck(bool value) {
- throw new UnsupportedError(
- "Spellcheck can't be set for document fragments.");
- }
-
- void set translate(bool value) {
- throw new UnsupportedError(
- "Spellcheck can't be set for document fragments.");
- }
-
- void set tabIndex(int value) {
- throw new UnsupportedError(
- "Tab index can't be set for document fragments.");
- }
-
- void set title(String value) {
- throw new UnsupportedError(
- "Title can't be set for document fragments.");
- }
-
- void set webkitdropzone(String value) {
- throw new UnsupportedError(
- "WebKit drop zone can't be set for document fragments.");
- }
-
- void set webkitRegionOverflow(String value) {
- throw new UnsupportedError(
- "WebKit region overflow can't be set for document fragments.");
+ this.nodes.add(new DocumentFragment.html(text));
}
@DocsEditable
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
+ @deprecated
ElementEvents get on =>
new ElementEvents(this);
@JSName('querySelector')
- @DocsEditable @DomName('DocumentFragment.querySelector')
+ @DomName('DocumentFragment.querySelector')
+ @DocsEditable
Element $dom_querySelector(String selectors) native;
@JSName('querySelectorAll')
- @DocsEditable @DomName('DocumentFragment.querySelectorAll')
- @Returns('NodeList') @Creates('NodeList')
+ @DomName('DocumentFragment.querySelectorAll')
+ @DocsEditable
+ @Returns('NodeList')
+ @Creates('NodeList')
List<Node> $dom_querySelectorAll(String selectors) native;
}
@@ -6434,7 +6832,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('DocumentType')
class DocumentType extends Node native "*DocumentType" {
@@ -6444,12 +6841,12 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('DOMError')
class DomError native "*DOMError" {
- @DocsEditable @DomName('DOMError.name')
+ @DomName('DOMError.name')
+ @DocsEditable
final String name;
}
// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
@@ -6493,10 +6890,12 @@
return errorName;
}
- @DocsEditable @DomName('DOMCoreException.message')
+ @DomName('DOMCoreException.message')
+ @DocsEditable
final String message;
- @DocsEditable @DomName('DOMCoreException.toString')
+ @DomName('DOMCoreException.toString')
+ @DocsEditable
String toString() native;
}
@@ -6505,26 +6904,30 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('DOMImplementation')
class DomImplementation native "*DOMImplementation" {
@JSName('createCSSStyleSheet')
- @DocsEditable @DomName('DOMImplementation.createCSSStyleSheet')
+ @DomName('DOMImplementation.createCSSStyleSheet')
+ @DocsEditable
CssStyleSheet createCssStyleSheet(String title, String media) native;
- @DocsEditable @DomName('DOMImplementation.createDocument')
+ @DomName('DOMImplementation.createDocument')
+ @DocsEditable
Document createDocument(String namespaceURI, String qualifiedName, DocumentType doctype) native;
- @DocsEditable @DomName('DOMImplementation.createDocumentType')
+ @DomName('DOMImplementation.createDocumentType')
+ @DocsEditable
DocumentType createDocumentType(String qualifiedName, String publicId, String systemId) native;
@JSName('createHTMLDocument')
- @DocsEditable @DomName('DOMImplementation.createHTMLDocument')
+ @DomName('DOMImplementation.createHTMLDocument')
+ @DocsEditable
HtmlDocument createHtmlDocument(String title) native;
- @DocsEditable @DomName('DOMImplementation.hasFeature')
+ @DomName('DOMImplementation.hasFeature')
+ @DocsEditable
bool hasFeature(String feature, String version) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -6532,21 +6935,24 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('MimeType')
class DomMimeType native "*MimeType" {
- @DocsEditable @DomName('DOMMimeType.description')
+ @DomName('DOMMimeType.description')
+ @DocsEditable
final String description;
- @DocsEditable @DomName('DOMMimeType.enabledPlugin')
+ @DomName('DOMMimeType.enabledPlugin')
+ @DocsEditable
final DomPlugin enabledPlugin;
- @DocsEditable @DomName('DOMMimeType.suffixes')
+ @DomName('DOMMimeType.suffixes')
+ @DocsEditable
final String suffixes;
- @DocsEditable @DomName('DOMMimeType.type')
+ @DomName('DOMMimeType.type')
+ @DocsEditable
final String type;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -6554,12 +6960,12 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('MimeTypeArray')
class DomMimeTypeArray implements JavaScriptIndexingBehavior, List<DomMimeType> native "*MimeTypeArray" {
- @DocsEditable @DomName('DOMMimeTypeArray.length')
+ @DomName('DOMMimeTypeArray.length')
+ @DocsEditable
int get length => JS("int", "#.length", this);
DomMimeType operator[](int index) => JS("DomMimeType", "#[#]", this, index);
@@ -6587,11 +6993,13 @@
void forEach(void f(DomMimeType element)) => IterableMixinWorkaround.forEach(this, f);
- String join([String separator]) => IterableMixinWorkaround.joinList(this, separator);
+ String join([String separator]) =>
+ IterableMixinWorkaround.joinList(this, separator);
List mappedBy(f(DomMimeType element)) => IterableMixinWorkaround.mappedByList(this, f);
- Iterable<DomMimeType> where(bool f(DomMimeType element)) => IterableMixinWorkaround.where(this, f);
+ Iterable<DomMimeType> where(bool f(DomMimeType element)) =>
+ IterableMixinWorkaround.where(this, f);
bool every(bool f(DomMimeType element)) => IterableMixinWorkaround.every(this, f);
@@ -6653,6 +7061,9 @@
throw new UnsupportedError("Cannot clear immutable List.");
}
+ List<DomMimeType> get reversed =>
+ new ReversedListView<DomMimeType>(this, 0, null);
+
void sort([int compare(DomMimeType a, DomMimeType b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -6681,9 +7092,11 @@
throw new StateError("More than one element");
}
- DomMimeType min([int compare(DomMimeType a, DomMimeType b)]) => IterableMixinWorkaround.min(this, compare);
+ DomMimeType min([int compare(DomMimeType a, DomMimeType b)]) =>
+ IterableMixinWorkaround.min(this, compare);
- DomMimeType max([int compare(DomMimeType a, DomMimeType b)]) => IterableMixinWorkaround.max(this, compare);
+ DomMimeType max([int compare(DomMimeType a, DomMimeType b)]) =>
+ IterableMixinWorkaround.max(this, compare);
DomMimeType removeAt(int pos) {
throw new UnsupportedError("Cannot remove from immutable List.");
@@ -6730,10 +7143,12 @@
// -- end List<DomMimeType> mixins.
- @DocsEditable @DomName('DOMMimeTypeArray.item')
+ @DomName('DOMMimeTypeArray.item')
+ @DocsEditable
DomMimeType item(int index) native;
- @DocsEditable @DomName('DOMMimeTypeArray.namedItem')
+ @DomName('DOMMimeTypeArray.namedItem')
+ @DocsEditable
DomMimeType namedItem(String name) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -6741,7 +7156,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('DOMParser')
class DomParser native "*DOMParser" {
@@ -6750,7 +7164,8 @@
factory DomParser() => DomParser._create();
static DomParser _create() => JS('DomParser', 'new DOMParser()');
- @DocsEditable @DomName('DOMParser.parseFromString')
+ @DomName('DOMParser.parseFromString')
+ @DocsEditable
Document parseFromString(String str, String contentType) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -6758,27 +7173,32 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('Plugin')
class DomPlugin native "*Plugin" {
- @DocsEditable @DomName('DOMPlugin.description')
+ @DomName('DOMPlugin.description')
+ @DocsEditable
final String description;
- @DocsEditable @DomName('DOMPlugin.filename')
+ @DomName('DOMPlugin.filename')
+ @DocsEditable
final String filename;
- @DocsEditable @DomName('DOMPlugin.length')
+ @DomName('DOMPlugin.length')
+ @DocsEditable
final int length;
- @DocsEditable @DomName('DOMPlugin.name')
+ @DomName('DOMPlugin.name')
+ @DocsEditable
final String name;
- @DocsEditable @DomName('DOMPlugin.item')
+ @DomName('DOMPlugin.item')
+ @DocsEditable
DomMimeType item(int index) native;
- @DocsEditable @DomName('DOMPlugin.namedItem')
+ @DomName('DOMPlugin.namedItem')
+ @DocsEditable
DomMimeType namedItem(String name) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -6786,12 +7206,12 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('PluginArray')
class DomPluginArray implements JavaScriptIndexingBehavior, List<DomPlugin> native "*PluginArray" {
- @DocsEditable @DomName('DOMPluginArray.length')
+ @DomName('DOMPluginArray.length')
+ @DocsEditable
int get length => JS("int", "#.length", this);
DomPlugin operator[](int index) => JS("DomPlugin", "#[#]", this, index);
@@ -6819,11 +7239,13 @@
void forEach(void f(DomPlugin element)) => IterableMixinWorkaround.forEach(this, f);
- String join([String separator]) => IterableMixinWorkaround.joinList(this, separator);
+ String join([String separator]) =>
+ IterableMixinWorkaround.joinList(this, separator);
List mappedBy(f(DomPlugin element)) => IterableMixinWorkaround.mappedByList(this, f);
- Iterable<DomPlugin> where(bool f(DomPlugin element)) => IterableMixinWorkaround.where(this, f);
+ Iterable<DomPlugin> where(bool f(DomPlugin element)) =>
+ IterableMixinWorkaround.where(this, f);
bool every(bool f(DomPlugin element)) => IterableMixinWorkaround.every(this, f);
@@ -6885,6 +7307,9 @@
throw new UnsupportedError("Cannot clear immutable List.");
}
+ List<DomPlugin> get reversed =>
+ new ReversedListView<DomPlugin>(this, 0, null);
+
void sort([int compare(DomPlugin a, DomPlugin b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -6913,9 +7338,11 @@
throw new StateError("More than one element");
}
- DomPlugin min([int compare(DomPlugin a, DomPlugin b)]) => IterableMixinWorkaround.min(this, compare);
+ DomPlugin min([int compare(DomPlugin a, DomPlugin b)]) =>
+ IterableMixinWorkaround.min(this, compare);
- DomPlugin max([int compare(DomPlugin a, DomPlugin b)]) => IterableMixinWorkaround.max(this, compare);
+ DomPlugin max([int compare(DomPlugin a, DomPlugin b)]) =>
+ IterableMixinWorkaround.max(this, compare);
DomPlugin removeAt(int pos) {
throw new UnsupportedError("Cannot remove from immutable List.");
@@ -6962,13 +7389,16 @@
// -- end List<DomPlugin> mixins.
- @DocsEditable @DomName('DOMPluginArray.item')
+ @DomName('DOMPluginArray.item')
+ @DocsEditable
DomPlugin item(int index) native;
- @DocsEditable @DomName('DOMPluginArray.namedItem')
+ @DomName('DOMPluginArray.namedItem')
+ @DocsEditable
DomPlugin namedItem(String name) native;
- @DocsEditable @DomName('DOMPluginArray.refresh')
+ @DomName('DOMPluginArray.refresh')
+ @DocsEditable
void refresh(bool reload) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -6976,87 +7406,112 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('Selection')
class DomSelection native "*Selection" {
- @DocsEditable @DomName('DOMSelection.anchorNode')
+ @DomName('DOMSelection.anchorNode')
+ @DocsEditable
final Node anchorNode;
- @DocsEditable @DomName('DOMSelection.anchorOffset')
+ @DomName('DOMSelection.anchorOffset')
+ @DocsEditable
final int anchorOffset;
- @DocsEditable @DomName('DOMSelection.baseNode')
+ @DomName('DOMSelection.baseNode')
+ @DocsEditable
final Node baseNode;
- @DocsEditable @DomName('DOMSelection.baseOffset')
+ @DomName('DOMSelection.baseOffset')
+ @DocsEditable
final int baseOffset;
- @DocsEditable @DomName('DOMSelection.extentNode')
+ @DomName('DOMSelection.extentNode')
+ @DocsEditable
final Node extentNode;
- @DocsEditable @DomName('DOMSelection.extentOffset')
+ @DomName('DOMSelection.extentOffset')
+ @DocsEditable
final int extentOffset;
- @DocsEditable @DomName('DOMSelection.focusNode')
+ @DomName('DOMSelection.focusNode')
+ @DocsEditable
final Node focusNode;
- @DocsEditable @DomName('DOMSelection.focusOffset')
+ @DomName('DOMSelection.focusOffset')
+ @DocsEditable
final int focusOffset;
- @DocsEditable @DomName('DOMSelection.isCollapsed')
+ @DomName('DOMSelection.isCollapsed')
+ @DocsEditable
final bool isCollapsed;
- @DocsEditable @DomName('DOMSelection.rangeCount')
+ @DomName('DOMSelection.rangeCount')
+ @DocsEditable
final int rangeCount;
- @DocsEditable @DomName('DOMSelection.type')
+ @DomName('DOMSelection.type')
+ @DocsEditable
final String type;
- @DocsEditable @DomName('DOMSelection.addRange')
+ @DomName('DOMSelection.addRange')
+ @DocsEditable
void addRange(Range range) native;
- @DocsEditable @DomName('DOMSelection.collapse')
+ @DomName('DOMSelection.collapse')
+ @DocsEditable
void collapse(Node node, int index) native;
- @DocsEditable @DomName('DOMSelection.collapseToEnd')
+ @DomName('DOMSelection.collapseToEnd')
+ @DocsEditable
void collapseToEnd() native;
- @DocsEditable @DomName('DOMSelection.collapseToStart')
+ @DomName('DOMSelection.collapseToStart')
+ @DocsEditable
void collapseToStart() native;
- @DocsEditable @DomName('DOMSelection.containsNode')
+ @DomName('DOMSelection.containsNode')
+ @DocsEditable
bool containsNode(Node node, bool allowPartial) native;
- @DocsEditable @DomName('DOMSelection.deleteFromDocument')
+ @DomName('DOMSelection.deleteFromDocument')
+ @DocsEditable
void deleteFromDocument() native;
- @DocsEditable @DomName('DOMSelection.empty')
+ @DomName('DOMSelection.empty')
+ @DocsEditable
void empty() native;
- @DocsEditable @DomName('DOMSelection.extend')
+ @DomName('DOMSelection.extend')
+ @DocsEditable
void extend(Node node, int offset) native;
- @DocsEditable @DomName('DOMSelection.getRangeAt')
+ @DomName('DOMSelection.getRangeAt')
+ @DocsEditable
Range getRangeAt(int index) native;
- @DocsEditable @DomName('DOMSelection.modify')
+ @DomName('DOMSelection.modify')
+ @DocsEditable
void modify(String alter, String direction, String granularity) native;
- @DocsEditable @DomName('DOMSelection.removeAllRanges')
+ @DomName('DOMSelection.removeAllRanges')
+ @DocsEditable
void removeAllRanges() native;
- @DocsEditable @DomName('DOMSelection.selectAllChildren')
+ @DomName('DOMSelection.selectAllChildren')
+ @DocsEditable
void selectAllChildren(Node node) native;
- @DocsEditable @DomName('DOMSelection.setBaseAndExtent')
+ @DomName('DOMSelection.setBaseAndExtent')
+ @DocsEditable
void setBaseAndExtent(Node baseNode, int baseOffset, Node extentNode, int extentOffset) native;
- @DocsEditable @DomName('DOMSelection.setPosition')
+ @DomName('DOMSelection.setPosition')
+ @DocsEditable
void setPosition(Node node, int offset) native;
- @DocsEditable @DomName('DOMSelection.toString')
+ @DomName('DOMSelection.toString')
+ @DocsEditable
String toString() native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -7064,12 +7519,12 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('DOMSettableTokenList')
class DomSettableTokenList extends DomTokenList native "*DOMSettableTokenList" {
- @DocsEditable @DomName('DOMSettableTokenList.value')
+ @DomName('DOMSettableTokenList.value')
+ @DocsEditable
String value;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -7077,12 +7532,12 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('DOMStringList')
class DomStringList implements JavaScriptIndexingBehavior, List<String> native "*DOMStringList" {
- @DocsEditable @DomName('DOMStringList.length')
+ @DomName('DOMStringList.length')
+ @DocsEditable
int get length => JS("int", "#.length", this);
String operator[](int index) => JS("String", "#[#]", this, index);
@@ -7110,11 +7565,13 @@
void forEach(void f(String element)) => IterableMixinWorkaround.forEach(this, f);
- String join([String separator]) => IterableMixinWorkaround.joinList(this, separator);
+ String join([String separator]) =>
+ IterableMixinWorkaround.joinList(this, separator);
List mappedBy(f(String element)) => IterableMixinWorkaround.mappedByList(this, f);
- Iterable<String> where(bool f(String element)) => IterableMixinWorkaround.where(this, f);
+ Iterable<String> where(bool f(String element)) =>
+ IterableMixinWorkaround.where(this, f);
bool every(bool f(String element)) => IterableMixinWorkaround.every(this, f);
@@ -7176,6 +7633,9 @@
throw new UnsupportedError("Cannot clear immutable List.");
}
+ List<String> get reversed =>
+ new ReversedListView<String>(this, 0, null);
+
void sort([int compare(String a, String b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -7204,9 +7664,11 @@
throw new StateError("More than one element");
}
- String min([int compare(String a, String b)]) => IterableMixinWorkaround.min(this, compare);
+ String min([int compare(String a, String b)]) =>
+ IterableMixinWorkaround.min(this, compare);
- String max([int compare(String a, String b)]) => IterableMixinWorkaround.max(this, compare);
+ String max([int compare(String a, String b)]) =>
+ IterableMixinWorkaround.max(this, compare);
String removeAt(int pos) {
throw new UnsupportedError("Cannot remove from immutable List.");
@@ -7253,10 +7715,12 @@
// -- end List<String> mixins.
- @DocsEditable @DomName('DOMStringList.contains')
+ @DomName('DOMStringList.contains')
+ @DocsEditable
bool contains(String string) native;
- @DocsEditable @DomName('DOMStringList.item')
+ @DomName('DOMStringList.item')
+ @DocsEditable
String item(int index) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -7264,7 +7728,6 @@
// BSD-style license that can be found in the LICENSE file.
-@DocsEditable
@DomName('DOMStringMap')
abstract class DomStringMap {
}
@@ -7273,24 +7736,28 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('DOMTokenList')
class DomTokenList native "*DOMTokenList" {
- @DocsEditable @DomName('DOMTokenList.length')
+ @DomName('DOMTokenList.length')
+ @DocsEditable
final int length;
- @DocsEditable @DomName('DOMTokenList.contains')
+ @DomName('DOMTokenList.contains')
+ @DocsEditable
bool contains(String token) native;
- @DocsEditable @DomName('DOMTokenList.item')
+ @DomName('DOMTokenList.item')
+ @DocsEditable
String item(int index) native;
- @DocsEditable @DomName('DOMTokenList.toString')
+ @DomName('DOMTokenList.toString')
+ @DocsEditable
String toString() native;
- @DocsEditable @DomName('DOMTokenList.toggle')
+ @DomName('DOMTokenList.toggle')
+ @DocsEditable
bool toggle(String token, [bool force]) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -7431,6 +7898,9 @@
}
}
+ List<Element> get reversed =>
+ new ReversedListView<Element>(this, 0, null);
+
void sort([int compare(Element a, Element b)]) {
throw new UnsupportedError('TODO(jacobr): should we impl?');
}
@@ -7454,19 +7924,19 @@
}
void removeAll(Iterable elements) {
- Collections.removeAll(this, elements);
+ IterableMixinWorkaround.removeAll(this, elements);
}
void retainAll(Iterable elements) {
- Collections.retainAll(this, elements);
+ IterableMixinWorkaround.retainAll(this, elements);
}
void removeMatching(bool test(Element element)) {
- Collections.removeMatching(this, test);
+ IterableMixinWorkaround.removeMatching(this, test);
}
void retainMatching(bool test(Element element)) {
- Collections.retainMatching(this, test);
+ IterableMixinWorkaround.retainMatching(this, test);
}
void removeRange(int start, int rangeLength) {
@@ -7653,6 +8123,9 @@
throw new UnsupportedError('');
}
+ List<Element> get reversed =>
+ new ReversedListView<Element>(this, 0, null);
+
void sort([int compare(Element a, Element b)]) {
throw new UnsupportedError('');
}
@@ -7790,6 +8263,7 @@
/**
* An abstract class, which all HTML elements extend.
*/
+@DomName('Element')
abstract class Element extends Node implements ElementTraversal native "*Element" {
/**
@@ -8181,7 +8655,7 @@
/**
* Checks if this element matches the CSS selectors.
*/
- @Experimental()
+ @Experimental
bool matches(String selectors) {
if (JS('bool', '!!#.matches', this)) {
return JS('bool', '#.matches(#)', this, selectors);
@@ -8195,415 +8669,675 @@
}
+ @DomName('Element.abort')
+ @DocsEditable
static const EventStreamProvider<Event> abortEvent = const EventStreamProvider<Event>('abort');
+ @DomName('Element.beforecopy')
+ @DocsEditable
static const EventStreamProvider<Event> beforeCopyEvent = const EventStreamProvider<Event>('beforecopy');
+ @DomName('Element.beforecut')
+ @DocsEditable
static const EventStreamProvider<Event> beforeCutEvent = const EventStreamProvider<Event>('beforecut');
+ @DomName('Element.beforepaste')
+ @DocsEditable
static const EventStreamProvider<Event> beforePasteEvent = const EventStreamProvider<Event>('beforepaste');
+ @DomName('Element.blur')
+ @DocsEditable
static const EventStreamProvider<Event> blurEvent = const EventStreamProvider<Event>('blur');
+ @DomName('Element.change')
+ @DocsEditable
static const EventStreamProvider<Event> changeEvent = const EventStreamProvider<Event>('change');
+ @DomName('Element.click')
+ @DocsEditable
static const EventStreamProvider<MouseEvent> clickEvent = const EventStreamProvider<MouseEvent>('click');
+ @DomName('Element.contextmenu')
+ @DocsEditable
static const EventStreamProvider<MouseEvent> contextMenuEvent = const EventStreamProvider<MouseEvent>('contextmenu');
+ @DomName('Element.copy')
+ @DocsEditable
static const EventStreamProvider<Event> copyEvent = const EventStreamProvider<Event>('copy');
+ @DomName('Element.cut')
+ @DocsEditable
static const EventStreamProvider<Event> cutEvent = const EventStreamProvider<Event>('cut');
+ @DomName('Element.dblclick')
+ @DocsEditable
static const EventStreamProvider<Event> doubleClickEvent = const EventStreamProvider<Event>('dblclick');
+ @DomName('Element.drag')
+ @DocsEditable
static const EventStreamProvider<MouseEvent> dragEvent = const EventStreamProvider<MouseEvent>('drag');
+ @DomName('Element.dragend')
+ @DocsEditable
static const EventStreamProvider<MouseEvent> dragEndEvent = const EventStreamProvider<MouseEvent>('dragend');
+ @DomName('Element.dragenter')
+ @DocsEditable
static const EventStreamProvider<MouseEvent> dragEnterEvent = const EventStreamProvider<MouseEvent>('dragenter');
+ @DomName('Element.dragleave')
+ @DocsEditable
static const EventStreamProvider<MouseEvent> dragLeaveEvent = const EventStreamProvider<MouseEvent>('dragleave');
+ @DomName('Element.dragover')
+ @DocsEditable
static const EventStreamProvider<MouseEvent> dragOverEvent = const EventStreamProvider<MouseEvent>('dragover');
+ @DomName('Element.dragstart')
+ @DocsEditable
static const EventStreamProvider<MouseEvent> dragStartEvent = const EventStreamProvider<MouseEvent>('dragstart');
+ @DomName('Element.drop')
+ @DocsEditable
static const EventStreamProvider<MouseEvent> dropEvent = const EventStreamProvider<MouseEvent>('drop');
+ @DomName('Element.error')
+ @DocsEditable
static const EventStreamProvider<Event> errorEvent = const EventStreamProvider<Event>('error');
+ @DomName('Element.focus')
+ @DocsEditable
static const EventStreamProvider<Event> focusEvent = const EventStreamProvider<Event>('focus');
+ @DomName('Element.input')
+ @DocsEditable
static const EventStreamProvider<Event> inputEvent = const EventStreamProvider<Event>('input');
+ @DomName('Element.invalid')
+ @DocsEditable
static const EventStreamProvider<Event> invalidEvent = const EventStreamProvider<Event>('invalid');
+ @DomName('Element.keydown')
+ @DocsEditable
static const EventStreamProvider<KeyboardEvent> keyDownEvent = const EventStreamProvider<KeyboardEvent>('keydown');
+ @DomName('Element.keypress')
+ @DocsEditable
static const EventStreamProvider<KeyboardEvent> keyPressEvent = const EventStreamProvider<KeyboardEvent>('keypress');
+ @DomName('Element.keyup')
+ @DocsEditable
static const EventStreamProvider<KeyboardEvent> keyUpEvent = const EventStreamProvider<KeyboardEvent>('keyup');
+ @DomName('Element.load')
+ @DocsEditable
static const EventStreamProvider<Event> loadEvent = const EventStreamProvider<Event>('load');
+ @DomName('Element.mousedown')
+ @DocsEditable
static const EventStreamProvider<MouseEvent> mouseDownEvent = const EventStreamProvider<MouseEvent>('mousedown');
+ @DomName('Element.mousemove')
+ @DocsEditable
static const EventStreamProvider<MouseEvent> mouseMoveEvent = const EventStreamProvider<MouseEvent>('mousemove');
+ @DomName('Element.mouseout')
+ @DocsEditable
static const EventStreamProvider<MouseEvent> mouseOutEvent = const EventStreamProvider<MouseEvent>('mouseout');
+ @DomName('Element.mouseover')
+ @DocsEditable
static const EventStreamProvider<MouseEvent> mouseOverEvent = const EventStreamProvider<MouseEvent>('mouseover');
+ @DomName('Element.mouseup')
+ @DocsEditable
static const EventStreamProvider<MouseEvent> mouseUpEvent = const EventStreamProvider<MouseEvent>('mouseup');
+ @DomName('Element.paste')
+ @DocsEditable
static const EventStreamProvider<Event> pasteEvent = const EventStreamProvider<Event>('paste');
+ @DomName('Element.reset')
+ @DocsEditable
static const EventStreamProvider<Event> resetEvent = const EventStreamProvider<Event>('reset');
+ @DomName('Element.scroll')
+ @DocsEditable
static const EventStreamProvider<Event> scrollEvent = const EventStreamProvider<Event>('scroll');
+ @DomName('Element.search')
+ @DocsEditable
static const EventStreamProvider<Event> searchEvent = const EventStreamProvider<Event>('search');
+ @DomName('Element.select')
+ @DocsEditable
static const EventStreamProvider<Event> selectEvent = const EventStreamProvider<Event>('select');
+ @DomName('Element.selectstart')
+ @DocsEditable
static const EventStreamProvider<Event> selectStartEvent = const EventStreamProvider<Event>('selectstart');
+ @DomName('Element.submit')
+ @DocsEditable
static const EventStreamProvider<Event> submitEvent = const EventStreamProvider<Event>('submit');
+ @DomName('Element.touchcancel')
+ @DocsEditable
static const EventStreamProvider<TouchEvent> touchCancelEvent = const EventStreamProvider<TouchEvent>('touchcancel');
+ @DomName('Element.touchend')
+ @DocsEditable
static const EventStreamProvider<TouchEvent> touchEndEvent = const EventStreamProvider<TouchEvent>('touchend');
+ @DomName('Element.touchenter')
+ @DocsEditable
static const EventStreamProvider<TouchEvent> touchEnterEvent = const EventStreamProvider<TouchEvent>('touchenter');
+ @DomName('Element.touchleave')
+ @DocsEditable
static const EventStreamProvider<TouchEvent> touchLeaveEvent = const EventStreamProvider<TouchEvent>('touchleave');
+ @DomName('Element.touchmove')
+ @DocsEditable
static const EventStreamProvider<TouchEvent> touchMoveEvent = const EventStreamProvider<TouchEvent>('touchmove');
+ @DomName('Element.touchstart')
+ @DocsEditable
static const EventStreamProvider<TouchEvent> touchStartEvent = const EventStreamProvider<TouchEvent>('touchstart');
+ @DomName('Element.webkitTransitionEnd')
+ @DocsEditable
static const EventStreamProvider<TransitionEvent> transitionEndEvent = const EventStreamProvider<TransitionEvent>('webkitTransitionEnd');
+ @DomName('Element.webkitfullscreenchange')
+ @DocsEditable
static const EventStreamProvider<Event> fullscreenChangeEvent = const EventStreamProvider<Event>('webkitfullscreenchange');
+ @DomName('Element.webkitfullscreenerror')
+ @DocsEditable
static const EventStreamProvider<Event> fullscreenErrorEvent = const EventStreamProvider<Event>('webkitfullscreenerror');
@DocsEditable
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
+ @deprecated
ElementEvents get on =>
new ElementEvents(this);
@JSName('children')
- @DocsEditable @DomName('Element.children')
+ @DomName('Element.children')
+ @DocsEditable
final HtmlCollection $dom_children;
- @DocsEditable @DomName('Element.contentEditable')
+ @DomName('Element.contentEditable')
+ @DocsEditable
String contentEditable;
- @DocsEditable @DomName('Element.dir')
+ @DomName('Element.dir')
+ @DocsEditable
String dir;
- @DocsEditable @DomName('Element.draggable')
+ @DomName('Element.draggable')
+ @DocsEditable
bool draggable;
- @DocsEditable @DomName('Element.hidden')
+ @DomName('Element.hidden')
+ @DocsEditable
bool hidden;
- @DocsEditable @DomName('Element.id')
+ @DomName('Element.id')
+ @DocsEditable
String id;
@JSName('innerHTML')
- @DocsEditable @DomName('Element.innerHTML')
+ @DomName('Element.innerHTML')
+ @DocsEditable
String innerHtml;
- @DocsEditable @DomName('Element.isContentEditable')
+ @DomName('Element.isContentEditable')
+ @DocsEditable
final bool isContentEditable;
- @DocsEditable @DomName('Element.lang')
+ @DomName('Element.lang')
+ @DocsEditable
String lang;
@JSName('outerHTML')
- @DocsEditable @DomName('Element.outerHTML')
+ @DomName('Element.outerHTML')
+ @DocsEditable
final String outerHtml;
- @DocsEditable @DomName('Element.spellcheck')
+ @DomName('Element.spellcheck')
+ @DocsEditable
bool spellcheck;
- @DocsEditable @DomName('Element.tabIndex')
+ @DomName('Element.tabIndex')
+ @DocsEditable
int tabIndex;
- @DocsEditable @DomName('Element.title')
+ @DomName('Element.title')
+ @DocsEditable
String title;
- @DocsEditable @DomName('Element.translate')
+ @DomName('Element.translate')
+ @DocsEditable
bool translate;
- @DocsEditable @DomName('Element.webkitdropzone')
+ @DomName('Element.webkitdropzone')
+ @DocsEditable
String webkitdropzone;
- @DocsEditable @DomName('Element.click')
+ @DomName('Element.click')
+ @DocsEditable
void click() native;
static const int ALLOW_KEYBOARD_INPUT = 1;
@JSName('childElementCount')
- @DocsEditable @DomName('Element.childElementCount')
+ @DomName('Element.childElementCount')
+ @DocsEditable
final int $dom_childElementCount;
@JSName('className')
- @DocsEditable @DomName('Element.className')
+ @DomName('Element.className')
+ @DocsEditable
String $dom_className;
- @DocsEditable @DomName('Element.clientHeight')
+ @DomName('Element.clientHeight')
+ @DocsEditable
final int clientHeight;
- @DocsEditable @DomName('Element.clientLeft')
+ @DomName('Element.clientLeft')
+ @DocsEditable
final int clientLeft;
- @DocsEditable @DomName('Element.clientTop')
+ @DomName('Element.clientTop')
+ @DocsEditable
final int clientTop;
- @DocsEditable @DomName('Element.clientWidth')
+ @DomName('Element.clientWidth')
+ @DocsEditable
final int clientWidth;
- @DocsEditable @DomName('Element.dataset')
+ @DomName('Element.dataset')
+ @DocsEditable
final Map<String, String> dataset;
@JSName('firstElementChild')
- @DocsEditable @DomName('Element.firstElementChild')
+ @DomName('Element.firstElementChild')
+ @DocsEditable
final Element $dom_firstElementChild;
@JSName('lastElementChild')
- @DocsEditable @DomName('Element.lastElementChild')
+ @DomName('Element.lastElementChild')
+ @DocsEditable
final Element $dom_lastElementChild;
- @DocsEditable @DomName('Element.nextElementSibling')
+ @DomName('Element.nextElementSibling')
+ @DocsEditable
final Element nextElementSibling;
- @DocsEditable @DomName('Element.offsetHeight')
+ @DomName('Element.offsetHeight')
+ @DocsEditable
final int offsetHeight;
- @DocsEditable @DomName('Element.offsetLeft')
+ @DomName('Element.offsetLeft')
+ @DocsEditable
final int offsetLeft;
- @DocsEditable @DomName('Element.offsetParent')
+ @DomName('Element.offsetParent')
+ @DocsEditable
final Element offsetParent;
- @DocsEditable @DomName('Element.offsetTop')
+ @DomName('Element.offsetTop')
+ @DocsEditable
final int offsetTop;
- @DocsEditable @DomName('Element.offsetWidth')
+ @DomName('Element.offsetWidth')
+ @DocsEditable
final int offsetWidth;
- @DocsEditable @DomName('Element.previousElementSibling')
+ @DomName('Element.previousElementSibling')
+ @DocsEditable
final Element previousElementSibling;
- @DocsEditable @DomName('Element.scrollHeight')
+ @DomName('Element.scrollHeight')
+ @DocsEditable
final int scrollHeight;
- @DocsEditable @DomName('Element.scrollLeft')
+ @DomName('Element.scrollLeft')
+ @DocsEditable
int scrollLeft;
- @DocsEditable @DomName('Element.scrollTop')
+ @DomName('Element.scrollTop')
+ @DocsEditable
int scrollTop;
- @DocsEditable @DomName('Element.scrollWidth')
+ @DomName('Element.scrollWidth')
+ @DocsEditable
final int scrollWidth;
- @DocsEditable @DomName('Element.style')
+ @DomName('Element.style')
+ @DocsEditable
final CssStyleDeclaration style;
- @DocsEditable @DomName('Element.tagName')
+ @DomName('Element.tagName')
+ @DocsEditable
final String tagName;
- @DocsEditable @DomName('Element.webkitPseudo')
+ @DomName('Element.webkitPseudo')
+ @DocsEditable
String webkitPseudo;
- @DocsEditable @DomName('Element.webkitShadowRoot')
+ @DomName('Element.webkitShadowRoot')
+ @DocsEditable
final ShadowRoot webkitShadowRoot;
- @DocsEditable @DomName('Element.blur')
+ @DomName('Element.blur')
+ @DocsEditable
void blur() native;
- @DocsEditable @DomName('Element.focus')
+ @DomName('Element.focus')
+ @DocsEditable
void focus() native;
@JSName('getAttribute')
- @DocsEditable @DomName('Element.getAttribute')
+ @DomName('Element.getAttribute')
+ @DocsEditable
String $dom_getAttribute(String name) native;
@JSName('getAttributeNS')
- @DocsEditable @DomName('Element.getAttributeNS')
+ @DomName('Element.getAttributeNS')
+ @DocsEditable
String $dom_getAttributeNS(String namespaceURI, String localName) native;
- @DocsEditable @DomName('Element.getBoundingClientRect')
+ @DomName('Element.getBoundingClientRect')
+ @DocsEditable
ClientRect getBoundingClientRect() native;
- @DocsEditable @DomName('Element.getClientRects')
- @Returns('_ClientRectList') @Creates('_ClientRectList')
+ @DomName('Element.getClientRects')
+ @DocsEditable
+ @Returns('_ClientRectList')
+ @Creates('_ClientRectList')
List<ClientRect> getClientRects() native;
@JSName('getElementsByClassName')
- @DocsEditable @DomName('Element.getElementsByClassName')
- @Returns('NodeList') @Creates('NodeList')
+ @DomName('Element.getElementsByClassName')
+ @DocsEditable
+ @Returns('NodeList')
+ @Creates('NodeList')
List<Node> $dom_getElementsByClassName(String name) native;
@JSName('getElementsByTagName')
- @DocsEditable @DomName('Element.getElementsByTagName')
- @Returns('NodeList') @Creates('NodeList')
+ @DomName('Element.getElementsByTagName')
+ @DocsEditable
+ @Returns('NodeList')
+ @Creates('NodeList')
List<Node> $dom_getElementsByTagName(String name) native;
@JSName('hasAttribute')
- @DocsEditable @DomName('Element.hasAttribute')
+ @DomName('Element.hasAttribute')
+ @DocsEditable
bool $dom_hasAttribute(String name) native;
@JSName('hasAttributeNS')
- @DocsEditable @DomName('Element.hasAttributeNS')
+ @DomName('Element.hasAttributeNS')
+ @DocsEditable
bool $dom_hasAttributeNS(String namespaceURI, String localName) native;
@JSName('querySelector')
- @DocsEditable @DomName('Element.querySelector')
+ @DomName('Element.querySelector')
+ @DocsEditable
Element $dom_querySelector(String selectors) native;
@JSName('querySelectorAll')
- @DocsEditable @DomName('Element.querySelectorAll')
- @Returns('NodeList') @Creates('NodeList')
+ @DomName('Element.querySelectorAll')
+ @DocsEditable
+ @Returns('NodeList')
+ @Creates('NodeList')
List<Node> $dom_querySelectorAll(String selectors) native;
@JSName('removeAttribute')
- @DocsEditable @DomName('Element.removeAttribute')
+ @DomName('Element.removeAttribute')
+ @DocsEditable
void $dom_removeAttribute(String name) native;
@JSName('removeAttributeNS')
- @DocsEditable @DomName('Element.removeAttributeNS')
+ @DomName('Element.removeAttributeNS')
+ @DocsEditable
void $dom_removeAttributeNS(String namespaceURI, String localName) native;
- @DocsEditable @DomName('Element.scrollByLines')
+ @DomName('Element.scrollByLines')
+ @DocsEditable
void scrollByLines(int lines) native;
- @DocsEditable @DomName('Element.scrollByPages')
+ @DomName('Element.scrollByPages')
+ @DocsEditable
void scrollByPages(int pages) native;
@JSName('scrollIntoViewIfNeeded')
- @DocsEditable @DomName('Element.scrollIntoViewIfNeeded')
+ @DomName('Element.scrollIntoViewIfNeeded')
+ @DocsEditable
void scrollIntoView([bool centerIfNeeded]) native;
@JSName('setAttribute')
- @DocsEditable @DomName('Element.setAttribute')
+ @DomName('Element.setAttribute')
+ @DocsEditable
void $dom_setAttribute(String name, String value) native;
@JSName('setAttributeNS')
- @DocsEditable @DomName('Element.setAttributeNS')
+ @DomName('Element.setAttributeNS')
+ @DocsEditable
void $dom_setAttributeNS(String namespaceURI, String qualifiedName, String value) native;
@JSName('webkitCreateShadowRoot')
- @DocsEditable @DomName('Element.webkitCreateShadowRoot') @SupportedBrowser(SupportedBrowser.CHROME, '25') @Experimental()
+ @DomName('Element.webkitCreateShadowRoot')
+ @DocsEditable
+ @SupportedBrowser(SupportedBrowser.CHROME, '25')
+ @Experimental
ShadowRoot createShadowRoot() native;
- @DocsEditable @DomName('Element.webkitRequestFullScreen')
+ @DomName('Element.webkitRequestFullScreen')
+ @DocsEditable
void webkitRequestFullScreen(int flags) native;
- @DocsEditable @DomName('Element.webkitRequestFullscreen')
+ @DomName('Element.webkitRequestFullscreen')
+ @DocsEditable
void webkitRequestFullscreen() native;
- @DocsEditable @DomName('Element.webkitRequestPointerLock')
+ @DomName('Element.webkitRequestPointerLock')
+ @DocsEditable
void webkitRequestPointerLock() native;
+ @DomName('Element.abort')
+ @DocsEditable
Stream<Event> get onAbort => abortEvent.forTarget(this);
+ @DomName('Element.beforecopy')
+ @DocsEditable
Stream<Event> get onBeforeCopy => beforeCopyEvent.forTarget(this);
+ @DomName('Element.beforecut')
+ @DocsEditable
Stream<Event> get onBeforeCut => beforeCutEvent.forTarget(this);
+ @DomName('Element.beforepaste')
+ @DocsEditable
Stream<Event> get onBeforePaste => beforePasteEvent.forTarget(this);
+ @DomName('Element.blur')
+ @DocsEditable
Stream<Event> get onBlur => blurEvent.forTarget(this);
+ @DomName('Element.change')
+ @DocsEditable
Stream<Event> get onChange => changeEvent.forTarget(this);
+ @DomName('Element.click')
+ @DocsEditable
Stream<MouseEvent> get onClick => clickEvent.forTarget(this);
+ @DomName('Element.contextmenu')
+ @DocsEditable
Stream<MouseEvent> get onContextMenu => contextMenuEvent.forTarget(this);
+ @DomName('Element.copy')
+ @DocsEditable
Stream<Event> get onCopy => copyEvent.forTarget(this);
+ @DomName('Element.cut')
+ @DocsEditable
Stream<Event> get onCut => cutEvent.forTarget(this);
+ @DomName('Element.dblclick')
+ @DocsEditable
Stream<Event> get onDoubleClick => doubleClickEvent.forTarget(this);
+ @DomName('Element.drag')
+ @DocsEditable
Stream<MouseEvent> get onDrag => dragEvent.forTarget(this);
+ @DomName('Element.dragend')
+ @DocsEditable
Stream<MouseEvent> get onDragEnd => dragEndEvent.forTarget(this);
+ @DomName('Element.dragenter')
+ @DocsEditable
Stream<MouseEvent> get onDragEnter => dragEnterEvent.forTarget(this);
+ @DomName('Element.dragleave')
+ @DocsEditable
Stream<MouseEvent> get onDragLeave => dragLeaveEvent.forTarget(this);
+ @DomName('Element.dragover')
+ @DocsEditable
Stream<MouseEvent> get onDragOver => dragOverEvent.forTarget(this);
+ @DomName('Element.dragstart')
+ @DocsEditable
Stream<MouseEvent> get onDragStart => dragStartEvent.forTarget(this);
+ @DomName('Element.drop')
+ @DocsEditable
Stream<MouseEvent> get onDrop => dropEvent.forTarget(this);
+ @DomName('Element.error')
+ @DocsEditable
Stream<Event> get onError => errorEvent.forTarget(this);
+ @DomName('Element.focus')
+ @DocsEditable
Stream<Event> get onFocus => focusEvent.forTarget(this);
+ @DomName('Element.input')
+ @DocsEditable
Stream<Event> get onInput => inputEvent.forTarget(this);
+ @DomName('Element.invalid')
+ @DocsEditable
Stream<Event> get onInvalid => invalidEvent.forTarget(this);
+ @DomName('Element.keydown')
+ @DocsEditable
Stream<KeyboardEvent> get onKeyDown => keyDownEvent.forTarget(this);
+ @DomName('Element.keypress')
+ @DocsEditable
Stream<KeyboardEvent> get onKeyPress => keyPressEvent.forTarget(this);
+ @DomName('Element.keyup')
+ @DocsEditable
Stream<KeyboardEvent> get onKeyUp => keyUpEvent.forTarget(this);
+ @DomName('Element.load')
+ @DocsEditable
Stream<Event> get onLoad => loadEvent.forTarget(this);
+ @DomName('Element.mousedown')
+ @DocsEditable
Stream<MouseEvent> get onMouseDown => mouseDownEvent.forTarget(this);
+ @DomName('Element.mousemove')
+ @DocsEditable
Stream<MouseEvent> get onMouseMove => mouseMoveEvent.forTarget(this);
+ @DomName('Element.mouseout')
+ @DocsEditable
Stream<MouseEvent> get onMouseOut => mouseOutEvent.forTarget(this);
+ @DomName('Element.mouseover')
+ @DocsEditable
Stream<MouseEvent> get onMouseOver => mouseOverEvent.forTarget(this);
+ @DomName('Element.mouseup')
+ @DocsEditable
Stream<MouseEvent> get onMouseUp => mouseUpEvent.forTarget(this);
+ @DomName('Element.mousewheel')
+ @DocsEditable
Stream<WheelEvent> get onMouseWheel => mouseWheelEvent.forTarget(this);
+ @DomName('Element.paste')
+ @DocsEditable
Stream<Event> get onPaste => pasteEvent.forTarget(this);
+ @DomName('Element.reset')
+ @DocsEditable
Stream<Event> get onReset => resetEvent.forTarget(this);
+ @DomName('Element.scroll')
+ @DocsEditable
Stream<Event> get onScroll => scrollEvent.forTarget(this);
+ @DomName('Element.search')
+ @DocsEditable
Stream<Event> get onSearch => searchEvent.forTarget(this);
+ @DomName('Element.select')
+ @DocsEditable
Stream<Event> get onSelect => selectEvent.forTarget(this);
+ @DomName('Element.selectstart')
+ @DocsEditable
Stream<Event> get onSelectStart => selectStartEvent.forTarget(this);
+ @DomName('Element.submit')
+ @DocsEditable
Stream<Event> get onSubmit => submitEvent.forTarget(this);
+ @DomName('Element.touchcancel')
+ @DocsEditable
Stream<TouchEvent> get onTouchCancel => touchCancelEvent.forTarget(this);
+ @DomName('Element.touchend')
+ @DocsEditable
Stream<TouchEvent> get onTouchEnd => touchEndEvent.forTarget(this);
+ @DomName('Element.touchenter')
+ @DocsEditable
Stream<TouchEvent> get onTouchEnter => touchEnterEvent.forTarget(this);
+ @DomName('Element.touchleave')
+ @DocsEditable
Stream<TouchEvent> get onTouchLeave => touchLeaveEvent.forTarget(this);
+ @DomName('Element.touchmove')
+ @DocsEditable
Stream<TouchEvent> get onTouchMove => touchMoveEvent.forTarget(this);
+ @DomName('Element.touchstart')
+ @DocsEditable
Stream<TouchEvent> get onTouchStart => touchStartEvent.forTarget(this);
+ @DomName('Element.webkitTransitionEnd')
+ @DocsEditable
Stream<TransitionEvent> get onTransitionEnd => transitionEndEvent.forTarget(this);
+ @DomName('Element.webkitfullscreenchange')
+ @DocsEditable
Stream<Event> get onFullscreenChange => fullscreenChangeEvent.forTarget(this);
+ @DomName('Element.webkitfullscreenerror')
+ @DocsEditable
Stream<Event> get onFullscreenError => fullscreenErrorEvent.forTarget(this);
}
@@ -8745,6 +9479,7 @@
// BSD-style license that can be found in the LICENSE file.
+@deprecated
class ElementEvents extends Events {
ElementEvents(EventTarget _ptr) : super(_ptr);
@@ -8907,7 +9642,6 @@
// BSD-style license that can be found in the LICENSE file.
-@DocsEditable
@DomName('ElementTraversal')
abstract class ElementTraversal {
@@ -8926,7 +9660,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('HTMLEmbedElement')
@SupportedBrowser(SupportedBrowser.CHROME)
@@ -8940,22 +9673,28 @@
/// Checks if this type is supported on the current platform.
static bool get supported => Element.isTagSupported('embed');
- @DocsEditable @DomName('HTMLEmbedElement.align')
+ @DomName('HTMLEmbedElement.align')
+ @DocsEditable
String align;
- @DocsEditable @DomName('HTMLEmbedElement.height')
+ @DomName('HTMLEmbedElement.height')
+ @DocsEditable
String height;
- @DocsEditable @DomName('HTMLEmbedElement.name')
+ @DomName('HTMLEmbedElement.name')
+ @DocsEditable
String name;
- @DocsEditable @DomName('HTMLEmbedElement.src')
+ @DomName('HTMLEmbedElement.src')
+ @DocsEditable
String src;
- @DocsEditable @DomName('HTMLEmbedElement.type')
+ @DomName('HTMLEmbedElement.type')
+ @DocsEditable
String type;
- @DocsEditable @DomName('HTMLEmbedElement.width')
+ @DomName('HTMLEmbedElement.width')
+ @DocsEditable
String width;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -8963,7 +9702,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('EntityReference')
class EntityReference extends Node native "*EntityReference" {
@@ -8981,43 +9719,53 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('Entry')
class Entry native "*Entry" {
- @DocsEditable @DomName('Entry.filesystem')
+ @DomName('Entry.filesystem')
+ @DocsEditable
final FileSystem filesystem;
- @DocsEditable @DomName('Entry.fullPath')
+ @DomName('Entry.fullPath')
+ @DocsEditable
final String fullPath;
- @DocsEditable @DomName('Entry.isDirectory')
+ @DomName('Entry.isDirectory')
+ @DocsEditable
final bool isDirectory;
- @DocsEditable @DomName('Entry.isFile')
+ @DomName('Entry.isFile')
+ @DocsEditable
final bool isFile;
- @DocsEditable @DomName('Entry.name')
+ @DomName('Entry.name')
+ @DocsEditable
final String name;
- @DocsEditable @DomName('Entry.copyTo')
+ @DomName('Entry.copyTo')
+ @DocsEditable
void copyTo(DirectoryEntry parent, [String name, EntryCallback successCallback, ErrorCallback errorCallback]) native;
- @DocsEditable @DomName('Entry.getMetadata')
+ @DomName('Entry.getMetadata')
+ @DocsEditable
void getMetadata(MetadataCallback successCallback, [ErrorCallback errorCallback]) native;
- @DocsEditable @DomName('Entry.getParent')
+ @DomName('Entry.getParent')
+ @DocsEditable
void getParent([EntryCallback successCallback, ErrorCallback errorCallback]) native;
- @DocsEditable @DomName('Entry.moveTo')
+ @DomName('Entry.moveTo')
+ @DocsEditable
void moveTo(DirectoryEntry parent, [String name, EntryCallback successCallback, ErrorCallback errorCallback]) native;
- @DocsEditable @DomName('Entry.remove')
+ @DomName('Entry.remove')
+ @DocsEditable
void remove(VoidCallback successCallback, [ErrorCallback errorCallback]) native;
@JSName('toURL')
- @DocsEditable @DomName('Entry.toURL')
+ @DomName('Entry.toURL')
+ @DocsEditable
String toUrl() native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -9033,43 +9781,53 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('EntrySync')
class EntrySync native "*EntrySync" {
- @DocsEditable @DomName('EntrySync.filesystem')
+ @DomName('EntrySync.filesystem')
+ @DocsEditable
final FileSystemSync filesystem;
- @DocsEditable @DomName('EntrySync.fullPath')
+ @DomName('EntrySync.fullPath')
+ @DocsEditable
final String fullPath;
- @DocsEditable @DomName('EntrySync.isDirectory')
+ @DomName('EntrySync.isDirectory')
+ @DocsEditable
final bool isDirectory;
- @DocsEditable @DomName('EntrySync.isFile')
+ @DomName('EntrySync.isFile')
+ @DocsEditable
final bool isFile;
- @DocsEditable @DomName('EntrySync.name')
+ @DomName('EntrySync.name')
+ @DocsEditable
final String name;
- @DocsEditable @DomName('EntrySync.copyTo')
+ @DomName('EntrySync.copyTo')
+ @DocsEditable
EntrySync copyTo(DirectoryEntrySync parent, String name) native;
- @DocsEditable @DomName('EntrySync.getMetadata')
+ @DomName('EntrySync.getMetadata')
+ @DocsEditable
Metadata getMetadata() native;
- @DocsEditable @DomName('EntrySync.getParent')
+ @DomName('EntrySync.getParent')
+ @DocsEditable
EntrySync getParent() native;
- @DocsEditable @DomName('EntrySync.moveTo')
+ @DomName('EntrySync.moveTo')
+ @DocsEditable
EntrySync moveTo(DirectoryEntrySync parent, String name) native;
- @DocsEditable @DomName('EntrySync.remove')
+ @DomName('EntrySync.remove')
+ @DocsEditable
void remove() native;
@JSName('toURL')
- @DocsEditable @DomName('EntrySync.toURL')
+ @DomName('EntrySync.toURL')
+ @DocsEditable
String toUrl() native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -9085,18 +9843,20 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('ErrorEvent')
class ErrorEvent extends Event native "*ErrorEvent" {
- @DocsEditable @DomName('ErrorEvent.filename')
+ @DomName('ErrorEvent.filename')
+ @DocsEditable
final String filename;
- @DocsEditable @DomName('ErrorEvent.lineno')
+ @DomName('ErrorEvent.lineno')
+ @DocsEditable
final int lineno;
- @DocsEditable @DomName('ErrorEvent.message')
+ @DomName('ErrorEvent.message')
+ @DocsEditable
final String message;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -9106,7 +9866,6 @@
// WARNING: Do not edit - generated code.
-@DocsEditable
@DomName('Event')
class Event native "*Event" {
// In JS, canBubble and cancelable are technically required parameters to
@@ -9115,8 +9874,26 @@
//
// Contrary to JS, we default canBubble and cancelable to true, since that's
// what people want most of the time anyway.
- factory Event(String type, [bool canBubble = true, bool cancelable = true]) =>
- _EventFactoryProvider.createEvent(type, canBubble, cancelable);
+ factory Event(String type,
+ {bool canBubble: true, bool cancelable: true}) {
+ return new Event.eventType('Event', type, canBubble: canBubble,
+ cancelable: canBubble);
+ }
+
+ /**
+ * Creates a new Event object of the specified type.
+ *
+ * This is analogous to document.createEvent.
+ * Normally events should be created via their constructors, if available.
+ *
+ * var e = new Event.type('MouseEvent', 'mousedown', true, true);
+ */
+ factory Event.eventType(String type, String name, {bool canBubble: true,
+ bool cancelable: true}) {
+ final Event e = document.$dom_createEvent(type);
+ e.$dom_initEvent(name, canBubble, cancelable);
+ return e;
+ }
static const int AT_TARGET = 2;
@@ -9158,63 +9935,93 @@
static const int SELECT = 16384;
- @DocsEditable @DomName('Event.bubbles')
+ @DomName('Event.bubbles')
+ @DocsEditable
final bool bubbles;
- @DocsEditable @DomName('Event.cancelBubble')
+ @DomName('Event.cancelBubble')
+ @DocsEditable
bool cancelBubble;
- @DocsEditable @DomName('Event.cancelable')
+ @DomName('Event.cancelable')
+ @DocsEditable
final bool cancelable;
- @DocsEditable @DomName('Event.clipboardData')
+ @DomName('Event.clipboardData')
+ @DocsEditable
final Clipboard clipboardData;
EventTarget get currentTarget => _convertNativeToDart_EventTarget(this._currentTarget);
@JSName('currentTarget')
- @DocsEditable @DomName('Event.currentTarget') @Creates('Null') @Returns('EventTarget|=Object')
+ @DomName('Event.currentTarget')
+ @DocsEditable
+ @Creates('Null')
+ @Returns('EventTarget|=Object')
final dynamic _currentTarget;
- @DocsEditable @DomName('Event.defaultPrevented')
+ @DomName('Event.defaultPrevented')
+ @DocsEditable
final bool defaultPrevented;
- @DocsEditable @DomName('Event.eventPhase')
+ @DomName('Event.eventPhase')
+ @DocsEditable
final int eventPhase;
- @DocsEditable @DomName('Event.returnValue')
+ @DomName('Event.returnValue')
+ @DocsEditable
bool returnValue;
EventTarget get target => _convertNativeToDart_EventTarget(this._target);
@JSName('target')
- @DocsEditable @DomName('Event.target') @Creates('Node') @Returns('EventTarget|=Object')
+ @DomName('Event.target')
+ @DocsEditable
+ @Creates('Node')
+ @Returns('EventTarget|=Object')
final dynamic _target;
- @DocsEditable @DomName('Event.timeStamp')
+ @DomName('Event.timeStamp')
+ @DocsEditable
final int timeStamp;
- @DocsEditable @DomName('Event.type')
+ @DomName('Event.type')
+ @DocsEditable
final String type;
@JSName('initEvent')
- @DocsEditable @DomName('Event.initEvent')
+ @DomName('Event.initEvent')
+ @DocsEditable
void $dom_initEvent(String eventTypeArg, bool canBubbleArg, bool cancelableArg) native;
- @DocsEditable @DomName('Event.preventDefault')
+ @DomName('Event.preventDefault')
+ @DocsEditable
void preventDefault() native;
- @DocsEditable @DomName('Event.stopImmediatePropagation')
+ @DomName('Event.stopImmediatePropagation')
+ @DocsEditable
void stopImmediatePropagation() native;
- @DocsEditable @DomName('Event.stopPropagation')
+ @DomName('Event.stopPropagation')
+ @DocsEditable
void stopPropagation() native;
+
+ /**
+ * Checks to see if the event class is supported by the current platform.
+ */
+ static bool _isTypeSupported(String eventType) {
+ // Browsers throw for unsupported event names.
+ try {
+ var e = document.$dom_createEvent(eventType);
+ return e is Event;
+ } catch (_) { }
+ return false;
+ }
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('EventException')
class EventException native "*EventException" {
@@ -9223,16 +10030,20 @@
static const int UNSPECIFIED_EVENT_TYPE_ERR = 0;
- @DocsEditable @DomName('EventException.code')
+ @DomName('EventException.code')
+ @DocsEditable
final int code;
- @DocsEditable @DomName('EventException.message')
+ @DomName('EventException.message')
+ @DocsEditable
final String message;
- @DocsEditable @DomName('EventException.name')
+ @DomName('EventException.name')
+ @DocsEditable
final String name;
- @DocsEditable @DomName('EventException.toString')
+ @DomName('EventException.toString')
+ @DocsEditable
String toString() native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -9240,15 +10051,20 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('EventSource')
class EventSource extends EventTarget native "*EventSource" {
+ @DomName('EventSource.error')
+ @DocsEditable
static const EventStreamProvider<Event> errorEvent = const EventStreamProvider<Event>('error');
+ @DomName('EventSource.message')
+ @DocsEditable
static const EventStreamProvider<MessageEvent> messageEvent = const EventStreamProvider<MessageEvent>('message');
+ @DomName('EventSource.open')
+ @DocsEditable
static const EventStreamProvider<Event> openEvent = const EventStreamProvider<Event>('open');
@DocsEditable
@@ -9267,6 +10083,7 @@
@DocsEditable
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
+ @deprecated
EventSourceEvents get on =>
new EventSourceEvents(this);
@@ -9276,38 +10093,51 @@
static const int OPEN = 1;
- @DocsEditable @DomName('EventSource.readyState')
+ @DomName('EventSource.readyState')
+ @DocsEditable
final int readyState;
- @DocsEditable @DomName('EventSource.url')
+ @DomName('EventSource.url')
+ @DocsEditable
final String url;
- @DocsEditable @DomName('EventSource.withCredentials')
+ @DomName('EventSource.withCredentials')
+ @DocsEditable
final bool withCredentials;
@JSName('addEventListener')
- @DocsEditable @DomName('EventSource.addEventListener')
+ @DomName('EventSource.addEventListener')
+ @DocsEditable
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native;
- @DocsEditable @DomName('EventSource.close')
+ @DomName('EventSource.close')
+ @DocsEditable
void close() native;
- @JSName('dispatchEvent')
- @DocsEditable @DomName('EventSource.dispatchEvent')
- bool $dom_dispatchEvent(Event evt) native;
+ @DomName('EventSource.dispatchEvent')
+ @DocsEditable
+ bool dispatchEvent(Event evt) native;
@JSName('removeEventListener')
- @DocsEditable @DomName('EventSource.removeEventListener')
+ @DomName('EventSource.removeEventListener')
+ @DocsEditable
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native;
+ @DomName('EventSource.error')
+ @DocsEditable
Stream<Event> get onError => errorEvent.forTarget(this);
+ @DomName('EventSource.message')
+ @DocsEditable
Stream<MessageEvent> get onMessage => messageEvent.forTarget(this);
+ @DomName('EventSource.open')
+ @DocsEditable
Stream<Event> get onOpen => openEvent.forTarget(this);
}
@DocsEditable
+@deprecated
class EventSourceEvents extends Events {
@DocsEditable
EventSourceEvents(EventTarget _ptr) : super(_ptr);
@@ -9332,7 +10162,7 @@
* Events can either be accessed by string name (using the indexed getter) or by
* getters exposed by subclasses. Use the getters exposed by subclasses when
* possible for better compile-time type checks.
- *
+ *
* Using an indexed getter:
* events['mouseover'].add((e) => print("Mouse over!"));
*
@@ -9375,7 +10205,7 @@
}
bool dispatch(Event evt) {
- return _ptr.$dom_dispatchEvent(evt);
+ return _ptr.dispatchEvent(evt);
}
void _add(EventListener listener, bool useCapture) {
@@ -9387,8 +10217,6 @@
}
}
-@DocsEditable
-@DomName('EventTarget')
/**
* Base class for all browser objects that support events.
*
@@ -9396,22 +10224,25 @@
* [$dom_addEventListener], [$dom_dispatchEvent], and
* [$dom_removeEventListener]) for compile-time type checks and a more concise
* API.
- */
+ */
+@DomName('EventTarget')
class EventTarget native "*EventTarget" {
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
Events get on => new Events(this);
@JSName('addEventListener')
- @DocsEditable @DomName('EventTarget.addEventListener')
+ @DomName('EventTarget.addEventListener')
+ @DocsEditable
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native;
- @JSName('dispatchEvent')
- @DocsEditable @DomName('EventTarget.dispatchEvent')
- bool $dom_dispatchEvent(Event event) native;
+ @DomName('EventTarget.dispatchEvent')
+ @DocsEditable
+ bool dispatchEvent(Event event) native;
@JSName('removeEventListener')
- @DocsEditable @DomName('EventTarget.removeEventListener')
+ @DomName('EventTarget.removeEventListener')
+ @DocsEditable
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native;
}
@@ -9420,7 +10251,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('EXTTextureFilterAnisotropic')
class ExtTextureFilterAnisotropic native "*EXTTextureFilterAnisotropic" {
@@ -9434,7 +10264,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('HTMLFieldSetElement')
class FieldSetElement extends Element native "*HTMLFieldSetElement" {
@@ -9442,34 +10271,44 @@
@DocsEditable
factory FieldSetElement() => document.$dom_createElement("fieldset");
- @DocsEditable @DomName('HTMLFieldSetElement.disabled')
+ @DomName('HTMLFieldSetElement.disabled')
+ @DocsEditable
bool disabled;
- @DocsEditable @DomName('HTMLFieldSetElement.elements')
+ @DomName('HTMLFieldSetElement.elements')
+ @DocsEditable
final HtmlCollection elements;
- @DocsEditable @DomName('HTMLFieldSetElement.form')
+ @DomName('HTMLFieldSetElement.form')
+ @DocsEditable
final FormElement form;
- @DocsEditable @DomName('HTMLFieldSetElement.name')
+ @DomName('HTMLFieldSetElement.name')
+ @DocsEditable
String name;
- @DocsEditable @DomName('HTMLFieldSetElement.type')
+ @DomName('HTMLFieldSetElement.type')
+ @DocsEditable
final String type;
- @DocsEditable @DomName('HTMLFieldSetElement.validationMessage')
+ @DomName('HTMLFieldSetElement.validationMessage')
+ @DocsEditable
final String validationMessage;
- @DocsEditable @DomName('HTMLFieldSetElement.validity')
+ @DomName('HTMLFieldSetElement.validity')
+ @DocsEditable
final ValidityState validity;
- @DocsEditable @DomName('HTMLFieldSetElement.willValidate')
+ @DomName('HTMLFieldSetElement.willValidate')
+ @DocsEditable
final bool willValidate;
- @DocsEditable @DomName('HTMLFieldSetElement.checkValidity')
+ @DomName('HTMLFieldSetElement.checkValidity')
+ @DocsEditable
bool checkValidity() native;
- @DocsEditable @DomName('HTMLFieldSetElement.setCustomValidity')
+ @DomName('HTMLFieldSetElement.setCustomValidity')
+ @DocsEditable
void setCustomValidity(String error) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -9477,18 +10316,20 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('File')
class File extends Blob native "*File" {
- @DocsEditable @DomName('File.lastModifiedDate')
+ @DomName('File.lastModifiedDate')
+ @DocsEditable
final Date lastModifiedDate;
- @DocsEditable @DomName('File.name')
+ @DomName('File.name')
+ @DocsEditable
final String name;
- @DocsEditable @DomName('File.webkitRelativePath')
+ @DomName('File.webkitRelativePath')
+ @DocsEditable
final String webkitRelativePath;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -9504,15 +10345,16 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('FileEntry')
class FileEntry extends Entry native "*FileEntry" {
- @DocsEditable @DomName('FileEntry.createWriter')
+ @DomName('FileEntry.createWriter')
+ @DocsEditable
void createWriter(FileWriterCallback successCallback, [ErrorCallback errorCallback]) native;
- @DocsEditable @DomName('FileEntry.file')
+ @DomName('FileEntry.file')
+ @DocsEditable
void file(FileCallback successCallback, [ErrorCallback errorCallback]) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -9520,15 +10362,16 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('FileEntrySync')
class FileEntrySync extends EntrySync native "*FileEntrySync" {
- @DocsEditable @DomName('FileEntrySync.createWriter')
+ @DomName('FileEntrySync.createWriter')
+ @DocsEditable
FileWriterSync createWriter() native;
- @DocsEditable @DomName('FileEntrySync.file')
+ @DomName('FileEntrySync.file')
+ @DocsEditable
File file() native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -9536,7 +10379,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('FileError')
class FileError native "*FileError" {
@@ -9565,7 +10407,8 @@
static const int TYPE_MISMATCH_ERR = 11;
- @DocsEditable @DomName('FileError.code')
+ @DomName('FileError.code')
+ @DocsEditable
final int code;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -9573,7 +10416,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('FileException')
class FileException native "*FileException" {
@@ -9602,16 +10444,20 @@
static const int TYPE_MISMATCH_ERR = 11;
- @DocsEditable @DomName('FileException.code')
+ @DomName('FileException.code')
+ @DocsEditable
final int code;
- @DocsEditable @DomName('FileException.message')
+ @DomName('FileException.message')
+ @DocsEditable
final String message;
- @DocsEditable @DomName('FileException.name')
+ @DomName('FileException.name')
+ @DocsEditable
final String name;
- @DocsEditable @DomName('FileException.toString')
+ @DomName('FileException.toString')
+ @DocsEditable
String toString() native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -9619,12 +10465,12 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('FileList')
class FileList implements JavaScriptIndexingBehavior, List<File> native "*FileList" {
- @DocsEditable @DomName('FileList.length')
+ @DomName('FileList.length')
+ @DocsEditable
int get length => JS("int", "#.length", this);
File operator[](int index) => JS("File", "#[#]", this, index);
@@ -9652,11 +10498,13 @@
void forEach(void f(File element)) => IterableMixinWorkaround.forEach(this, f);
- String join([String separator]) => IterableMixinWorkaround.joinList(this, separator);
+ String join([String separator]) =>
+ IterableMixinWorkaround.joinList(this, separator);
List mappedBy(f(File element)) => IterableMixinWorkaround.mappedByList(this, f);
- Iterable<File> where(bool f(File element)) => IterableMixinWorkaround.where(this, f);
+ Iterable<File> where(bool f(File element)) =>
+ IterableMixinWorkaround.where(this, f);
bool every(bool f(File element)) => IterableMixinWorkaround.every(this, f);
@@ -9718,6 +10566,9 @@
throw new UnsupportedError("Cannot clear immutable List.");
}
+ List<File> get reversed =>
+ new ReversedListView<File>(this, 0, null);
+
void sort([int compare(File a, File b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -9746,9 +10597,11 @@
throw new StateError("More than one element");
}
- File min([int compare(File a, File b)]) => IterableMixinWorkaround.min(this, compare);
+ File min([int compare(File a, File b)]) =>
+ IterableMixinWorkaround.min(this, compare);
- File max([int compare(File a, File b)]) => IterableMixinWorkaround.max(this, compare);
+ File max([int compare(File a, File b)]) =>
+ IterableMixinWorkaround.max(this, compare);
File removeAt(int pos) {
throw new UnsupportedError("Cannot remove from immutable List.");
@@ -9795,7 +10648,8 @@
// -- end List<File> mixins.
- @DocsEditable @DomName('FileList.item')
+ @DomName('FileList.item')
+ @DocsEditable
File item(int index) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -9803,21 +10657,32 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('FileReader')
class FileReader extends EventTarget native "*FileReader" {
+ @DomName('FileReader.abort')
+ @DocsEditable
static const EventStreamProvider<ProgressEvent> abortEvent = const EventStreamProvider<ProgressEvent>('abort');
+ @DomName('FileReader.error')
+ @DocsEditable
static const EventStreamProvider<Event> errorEvent = const EventStreamProvider<Event>('error');
+ @DomName('FileReader.load')
+ @DocsEditable
static const EventStreamProvider<ProgressEvent> loadEvent = const EventStreamProvider<ProgressEvent>('load');
+ @DomName('FileReader.loadend')
+ @DocsEditable
static const EventStreamProvider<ProgressEvent> loadEndEvent = const EventStreamProvider<ProgressEvent>('loadend');
+ @DomName('FileReader.loadstart')
+ @DocsEditable
static const EventStreamProvider<ProgressEvent> loadStartEvent = const EventStreamProvider<ProgressEvent>('loadstart');
+ @DomName('FileReader.progress')
+ @DocsEditable
static const EventStreamProvider<ProgressEvent> progressEvent = const EventStreamProvider<ProgressEvent>('progress');
@DocsEditable
@@ -9826,6 +10691,7 @@
@DocsEditable
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
+ @deprecated
FileReaderEvents get on =>
new FileReaderEvents(this);
@@ -9835,57 +10701,81 @@
static const int LOADING = 1;
- @DocsEditable @DomName('FileReader.error')
+ @DomName('FileReader.error')
+ @DocsEditable
final FileError error;
- @DocsEditable @DomName('FileReader.readyState')
+ @DomName('FileReader.readyState')
+ @DocsEditable
final int readyState;
- @DocsEditable @DomName('FileReader.result') @Creates('String|ArrayBuffer|Null')
+ @DomName('FileReader.result')
+ @DocsEditable
+ @Creates('String|ArrayBuffer|Null')
final Object result;
- @DocsEditable @DomName('FileReader.abort')
+ @DomName('FileReader.abort')
+ @DocsEditable
void abort() native;
@JSName('addEventListener')
- @DocsEditable @DomName('FileReader.addEventListener')
+ @DomName('FileReader.addEventListener')
+ @DocsEditable
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native;
- @JSName('dispatchEvent')
- @DocsEditable @DomName('FileReader.dispatchEvent')
- bool $dom_dispatchEvent(Event evt) native;
+ @DomName('FileReader.dispatchEvent')
+ @DocsEditable
+ bool dispatchEvent(Event evt) native;
- @DocsEditable @DomName('FileReader.readAsArrayBuffer')
+ @DomName('FileReader.readAsArrayBuffer')
+ @DocsEditable
void readAsArrayBuffer(Blob blob) native;
- @DocsEditable @DomName('FileReader.readAsBinaryString')
+ @DomName('FileReader.readAsBinaryString')
+ @DocsEditable
void readAsBinaryString(Blob blob) native;
@JSName('readAsDataURL')
- @DocsEditable @DomName('FileReader.readAsDataURL')
+ @DomName('FileReader.readAsDataURL')
+ @DocsEditable
void readAsDataUrl(Blob blob) native;
- @DocsEditable @DomName('FileReader.readAsText')
+ @DomName('FileReader.readAsText')
+ @DocsEditable
void readAsText(Blob blob, [String encoding]) native;
@JSName('removeEventListener')
- @DocsEditable @DomName('FileReader.removeEventListener')
+ @DomName('FileReader.removeEventListener')
+ @DocsEditable
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native;
+ @DomName('FileReader.abort')
+ @DocsEditable
Stream<ProgressEvent> get onAbort => abortEvent.forTarget(this);
+ @DomName('FileReader.error')
+ @DocsEditable
Stream<Event> get onError => errorEvent.forTarget(this);
+ @DomName('FileReader.load')
+ @DocsEditable
Stream<ProgressEvent> get onLoad => loadEvent.forTarget(this);
+ @DomName('FileReader.loadend')
+ @DocsEditable
Stream<ProgressEvent> get onLoadEnd => loadEndEvent.forTarget(this);
+ @DomName('FileReader.loadstart')
+ @DocsEditable
Stream<ProgressEvent> get onLoadStart => loadStartEvent.forTarget(this);
+ @DomName('FileReader.progress')
+ @DocsEditable
Stream<ProgressEvent> get onProgress => progressEvent.forTarget(this);
}
@DocsEditable
+@deprecated
class FileReaderEvents extends Events {
@DocsEditable
FileReaderEvents(EventTarget _ptr) : super(_ptr);
@@ -9913,7 +10803,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('FileReaderSync')
class FileReaderSync native "*FileReaderSync" {
@@ -9922,17 +10811,21 @@
factory FileReaderSync() => FileReaderSync._create();
static FileReaderSync _create() => JS('FileReaderSync', 'new FileReaderSync()');
- @DocsEditable @DomName('FileReaderSync.readAsArrayBuffer')
+ @DomName('FileReaderSync.readAsArrayBuffer')
+ @DocsEditable
ArrayBuffer readAsArrayBuffer(Blob blob) native;
- @DocsEditable @DomName('FileReaderSync.readAsBinaryString')
+ @DomName('FileReaderSync.readAsBinaryString')
+ @DocsEditable
String readAsBinaryString(Blob blob) native;
@JSName('readAsDataURL')
- @DocsEditable @DomName('FileReaderSync.readAsDataURL')
+ @DomName('FileReaderSync.readAsDataURL')
+ @DocsEditable
String readAsDataUrl(Blob blob) native;
- @DocsEditable @DomName('FileReaderSync.readAsText')
+ @DomName('FileReaderSync.readAsText')
+ @DocsEditable
String readAsText(Blob blob, [String encoding]) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -9940,7 +10833,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('DOMFileSystem')
class FileSystem native "*DOMFileSystem" {
@@ -9948,10 +10840,12 @@
/// Checks if this type is supported on the current platform.
static bool get supported => JS('bool', '!!(window.webkitRequestFileSystem)');
- @DocsEditable @DomName('DOMFileSystem.name')
+ @DomName('DOMFileSystem.name')
+ @DocsEditable
final String name;
- @DocsEditable @DomName('DOMFileSystem.root')
+ @DomName('DOMFileSystem.root')
+ @DocsEditable
final DirectoryEntry root;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -9967,15 +10861,16 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('DOMFileSystemSync')
class FileSystemSync native "*DOMFileSystemSync" {
- @DocsEditable @DomName('DOMFileSystemSync.name')
+ @DomName('DOMFileSystemSync.name')
+ @DocsEditable
final String name;
- @DocsEditable @DomName('DOMFileSystemSync.root')
+ @DomName('DOMFileSystemSync.root')
+ @DocsEditable
final DirectoryEntrySync root;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -9983,25 +10878,37 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('FileWriter')
class FileWriter extends EventTarget native "*FileWriter" {
+ @DomName('FileWriter.abort')
+ @DocsEditable
static const EventStreamProvider<ProgressEvent> abortEvent = const EventStreamProvider<ProgressEvent>('abort');
+ @DomName('FileWriter.error')
+ @DocsEditable
static const EventStreamProvider<Event> errorEvent = const EventStreamProvider<Event>('error');
+ @DomName('FileWriter.progress')
+ @DocsEditable
static const EventStreamProvider<ProgressEvent> progressEvent = const EventStreamProvider<ProgressEvent>('progress');
+ @DomName('FileWriter.write')
+ @DocsEditable
static const EventStreamProvider<ProgressEvent> writeEvent = const EventStreamProvider<ProgressEvent>('write');
+ @DomName('FileWriter.writeend')
+ @DocsEditable
static const EventStreamProvider<ProgressEvent> writeEndEvent = const EventStreamProvider<ProgressEvent>('writeend');
+ @DomName('FileWriter.writestart')
+ @DocsEditable
static const EventStreamProvider<ProgressEvent> writeStartEvent = const EventStreamProvider<ProgressEvent>('writestart');
@DocsEditable
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
+ @deprecated
FileWriterEvents get on =>
new FileWriterEvents(this);
@@ -10011,56 +10918,79 @@
static const int WRITING = 1;
- @DocsEditable @DomName('FileWriter.error')
+ @DomName('FileWriter.error')
+ @DocsEditable
final FileError error;
- @DocsEditable @DomName('FileWriter.length')
+ @DomName('FileWriter.length')
+ @DocsEditable
final int length;
- @DocsEditable @DomName('FileWriter.position')
+ @DomName('FileWriter.position')
+ @DocsEditable
final int position;
- @DocsEditable @DomName('FileWriter.readyState')
+ @DomName('FileWriter.readyState')
+ @DocsEditable
final int readyState;
- @DocsEditable @DomName('FileWriter.abort')
+ @DomName('FileWriter.abort')
+ @DocsEditable
void abort() native;
@JSName('addEventListener')
- @DocsEditable @DomName('FileWriter.addEventListener')
+ @DomName('FileWriter.addEventListener')
+ @DocsEditable
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native;
- @JSName('dispatchEvent')
- @DocsEditable @DomName('FileWriter.dispatchEvent')
- bool $dom_dispatchEvent(Event evt) native;
+ @DomName('FileWriter.dispatchEvent')
+ @DocsEditable
+ bool dispatchEvent(Event evt) native;
@JSName('removeEventListener')
- @DocsEditable @DomName('FileWriter.removeEventListener')
+ @DomName('FileWriter.removeEventListener')
+ @DocsEditable
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native;
- @DocsEditable @DomName('FileWriter.seek')
+ @DomName('FileWriter.seek')
+ @DocsEditable
void seek(int position) native;
- @DocsEditable @DomName('FileWriter.truncate')
+ @DomName('FileWriter.truncate')
+ @DocsEditable
void truncate(int size) native;
- @DocsEditable @DomName('FileWriter.write')
+ @DomName('FileWriter.write')
+ @DocsEditable
void write(Blob data) native;
+ @DomName('FileWriter.abort')
+ @DocsEditable
Stream<ProgressEvent> get onAbort => abortEvent.forTarget(this);
+ @DomName('FileWriter.error')
+ @DocsEditable
Stream<Event> get onError => errorEvent.forTarget(this);
+ @DomName('FileWriter.progress')
+ @DocsEditable
Stream<ProgressEvent> get onProgress => progressEvent.forTarget(this);
+ @DomName('FileWriter.write')
+ @DocsEditable
Stream<ProgressEvent> get onWrite => writeEvent.forTarget(this);
+ @DomName('FileWriter.writeend')
+ @DocsEditable
Stream<ProgressEvent> get onWriteEnd => writeEndEvent.forTarget(this);
+ @DomName('FileWriter.writestart')
+ @DocsEditable
Stream<ProgressEvent> get onWriteStart => writeStartEvent.forTarget(this);
}
@DocsEditable
+@deprecated
class FileWriterEvents extends Events {
@DocsEditable
FileWriterEvents(EventTarget _ptr) : super(_ptr);
@@ -10096,24 +11026,28 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('FileWriterSync')
class FileWriterSync native "*FileWriterSync" {
- @DocsEditable @DomName('FileWriterSync.length')
+ @DomName('FileWriterSync.length')
+ @DocsEditable
final int length;
- @DocsEditable @DomName('FileWriterSync.position')
+ @DomName('FileWriterSync.position')
+ @DocsEditable
final int position;
- @DocsEditable @DomName('FileWriterSync.seek')
+ @DomName('FileWriterSync.seek')
+ @DocsEditable
void seek(int position) native;
- @DocsEditable @DomName('FileWriterSync.truncate')
+ @DomName('FileWriterSync.truncate')
+ @DocsEditable
void truncate(int size) native;
- @DocsEditable @DomName('FileWriterSync.write')
+ @DomName('FileWriterSync.write')
+ @DocsEditable
void write(Blob data) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -10121,7 +11055,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('Float32Array')
class Float32Array extends ArrayBufferView implements JavaScriptIndexingBehavior, List<num> native "*Float32Array" {
@@ -10137,7 +11070,8 @@
static const int BYTES_PER_ELEMENT = 4;
- @DocsEditable @DomName('Float32Array.length')
+ @DomName('Float32Array.length')
+ @DocsEditable
int get length => JS("int", "#.length", this);
num operator[](int index) => JS("num", "#[#]", this, index);
@@ -10162,11 +11096,13 @@
void forEach(void f(num element)) => IterableMixinWorkaround.forEach(this, f);
- String join([String separator]) => IterableMixinWorkaround.joinList(this, separator);
+ String join([String separator]) =>
+ IterableMixinWorkaround.joinList(this, separator);
List mappedBy(f(num element)) => IterableMixinWorkaround.mappedByList(this, f);
- Iterable<num> where(bool f(num element)) => IterableMixinWorkaround.where(this, f);
+ Iterable<num> where(bool f(num element)) =>
+ IterableMixinWorkaround.where(this, f);
bool every(bool f(num element)) => IterableMixinWorkaround.every(this, f);
@@ -10228,6 +11164,9 @@
throw new UnsupportedError("Cannot clear immutable List.");
}
+ List<num> get reversed =>
+ new ReversedListView<num>(this, 0, null);
+
void sort([int compare(num a, num b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -10256,9 +11195,11 @@
throw new StateError("More than one element");
}
- num min([int compare(num a, num b)]) => IterableMixinWorkaround.min(this, compare);
+ num min([int compare(num a, num b)]) =>
+ IterableMixinWorkaround.min(this, compare);
- num max([int compare(num a, num b)]) => IterableMixinWorkaround.max(this, compare);
+ num max([int compare(num a, num b)]) =>
+ IterableMixinWorkaround.max(this, compare);
num removeAt(int pos) {
throw new UnsupportedError("Cannot remove from immutable List.");
@@ -10306,10 +11247,12 @@
// -- end List<num> mixins.
@JSName('set')
- @DocsEditable @DomName('Float32Array.set')
+ @DomName('Float32Array.set')
+ @DocsEditable
void setElements(Object array, [int offset]) native;
- @DocsEditable @DomName('Float32Array.subarray')
+ @DomName('Float32Array.subarray')
+ @DocsEditable
Float32Array subarray(int start, [int end]) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -10317,7 +11260,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('Float64Array')
class Float64Array extends ArrayBufferView implements JavaScriptIndexingBehavior, List<num> native "*Float64Array" {
@@ -10333,7 +11275,8 @@
static const int BYTES_PER_ELEMENT = 8;
- @DocsEditable @DomName('Float64Array.length')
+ @DomName('Float64Array.length')
+ @DocsEditable
int get length => JS("int", "#.length", this);
num operator[](int index) => JS("num", "#[#]", this, index);
@@ -10358,11 +11301,13 @@
void forEach(void f(num element)) => IterableMixinWorkaround.forEach(this, f);
- String join([String separator]) => IterableMixinWorkaround.joinList(this, separator);
+ String join([String separator]) =>
+ IterableMixinWorkaround.joinList(this, separator);
List mappedBy(f(num element)) => IterableMixinWorkaround.mappedByList(this, f);
- Iterable<num> where(bool f(num element)) => IterableMixinWorkaround.where(this, f);
+ Iterable<num> where(bool f(num element)) =>
+ IterableMixinWorkaround.where(this, f);
bool every(bool f(num element)) => IterableMixinWorkaround.every(this, f);
@@ -10424,6 +11369,9 @@
throw new UnsupportedError("Cannot clear immutable List.");
}
+ List<num> get reversed =>
+ new ReversedListView<num>(this, 0, null);
+
void sort([int compare(num a, num b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -10452,9 +11400,11 @@
throw new StateError("More than one element");
}
- num min([int compare(num a, num b)]) => IterableMixinWorkaround.min(this, compare);
+ num min([int compare(num a, num b)]) =>
+ IterableMixinWorkaround.min(this, compare);
- num max([int compare(num a, num b)]) => IterableMixinWorkaround.max(this, compare);
+ num max([int compare(num a, num b)]) =>
+ IterableMixinWorkaround.max(this, compare);
num removeAt(int pos) {
throw new UnsupportedError("Cannot remove from immutable List.");
@@ -10502,10 +11452,12 @@
// -- end List<num> mixins.
@JSName('set')
- @DocsEditable @DomName('Float64Array.set')
+ @DomName('Float64Array.set')
+ @DocsEditable
void setElements(Object array, [int offset]) native;
- @DocsEditable @DomName('Float64Array.subarray')
+ @DomName('Float64Array.subarray')
+ @DocsEditable
Float64Array subarray(int start, [int end]) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -10513,7 +11465,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('FormData')
class FormData native "*FormData" {
@@ -10532,7 +11483,8 @@
return JS('FormData', 'new FormData(#)', form);
}
- @DocsEditable @DomName('DOMFormData.append')
+ @DomName('DOMFormData.append')
+ @DocsEditable
void append(String name, value, [String filename]) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -10540,7 +11492,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('HTMLFormElement')
class FormElement extends Element native "*HTMLFormElement" {
@@ -10548,43 +11499,56 @@
@DocsEditable
factory FormElement() => document.$dom_createElement("form");
- @DocsEditable @DomName('HTMLFormElement.acceptCharset')
+ @DomName('HTMLFormElement.acceptCharset')
+ @DocsEditable
String acceptCharset;
- @DocsEditable @DomName('HTMLFormElement.action')
+ @DomName('HTMLFormElement.action')
+ @DocsEditable
String action;
- @DocsEditable @DomName('HTMLFormElement.autocomplete')
+ @DomName('HTMLFormElement.autocomplete')
+ @DocsEditable
String autocomplete;
- @DocsEditable @DomName('HTMLFormElement.encoding')
+ @DomName('HTMLFormElement.encoding')
+ @DocsEditable
String encoding;
- @DocsEditable @DomName('HTMLFormElement.enctype')
+ @DomName('HTMLFormElement.enctype')
+ @DocsEditable
String enctype;
- @DocsEditable @DomName('HTMLFormElement.length')
+ @DomName('HTMLFormElement.length')
+ @DocsEditable
final int length;
- @DocsEditable @DomName('HTMLFormElement.method')
+ @DomName('HTMLFormElement.method')
+ @DocsEditable
String method;
- @DocsEditable @DomName('HTMLFormElement.name')
+ @DomName('HTMLFormElement.name')
+ @DocsEditable
String name;
- @DocsEditable @DomName('HTMLFormElement.noValidate')
+ @DomName('HTMLFormElement.noValidate')
+ @DocsEditable
bool noValidate;
- @DocsEditable @DomName('HTMLFormElement.target')
+ @DomName('HTMLFormElement.target')
+ @DocsEditable
String target;
- @DocsEditable @DomName('HTMLFormElement.checkValidity')
+ @DomName('HTMLFormElement.checkValidity')
+ @DocsEditable
bool checkValidity() native;
- @DocsEditable @DomName('HTMLFormElement.reset')
+ @DomName('HTMLFormElement.reset')
+ @DocsEditable
void reset() native;
- @DocsEditable @DomName('HTMLFormElement.submit')
+ @DomName('HTMLFormElement.submit')
+ @DocsEditable
void submit() native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -10592,24 +11556,28 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('Gamepad')
class Gamepad native "*Gamepad" {
- @DocsEditable @DomName('Gamepad.axes')
+ @DomName('Gamepad.axes')
+ @DocsEditable
final List<num> axes;
- @DocsEditable @DomName('Gamepad.buttons')
+ @DomName('Gamepad.buttons')
+ @DocsEditable
final List<num> buttons;
- @DocsEditable @DomName('Gamepad.id')
+ @DomName('Gamepad.id')
+ @DocsEditable
final String id;
- @DocsEditable @DomName('Gamepad.index')
+ @DomName('Gamepad.index')
+ @DocsEditable
final int index;
- @DocsEditable @DomName('Gamepad.timestamp')
+ @DomName('Gamepad.timestamp')
+ @DocsEditable
final int timestamp;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -10617,18 +11585,20 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('Geolocation')
class Geolocation native "*Geolocation" {
- @DocsEditable @DomName('Geolocation.clearWatch')
+ @DomName('Geolocation.clearWatch')
+ @DocsEditable
void clearWatch(int watchId) native;
- @DocsEditable @DomName('Geolocation.getCurrentPosition')
+ @DomName('Geolocation.getCurrentPosition')
+ @DocsEditable
void getCurrentPosition(PositionCallback successCallback, [PositionErrorCallback errorCallback, Object options]) native;
- @DocsEditable @DomName('Geolocation.watchPosition')
+ @DomName('Geolocation.watchPosition')
+ @DocsEditable
int watchPosition(PositionCallback successCallback, [PositionErrorCallback errorCallback, Object options]) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -10636,15 +11606,16 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('Geoposition')
class Geoposition native "*Geoposition" {
- @DocsEditable @DomName('Geoposition.coords')
+ @DomName('Geoposition.coords')
+ @DocsEditable
final Coordinates coords;
- @DocsEditable @DomName('Geoposition.timestamp')
+ @DomName('Geoposition.timestamp')
+ @DocsEditable
final int timestamp;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -10652,7 +11623,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('HTMLHRElement')
class HRElement extends Element native "*HTMLHRElement" {
@@ -10660,33 +11630,50 @@
@DocsEditable
factory HRElement() => document.$dom_createElement("hr");
}
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
+// WARNING: Do not edit - generated code.
-
-@DocsEditable
@DomName('HashChangeEvent')
+@SupportedBrowser(SupportedBrowser.CHROME)
+@SupportedBrowser(SupportedBrowser.FIREFOX)
+@SupportedBrowser(SupportedBrowser.SAFARI)
+
class HashChangeEvent extends Event native "*HashChangeEvent" {
+ factory HashChangeEvent(String type,
+ {bool canBubble: true, bool cancelable: true, String oldUrl,
+ String newUrl}) {
+ var event = document.$dom_createEvent("HashChangeEvent");
+ event.$dom_initHashChangeEvent(type, canBubble, cancelable, oldUrl, newUrl);
+ return event;
+ }
+
+ /// Checks if this type is supported on the current platform.
+ static bool get supported => Event._isTypeSupported('HashChangeEvent');
@JSName('newURL')
- @DocsEditable @DomName('HashChangeEvent.newURL')
+ @DomName('HashChangeEvent.newURL')
+ @DocsEditable
final String newUrl;
@JSName('oldURL')
- @DocsEditable @DomName('HashChangeEvent.oldURL')
+ @DomName('HashChangeEvent.oldURL')
+ @DocsEditable
final String oldUrl;
- @DocsEditable @DomName('HashChangeEvent.initHashChangeEvent')
- void initHashChangeEvent(String type, bool canBubble, bool cancelable, String oldURL, String newURL) native;
+ @JSName('initHashChangeEvent')
+ @DomName('HashChangeEvent.initHashChangeEvent')
+ @DocsEditable
+ void $dom_initHashChangeEvent(String type, bool canBubble, bool cancelable, String oldURL, String newURL) native;
+
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('HTMLHeadElement')
class HeadElement extends Element native "*HTMLHeadElement" {
@@ -10699,7 +11686,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('HTMLHeadingElement')
class HeadingElement extends Element native "*HTMLHeadingElement" {
@@ -10727,8 +11713,6 @@
// BSD-style license that can be found in the LICENSE file.
-
-@DocsEditable
@DomName('History')
class History implements HistoryBase native "*History" {
@@ -10743,27 +11727,44 @@
*/
static bool get supportsState => JS('bool', '!!window.history.pushState');
- @DocsEditable @DomName('History.length')
+ @DomName('History.length')
+ @DocsEditable
final int length;
dynamic get state => _convertNativeToDart_SerializedScriptValue(this._state);
@JSName('state')
- @DocsEditable @DomName('History.state') @annotation_Creates_SerializedScriptValue @annotation_Returns_SerializedScriptValue
+ @DomName('History.state')
+ @DocsEditable
+ @annotation_Creates_SerializedScriptValue
+ @annotation_Returns_SerializedScriptValue
final dynamic _state;
- @DocsEditable @DomName('History.back')
+ @DomName('History.back')
+ @DocsEditable
void back() native;
- @DocsEditable @DomName('History.forward')
+ @DomName('History.forward')
+ @DocsEditable
void forward() native;
- @DocsEditable @DomName('History.go')
+ @DomName('History.go')
+ @DocsEditable
void go(int distance) native;
- @DocsEditable @DomName('History.pushState') @SupportedBrowser(SupportedBrowser.CHROME) @SupportedBrowser(SupportedBrowser.FIREFOX) @SupportedBrowser(SupportedBrowser.IE, '10') @SupportedBrowser(SupportedBrowser.SAFARI)
+ @DomName('History.pushState')
+ @DocsEditable
+ @SupportedBrowser(SupportedBrowser.CHROME)
+ @SupportedBrowser(SupportedBrowser.FIREFOX)
+ @SupportedBrowser(SupportedBrowser.IE, '10')
+ @SupportedBrowser(SupportedBrowser.SAFARI)
void pushState(Object data, String title, [String url]) native;
- @DocsEditable @DomName('History.replaceState') @SupportedBrowser(SupportedBrowser.CHROME) @SupportedBrowser(SupportedBrowser.FIREFOX) @SupportedBrowser(SupportedBrowser.IE, '10') @SupportedBrowser(SupportedBrowser.SAFARI)
+ @DomName('History.replaceState')
+ @DocsEditable
+ @SupportedBrowser(SupportedBrowser.CHROME)
+ @SupportedBrowser(SupportedBrowser.FIREFOX)
+ @SupportedBrowser(SupportedBrowser.IE, '10')
+ @SupportedBrowser(SupportedBrowser.SAFARI)
void replaceState(Object data, String title, [String url]) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -10771,12 +11772,12 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('HTMLAllCollection')
class HtmlAllCollection implements JavaScriptIndexingBehavior, List<Node> native "*HTMLAllCollection" {
- @DocsEditable @DomName('HTMLAllCollection.length')
+ @DomName('HTMLAllCollection.length')
+ @DocsEditable
int get length => JS("int", "#.length", this);
Node operator[](int index) => JS("Node", "#[#]", this, index);
@@ -10804,11 +11805,13 @@
void forEach(void f(Node element)) => IterableMixinWorkaround.forEach(this, f);
- String join([String separator]) => IterableMixinWorkaround.joinList(this, separator);
+ String join([String separator]) =>
+ IterableMixinWorkaround.joinList(this, separator);
List mappedBy(f(Node element)) => IterableMixinWorkaround.mappedByList(this, f);
- Iterable<Node> where(bool f(Node element)) => IterableMixinWorkaround.where(this, f);
+ Iterable<Node> where(bool f(Node element)) =>
+ IterableMixinWorkaround.where(this, f);
bool every(bool f(Node element)) => IterableMixinWorkaround.every(this, f);
@@ -10870,6 +11873,9 @@
throw new UnsupportedError("Cannot clear immutable List.");
}
+ List<Node> get reversed =>
+ new ReversedListView<Node>(this, 0, null);
+
void sort([int compare(Node a, Node b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -10898,9 +11904,11 @@
throw new StateError("More than one element");
}
- Node min([int compare(Node a, Node b)]) => IterableMixinWorkaround.min(this, compare);
+ Node min([int compare(Node a, Node b)]) =>
+ IterableMixinWorkaround.min(this, compare);
- Node max([int compare(Node a, Node b)]) => IterableMixinWorkaround.max(this, compare);
+ Node max([int compare(Node a, Node b)]) =>
+ IterableMixinWorkaround.max(this, compare);
Node removeAt(int pos) {
throw new UnsupportedError("Cannot remove from immutable List.");
@@ -10947,14 +11955,18 @@
// -- end List<Node> mixins.
- @DocsEditable @DomName('HTMLAllCollection.item')
+ @DomName('HTMLAllCollection.item')
+ @DocsEditable
Node item(int index) native;
- @DocsEditable @DomName('HTMLAllCollection.namedItem')
+ @DomName('HTMLAllCollection.namedItem')
+ @DocsEditable
Node namedItem(String name) native;
- @DocsEditable @DomName('HTMLAllCollection.tags')
- @Returns('NodeList') @Creates('NodeList')
+ @DomName('HTMLAllCollection.tags')
+ @DocsEditable
+ @Returns('NodeList')
+ @Creates('NodeList')
List<Node> tags(String name) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -10962,12 +11974,12 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('HTMLCollection')
class HtmlCollection implements JavaScriptIndexingBehavior, List<Node> native "*HTMLCollection" {
- @DocsEditable @DomName('HTMLCollection.length')
+ @DomName('HTMLCollection.length')
+ @DocsEditable
int get length => JS("int", "#.length", this);
Node operator[](int index) => JS("Node", "#[#]", this, index);
@@ -10995,11 +12007,13 @@
void forEach(void f(Node element)) => IterableMixinWorkaround.forEach(this, f);
- String join([String separator]) => IterableMixinWorkaround.joinList(this, separator);
+ String join([String separator]) =>
+ IterableMixinWorkaround.joinList(this, separator);
List mappedBy(f(Node element)) => IterableMixinWorkaround.mappedByList(this, f);
- Iterable<Node> where(bool f(Node element)) => IterableMixinWorkaround.where(this, f);
+ Iterable<Node> where(bool f(Node element)) =>
+ IterableMixinWorkaround.where(this, f);
bool every(bool f(Node element)) => IterableMixinWorkaround.every(this, f);
@@ -11061,6 +12075,9 @@
throw new UnsupportedError("Cannot clear immutable List.");
}
+ List<Node> get reversed =>
+ new ReversedListView<Node>(this, 0, null);
+
void sort([int compare(Node a, Node b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -11089,9 +12106,11 @@
throw new StateError("More than one element");
}
- Node min([int compare(Node a, Node b)]) => IterableMixinWorkaround.min(this, compare);
+ Node min([int compare(Node a, Node b)]) =>
+ IterableMixinWorkaround.min(this, compare);
- Node max([int compare(Node a, Node b)]) => IterableMixinWorkaround.max(this, compare);
+ Node max([int compare(Node a, Node b)]) =>
+ IterableMixinWorkaround.max(this, compare);
Node removeAt(int pos) {
throw new UnsupportedError("Cannot remove from immutable List.");
@@ -11138,10 +12157,12 @@
// -- end List<Node> mixins.
- @DocsEditable @DomName('HTMLCollection.item')
+ @DomName('HTMLCollection.item')
+ @DocsEditable
Node item(int index) native;
- @DocsEditable @DomName('HTMLCollection.namedItem')
+ @DomName('HTMLCollection.namedItem')
+ @DocsEditable
Node namedItem(String name) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -11151,11 +12172,11 @@
// WARNING: Do not edit - generated code.
-@DocsEditable
@DomName('HTMLDocument')
class HtmlDocument extends Document native "*HTMLDocument" {
- @DocsEditable @DomName('HTMLDocument.activeElement')
+ @DomName('HTMLDocument.activeElement')
+ @DocsEditable
final Element activeElement;
@DomName('Document.body')
@@ -11209,7 +12230,7 @@
*/
@SupportedBrowser(SupportedBrowser.CHROME)
@SupportedBrowser(SupportedBrowser.SAFARI)
- @Experimental()
+ @Experimental
@DomName('Document.getCSSCanvasContext')
CanvasRenderingContext getCssCanvasContext(String contextId, String name,
int width, int height) {
@@ -11284,7 +12305,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('HTMLHtmlElement')
class HtmlElement extends Element native "*HTMLHtmlElement" {
@@ -11297,12 +12317,12 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('HTMLFormControlsCollection')
class HtmlFormControlsCollection extends HtmlCollection native "*HTMLFormControlsCollection" {
- @DocsEditable @DomName('HTMLFormControlsCollection.namedItem')
+ @DomName('HTMLFormControlsCollection.namedItem')
+ @DocsEditable
Node namedItem(String name) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -11310,7 +12330,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('HTMLOptionsCollection')
class HtmlOptionsCollection extends HtmlCollection native "*HTMLOptionsCollection" {
@@ -11322,23 +12341,23 @@
/**
* A utility for retrieving data from a URL.
- *
+ *
* HttpRequest can be used to obtain data from http, ftp, and file
- * protocols.
- *
+ * protocols.
+ *
* For example, suppose we're developing these API docs, and we
* wish to retrieve the HTML of the top-level page and print it out.
* The easiest way to do that would be:
- *
+ *
* var httpRequest = HttpRequest.get('http://api.dartlang.org',
* (request) => print(request.responseText));
- *
+ *
* **Important**: With the default behavior of this class, your
* code making the request should be served from the same origin (domain name,
* port, and application layer protocol) as the URL you are trying to access
- * with HttpRequest. However, there are ways to
+ * with HttpRequest. However, there are ways to
* [get around this restriction](http://www.dartlang.org/articles/json-web-service/#note-on-jsonp).
- *
+ *
* See also:
*
* * [Dart article on using HttpRequests](http://www.dartlang.org/articles/json-web-service/#getting-data)
@@ -11349,7 +12368,7 @@
class HttpRequest extends EventTarget native "*XMLHttpRequest" {
/**
* Creates a URL get request for the specified `url`.
- *
+ *
* After completing the request, the object will call the user-provided
* [onComplete] callback.
*/
@@ -11361,8 +12380,8 @@
* Creates a URL GET request for the specified `url` with
* credentials such a cookie (already) set in the header or
* [authorization headers](http://tools.ietf.org/html/rfc1945#section-10.2).
- *
- * After completing the request, the object will call the user-provided
+ *
+ * After completing the request, the object will call the user-provided
* [onComplete] callback.
*
* A few other details to keep in mind when using credentials:
@@ -11371,7 +12390,7 @@
* * The `Access-Control-Allow-Origin` header of `url` cannot contain a wildcard (*).
* * The `Access-Control-Allow-Credentials` header of `url` must be set to true.
* * If `Access-Control-Expose-Headers` has not been set to true, only a subset of all the response headers will be returned when calling [getAllRequestHeaders].
- *
+ *
* See also: [authorization headers](http://en.wikipedia.org/wiki/Basic_access_authentication).
*/
factory HttpRequest.getWithCredentials(String url,
@@ -11379,18 +12398,32 @@
_HttpRequestUtils.get(url, onComplete, true);
+ @DomName('XMLHttpRequest.abort')
+ @DocsEditable
static const EventStreamProvider<ProgressEvent> abortEvent = const EventStreamProvider<ProgressEvent>('abort');
+ @DomName('XMLHttpRequest.error')
+ @DocsEditable
static const EventStreamProvider<ProgressEvent> errorEvent = const EventStreamProvider<ProgressEvent>('error');
+ @DomName('XMLHttpRequest.load')
+ @DocsEditable
static const EventStreamProvider<ProgressEvent> loadEvent = const EventStreamProvider<ProgressEvent>('load');
+ @DomName('XMLHttpRequest.loadend')
+ @DocsEditable
static const EventStreamProvider<ProgressEvent> loadEndEvent = const EventStreamProvider<ProgressEvent>('loadend');
+ @DomName('XMLHttpRequest.loadstart')
+ @DocsEditable
static const EventStreamProvider<ProgressEvent> loadStartEvent = const EventStreamProvider<ProgressEvent>('loadstart');
+ @DomName('XMLHttpRequest.progress')
+ @DocsEditable
static const EventStreamProvider<ProgressEvent> progressEvent = const EventStreamProvider<ProgressEvent>('progress');
+ @DomName('XMLHttpRequest.readystatechange')
+ @DocsEditable
static const EventStreamProvider<ProgressEvent> readyStateChangeEvent = const EventStreamProvider<ProgressEvent>('readystatechange');
@DocsEditable
@@ -11399,6 +12432,7 @@
@DocsEditable
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
+ @deprecated
HttpRequestEvents get on =>
new HttpRequestEvents(this);
@@ -11412,84 +12446,118 @@
static const int UNSENT = 0;
- @DocsEditable @DomName('XMLHttpRequest.readyState')
+ @DomName('XMLHttpRequest.readyState')
+ @DocsEditable
final int readyState;
- @DocsEditable @DomName('XMLHttpRequest.response') @Creates('ArrayBuffer|Blob|Document|=Object|=List|String|num')
+ @DomName('XMLHttpRequest.response')
+ @DocsEditable
+ @Creates('ArrayBuffer|Blob|Document|=Object|=List|String|num')
final Object response;
- @DocsEditable @DomName('XMLHttpRequest.responseText')
+ @DomName('XMLHttpRequest.responseText')
+ @DocsEditable
final String responseText;
- @DocsEditable @DomName('XMLHttpRequest.responseType')
+ @DomName('XMLHttpRequest.responseType')
+ @DocsEditable
String responseType;
@JSName('responseXML')
- @DocsEditable @DomName('XMLHttpRequest.responseXML')
+ @DomName('XMLHttpRequest.responseXML')
+ @DocsEditable
final Document responseXml;
- @DocsEditable @DomName('XMLHttpRequest.status')
+ @DomName('XMLHttpRequest.status')
+ @DocsEditable
final int status;
- @DocsEditable @DomName('XMLHttpRequest.statusText')
+ @DomName('XMLHttpRequest.statusText')
+ @DocsEditable
final String statusText;
- @DocsEditable @DomName('XMLHttpRequest.upload')
+ @DomName('XMLHttpRequest.upload')
+ @DocsEditable
final HttpRequestUpload upload;
- @DocsEditable @DomName('XMLHttpRequest.withCredentials')
+ @DomName('XMLHttpRequest.withCredentials')
+ @DocsEditable
bool withCredentials;
- @DocsEditable @DomName('XMLHttpRequest.abort')
+ @DomName('XMLHttpRequest.abort')
+ @DocsEditable
void abort() native;
@JSName('addEventListener')
- @DocsEditable @DomName('XMLHttpRequest.addEventListener')
+ @DomName('XMLHttpRequest.addEventListener')
+ @DocsEditable
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native;
- @JSName('dispatchEvent')
- @DocsEditable @DomName('XMLHttpRequest.dispatchEvent')
- bool $dom_dispatchEvent(Event evt) native;
+ @DomName('XMLHttpRequest.dispatchEvent')
+ @DocsEditable
+ bool dispatchEvent(Event evt) native;
- @DocsEditable @DomName('XMLHttpRequest.getAllResponseHeaders')
+ @DomName('XMLHttpRequest.getAllResponseHeaders')
+ @DocsEditable
String getAllResponseHeaders() native;
- @DocsEditable @DomName('XMLHttpRequest.getResponseHeader')
+ @DomName('XMLHttpRequest.getResponseHeader')
+ @DocsEditable
String getResponseHeader(String header) native;
- @DocsEditable @DomName('XMLHttpRequest.open')
+ @DomName('XMLHttpRequest.open')
+ @DocsEditable
void open(String method, String url, [bool async, String user, String password]) native;
- @DocsEditable @DomName('XMLHttpRequest.overrideMimeType')
+ @DomName('XMLHttpRequest.overrideMimeType')
+ @DocsEditable
void overrideMimeType(String override) native;
@JSName('removeEventListener')
- @DocsEditable @DomName('XMLHttpRequest.removeEventListener')
+ @DomName('XMLHttpRequest.removeEventListener')
+ @DocsEditable
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native;
- @DocsEditable @DomName('XMLHttpRequest.send')
+ @DomName('XMLHttpRequest.send')
+ @DocsEditable
void send([data]) native;
- @DocsEditable @DomName('XMLHttpRequest.setRequestHeader')
+ @DomName('XMLHttpRequest.setRequestHeader')
+ @DocsEditable
void setRequestHeader(String header, String value) native;
+ @DomName('XMLHttpRequest.abort')
+ @DocsEditable
Stream<ProgressEvent> get onAbort => abortEvent.forTarget(this);
+ @DomName('XMLHttpRequest.error')
+ @DocsEditable
Stream<ProgressEvent> get onError => errorEvent.forTarget(this);
+ @DomName('XMLHttpRequest.load')
+ @DocsEditable
Stream<ProgressEvent> get onLoad => loadEvent.forTarget(this);
+ @DomName('XMLHttpRequest.loadend')
+ @DocsEditable
Stream<ProgressEvent> get onLoadEnd => loadEndEvent.forTarget(this);
+ @DomName('XMLHttpRequest.loadstart')
+ @DocsEditable
Stream<ProgressEvent> get onLoadStart => loadStartEvent.forTarget(this);
+ @DomName('XMLHttpRequest.progress')
+ @DocsEditable
Stream<ProgressEvent> get onProgress => progressEvent.forTarget(this);
+ @DomName('XMLHttpRequest.readystatechange')
+ @DocsEditable
Stream<ProgressEvent> get onReadyStateChange => readyStateChangeEvent.forTarget(this);
}
@DocsEditable
+@deprecated
class HttpRequestEvents extends Events {
@DocsEditable
HttpRequestEvents(EventTarget _ptr) : super(_ptr);
@@ -11520,7 +12588,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('XMLHttpRequestException')
class HttpRequestException native "*XMLHttpRequestException" {
@@ -11529,16 +12596,20 @@
static const int NETWORK_ERR = 101;
- @DocsEditable @DomName('XMLHttpRequestException.code')
+ @DomName('XMLHttpRequestException.code')
+ @DocsEditable
final int code;
- @DocsEditable @DomName('XMLHttpRequestException.message')
+ @DomName('XMLHttpRequestException.message')
+ @DocsEditable
final String message;
- @DocsEditable @DomName('XMLHttpRequestException.name')
+ @DomName('XMLHttpRequestException.name')
+ @DocsEditable
final String name;
- @DocsEditable @DomName('XMLHttpRequestException.toString')
+ @DomName('XMLHttpRequestException.toString')
+ @DocsEditable
String toString() native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -11546,15 +12617,22 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('XMLHttpRequestProgressEvent')
+@SupportedBrowser(SupportedBrowser.CHROME)
+@SupportedBrowser(SupportedBrowser.SAFARI)
+@Experimental
class HttpRequestProgressEvent extends ProgressEvent native "*XMLHttpRequestProgressEvent" {
- @DocsEditable @DomName('XMLHttpRequestProgressEvent.position')
+ /// Checks if this type is supported on the current platform.
+ static bool get supported => Event._isTypeSupported('XMLHttpRequestProgressEvent');
+
+ @DomName('XMLHttpRequestProgressEvent.position')
+ @DocsEditable
final int position;
- @DocsEditable @DomName('XMLHttpRequestProgressEvent.totalSize')
+ @DomName('XMLHttpRequestProgressEvent.totalSize')
+ @DocsEditable
final int totalSize;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -11562,54 +12640,81 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('XMLHttpRequestUpload')
class HttpRequestUpload extends EventTarget native "*XMLHttpRequestUpload" {
+ @DomName('XMLHttpRequestUpload.abort')
+ @DocsEditable
static const EventStreamProvider<ProgressEvent> abortEvent = const EventStreamProvider<ProgressEvent>('abort');
+ @DomName('XMLHttpRequestUpload.error')
+ @DocsEditable
static const EventStreamProvider<ProgressEvent> errorEvent = const EventStreamProvider<ProgressEvent>('error');
+ @DomName('XMLHttpRequestUpload.load')
+ @DocsEditable
static const EventStreamProvider<ProgressEvent> loadEvent = const EventStreamProvider<ProgressEvent>('load');
+ @DomName('XMLHttpRequestUpload.loadend')
+ @DocsEditable
static const EventStreamProvider<ProgressEvent> loadEndEvent = const EventStreamProvider<ProgressEvent>('loadend');
+ @DomName('XMLHttpRequestUpload.loadstart')
+ @DocsEditable
static const EventStreamProvider<ProgressEvent> loadStartEvent = const EventStreamProvider<ProgressEvent>('loadstart');
+ @DomName('XMLHttpRequestUpload.progress')
+ @DocsEditable
static const EventStreamProvider<ProgressEvent> progressEvent = const EventStreamProvider<ProgressEvent>('progress');
@DocsEditable
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
+ @deprecated
HttpRequestUploadEvents get on =>
new HttpRequestUploadEvents(this);
@JSName('addEventListener')
- @DocsEditable @DomName('XMLHttpRequestUpload.addEventListener')
+ @DomName('XMLHttpRequestUpload.addEventListener')
+ @DocsEditable
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native;
- @JSName('dispatchEvent')
- @DocsEditable @DomName('XMLHttpRequestUpload.dispatchEvent')
- bool $dom_dispatchEvent(Event evt) native;
+ @DomName('XMLHttpRequestUpload.dispatchEvent')
+ @DocsEditable
+ bool dispatchEvent(Event evt) native;
@JSName('removeEventListener')
- @DocsEditable @DomName('XMLHttpRequestUpload.removeEventListener')
+ @DomName('XMLHttpRequestUpload.removeEventListener')
+ @DocsEditable
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native;
+ @DomName('XMLHttpRequestUpload.abort')
+ @DocsEditable
Stream<ProgressEvent> get onAbort => abortEvent.forTarget(this);
+ @DomName('XMLHttpRequestUpload.error')
+ @DocsEditable
Stream<ProgressEvent> get onError => errorEvent.forTarget(this);
+ @DomName('XMLHttpRequestUpload.load')
+ @DocsEditable
Stream<ProgressEvent> get onLoad => loadEvent.forTarget(this);
+ @DomName('XMLHttpRequestUpload.loadend')
+ @DocsEditable
Stream<ProgressEvent> get onLoadEnd => loadEndEvent.forTarget(this);
+ @DomName('XMLHttpRequestUpload.loadstart')
+ @DocsEditable
Stream<ProgressEvent> get onLoadStart => loadStartEvent.forTarget(this);
+ @DomName('XMLHttpRequestUpload.progress')
+ @DocsEditable
Stream<ProgressEvent> get onProgress => progressEvent.forTarget(this);
}
@DocsEditable
+@deprecated
class HttpRequestUploadEvents extends Events {
@DocsEditable
HttpRequestUploadEvents(EventTarget _ptr) : super(_ptr);
@@ -11637,7 +12742,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('HTMLIFrameElement')
class IFrameElement extends Element native "*HTMLIFrameElement" {
@@ -11647,52 +12751,63 @@
WindowBase get contentWindow => _convertNativeToDart_Window(this._contentWindow);
@JSName('contentWindow')
- @DocsEditable @DomName('HTMLIFrameElement.contentWindow') @Creates('Window|=Object') @Returns('Window|=Object')
+ @DomName('HTMLIFrameElement.contentWindow')
+ @DocsEditable
+ @Creates('Window|=Object')
+ @Returns('Window|=Object')
final dynamic _contentWindow;
- @DocsEditable @DomName('HTMLIFrameElement.height')
+ @DomName('HTMLIFrameElement.height')
+ @DocsEditable
String height;
- @DocsEditable @DomName('HTMLIFrameElement.name')
+ @DomName('HTMLIFrameElement.name')
+ @DocsEditable
String name;
- @DocsEditable @DomName('HTMLIFrameElement.sandbox')
+ @DomName('HTMLIFrameElement.sandbox')
+ @DocsEditable
String sandbox;
- @DocsEditable @DomName('HTMLIFrameElement.src')
+ @DomName('HTMLIFrameElement.src')
+ @DocsEditable
String src;
- @DocsEditable @DomName('HTMLIFrameElement.srcdoc')
+ @DomName('HTMLIFrameElement.srcdoc')
+ @DocsEditable
String srcdoc;
- @DocsEditable @DomName('HTMLIFrameElement.width')
+ @DomName('HTMLIFrameElement.width')
+ @DocsEditable
String width;
}
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-
-
-@DocsEditable
@DomName('ImageData')
+
class ImageData native "*ImageData" {
- @DocsEditable @DomName('ImageData.data')
- final Uint8ClampedArray data;
- @DocsEditable @DomName('ImageData.height')
+ @DomName('ImageData.data')
+ @DocsEditable
+ final List<int> data;
+
+ @DomName('ImageData.height')
+ @DocsEditable
final int height;
- @DocsEditable @DomName('ImageData.width')
+ @DomName('ImageData.width')
+ @DocsEditable
final int width;
+
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('HTMLImageElement')
class ImageElement extends Element native "*HTMLImageElement" {
@@ -11706,46 +12821,60 @@
return e;
}
- @DocsEditable @DomName('HTMLImageElement.alt')
+ @DomName('HTMLImageElement.alt')
+ @DocsEditable
String alt;
- @DocsEditable @DomName('HTMLImageElement.border')
+ @DomName('HTMLImageElement.border')
+ @DocsEditable
String border;
- @DocsEditable @DomName('HTMLImageElement.complete')
+ @DomName('HTMLImageElement.complete')
+ @DocsEditable
final bool complete;
- @DocsEditable @DomName('HTMLImageElement.crossOrigin')
+ @DomName('HTMLImageElement.crossOrigin')
+ @DocsEditable
String crossOrigin;
- @DocsEditable @DomName('HTMLImageElement.height')
+ @DomName('HTMLImageElement.height')
+ @DocsEditable
int height;
- @DocsEditable @DomName('HTMLImageElement.isMap')
+ @DomName('HTMLImageElement.isMap')
+ @DocsEditable
bool isMap;
- @DocsEditable @DomName('HTMLImageElement.lowsrc')
+ @DomName('HTMLImageElement.lowsrc')
+ @DocsEditable
String lowsrc;
- @DocsEditable @DomName('HTMLImageElement.naturalHeight')
+ @DomName('HTMLImageElement.naturalHeight')
+ @DocsEditable
final int naturalHeight;
- @DocsEditable @DomName('HTMLImageElement.naturalWidth')
+ @DomName('HTMLImageElement.naturalWidth')
+ @DocsEditable
final int naturalWidth;
- @DocsEditable @DomName('HTMLImageElement.src')
+ @DomName('HTMLImageElement.src')
+ @DocsEditable
String src;
- @DocsEditable @DomName('HTMLImageElement.useMap')
+ @DomName('HTMLImageElement.useMap')
+ @DocsEditable
String useMap;
- @DocsEditable @DomName('HTMLImageElement.width')
+ @DomName('HTMLImageElement.width')
+ @DocsEditable
int width;
- @DocsEditable @DomName('HTMLImageElement.x')
+ @DomName('HTMLImageElement.x')
+ @DocsEditable
final int x;
- @DocsEditable @DomName('HTMLImageElement.y')
+ @DomName('HTMLImageElement.y')
+ @DocsEditable
final int y;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -11753,7 +12882,6 @@
// BSD-style license that can be found in the LICENSE file.
-@DocsEditable
@DomName('HTMLInputElement')
class InputElement extends Element implements
HiddenInputElement,
@@ -11791,184 +12919,248 @@
return e;
}
+ @DomName('HTMLInputElement.webkitSpeechChange')
+ @DocsEditable
static const EventStreamProvider<Event> speechChangeEvent = const EventStreamProvider<Event>('webkitSpeechChange');
@DocsEditable
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
+ @deprecated
InputElementEvents get on =>
new InputElementEvents(this);
- @DocsEditable @DomName('HTMLInputElement.accept')
+ @DomName('HTMLInputElement.accept')
+ @DocsEditable
String accept;
- @DocsEditable @DomName('HTMLInputElement.alt')
+ @DomName('HTMLInputElement.alt')
+ @DocsEditable
String alt;
- @DocsEditable @DomName('HTMLInputElement.autocomplete')
+ @DomName('HTMLInputElement.autocomplete')
+ @DocsEditable
String autocomplete;
- @DocsEditable @DomName('HTMLInputElement.autofocus')
+ @DomName('HTMLInputElement.autofocus')
+ @DocsEditable
bool autofocus;
- @DocsEditable @DomName('HTMLInputElement.checked')
+ @DomName('HTMLInputElement.checked')
+ @DocsEditable
bool checked;
- @DocsEditable @DomName('HTMLInputElement.defaultChecked')
+ @DomName('HTMLInputElement.defaultChecked')
+ @DocsEditable
bool defaultChecked;
- @DocsEditable @DomName('HTMLInputElement.defaultValue')
+ @DomName('HTMLInputElement.defaultValue')
+ @DocsEditable
String defaultValue;
- @DocsEditable @DomName('HTMLInputElement.dirName')
+ @DomName('HTMLInputElement.dirName')
+ @DocsEditable
String dirName;
- @DocsEditable @DomName('HTMLInputElement.disabled')
+ @DomName('HTMLInputElement.disabled')
+ @DocsEditable
bool disabled;
- @DocsEditable @DomName('HTMLInputElement.files')
- @Returns('FileList') @Creates('FileList')
+ @DomName('HTMLInputElement.files')
+ @DocsEditable
+ @Returns('FileList')
+ @Creates('FileList')
List<File> files;
- @DocsEditable @DomName('HTMLInputElement.form')
+ @DomName('HTMLInputElement.form')
+ @DocsEditable
final FormElement form;
- @DocsEditable @DomName('HTMLInputElement.formAction')
+ @DomName('HTMLInputElement.formAction')
+ @DocsEditable
String formAction;
- @DocsEditable @DomName('HTMLInputElement.formEnctype')
+ @DomName('HTMLInputElement.formEnctype')
+ @DocsEditable
String formEnctype;
- @DocsEditable @DomName('HTMLInputElement.formMethod')
+ @DomName('HTMLInputElement.formMethod')
+ @DocsEditable
String formMethod;
- @DocsEditable @DomName('HTMLInputElement.formNoValidate')
+ @DomName('HTMLInputElement.formNoValidate')
+ @DocsEditable
bool formNoValidate;
- @DocsEditable @DomName('HTMLInputElement.formTarget')
+ @DomName('HTMLInputElement.formTarget')
+ @DocsEditable
String formTarget;
- @DocsEditable @DomName('HTMLInputElement.height')
+ @DomName('HTMLInputElement.height')
+ @DocsEditable
int height;
- @DocsEditable @DomName('HTMLInputElement.incremental')
+ @DomName('HTMLInputElement.incremental')
+ @DocsEditable
bool incremental;
- @DocsEditable @DomName('HTMLInputElement.indeterminate')
+ @DomName('HTMLInputElement.indeterminate')
+ @DocsEditable
bool indeterminate;
- @DocsEditable @DomName('HTMLInputElement.labels')
- @Returns('NodeList') @Creates('NodeList')
+ @DomName('HTMLInputElement.labels')
+ @DocsEditable
+ @Returns('NodeList')
+ @Creates('NodeList')
final List<Node> labels;
- @DocsEditable @DomName('HTMLInputElement.list')
+ @DomName('HTMLInputElement.list')
+ @DocsEditable
final Element list;
- @DocsEditable @DomName('HTMLInputElement.max')
+ @DomName('HTMLInputElement.max')
+ @DocsEditable
String max;
- @DocsEditable @DomName('HTMLInputElement.maxLength')
+ @DomName('HTMLInputElement.maxLength')
+ @DocsEditable
int maxLength;
- @DocsEditable @DomName('HTMLInputElement.min')
+ @DomName('HTMLInputElement.min')
+ @DocsEditable
String min;
- @DocsEditable @DomName('HTMLInputElement.multiple')
+ @DomName('HTMLInputElement.multiple')
+ @DocsEditable
bool multiple;
- @DocsEditable @DomName('HTMLInputElement.name')
+ @DomName('HTMLInputElement.name')
+ @DocsEditable
String name;
- @DocsEditable @DomName('HTMLInputElement.pattern')
+ @DomName('HTMLInputElement.pattern')
+ @DocsEditable
String pattern;
- @DocsEditable @DomName('HTMLInputElement.placeholder')
+ @DomName('HTMLInputElement.placeholder')
+ @DocsEditable
String placeholder;
- @DocsEditable @DomName('HTMLInputElement.readOnly')
+ @DomName('HTMLInputElement.readOnly')
+ @DocsEditable
bool readOnly;
- @DocsEditable @DomName('HTMLInputElement.required')
+ @DomName('HTMLInputElement.required')
+ @DocsEditable
bool required;
- @DocsEditable @DomName('HTMLInputElement.selectionDirection')
+ @DomName('HTMLInputElement.selectionDirection')
+ @DocsEditable
String selectionDirection;
- @DocsEditable @DomName('HTMLInputElement.selectionEnd')
+ @DomName('HTMLInputElement.selectionEnd')
+ @DocsEditable
int selectionEnd;
- @DocsEditable @DomName('HTMLInputElement.selectionStart')
+ @DomName('HTMLInputElement.selectionStart')
+ @DocsEditable
int selectionStart;
- @DocsEditable @DomName('HTMLInputElement.size')
+ @DomName('HTMLInputElement.size')
+ @DocsEditable
int size;
- @DocsEditable @DomName('HTMLInputElement.src')
+ @DomName('HTMLInputElement.src')
+ @DocsEditable
String src;
- @DocsEditable @DomName('HTMLInputElement.step')
+ @DomName('HTMLInputElement.step')
+ @DocsEditable
String step;
- @DocsEditable @DomName('HTMLInputElement.type')
+ @DomName('HTMLInputElement.type')
+ @DocsEditable
String type;
- @DocsEditable @DomName('HTMLInputElement.useMap')
+ @DomName('HTMLInputElement.useMap')
+ @DocsEditable
String useMap;
- @DocsEditable @DomName('HTMLInputElement.validationMessage')
+ @DomName('HTMLInputElement.validationMessage')
+ @DocsEditable
final String validationMessage;
- @DocsEditable @DomName('HTMLInputElement.validity')
+ @DomName('HTMLInputElement.validity')
+ @DocsEditable
final ValidityState validity;
- @DocsEditable @DomName('HTMLInputElement.value')
+ @DomName('HTMLInputElement.value')
+ @DocsEditable
String value;
- @DocsEditable @DomName('HTMLInputElement.valueAsDate')
+ @DomName('HTMLInputElement.valueAsDate')
+ @DocsEditable
Date valueAsDate;
- @DocsEditable @DomName('HTMLInputElement.valueAsNumber')
+ @DomName('HTMLInputElement.valueAsNumber')
+ @DocsEditable
num valueAsNumber;
- @DocsEditable @DomName('HTMLInputElement.webkitEntries')
- @Returns('_EntryArray') @Creates('_EntryArray')
+ @DomName('HTMLInputElement.webkitEntries')
+ @DocsEditable
+ @Returns('_EntryArray')
+ @Creates('_EntryArray')
final List<Entry> webkitEntries;
- @DocsEditable @DomName('HTMLInputElement.webkitGrammar')
+ @DomName('HTMLInputElement.webkitGrammar')
+ @DocsEditable
bool webkitGrammar;
- @DocsEditable @DomName('HTMLInputElement.webkitSpeech')
+ @DomName('HTMLInputElement.webkitSpeech')
+ @DocsEditable
bool webkitSpeech;
- @DocsEditable @DomName('HTMLInputElement.webkitdirectory')
+ @DomName('HTMLInputElement.webkitdirectory')
+ @DocsEditable
bool webkitdirectory;
- @DocsEditable @DomName('HTMLInputElement.width')
+ @DomName('HTMLInputElement.width')
+ @DocsEditable
int width;
- @DocsEditable @DomName('HTMLInputElement.willValidate')
+ @DomName('HTMLInputElement.willValidate')
+ @DocsEditable
final bool willValidate;
- @DocsEditable @DomName('HTMLInputElement.checkValidity')
+ @DomName('HTMLInputElement.checkValidity')
+ @DocsEditable
bool checkValidity() native;
- @DocsEditable @DomName('HTMLInputElement.select')
+ @DomName('HTMLInputElement.select')
+ @DocsEditable
void select() native;
- @DocsEditable @DomName('HTMLInputElement.setCustomValidity')
+ @DomName('HTMLInputElement.setCustomValidity')
+ @DocsEditable
void setCustomValidity(String error) native;
- @DocsEditable @DomName('HTMLInputElement.setRangeText')
+ @DomName('HTMLInputElement.setRangeText')
+ @DocsEditable
void setRangeText(String replacement, [int start, int end, String selectionMode]) native;
- @DocsEditable @DomName('HTMLInputElement.setSelectionRange')
+ @DomName('HTMLInputElement.setSelectionRange')
+ @DocsEditable
void setSelectionRange(int start, int end, [String direction]) native;
- @DocsEditable @DomName('HTMLInputElement.stepDown')
+ @DomName('HTMLInputElement.stepDown')
+ @DocsEditable
void stepDown([int n]) native;
- @DocsEditable @DomName('HTMLInputElement.stepUp')
+ @DomName('HTMLInputElement.stepUp')
+ @DocsEditable
void stepUp([int n]) native;
+ @DomName('HTMLInputElement.webkitSpeechChange')
+ @DocsEditable
Stream<Event> get onSpeechChange => speechChangeEvent.forTarget(this);
}
@@ -12240,12 +13432,12 @@
* Use [supported] to check if this is supported on the current platform.
*/
@SupportedBrowser(SupportedBrowser.CHROME, '25')
-@Experimental()
+@Experimental
abstract class DateTimeInputElement implements RangeInputElementBase {
factory DateTimeInputElement() => new InputElement(type: 'datetime');
@DomName('HTMLInputElement.valueAsDate')
- Date valueAsDate;
+ DateTime valueAsDate;
@DomName('HTMLInputElement.readOnly')
bool readOnly;
@@ -12265,12 +13457,12 @@
* Use [supported] to check if this is supported on the current platform.
*/
@SupportedBrowser(SupportedBrowser.CHROME, '25')
-@Experimental()
+@Experimental
abstract class DateInputElement implements RangeInputElementBase {
factory DateInputElement() => new InputElement(type: 'date');
@DomName('HTMLInputElement.valueAsDate')
- Date valueAsDate;
+ DateTime valueAsDate;
@DomName('HTMLInputElement.readOnly')
bool readOnly;
@@ -12290,12 +13482,12 @@
* Use [supported] to check if this is supported on the current platform.
*/
@SupportedBrowser(SupportedBrowser.CHROME, '25')
-@Experimental()
+@Experimental
abstract class MonthInputElement implements RangeInputElementBase {
factory MonthInputElement() => new InputElement(type: 'month');
@DomName('HTMLInputElement.valueAsDate')
- Date valueAsDate;
+ DateTime valueAsDate;
@DomName('HTMLInputElement.readOnly')
bool readOnly;
@@ -12315,12 +13507,12 @@
* Use [supported] to check if this is supported on the current platform.
*/
@SupportedBrowser(SupportedBrowser.CHROME, '25')
-@Experimental()
+@Experimental
abstract class WeekInputElement implements RangeInputElementBase {
factory WeekInputElement() => new InputElement(type: 'week');
@DomName('HTMLInputElement.valueAsDate')
- Date valueAsDate;
+ DateTime valueAsDate;
@DomName('HTMLInputElement.readOnly')
bool readOnly;
@@ -12340,12 +13532,12 @@
* Use [supported] to check if this is supported on the current platform.
*/
@SupportedBrowser(SupportedBrowser.CHROME)
-@Experimental()
+@Experimental
abstract class TimeInputElement implements RangeInputElementBase {
factory TimeInputElement() => new InputElement(type: 'time');
@DomName('HTMLInputElement.valueAsDate')
- Date valueAsDate;
+ DateTime valueAsDate;
@DomName('HTMLInputElement.readOnly')
bool readOnly;
@@ -12366,7 +13558,7 @@
* Use [supported] to check if this is supported on the current platform.
*/
@SupportedBrowser(SupportedBrowser.CHROME, '25')
-@Experimental()
+@Experimental
abstract class LocalDateTimeInputElement implements RangeInputElementBase {
factory LocalDateTimeInputElement() =>
new InputElement(type: 'datetime-local');
@@ -12389,7 +13581,7 @@
@SupportedBrowser(SupportedBrowser.CHROME)
@SupportedBrowser(SupportedBrowser.IE)
@SupportedBrowser(SupportedBrowser.SAFARI)
-@Experimental()
+@Experimental
abstract class NumberInputElement implements RangeInputElementBase {
factory NumberInputElement() => new InputElement(type: 'number');
@@ -12416,7 +13608,7 @@
*/
@SupportedBrowser(SupportedBrowser.CHROME)
@SupportedBrowser(SupportedBrowser.IE, '10')
-@Experimental()
+@Experimental
abstract class RangeInputElement implements RangeInputElementBase {
factory RangeInputElement() => new InputElement(type: 'range');
@@ -12556,6 +13748,7 @@
@DocsEditable
+@deprecated
class InputElementEvents extends ElementEvents {
@DocsEditable
InputElementEvents(EventTarget _ptr) : super(_ptr);
@@ -12568,7 +13761,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('Int16Array')
class Int16Array extends ArrayBufferView implements JavaScriptIndexingBehavior, List<int> native "*Int16Array" {
@@ -12584,7 +13776,8 @@
static const int BYTES_PER_ELEMENT = 2;
- @DocsEditable @DomName('Int16Array.length')
+ @DomName('Int16Array.length')
+ @DocsEditable
int get length => JS("int", "#.length", this);
int operator[](int index) => JS("int", "#[#]", this, index);
@@ -12609,11 +13802,13 @@
void forEach(void f(int element)) => IterableMixinWorkaround.forEach(this, f);
- String join([String separator]) => IterableMixinWorkaround.joinList(this, separator);
+ String join([String separator]) =>
+ IterableMixinWorkaround.joinList(this, separator);
List mappedBy(f(int element)) => IterableMixinWorkaround.mappedByList(this, f);
- Iterable<int> where(bool f(int element)) => IterableMixinWorkaround.where(this, f);
+ Iterable<int> where(bool f(int element)) =>
+ IterableMixinWorkaround.where(this, f);
bool every(bool f(int element)) => IterableMixinWorkaround.every(this, f);
@@ -12675,6 +13870,9 @@
throw new UnsupportedError("Cannot clear immutable List.");
}
+ List<int> get reversed =>
+ new ReversedListView<int>(this, 0, null);
+
void sort([int compare(int a, int b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -12703,9 +13901,11 @@
throw new StateError("More than one element");
}
- int min([int compare(int a, int b)]) => IterableMixinWorkaround.min(this, compare);
+ int min([int compare(int a, int b)]) =>
+ IterableMixinWorkaround.min(this, compare);
- int max([int compare(int a, int b)]) => IterableMixinWorkaround.max(this, compare);
+ int max([int compare(int a, int b)]) =>
+ IterableMixinWorkaround.max(this, compare);
int removeAt(int pos) {
throw new UnsupportedError("Cannot remove from immutable List.");
@@ -12753,10 +13953,12 @@
// -- end List<int> mixins.
@JSName('set')
- @DocsEditable @DomName('Int16Array.set')
+ @DomName('Int16Array.set')
+ @DocsEditable
void setElements(Object array, [int offset]) native;
- @DocsEditable @DomName('Int16Array.subarray')
+ @DomName('Int16Array.subarray')
+ @DocsEditable
Int16Array subarray(int start, [int end]) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -12764,7 +13966,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('Int32Array')
class Int32Array extends ArrayBufferView implements JavaScriptIndexingBehavior, List<int> native "*Int32Array" {
@@ -12780,7 +13981,8 @@
static const int BYTES_PER_ELEMENT = 4;
- @DocsEditable @DomName('Int32Array.length')
+ @DomName('Int32Array.length')
+ @DocsEditable
int get length => JS("int", "#.length", this);
int operator[](int index) => JS("int", "#[#]", this, index);
@@ -12805,11 +14007,13 @@
void forEach(void f(int element)) => IterableMixinWorkaround.forEach(this, f);
- String join([String separator]) => IterableMixinWorkaround.joinList(this, separator);
+ String join([String separator]) =>
+ IterableMixinWorkaround.joinList(this, separator);
List mappedBy(f(int element)) => IterableMixinWorkaround.mappedByList(this, f);
- Iterable<int> where(bool f(int element)) => IterableMixinWorkaround.where(this, f);
+ Iterable<int> where(bool f(int element)) =>
+ IterableMixinWorkaround.where(this, f);
bool every(bool f(int element)) => IterableMixinWorkaround.every(this, f);
@@ -12871,6 +14075,9 @@
throw new UnsupportedError("Cannot clear immutable List.");
}
+ List<int> get reversed =>
+ new ReversedListView<int>(this, 0, null);
+
void sort([int compare(int a, int b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -12899,9 +14106,11 @@
throw new StateError("More than one element");
}
- int min([int compare(int a, int b)]) => IterableMixinWorkaround.min(this, compare);
+ int min([int compare(int a, int b)]) =>
+ IterableMixinWorkaround.min(this, compare);
- int max([int compare(int a, int b)]) => IterableMixinWorkaround.max(this, compare);
+ int max([int compare(int a, int b)]) =>
+ IterableMixinWorkaround.max(this, compare);
int removeAt(int pos) {
throw new UnsupportedError("Cannot remove from immutable List.");
@@ -12949,10 +14158,12 @@
// -- end List<int> mixins.
@JSName('set')
- @DocsEditable @DomName('Int32Array.set')
+ @DomName('Int32Array.set')
+ @DocsEditable
void setElements(Object array, [int offset]) native;
- @DocsEditable @DomName('Int32Array.subarray')
+ @DomName('Int32Array.subarray')
+ @DocsEditable
Int32Array subarray(int start, [int end]) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -12960,7 +14171,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('Int8Array')
class Int8Array extends ArrayBufferView implements JavaScriptIndexingBehavior, List<int> native "*Int8Array" {
@@ -12976,7 +14186,8 @@
static const int BYTES_PER_ELEMENT = 1;
- @DocsEditable @DomName('Int8Array.length')
+ @DomName('Int8Array.length')
+ @DocsEditable
int get length => JS("int", "#.length", this);
int operator[](int index) => JS("int", "#[#]", this, index);
@@ -13001,11 +14212,13 @@
void forEach(void f(int element)) => IterableMixinWorkaround.forEach(this, f);
- String join([String separator]) => IterableMixinWorkaround.joinList(this, separator);
+ String join([String separator]) =>
+ IterableMixinWorkaround.joinList(this, separator);
List mappedBy(f(int element)) => IterableMixinWorkaround.mappedByList(this, f);
- Iterable<int> where(bool f(int element)) => IterableMixinWorkaround.where(this, f);
+ Iterable<int> where(bool f(int element)) =>
+ IterableMixinWorkaround.where(this, f);
bool every(bool f(int element)) => IterableMixinWorkaround.every(this, f);
@@ -13067,6 +14280,9 @@
throw new UnsupportedError("Cannot clear immutable List.");
}
+ List<int> get reversed =>
+ new ReversedListView<int>(this, 0, null);
+
void sort([int compare(int a, int b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -13095,9 +14311,11 @@
throw new StateError("More than one element");
}
- int min([int compare(int a, int b)]) => IterableMixinWorkaround.min(this, compare);
+ int min([int compare(int a, int b)]) =>
+ IterableMixinWorkaround.min(this, compare);
- int max([int compare(int a, int b)]) => IterableMixinWorkaround.max(this, compare);
+ int max([int compare(int a, int b)]) =>
+ IterableMixinWorkaround.max(this, compare);
int removeAt(int pos) {
throw new UnsupportedError("Cannot remove from immutable List.");
@@ -13145,10 +14363,12 @@
// -- end List<int> mixins.
@JSName('set')
- @DocsEditable @DomName('Int8Array.set')
+ @DomName('Int8Array.set')
+ @DocsEditable
void setElements(Object array, [int offset]) native;
- @DocsEditable @DomName('Int8Array.subarray')
+ @DomName('Int8Array.subarray')
+ @DocsEditable
Int8Array subarray(int start, [int end]) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -13156,7 +14376,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('JavaScriptCallFrame')
class JavaScriptCallFrame native "*JavaScriptCallFrame" {
@@ -13171,37 +14390,48 @@
static const int WITH_SCOPE = 2;
- @DocsEditable @DomName('JavaScriptCallFrame.caller')
+ @DomName('JavaScriptCallFrame.caller')
+ @DocsEditable
final JavaScriptCallFrame caller;
- @DocsEditable @DomName('JavaScriptCallFrame.column')
+ @DomName('JavaScriptCallFrame.column')
+ @DocsEditable
final int column;
- @DocsEditable @DomName('JavaScriptCallFrame.functionName')
+ @DomName('JavaScriptCallFrame.functionName')
+ @DocsEditable
final String functionName;
- @DocsEditable @DomName('JavaScriptCallFrame.line')
+ @DomName('JavaScriptCallFrame.line')
+ @DocsEditable
final int line;
- @DocsEditable @DomName('JavaScriptCallFrame.scopeChain')
+ @DomName('JavaScriptCallFrame.scopeChain')
+ @DocsEditable
final List scopeChain;
- @DocsEditable @DomName('JavaScriptCallFrame.sourceID')
+ @DomName('JavaScriptCallFrame.sourceID')
+ @DocsEditable
final int sourceID;
- @DocsEditable @DomName('JavaScriptCallFrame.thisObject')
+ @DomName('JavaScriptCallFrame.thisObject')
+ @DocsEditable
final Object thisObject;
- @DocsEditable @DomName('JavaScriptCallFrame.type')
+ @DomName('JavaScriptCallFrame.type')
+ @DocsEditable
final String type;
- @DocsEditable @DomName('JavaScriptCallFrame.evaluate')
+ @DomName('JavaScriptCallFrame.evaluate')
+ @DocsEditable
void evaluate(String script) native;
- @DocsEditable @DomName('JavaScriptCallFrame.restart')
+ @DomName('JavaScriptCallFrame.restart')
+ @DocsEditable
Object restart() native;
- @DocsEditable @DomName('JavaScriptCallFrame.scopeType')
+ @DomName('JavaScriptCallFrame.scopeType')
+ @DocsEditable
int scopeType(int scopeIndex) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -13212,11 +14442,14 @@
@DomName('KeyboardEvent')
class KeyboardEvent extends UIEvent native "*KeyboardEvent" {
- factory KeyboardEvent(String type, Window view,
- [bool canBubble = true, bool cancelable = true,
- String keyIdentifier = "", int keyLocation = 1, bool ctrlKey = false,
- bool altKey = false, bool shiftKey = false, bool metaKey = false,
- bool altGraphKey = false]) {
+ factory KeyboardEvent(String type,
+ {Window view, bool canBubble: true, bool cancelable: true,
+ String keyIdentifier: "", int keyLocation: 1, bool ctrlKey: false,
+ bool altKey: false, bool shiftKey: false, bool metaKey: false,
+ bool altGraphKey: false}) {
+ if (view == null) {
+ view = window;
+ }
final e = document.$dom_createEvent("KeyboardEvent");
e.$dom_initKeyboardEvent(type, canBubble, cancelable, view, keyIdentifier,
keyLocation, ctrlKey, altKey, shiftKey, metaKey, altGraphKey);
@@ -13249,26 +14482,33 @@
@DomName('KeyboardEvent.charCode')
int get charCode => $dom_charCode;
- @DocsEditable @DomName('KeyboardEvent.altGraphKey')
+ @DomName('KeyboardEvent.altGraphKey')
+ @DocsEditable
final bool altGraphKey;
- @DocsEditable @DomName('KeyboardEvent.altKey')
+ @DomName('KeyboardEvent.altKey')
+ @DocsEditable
final bool altKey;
- @DocsEditable @DomName('KeyboardEvent.ctrlKey')
+ @DomName('KeyboardEvent.ctrlKey')
+ @DocsEditable
final bool ctrlKey;
@JSName('keyIdentifier')
- @DocsEditable @DomName('KeyboardEvent.keyIdentifier')
+ @DomName('KeyboardEvent.keyIdentifier')
+ @DocsEditable
final String $dom_keyIdentifier;
- @DocsEditable @DomName('KeyboardEvent.keyLocation')
+ @DomName('KeyboardEvent.keyLocation')
+ @DocsEditable
final int keyLocation;
- @DocsEditable @DomName('KeyboardEvent.metaKey')
+ @DomName('KeyboardEvent.metaKey')
+ @DocsEditable
final bool metaKey;
- @DocsEditable @DomName('KeyboardEvent.shiftKey')
+ @DomName('KeyboardEvent.shiftKey')
+ @DocsEditable
final bool shiftKey;
}
@@ -13277,12 +14517,11 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('HTMLKeygenElement')
@SupportedBrowser(SupportedBrowser.CHROME)
@SupportedBrowser(SupportedBrowser.SAFARI)
-@Experimental()
+@Experimental
class KeygenElement extends Element native "*HTMLKeygenElement" {
@DocsEditable
@@ -13291,44 +14530,58 @@
/// Checks if this type is supported on the current platform.
static bool get supported => Element.isTagSupported('keygen') && (new Element.tag('keygen') is KeygenElement);
- @DocsEditable @DomName('HTMLKeygenElement.autofocus')
+ @DomName('HTMLKeygenElement.autofocus')
+ @DocsEditable
bool autofocus;
- @DocsEditable @DomName('HTMLKeygenElement.challenge')
+ @DomName('HTMLKeygenElement.challenge')
+ @DocsEditable
String challenge;
- @DocsEditable @DomName('HTMLKeygenElement.disabled')
+ @DomName('HTMLKeygenElement.disabled')
+ @DocsEditable
bool disabled;
- @DocsEditable @DomName('HTMLKeygenElement.form')
+ @DomName('HTMLKeygenElement.form')
+ @DocsEditable
final FormElement form;
- @DocsEditable @DomName('HTMLKeygenElement.keytype')
+ @DomName('HTMLKeygenElement.keytype')
+ @DocsEditable
String keytype;
- @DocsEditable @DomName('HTMLKeygenElement.labels')
- @Returns('NodeList') @Creates('NodeList')
+ @DomName('HTMLKeygenElement.labels')
+ @DocsEditable
+ @Returns('NodeList')
+ @Creates('NodeList')
final List<Node> labels;
- @DocsEditable @DomName('HTMLKeygenElement.name')
+ @DomName('HTMLKeygenElement.name')
+ @DocsEditable
String name;
- @DocsEditable @DomName('HTMLKeygenElement.type')
+ @DomName('HTMLKeygenElement.type')
+ @DocsEditable
final String type;
- @DocsEditable @DomName('HTMLKeygenElement.validationMessage')
+ @DomName('HTMLKeygenElement.validationMessage')
+ @DocsEditable
final String validationMessage;
- @DocsEditable @DomName('HTMLKeygenElement.validity')
+ @DomName('HTMLKeygenElement.validity')
+ @DocsEditable
final ValidityState validity;
- @DocsEditable @DomName('HTMLKeygenElement.willValidate')
+ @DomName('HTMLKeygenElement.willValidate')
+ @DocsEditable
final bool willValidate;
- @DocsEditable @DomName('HTMLKeygenElement.checkValidity')
+ @DomName('HTMLKeygenElement.checkValidity')
+ @DocsEditable
bool checkValidity() native;
- @DocsEditable @DomName('HTMLKeygenElement.setCustomValidity')
+ @DomName('HTMLKeygenElement.setCustomValidity')
+ @DocsEditable
void setCustomValidity(String error) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -13336,7 +14589,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('HTMLLIElement')
class LIElement extends Element native "*HTMLLIElement" {
@@ -13344,10 +14596,12 @@
@DocsEditable
factory LIElement() => document.$dom_createElement("li");
- @DocsEditable @DomName('HTMLLIElement.type')
+ @DomName('HTMLLIElement.type')
+ @DocsEditable
String type;
- @DocsEditable @DomName('HTMLLIElement.value')
+ @DomName('HTMLLIElement.value')
+ @DocsEditable
int value;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -13355,7 +14609,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('HTMLLabelElement')
class LabelElement extends Element native "*HTMLLabelElement" {
@@ -13363,13 +14616,16 @@
@DocsEditable
factory LabelElement() => document.$dom_createElement("label");
- @DocsEditable @DomName('HTMLLabelElement.control')
+ @DomName('HTMLLabelElement.control')
+ @DocsEditable
final Element control;
- @DocsEditable @DomName('HTMLLabelElement.form')
+ @DomName('HTMLLabelElement.form')
+ @DocsEditable
final FormElement form;
- @DocsEditable @DomName('HTMLLabelElement.htmlFor')
+ @DomName('HTMLLabelElement.htmlFor')
+ @DocsEditable
String htmlFor;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -13377,7 +14633,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('HTMLLegendElement')
class LegendElement extends Element native "*HTMLLegendElement" {
@@ -13385,7 +14640,8 @@
@DocsEditable
factory LegendElement() => document.$dom_createElement("legend");
- @DocsEditable @DomName('HTMLLegendElement.form')
+ @DomName('HTMLLegendElement.form')
+ @DocsEditable
final FormElement form;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -13393,7 +14649,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('HTMLLinkElement')
class LinkElement extends Element native "*HTMLLinkElement" {
@@ -13401,28 +14656,36 @@
@DocsEditable
factory LinkElement() => document.$dom_createElement("link");
- @DocsEditable @DomName('HTMLLinkElement.disabled')
+ @DomName('HTMLLinkElement.disabled')
+ @DocsEditable
bool disabled;
- @DocsEditable @DomName('HTMLLinkElement.href')
+ @DomName('HTMLLinkElement.href')
+ @DocsEditable
String href;
- @DocsEditable @DomName('HTMLLinkElement.hreflang')
+ @DomName('HTMLLinkElement.hreflang')
+ @DocsEditable
String hreflang;
- @DocsEditable @DomName('HTMLLinkElement.media')
+ @DomName('HTMLLinkElement.media')
+ @DocsEditable
String media;
- @DocsEditable @DomName('HTMLLinkElement.rel')
+ @DomName('HTMLLinkElement.rel')
+ @DocsEditable
String rel;
- @DocsEditable @DomName('HTMLLinkElement.sheet')
+ @DomName('HTMLLinkElement.sheet')
+ @DocsEditable
final StyleSheet sheet;
- @DocsEditable @DomName('HTMLLinkElement.sizes')
+ @DomName('HTMLLinkElement.sizes')
+ @DocsEditable
DomSettableTokenList sizes;
- @DocsEditable @DomName('HTMLLinkElement.type')
+ @DomName('HTMLLinkElement.type')
+ @DocsEditable
String type;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -13430,12 +14693,12 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('LocalMediaStream')
class LocalMediaStream extends MediaStream implements EventTarget native "*LocalMediaStream" {
- @DocsEditable @DomName('LocalMediaStream.stop')
+ @DomName('LocalMediaStream.stop')
+ @DocsEditable
void stop() native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -13443,52 +14706,66 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('Location')
class Location implements LocationBase native "*Location" {
- @DocsEditable @DomName('Location.ancestorOrigins')
- @Returns('DomStringList') @Creates('DomStringList')
+ @DomName('Location.ancestorOrigins')
+ @DocsEditable
+ @Returns('DomStringList')
+ @Creates('DomStringList')
final List<String> ancestorOrigins;
- @DocsEditable @DomName('Location.hash')
+ @DomName('Location.hash')
+ @DocsEditable
String hash;
- @DocsEditable @DomName('Location.host')
+ @DomName('Location.host')
+ @DocsEditable
String host;
- @DocsEditable @DomName('Location.hostname')
+ @DomName('Location.hostname')
+ @DocsEditable
String hostname;
- @DocsEditable @DomName('Location.href')
+ @DomName('Location.href')
+ @DocsEditable
String href;
- @DocsEditable @DomName('Location.origin')
+ @DomName('Location.origin')
+ @DocsEditable
final String origin;
- @DocsEditable @DomName('Location.pathname')
+ @DomName('Location.pathname')
+ @DocsEditable
String pathname;
- @DocsEditable @DomName('Location.port')
+ @DomName('Location.port')
+ @DocsEditable
String port;
- @DocsEditable @DomName('Location.protocol')
+ @DomName('Location.protocol')
+ @DocsEditable
String protocol;
- @DocsEditable @DomName('Location.search')
+ @DomName('Location.search')
+ @DocsEditable
String search;
- @DocsEditable @DomName('Location.assign')
+ @DomName('Location.assign')
+ @DocsEditable
void assign(String url) native;
- @DocsEditable @DomName('Location.reload')
+ @DomName('Location.reload')
+ @DocsEditable
void reload() native;
- @DocsEditable @DomName('Location.replace')
+ @DomName('Location.replace')
+ @DocsEditable
void replace(String url) native;
- @DocsEditable @DomName('Location.toString')
+ @DomName('Location.toString')
+ @DocsEditable
String toString() native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -13496,7 +14773,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('HTMLMapElement')
class MapElement extends Element native "*HTMLMapElement" {
@@ -13504,10 +14780,12 @@
@DocsEditable
factory MapElement() => document.$dom_createElement("map");
- @DocsEditable @DomName('HTMLMapElement.areas')
+ @DomName('HTMLMapElement.areas')
+ @DocsEditable
final HtmlCollection areas;
- @DocsEditable @DomName('HTMLMapElement.name')
+ @DomName('HTMLMapElement.name')
+ @DocsEditable
String name;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -13515,7 +14793,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('MediaController')
class MediaController extends EventTarget native "*MediaController" {
@@ -13524,58 +14801,74 @@
factory MediaController() => MediaController._create();
static MediaController _create() => JS('MediaController', 'new MediaController()');
- @DocsEditable @DomName('MediaController.buffered')
+ @DomName('MediaController.buffered')
+ @DocsEditable
final TimeRanges buffered;
- @DocsEditable @DomName('MediaController.currentTime')
+ @DomName('MediaController.currentTime')
+ @DocsEditable
num currentTime;
- @DocsEditable @DomName('MediaController.defaultPlaybackRate')
+ @DomName('MediaController.defaultPlaybackRate')
+ @DocsEditable
num defaultPlaybackRate;
- @DocsEditable @DomName('MediaController.duration')
+ @DomName('MediaController.duration')
+ @DocsEditable
final num duration;
- @DocsEditable @DomName('MediaController.muted')
+ @DomName('MediaController.muted')
+ @DocsEditable
bool muted;
- @DocsEditable @DomName('MediaController.paused')
+ @DomName('MediaController.paused')
+ @DocsEditable
final bool paused;
- @DocsEditable @DomName('MediaController.playbackRate')
+ @DomName('MediaController.playbackRate')
+ @DocsEditable
num playbackRate;
- @DocsEditable @DomName('MediaController.playbackState')
+ @DomName('MediaController.playbackState')
+ @DocsEditable
final String playbackState;
- @DocsEditable @DomName('MediaController.played')
+ @DomName('MediaController.played')
+ @DocsEditable
final TimeRanges played;
- @DocsEditable @DomName('MediaController.seekable')
+ @DomName('MediaController.seekable')
+ @DocsEditable
final TimeRanges seekable;
- @DocsEditable @DomName('MediaController.volume')
+ @DomName('MediaController.volume')
+ @DocsEditable
num volume;
@JSName('addEventListener')
- @DocsEditable @DomName('MediaController.addEventListener')
+ @DomName('MediaController.addEventListener')
+ @DocsEditable
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native;
- @JSName('dispatchEvent')
- @DocsEditable @DomName('MediaController.dispatchEvent')
- bool $dom_dispatchEvent(Event evt) native;
+ @DomName('MediaController.dispatchEvent')
+ @DocsEditable
+ bool dispatchEvent(Event evt) native;
- @DocsEditable @DomName('MediaController.pause')
+ @DomName('MediaController.pause')
+ @DocsEditable
void pause() native;
- @DocsEditable @DomName('MediaController.play')
+ @DomName('MediaController.play')
+ @DocsEditable
void play() native;
@JSName('removeEventListener')
- @DocsEditable @DomName('MediaController.removeEventListener')
+ @DomName('MediaController.removeEventListener')
+ @DocsEditable
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native;
- @DocsEditable @DomName('MediaController.unpause')
+ @DomName('MediaController.unpause')
+ @DocsEditable
void unpause() native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -13583,63 +14876,113 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('HTMLMediaElement')
class MediaElement extends Element native "*HTMLMediaElement" {
+ @DomName('HTMLMediaElement.canplay')
+ @DocsEditable
static const EventStreamProvider<Event> canPlayEvent = const EventStreamProvider<Event>('canplay');
+ @DomName('HTMLMediaElement.canplaythrough')
+ @DocsEditable
static const EventStreamProvider<Event> canPlayThroughEvent = const EventStreamProvider<Event>('canplaythrough');
+ @DomName('HTMLMediaElement.durationchange')
+ @DocsEditable
static const EventStreamProvider<Event> durationChangeEvent = const EventStreamProvider<Event>('durationchange');
+ @DomName('HTMLMediaElement.emptied')
+ @DocsEditable
static const EventStreamProvider<Event> emptiedEvent = const EventStreamProvider<Event>('emptied');
+ @DomName('HTMLMediaElement.ended')
+ @DocsEditable
static const EventStreamProvider<Event> endedEvent = const EventStreamProvider<Event>('ended');
+ @DomName('HTMLMediaElement.loadeddata')
+ @DocsEditable
static const EventStreamProvider<Event> loadedDataEvent = const EventStreamProvider<Event>('loadeddata');
+ @DomName('HTMLMediaElement.loadedmetadata')
+ @DocsEditable
static const EventStreamProvider<Event> loadedMetadataEvent = const EventStreamProvider<Event>('loadedmetadata');
+ @DomName('HTMLMediaElement.loadstart')
+ @DocsEditable
static const EventStreamProvider<Event> loadStartEvent = const EventStreamProvider<Event>('loadstart');
+ @DomName('HTMLMediaElement.pause')
+ @DocsEditable
static const EventStreamProvider<Event> pauseEvent = const EventStreamProvider<Event>('pause');
+ @DomName('HTMLMediaElement.play')
+ @DocsEditable
static const EventStreamProvider<Event> playEvent = const EventStreamProvider<Event>('play');
+ @DomName('HTMLMediaElement.playing')
+ @DocsEditable
static const EventStreamProvider<Event> playingEvent = const EventStreamProvider<Event>('playing');
+ @DomName('HTMLMediaElement.progress')
+ @DocsEditable
static const EventStreamProvider<Event> progressEvent = const EventStreamProvider<Event>('progress');
+ @DomName('HTMLMediaElement.ratechange')
+ @DocsEditable
static const EventStreamProvider<Event> rateChangeEvent = const EventStreamProvider<Event>('ratechange');
+ @DomName('HTMLMediaElement.seeked')
+ @DocsEditable
static const EventStreamProvider<Event> seekedEvent = const EventStreamProvider<Event>('seeked');
+ @DomName('HTMLMediaElement.seeking')
+ @DocsEditable
static const EventStreamProvider<Event> seekingEvent = const EventStreamProvider<Event>('seeking');
+ @DomName('HTMLMediaElement.show')
+ @DocsEditable
static const EventStreamProvider<Event> showEvent = const EventStreamProvider<Event>('show');
+ @DomName('HTMLMediaElement.stalled')
+ @DocsEditable
static const EventStreamProvider<Event> stalledEvent = const EventStreamProvider<Event>('stalled');
+ @DomName('HTMLMediaElement.suspend')
+ @DocsEditable
static const EventStreamProvider<Event> suspendEvent = const EventStreamProvider<Event>('suspend');
+ @DomName('HTMLMediaElement.timeupdate')
+ @DocsEditable
static const EventStreamProvider<Event> timeUpdateEvent = const EventStreamProvider<Event>('timeupdate');
+ @DomName('HTMLMediaElement.volumechange')
+ @DocsEditable
static const EventStreamProvider<Event> volumeChangeEvent = const EventStreamProvider<Event>('volumechange');
+ @DomName('HTMLMediaElement.waiting')
+ @DocsEditable
static const EventStreamProvider<Event> waitingEvent = const EventStreamProvider<Event>('waiting');
+ @DomName('HTMLMediaElement.webkitkeyadded')
+ @DocsEditable
static const EventStreamProvider<MediaKeyEvent> keyAddedEvent = const EventStreamProvider<MediaKeyEvent>('webkitkeyadded');
+ @DomName('HTMLMediaElement.webkitkeyerror')
+ @DocsEditable
static const EventStreamProvider<MediaKeyEvent> keyErrorEvent = const EventStreamProvider<MediaKeyEvent>('webkitkeyerror');
+ @DomName('HTMLMediaElement.webkitkeymessage')
+ @DocsEditable
static const EventStreamProvider<MediaKeyEvent> keyMessageEvent = const EventStreamProvider<MediaKeyEvent>('webkitkeymessage');
+ @DomName('HTMLMediaElement.webkitneedkey')
+ @DocsEditable
static const EventStreamProvider<MediaKeyEvent> needKeyEvent = const EventStreamProvider<MediaKeyEvent>('webkitneedkey');
@DocsEditable
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
+ @deprecated
MediaElementEvents get on =>
new MediaElementEvents(this);
@@ -13661,178 +15004,269 @@
static const int NETWORK_NO_SOURCE = 3;
- @DocsEditable @DomName('HTMLMediaElement.autoplay')
+ @DomName('HTMLMediaElement.autoplay')
+ @DocsEditable
bool autoplay;
- @DocsEditable @DomName('HTMLMediaElement.buffered')
+ @DomName('HTMLMediaElement.buffered')
+ @DocsEditable
final TimeRanges buffered;
- @DocsEditable @DomName('HTMLMediaElement.controller')
+ @DomName('HTMLMediaElement.controller')
+ @DocsEditable
MediaController controller;
- @DocsEditable @DomName('HTMLMediaElement.controls')
+ @DomName('HTMLMediaElement.controls')
+ @DocsEditable
bool controls;
- @DocsEditable @DomName('HTMLMediaElement.currentSrc')
+ @DomName('HTMLMediaElement.currentSrc')
+ @DocsEditable
final String currentSrc;
- @DocsEditable @DomName('HTMLMediaElement.currentTime')
+ @DomName('HTMLMediaElement.currentTime')
+ @DocsEditable
num currentTime;
- @DocsEditable @DomName('HTMLMediaElement.defaultMuted')
+ @DomName('HTMLMediaElement.defaultMuted')
+ @DocsEditable
bool defaultMuted;
- @DocsEditable @DomName('HTMLMediaElement.defaultPlaybackRate')
+ @DomName('HTMLMediaElement.defaultPlaybackRate')
+ @DocsEditable
num defaultPlaybackRate;
- @DocsEditable @DomName('HTMLMediaElement.duration')
+ @DomName('HTMLMediaElement.duration')
+ @DocsEditable
final num duration;
- @DocsEditable @DomName('HTMLMediaElement.ended')
+ @DomName('HTMLMediaElement.ended')
+ @DocsEditable
final bool ended;
- @DocsEditable @DomName('HTMLMediaElement.error')
+ @DomName('HTMLMediaElement.error')
+ @DocsEditable
final MediaError error;
- @DocsEditable @DomName('HTMLMediaElement.initialTime')
+ @DomName('HTMLMediaElement.initialTime')
+ @DocsEditable
final num initialTime;
- @DocsEditable @DomName('HTMLMediaElement.loop')
+ @DomName('HTMLMediaElement.loop')
+ @DocsEditable
bool loop;
- @DocsEditable @DomName('HTMLMediaElement.mediaGroup')
+ @DomName('HTMLMediaElement.mediaGroup')
+ @DocsEditable
String mediaGroup;
- @DocsEditable @DomName('HTMLMediaElement.muted')
+ @DomName('HTMLMediaElement.muted')
+ @DocsEditable
bool muted;
- @DocsEditable @DomName('HTMLMediaElement.networkState')
+ @DomName('HTMLMediaElement.networkState')
+ @DocsEditable
final int networkState;
- @DocsEditable @DomName('HTMLMediaElement.paused')
+ @DomName('HTMLMediaElement.paused')
+ @DocsEditable
final bool paused;
- @DocsEditable @DomName('HTMLMediaElement.playbackRate')
+ @DomName('HTMLMediaElement.playbackRate')
+ @DocsEditable
num playbackRate;
- @DocsEditable @DomName('HTMLMediaElement.played')
+ @DomName('HTMLMediaElement.played')
+ @DocsEditable
final TimeRanges played;
- @DocsEditable @DomName('HTMLMediaElement.preload')
+ @DomName('HTMLMediaElement.preload')
+ @DocsEditable
String preload;
- @DocsEditable @DomName('HTMLMediaElement.readyState')
+ @DomName('HTMLMediaElement.readyState')
+ @DocsEditable
final int readyState;
- @DocsEditable @DomName('HTMLMediaElement.seekable')
+ @DomName('HTMLMediaElement.seekable')
+ @DocsEditable
final TimeRanges seekable;
- @DocsEditable @DomName('HTMLMediaElement.seeking')
+ @DomName('HTMLMediaElement.seeking')
+ @DocsEditable
final bool seeking;
- @DocsEditable @DomName('HTMLMediaElement.src')
+ @DomName('HTMLMediaElement.src')
+ @DocsEditable
String src;
- @DocsEditable @DomName('HTMLMediaElement.startTime')
+ @DomName('HTMLMediaElement.startTime')
+ @DocsEditable
final num startTime;
- @DocsEditable @DomName('HTMLMediaElement.textTracks')
+ @DomName('HTMLMediaElement.textTracks')
+ @DocsEditable
final TextTrackList textTracks;
- @DocsEditable @DomName('HTMLMediaElement.volume')
+ @DomName('HTMLMediaElement.volume')
+ @DocsEditable
num volume;
- @DocsEditable @DomName('HTMLMediaElement.webkitAudioDecodedByteCount')
+ @DomName('HTMLMediaElement.webkitAudioDecodedByteCount')
+ @DocsEditable
final int webkitAudioDecodedByteCount;
- @DocsEditable @DomName('HTMLMediaElement.webkitClosedCaptionsVisible')
+ @DomName('HTMLMediaElement.webkitClosedCaptionsVisible')
+ @DocsEditable
bool webkitClosedCaptionsVisible;
- @DocsEditable @DomName('HTMLMediaElement.webkitHasClosedCaptions')
+ @DomName('HTMLMediaElement.webkitHasClosedCaptions')
+ @DocsEditable
final bool webkitHasClosedCaptions;
- @DocsEditable @DomName('HTMLMediaElement.webkitPreservesPitch')
+ @DomName('HTMLMediaElement.webkitPreservesPitch')
+ @DocsEditable
bool webkitPreservesPitch;
- @DocsEditable @DomName('HTMLMediaElement.webkitVideoDecodedByteCount')
+ @DomName('HTMLMediaElement.webkitVideoDecodedByteCount')
+ @DocsEditable
final int webkitVideoDecodedByteCount;
- @DocsEditable @DomName('HTMLMediaElement.addTextTrack')
+ @DomName('HTMLMediaElement.addTextTrack')
+ @DocsEditable
TextTrack addTextTrack(String kind, [String label, String language]) native;
- @DocsEditable @DomName('HTMLMediaElement.canPlayType')
+ @DomName('HTMLMediaElement.canPlayType')
+ @DocsEditable
String canPlayType(String type, String keySystem) native;
- @DocsEditable @DomName('HTMLMediaElement.load')
+ @DomName('HTMLMediaElement.load')
+ @DocsEditable
void load() native;
- @DocsEditable @DomName('HTMLMediaElement.pause')
+ @DomName('HTMLMediaElement.pause')
+ @DocsEditable
void pause() native;
- @DocsEditable @DomName('HTMLMediaElement.play')
+ @DomName('HTMLMediaElement.play')
+ @DocsEditable
void play() native;
- @DocsEditable @DomName('HTMLMediaElement.webkitAddKey')
+ @DomName('HTMLMediaElement.webkitAddKey')
+ @DocsEditable
void webkitAddKey(String keySystem, Uint8Array key, [Uint8Array initData, String sessionId]) native;
- @DocsEditable @DomName('HTMLMediaElement.webkitCancelKeyRequest')
+ @DomName('HTMLMediaElement.webkitCancelKeyRequest')
+ @DocsEditable
void webkitCancelKeyRequest(String keySystem, String sessionId) native;
- @DocsEditable @DomName('HTMLMediaElement.webkitGenerateKeyRequest')
+ @DomName('HTMLMediaElement.webkitGenerateKeyRequest')
+ @DocsEditable
void webkitGenerateKeyRequest(String keySystem, [Uint8Array initData]) native;
+ @DomName('HTMLMediaElement.canplay')
+ @DocsEditable
Stream<Event> get onCanPlay => canPlayEvent.forTarget(this);
+ @DomName('HTMLMediaElement.canplaythrough')
+ @DocsEditable
Stream<Event> get onCanPlayThrough => canPlayThroughEvent.forTarget(this);
+ @DomName('HTMLMediaElement.durationchange')
+ @DocsEditable
Stream<Event> get onDurationChange => durationChangeEvent.forTarget(this);
+ @DomName('HTMLMediaElement.emptied')
+ @DocsEditable
Stream<Event> get onEmptied => emptiedEvent.forTarget(this);
+ @DomName('HTMLMediaElement.ended')
+ @DocsEditable
Stream<Event> get onEnded => endedEvent.forTarget(this);
+ @DomName('HTMLMediaElement.loadeddata')
+ @DocsEditable
Stream<Event> get onLoadedData => loadedDataEvent.forTarget(this);
+ @DomName('HTMLMediaElement.loadedmetadata')
+ @DocsEditable
Stream<Event> get onLoadedMetadata => loadedMetadataEvent.forTarget(this);
+ @DomName('HTMLMediaElement.loadstart')
+ @DocsEditable
Stream<Event> get onLoadStart => loadStartEvent.forTarget(this);
+ @DomName('HTMLMediaElement.pause')
+ @DocsEditable
Stream<Event> get onPause => pauseEvent.forTarget(this);
+ @DomName('HTMLMediaElement.play')
+ @DocsEditable
Stream<Event> get onPlay => playEvent.forTarget(this);
+ @DomName('HTMLMediaElement.playing')
+ @DocsEditable
Stream<Event> get onPlaying => playingEvent.forTarget(this);
+ @DomName('HTMLMediaElement.progress')
+ @DocsEditable
Stream<Event> get onProgress => progressEvent.forTarget(this);
+ @DomName('HTMLMediaElement.ratechange')
+ @DocsEditable
Stream<Event> get onRateChange => rateChangeEvent.forTarget(this);
+ @DomName('HTMLMediaElement.seeked')
+ @DocsEditable
Stream<Event> get onSeeked => seekedEvent.forTarget(this);
+ @DomName('HTMLMediaElement.seeking')
+ @DocsEditable
Stream<Event> get onSeeking => seekingEvent.forTarget(this);
+ @DomName('HTMLMediaElement.show')
+ @DocsEditable
Stream<Event> get onShow => showEvent.forTarget(this);
+ @DomName('HTMLMediaElement.stalled')
+ @DocsEditable
Stream<Event> get onStalled => stalledEvent.forTarget(this);
+ @DomName('HTMLMediaElement.suspend')
+ @DocsEditable
Stream<Event> get onSuspend => suspendEvent.forTarget(this);
+ @DomName('HTMLMediaElement.timeupdate')
+ @DocsEditable
Stream<Event> get onTimeUpdate => timeUpdateEvent.forTarget(this);
+ @DomName('HTMLMediaElement.volumechange')
+ @DocsEditable
Stream<Event> get onVolumeChange => volumeChangeEvent.forTarget(this);
+ @DomName('HTMLMediaElement.waiting')
+ @DocsEditable
Stream<Event> get onWaiting => waitingEvent.forTarget(this);
+ @DomName('HTMLMediaElement.webkitkeyadded')
+ @DocsEditable
Stream<MediaKeyEvent> get onKeyAdded => keyAddedEvent.forTarget(this);
+ @DomName('HTMLMediaElement.webkitkeyerror')
+ @DocsEditable
Stream<MediaKeyEvent> get onKeyError => keyErrorEvent.forTarget(this);
+ @DomName('HTMLMediaElement.webkitkeymessage')
+ @DocsEditable
Stream<MediaKeyEvent> get onKeyMessage => keyMessageEvent.forTarget(this);
+ @DomName('HTMLMediaElement.webkitneedkey')
+ @DocsEditable
Stream<MediaKeyEvent> get onNeedKey => needKeyEvent.forTarget(this);
}
@DocsEditable
+@deprecated
class MediaElementEvents extends ElementEvents {
@DocsEditable
MediaElementEvents(EventTarget _ptr) : super(_ptr);
@@ -13917,7 +15351,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('MediaError')
class MediaError native "*MediaError" {
@@ -13932,7 +15365,8 @@
static const int MEDIA_ERR_SRC_NOT_SUPPORTED = 4;
- @DocsEditable @DomName('MediaError.code')
+ @DomName('MediaError.code')
+ @DocsEditable
final int code;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -13940,7 +15374,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('MediaKeyError')
class MediaKeyError native "*MediaKeyError" {
@@ -13957,7 +15390,8 @@
static const int MEDIA_KEYERR_UNKNOWN = 1;
- @DocsEditable @DomName('MediaKeyError.code')
+ @DomName('MediaKeyError.code')
+ @DocsEditable
final int code;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -13965,31 +15399,37 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('MediaKeyEvent')
class MediaKeyEvent extends Event native "*MediaKeyEvent" {
@JSName('defaultURL')
- @DocsEditable @DomName('MediaKeyEvent.defaultURL')
+ @DomName('MediaKeyEvent.defaultURL')
+ @DocsEditable
final String defaultUrl;
- @DocsEditable @DomName('MediaKeyEvent.errorCode')
+ @DomName('MediaKeyEvent.errorCode')
+ @DocsEditable
final MediaKeyError errorCode;
- @DocsEditable @DomName('MediaKeyEvent.initData')
+ @DomName('MediaKeyEvent.initData')
+ @DocsEditable
final Uint8Array initData;
- @DocsEditable @DomName('MediaKeyEvent.keySystem')
+ @DomName('MediaKeyEvent.keySystem')
+ @DocsEditable
final String keySystem;
- @DocsEditable @DomName('MediaKeyEvent.message')
+ @DomName('MediaKeyEvent.message')
+ @DocsEditable
final Uint8Array message;
- @DocsEditable @DomName('MediaKeyEvent.sessionId')
+ @DomName('MediaKeyEvent.sessionId')
+ @DocsEditable
final String sessionId;
- @DocsEditable @DomName('MediaKeyEvent.systemCode')
+ @DomName('MediaKeyEvent.systemCode')
+ @DocsEditable
final int systemCode;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -13997,24 +15437,28 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('MediaList')
class MediaList native "*MediaList" {
- @DocsEditable @DomName('MediaList.length')
+ @DomName('MediaList.length')
+ @DocsEditable
final int length;
- @DocsEditable @DomName('MediaList.mediaText')
+ @DomName('MediaList.mediaText')
+ @DocsEditable
String mediaText;
- @DocsEditable @DomName('MediaList.appendMedium')
+ @DomName('MediaList.appendMedium')
+ @DocsEditable
void appendMedium(String newMedium) native;
- @DocsEditable @DomName('MediaList.deleteMedium')
+ @DomName('MediaList.deleteMedium')
+ @DocsEditable
void deleteMedium(String oldMedium) native;
- @DocsEditable @DomName('MediaList.item')
+ @DomName('MediaList.item')
+ @DocsEditable
String item(int index) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -14022,21 +15466,24 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('MediaQueryList')
class MediaQueryList native "*MediaQueryList" {
- @DocsEditable @DomName('MediaQueryList.matches')
+ @DomName('MediaQueryList.matches')
+ @DocsEditable
final bool matches;
- @DocsEditable @DomName('MediaQueryList.media')
+ @DomName('MediaQueryList.media')
+ @DocsEditable
final String media;
- @DocsEditable @DomName('MediaQueryList.addListener')
+ @DomName('MediaQueryList.addListener')
+ @DocsEditable
void addListener(MediaQueryListListener listener) native;
- @DocsEditable @DomName('MediaQueryList.removeListener')
+ @DomName('MediaQueryList.removeListener')
+ @DocsEditable
void removeListener(MediaQueryListListener listener) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -14044,7 +15491,6 @@
// BSD-style license that can be found in the LICENSE file.
-@DocsEditable
@DomName('MediaQueryListListener')
abstract class MediaQueryListListener {
@@ -14055,7 +15501,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('MediaSource')
class MediaSource extends EventTarget native "*MediaSource" {
@@ -14064,37 +15509,46 @@
factory MediaSource() => MediaSource._create();
static MediaSource _create() => JS('MediaSource', 'new MediaSource()');
- @DocsEditable @DomName('MediaSource.activeSourceBuffers')
+ @DomName('MediaSource.activeSourceBuffers')
+ @DocsEditable
final SourceBufferList activeSourceBuffers;
- @DocsEditable @DomName('MediaSource.duration')
+ @DomName('MediaSource.duration')
+ @DocsEditable
num duration;
- @DocsEditable @DomName('MediaSource.readyState')
+ @DomName('MediaSource.readyState')
+ @DocsEditable
final String readyState;
- @DocsEditable @DomName('MediaSource.sourceBuffers')
+ @DomName('MediaSource.sourceBuffers')
+ @DocsEditable
final SourceBufferList sourceBuffers;
@JSName('addEventListener')
- @DocsEditable @DomName('MediaSource.addEventListener')
+ @DomName('MediaSource.addEventListener')
+ @DocsEditable
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native;
- @DocsEditable @DomName('MediaSource.addSourceBuffer')
+ @DomName('MediaSource.addSourceBuffer')
+ @DocsEditable
SourceBuffer addSourceBuffer(String type) native;
- @JSName('dispatchEvent')
- @DocsEditable @DomName('MediaSource.dispatchEvent')
- bool $dom_dispatchEvent(Event event) native;
+ @DomName('MediaSource.dispatchEvent')
+ @DocsEditable
+ bool dispatchEvent(Event event) native;
- @DocsEditable @DomName('MediaSource.endOfStream')
+ @DomName('MediaSource.endOfStream')
+ @DocsEditable
void endOfStream(String error) native;
@JSName('removeEventListener')
- @DocsEditable @DomName('MediaSource.removeEventListener')
+ @DomName('MediaSource.removeEventListener')
+ @DocsEditable
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native;
- @DocsEditable @DomName('MediaSource.removeSourceBuffer')
+ @DomName('MediaSource.removeSourceBuffer')
+ @DocsEditable
void removeSourceBuffer(SourceBuffer buffer) native;
}
// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
@@ -14102,11 +15556,12 @@
// BSD-style license that can be found in the LICENSE file.
-/// @domName MediaStream; @docsEditable true
-@DocsEditable
-@DomName('MediaStream')
+/// @domName MediaStream; @docsEditable true@DomName('MediaStream')
+
class MediaStream extends EventTarget native "*MediaStream" {
+ @DomName('MediaStream.ended')
+ @DocsEditable
static const EventStreamProvider<Event> endedEvent = const EventStreamProvider<Event>('ended');
@DocsEditable
@@ -14115,45 +15570,58 @@
@DocsEditable
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
+ @deprecated
MediaStreamEvents get on =>
new MediaStreamEvents(this);
- @DocsEditable @DomName('MediaStream.ended')
+ @DomName('MediaStream.ended')
+ @DocsEditable
final bool ended;
- @DocsEditable @DomName('MediaStream.id')
+ @DomName('MediaStream.id')
+ @DocsEditable
final String id;
- @DocsEditable @DomName('MediaStream.label')
+ @DomName('MediaStream.label')
+ @DocsEditable
final String label;
@JSName('addEventListener')
- @DocsEditable @DomName('MediaStream.addEventListener')
+ @DomName('MediaStream.addEventListener')
+ @DocsEditable
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native;
- @DocsEditable @DomName('MediaStream.addTrack')
+ @DomName('MediaStream.addTrack')
+ @DocsEditable
void addTrack(MediaStreamTrack track) native;
- @JSName('dispatchEvent')
- @DocsEditable @DomName('MediaStream.dispatchEvent')
- bool $dom_dispatchEvent(Event event) native;
+ @DomName('MediaStream.dispatchEvent')
+ @DocsEditable
+ bool dispatchEvent(Event event) native;
- @DocsEditable @DomName('MediaStream.getAudioTracks')
+ @DomName('MediaStream.getAudioTracks')
+ @DocsEditable
List<MediaStreamTrack> getAudioTracks() native;
- @DocsEditable @DomName('MediaStream.getTrackById')
+ @DomName('MediaStream.getTrackById')
+ @DocsEditable
MediaStreamTrack getTrackById(String trackId) native;
- @DocsEditable @DomName('MediaStream.getVideoTracks')
+ @DomName('MediaStream.getVideoTracks')
+ @DocsEditable
List<MediaStreamTrack> getVideoTracks() native;
@JSName('removeEventListener')
- @DocsEditable @DomName('MediaStream.removeEventListener')
+ @DomName('MediaStream.removeEventListener')
+ @DocsEditable
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native;
- @DocsEditable @DomName('MediaStream.removeTrack')
+ @DomName('MediaStream.removeTrack')
+ @DocsEditable
void removeTrack(MediaStreamTrack track) native;
+ @DomName('MediaStream.ended')
+ @DocsEditable
Stream<Event> get onEnded => endedEvent.forTarget(this);
@@ -14174,6 +15642,7 @@
}
@DocsEditable
+@deprecated
class MediaStreamEvents extends Events {
@DocsEditable
MediaStreamEvents(EventTarget _ptr) : super(_ptr);
@@ -14192,12 +15661,15 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('MediaStreamEvent')
class MediaStreamEvent extends Event native "*MediaStreamEvent" {
- @DocsEditable @DomName('MediaStreamEvent.stream')
+ /// Checks if this type is supported on the current platform.
+ static bool get supported => Event._isTypeSupported('MediaStreamEvent');
+
+ @DomName('MediaStreamEvent.stream')
+ @DocsEditable
final MediaStream stream;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -14205,19 +15677,25 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('MediaStreamTrack')
class MediaStreamTrack extends EventTarget native "*MediaStreamTrack" {
+ @DomName('MediaStreamTrack.ended')
+ @DocsEditable
static const EventStreamProvider<Event> endedEvent = const EventStreamProvider<Event>('ended');
+ @DomName('MediaStreamTrack.mute')
+ @DocsEditable
static const EventStreamProvider<Event> muteEvent = const EventStreamProvider<Event>('mute');
+ @DomName('MediaStreamTrack.unmute')
+ @DocsEditable
static const EventStreamProvider<Event> unmuteEvent = const EventStreamProvider<Event>('unmute');
@DocsEditable
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
+ @deprecated
MediaStreamTrackEvents get on =>
new MediaStreamTrackEvents(this);
@@ -14227,41 +15705,55 @@
static const int MUTED = 1;
- @DocsEditable @DomName('MediaStreamTrack.enabled')
+ @DomName('MediaStreamTrack.enabled')
+ @DocsEditable
bool enabled;
- @DocsEditable @DomName('MediaStreamTrack.id')
+ @DomName('MediaStreamTrack.id')
+ @DocsEditable
final String id;
- @DocsEditable @DomName('MediaStreamTrack.kind')
+ @DomName('MediaStreamTrack.kind')
+ @DocsEditable
final String kind;
- @DocsEditable @DomName('MediaStreamTrack.label')
+ @DomName('MediaStreamTrack.label')
+ @DocsEditable
final String label;
- @DocsEditable @DomName('MediaStreamTrack.readyState')
+ @DomName('MediaStreamTrack.readyState')
+ @DocsEditable
final int readyState;
@JSName('addEventListener')
- @DocsEditable @DomName('MediaStreamTrack.addEventListener')
+ @DomName('MediaStreamTrack.addEventListener')
+ @DocsEditable
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native;
- @JSName('dispatchEvent')
- @DocsEditable @DomName('MediaStreamTrack.dispatchEvent')
- bool $dom_dispatchEvent(Event event) native;
+ @DomName('MediaStreamTrack.dispatchEvent')
+ @DocsEditable
+ bool dispatchEvent(Event event) native;
@JSName('removeEventListener')
- @DocsEditable @DomName('MediaStreamTrack.removeEventListener')
+ @DomName('MediaStreamTrack.removeEventListener')
+ @DocsEditable
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native;
+ @DomName('MediaStreamTrack.ended')
+ @DocsEditable
Stream<Event> get onEnded => endedEvent.forTarget(this);
+ @DomName('MediaStreamTrack.mute')
+ @DocsEditable
Stream<Event> get onMute => muteEvent.forTarget(this);
+ @DomName('MediaStreamTrack.unmute')
+ @DocsEditable
Stream<Event> get onUnmute => unmuteEvent.forTarget(this);
}
@DocsEditable
+@deprecated
class MediaStreamTrackEvents extends Events {
@DocsEditable
MediaStreamTrackEvents(EventTarget _ptr) : super(_ptr);
@@ -14280,12 +15772,15 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('MediaStreamTrackEvent')
class MediaStreamTrackEvent extends Event native "*MediaStreamTrackEvent" {
- @DocsEditable @DomName('MediaStreamTrackEvent.track')
+ /// Checks if this type is supported on the current platform.
+ static bool get supported => Event._isTypeSupported('MediaStreamTrackEvent');
+
+ @DomName('MediaStreamTrackEvent.track')
+ @DocsEditable
final MediaStreamTrack track;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -14293,18 +15788,20 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('MemoryInfo')
class MemoryInfo native "*MemoryInfo" {
- @DocsEditable @DomName('MemoryInfo.jsHeapSizeLimit')
+ @DomName('MemoryInfo.jsHeapSizeLimit')
+ @DocsEditable
final int jsHeapSizeLimit;
- @DocsEditable @DomName('MemoryInfo.totalJSHeapSize')
+ @DomName('MemoryInfo.totalJSHeapSize')
+ @DocsEditable
final int totalJSHeapSize;
- @DocsEditable @DomName('MemoryInfo.usedJSHeapSize')
+ @DomName('MemoryInfo.usedJSHeapSize')
+ @DocsEditable
final int usedJSHeapSize;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -14312,7 +15809,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('HTMLMenuElement')
class MenuElement extends Element native "*HTMLMenuElement" {
@@ -14325,7 +15821,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('MessageChannel')
class MessageChannel native "*MessageChannel" {
@@ -14334,74 +15829,102 @@
factory MessageChannel() => MessageChannel._create();
static MessageChannel _create() => JS('MessageChannel', 'new MessageChannel()');
- @DocsEditable @DomName('MessageChannel.port1')
+ @DomName('MessageChannel.port1')
+ @DocsEditable
final MessagePort port1;
- @DocsEditable @DomName('MessageChannel.port2')
+ @DomName('MessageChannel.port2')
+ @DocsEditable
final MessagePort port2;
}
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
+// WARNING: Do not edit - generated code.
-@DocsEditable
@DomName('MessageEvent')
class MessageEvent extends Event native "*MessageEvent" {
+ factory MessageEvent(String type,
+ {bool canBubble: false, bool cancelable: false, Object data,
+ String origin, String lastEventId,
+ Window source, List messagePorts}) {
+ if (source == null) {
+ source = window;
+ }
+ var event = document.$dom_createEvent("MessageEvent");
+ event.$dom_initMessageEvent(type, canBubble, cancelable, data, origin,
+ lastEventId, source, messagePorts);
+ return event;
+ }
dynamic get data => convertNativeToDart_SerializedScriptValue(this._data);
@JSName('data')
- @DocsEditable @DomName('MessageEvent.data') @annotation_Creates_SerializedScriptValue @annotation_Returns_SerializedScriptValue
+ @DomName('MessageEvent.data')
+ @DocsEditable
+ @annotation_Creates_SerializedScriptValue
+ @annotation_Returns_SerializedScriptValue
final dynamic _data;
- @DocsEditable @DomName('MessageEvent.lastEventId')
+ @DomName('MessageEvent.lastEventId')
+ @DocsEditable
final String lastEventId;
- @DocsEditable @DomName('MessageEvent.origin')
+ @DomName('MessageEvent.origin')
+ @DocsEditable
final String origin;
- @DocsEditable @DomName('MessageEvent.ports') @Creates('=List')
+ @DomName('MessageEvent.ports')
+ @DocsEditable
+ @Creates('=List')
final List ports;
WindowBase get source => _convertNativeToDart_Window(this._source);
@JSName('source')
- @DocsEditable @DomName('MessageEvent.source') @Creates('Window|=Object') @Returns('Window|=Object')
+ @DomName('MessageEvent.source')
+ @DocsEditable
+ @Creates('Window|=Object')
+ @Returns('Window|=Object')
final dynamic _source;
- @DocsEditable @DomName('MessageEvent.initMessageEvent')
- void initMessageEvent(String typeArg, bool canBubbleArg, bool cancelableArg, Object dataArg, String originArg, String lastEventIdArg, Window sourceArg, List messagePorts) native;
+ @JSName('initMessageEvent')
+ @DomName('MessageEvent.initMessageEvent')
+ @DocsEditable
+ void $dom_initMessageEvent(String typeArg, bool canBubbleArg, bool cancelableArg, Object dataArg, String originArg, String lastEventIdArg, Window sourceArg, List messagePorts) native;
- @DocsEditable @DomName('MessageEvent.webkitInitMessageEvent')
- void webkitInitMessageEvent(String typeArg, bool canBubbleArg, bool cancelableArg, Object dataArg, String originArg, String lastEventIdArg, Window sourceArg, List transferables) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('MessagePort')
class MessagePort extends EventTarget native "*MessagePort" {
+ @DomName('MessagePort.message')
+ @DocsEditable
static const EventStreamProvider<MessageEvent> messageEvent = const EventStreamProvider<MessageEvent>('message');
@DocsEditable
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
+ @deprecated
MessagePortEvents get on =>
new MessagePortEvents(this);
@JSName('addEventListener')
- @DocsEditable @DomName('MessagePort.addEventListener')
+ @DomName('MessagePort.addEventListener')
+ @DocsEditable
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native;
- @DocsEditable @DomName('MessagePort.close')
+ @DomName('MessagePort.close')
+ @DocsEditable
void close() native;
- @JSName('dispatchEvent')
- @DocsEditable @DomName('MessagePort.dispatchEvent')
- bool $dom_dispatchEvent(Event evt) native;
+ @DomName('MessagePort.dispatchEvent')
+ @DocsEditable
+ bool dispatchEvent(Event evt) native;
void postMessage(/*any*/ message, [List messagePorts]) {
if (?messagePorts) {
@@ -14414,23 +15937,30 @@
return;
}
@JSName('postMessage')
- @DocsEditable @DomName('MessagePort.postMessage')
+ @DomName('MessagePort.postMessage')
+ @DocsEditable
void _postMessage_1(message, List messagePorts) native;
@JSName('postMessage')
- @DocsEditable @DomName('MessagePort.postMessage')
+ @DomName('MessagePort.postMessage')
+ @DocsEditable
void _postMessage_2(message) native;
@JSName('removeEventListener')
- @DocsEditable @DomName('MessagePort.removeEventListener')
+ @DomName('MessagePort.removeEventListener')
+ @DocsEditable
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native;
- @DocsEditable @DomName('MessagePort.start')
+ @DomName('MessagePort.start')
+ @DocsEditable
void start() native;
+ @DomName('MessagePort.message')
+ @DocsEditable
Stream<MessageEvent> get onMessage => messageEvent.forTarget(this);
}
@DocsEditable
+@deprecated
class MessagePortEvents extends Events {
@DocsEditable
MessagePortEvents(EventTarget _ptr) : super(_ptr);
@@ -14443,18 +15973,20 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('HTMLMetaElement')
class MetaElement extends Element native "*HTMLMetaElement" {
- @DocsEditable @DomName('HTMLMetaElement.content')
+ @DomName('HTMLMetaElement.content')
+ @DocsEditable
String content;
- @DocsEditable @DomName('HTMLMetaElement.httpEquiv')
+ @DomName('HTMLMetaElement.httpEquiv')
+ @DocsEditable
String httpEquiv;
- @DocsEditable @DomName('HTMLMetaElement.name')
+ @DomName('HTMLMetaElement.name')
+ @DocsEditable
String name;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -14462,15 +15994,16 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('Metadata')
class Metadata native "*Metadata" {
- @DocsEditable @DomName('Metadata.modificationTime')
+ @DomName('Metadata.modificationTime')
+ @DocsEditable
final Date modificationTime;
- @DocsEditable @DomName('Metadata.size')
+ @DomName('Metadata.size')
+ @DocsEditable
final int size;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -14486,7 +16019,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('HTMLMeterElement')
@SupportedBrowser(SupportedBrowser.CHROME)
@@ -14500,26 +16032,34 @@
/// Checks if this type is supported on the current platform.
static bool get supported => Element.isTagSupported('meter');
- @DocsEditable @DomName('HTMLMeterElement.high')
+ @DomName('HTMLMeterElement.high')
+ @DocsEditable
num high;
- @DocsEditable @DomName('HTMLMeterElement.labels')
- @Returns('NodeList') @Creates('NodeList')
+ @DomName('HTMLMeterElement.labels')
+ @DocsEditable
+ @Returns('NodeList')
+ @Creates('NodeList')
final List<Node> labels;
- @DocsEditable @DomName('HTMLMeterElement.low')
+ @DomName('HTMLMeterElement.low')
+ @DocsEditable
num low;
- @DocsEditable @DomName('HTMLMeterElement.max')
+ @DomName('HTMLMeterElement.max')
+ @DocsEditable
num max;
- @DocsEditable @DomName('HTMLMeterElement.min')
+ @DomName('HTMLMeterElement.min')
+ @DocsEditable
num min;
- @DocsEditable @DomName('HTMLMeterElement.optimum')
+ @DomName('HTMLMeterElement.optimum')
+ @DocsEditable
num optimum;
- @DocsEditable @DomName('HTMLMeterElement.value')
+ @DomName('HTMLMeterElement.value')
+ @DocsEditable
num value;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -14527,15 +16067,16 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('HTMLModElement')
class ModElement extends Element native "*HTMLModElement" {
- @DocsEditable @DomName('HTMLModElement.cite')
+ @DomName('HTMLModElement.cite')
+ @DocsEditable
String cite;
- @DocsEditable @DomName('HTMLModElement.dateTime')
+ @DomName('HTMLModElement.dateTime')
+ @DocsEditable
String dateTime;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -14543,71 +16084,94 @@
// BSD-style license that can be found in the LICENSE file.
-@DocsEditable
@DomName('MouseEvent')
class MouseEvent extends UIEvent native "*MouseEvent" {
- factory MouseEvent(String type, Window view, int detail, int screenX,
- int screenY, int clientX, int clientY, int button, [bool canBubble = true,
- bool cancelable = true, bool ctrlKey = false, bool altKey = false,
- bool shiftKey = false, bool metaKey = false,
- EventTarget relatedTarget = null]) =>
- _MouseEventFactoryProvider.createMouseEvent(
- type, view, detail, screenX, screenY,
- clientX, clientY, button, canBubble, cancelable,
- ctrlKey, altKey, shiftKey, metaKey,
- relatedTarget);
+ factory MouseEvent(String type,
+ {Window view, int detail: 0, int screenX: 0, int screenY: 0,
+ int clientX: 0, int clientY: 0, int button: 0, bool canBubble: true,
+ bool cancelable: true, bool ctrlKey: false, bool altKey: false,
+ bool shiftKey: false, bool metaKey: false, EventTarget relatedTarget}) {
- @DocsEditable @DomName('MouseEvent.altKey')
+ if (view == null) {
+ view = window;
+ }
+ var event = document.$dom_createEvent('MouseEvent');
+ event.$dom_initMouseEvent(type, canBubble, cancelable, view, detail,
+ screenX, screenY, clientX, clientY, ctrlKey, altKey, shiftKey, metaKey,
+ button, relatedTarget);
+ return event;
+ }
+
+ @DomName('MouseEvent.altKey')
+ @DocsEditable
final bool altKey;
- @DocsEditable @DomName('MouseEvent.button')
+ @DomName('MouseEvent.button')
+ @DocsEditable
final int button;
- @DocsEditable @DomName('MouseEvent.clientX')
+ @DomName('MouseEvent.clientX')
+ @DocsEditable
final int clientX;
- @DocsEditable @DomName('MouseEvent.clientY')
+ @DomName('MouseEvent.clientY')
+ @DocsEditable
final int clientY;
- @DocsEditable @DomName('MouseEvent.ctrlKey')
+ @DomName('MouseEvent.ctrlKey')
+ @DocsEditable
final bool ctrlKey;
- @DocsEditable @DomName('MouseEvent.dataTransfer')
+ @DomName('MouseEvent.dataTransfer')
+ @DocsEditable
final Clipboard dataTransfer;
- @DocsEditable @DomName('MouseEvent.fromElement')
+ @DomName('MouseEvent.fromElement')
+ @DocsEditable
final Node fromElement;
- @DocsEditable @DomName('MouseEvent.metaKey')
+ @DomName('MouseEvent.metaKey')
+ @DocsEditable
final bool metaKey;
EventTarget get relatedTarget => _convertNativeToDart_EventTarget(this._relatedTarget);
@JSName('relatedTarget')
- @DocsEditable @DomName('MouseEvent.relatedTarget') @Creates('Node') @Returns('EventTarget|=Object')
+ @DomName('MouseEvent.relatedTarget')
+ @DocsEditable
+ @Creates('Node')
+ @Returns('EventTarget|=Object')
final dynamic _relatedTarget;
- @DocsEditable @DomName('MouseEvent.screenX')
+ @DomName('MouseEvent.screenX')
+ @DocsEditable
final int screenX;
- @DocsEditable @DomName('MouseEvent.screenY')
+ @DomName('MouseEvent.screenY')
+ @DocsEditable
final int screenY;
- @DocsEditable @DomName('MouseEvent.shiftKey')
+ @DomName('MouseEvent.shiftKey')
+ @DocsEditable
final bool shiftKey;
- @DocsEditable @DomName('MouseEvent.toElement')
+ @DomName('MouseEvent.toElement')
+ @DocsEditable
final Node toElement;
- @DocsEditable @DomName('MouseEvent.webkitMovementX')
+ @DomName('MouseEvent.webkitMovementX')
+ @DocsEditable
final int webkitMovementX;
- @DocsEditable @DomName('MouseEvent.webkitMovementY')
+ @DomName('MouseEvent.webkitMovementY')
+ @DocsEditable
final int webkitMovementY;
- @DocsEditable @DomName('MouseEvent.x')
+ @DomName('MouseEvent.x')
+ @DocsEditable
final int x;
- @DocsEditable @DomName('MouseEvent.y')
+ @DomName('MouseEvent.y')
+ @DocsEditable
final int y;
void $dom_initMouseEvent(String type, bool canBubble, bool cancelable, Window view, int detail, int screenX, int screenY, int clientX, int clientY, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, int button, EventTarget relatedTarget) {
@@ -14616,7 +16180,8 @@
return;
}
@JSName('initMouseEvent')
- @DocsEditable @DomName('MouseEvent.initMouseEvent')
+ @DomName('MouseEvent.initMouseEvent')
+ @DocsEditable
void _$dom_initMouseEvent_1(type, canBubble, cancelable, Window view, detail, screenX, screenY, clientX, clientY, ctrlKey, altKey, shiftKey, metaKey, button, relatedTarget) native;
@@ -14661,10 +16226,17 @@
// BSD-style license that can be found in the LICENSE file.
-
-@DocsEditable
@DomName('MutationEvent')
class MutationEvent extends Event native "*MutationEvent" {
+ factory MutationEvent(String type,
+ {bool canBubble: false, bool cancelable: false, Node relatedNode,
+ String prevValue, String newValue, String attrName, int attrChange: 0}) {
+
+ var event = document.$dom_createEvent('MutationEvent');
+ event.$dom_initMutationEvent(type, canBubble, cancelable, relatedNode,
+ prevValue, newValue, attrName, attrChange);
+ return event;
+ }
static const int ADDITION = 2;
@@ -14672,41 +16244,52 @@
static const int REMOVAL = 3;
- @DocsEditable @DomName('MutationEvent.attrChange')
+ @DomName('MutationEvent.attrChange')
+ @DocsEditable
final int attrChange;
- @DocsEditable @DomName('MutationEvent.attrName')
+ @DomName('MutationEvent.attrName')
+ @DocsEditable
final String attrName;
- @DocsEditable @DomName('MutationEvent.newValue')
+ @DomName('MutationEvent.newValue')
+ @DocsEditable
final String newValue;
- @DocsEditable @DomName('MutationEvent.prevValue')
+ @DomName('MutationEvent.prevValue')
+ @DocsEditable
final String prevValue;
- @DocsEditable @DomName('MutationEvent.relatedNode')
+ @DomName('MutationEvent.relatedNode')
+ @DocsEditable
final Node relatedNode;
- @DocsEditable @DomName('MutationEvent.initMutationEvent')
- void initMutationEvent(String type, bool canBubble, bool cancelable, Node relatedNode, String prevValue, String newValue, String attrName, int attrChange) native;
+ @JSName('initMutationEvent')
+ @DomName('MutationEvent.initMutationEvent')
+ @DocsEditable
+ void $dom_initMutationEvent(String type, bool canBubble, bool cancelable, Node relatedNode, String prevValue, String newValue, String attrName, int attrChange) native;
+
}
+
+
+
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-@DocsEditable
@DomName('MutationObserver')
@SupportedBrowser(SupportedBrowser.CHROME)
@SupportedBrowser(SupportedBrowser.FIREFOX)
@SupportedBrowser(SupportedBrowser.SAFARI)
-@Experimental()
+@Experimental
class MutationObserver native "*MutationObserver" {
@DocsEditable
factory MutationObserver(MutationCallback callback) => MutationObserver._create(callback);
- @DocsEditable @DomName('MutationObserver.disconnect')
+ @DomName('MutationObserver.disconnect')
+ @DocsEditable
void disconnect() native;
void _observe(Node target, Map options) {
@@ -14715,10 +16298,12 @@
return;
}
@JSName('observe')
- @DocsEditable @DomName('MutationObserver.observe')
+ @DomName('MutationObserver.observe')
+ @DocsEditable
void __observe_1(Node target, options) native;
- @DocsEditable @DomName('MutationObserver.takeRecords')
+ @DomName('MutationObserver.takeRecords')
+ @DocsEditable
List<MutationRecord> takeRecords() native;
/**
@@ -14807,38 +16392,48 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('MutationRecord')
class MutationRecord native "*MutationRecord" {
- @DocsEditable @DomName('MutationRecord.addedNodes')
- @Returns('NodeList') @Creates('NodeList')
+ @DomName('MutationRecord.addedNodes')
+ @DocsEditable
+ @Returns('NodeList')
+ @Creates('NodeList')
final List<Node> addedNodes;
- @DocsEditable @DomName('MutationRecord.attributeName')
+ @DomName('MutationRecord.attributeName')
+ @DocsEditable
final String attributeName;
- @DocsEditable @DomName('MutationRecord.attributeNamespace')
+ @DomName('MutationRecord.attributeNamespace')
+ @DocsEditable
final String attributeNamespace;
- @DocsEditable @DomName('MutationRecord.nextSibling')
+ @DomName('MutationRecord.nextSibling')
+ @DocsEditable
final Node nextSibling;
- @DocsEditable @DomName('MutationRecord.oldValue')
+ @DomName('MutationRecord.oldValue')
+ @DocsEditable
final String oldValue;
- @DocsEditable @DomName('MutationRecord.previousSibling')
+ @DomName('MutationRecord.previousSibling')
+ @DocsEditable
final Node previousSibling;
- @DocsEditable @DomName('MutationRecord.removedNodes')
- @Returns('NodeList') @Creates('NodeList')
+ @DomName('MutationRecord.removedNodes')
+ @DocsEditable
+ @Returns('NodeList')
+ @Creates('NodeList')
final List<Node> removedNodes;
- @DocsEditable @DomName('MutationRecord.target')
+ @DomName('MutationRecord.target')
+ @DocsEditable
final Node target;
- @DocsEditable @DomName('MutationRecord.type')
+ @DomName('MutationRecord.type')
+ @DocsEditable
final String type;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -14846,12 +16441,12 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('NamedNodeMap')
class NamedNodeMap implements JavaScriptIndexingBehavior, List<Node> native "*NamedNodeMap" {
- @DocsEditable @DomName('NamedNodeMap.length')
+ @DomName('NamedNodeMap.length')
+ @DocsEditable
int get length => JS("int", "#.length", this);
Node operator[](int index) => JS("Node", "#[#]", this, index);
@@ -14879,11 +16474,13 @@
void forEach(void f(Node element)) => IterableMixinWorkaround.forEach(this, f);
- String join([String separator]) => IterableMixinWorkaround.joinList(this, separator);
+ String join([String separator]) =>
+ IterableMixinWorkaround.joinList(this, separator);
List mappedBy(f(Node element)) => IterableMixinWorkaround.mappedByList(this, f);
- Iterable<Node> where(bool f(Node element)) => IterableMixinWorkaround.where(this, f);
+ Iterable<Node> where(bool f(Node element)) =>
+ IterableMixinWorkaround.where(this, f);
bool every(bool f(Node element)) => IterableMixinWorkaround.every(this, f);
@@ -14945,6 +16542,9 @@
throw new UnsupportedError("Cannot clear immutable List.");
}
+ List<Node> get reversed =>
+ new ReversedListView<Node>(this, 0, null);
+
void sort([int compare(Node a, Node b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -14973,9 +16573,11 @@
throw new StateError("More than one element");
}
- Node min([int compare(Node a, Node b)]) => IterableMixinWorkaround.min(this, compare);
+ Node min([int compare(Node a, Node b)]) =>
+ IterableMixinWorkaround.min(this, compare);
- Node max([int compare(Node a, Node b)]) => IterableMixinWorkaround.max(this, compare);
+ Node max([int compare(Node a, Node b)]) =>
+ IterableMixinWorkaround.max(this, compare);
Node removeAt(int pos) {
throw new UnsupportedError("Cannot remove from immutable List.");
@@ -15022,25 +16624,32 @@
// -- end List<Node> mixins.
- @DocsEditable @DomName('NamedNodeMap.getNamedItem')
+ @DomName('NamedNodeMap.getNamedItem')
+ @DocsEditable
Node getNamedItem(String name) native;
- @DocsEditable @DomName('NamedNodeMap.getNamedItemNS')
+ @DomName('NamedNodeMap.getNamedItemNS')
+ @DocsEditable
Node getNamedItemNS(String namespaceURI, String localName) native;
- @DocsEditable @DomName('NamedNodeMap.item')
+ @DomName('NamedNodeMap.item')
+ @DocsEditable
Node item(int index) native;
- @DocsEditable @DomName('NamedNodeMap.removeNamedItem')
+ @DomName('NamedNodeMap.removeNamedItem')
+ @DocsEditable
Node removeNamedItem(String name) native;
- @DocsEditable @DomName('NamedNodeMap.removeNamedItemNS')
+ @DomName('NamedNodeMap.removeNamedItemNS')
+ @DocsEditable
Node removeNamedItemNS(String namespaceURI, String localName) native;
- @DocsEditable @DomName('NamedNodeMap.setNamedItem')
+ @DomName('NamedNodeMap.setNamedItem')
+ @DocsEditable
Node setNamedItem(Node node) native;
- @DocsEditable @DomName('NamedNodeMap.setNamedItemNS')
+ @DomName('NamedNodeMap.setNamedItemNS')
+ @DocsEditable
Node setNamedItemNS(Node node) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -15048,7 +16657,6 @@
// BSD-style license that can be found in the LICENSE file.
-@DocsEditable
@DomName('Navigator')
class Navigator native "*Navigator" {
@@ -15076,7 +16684,7 @@
*/
@DomName('Navigator.webkitGetUserMedia')
@SupportedBrowser(SupportedBrowser.CHROME)
- @Experimental()
+ @Experimental
Future<LocalMediaStream> getUserMedia({bool audio: false,
bool video: false}) {
var completer = new Completer<LocalMediaStream>();
@@ -15108,59 +16716,78 @@
_NavigatorUserMediaErrorCallback error) native;
- @DocsEditable @DomName('Navigator.appCodeName')
+ @DomName('Navigator.appCodeName')
+ @DocsEditable
final String appCodeName;
- @DocsEditable @DomName('Navigator.appName')
+ @DomName('Navigator.appName')
+ @DocsEditable
final String appName;
- @DocsEditable @DomName('Navigator.appVersion')
+ @DomName('Navigator.appVersion')
+ @DocsEditable
final String appVersion;
- @DocsEditable @DomName('Navigator.cookieEnabled')
+ @DomName('Navigator.cookieEnabled')
+ @DocsEditable
final bool cookieEnabled;
- @DocsEditable @DomName('Navigator.geolocation')
+ @DomName('Navigator.geolocation')
+ @DocsEditable
final Geolocation geolocation;
- @DocsEditable @DomName('Navigator.mimeTypes')
+ @DomName('Navigator.mimeTypes')
+ @DocsEditable
final DomMimeTypeArray mimeTypes;
- @DocsEditable @DomName('Navigator.onLine')
+ @DomName('Navigator.onLine')
+ @DocsEditable
final bool onLine;
- @DocsEditable @DomName('Navigator.platform')
+ @DomName('Navigator.platform')
+ @DocsEditable
final String platform;
- @DocsEditable @DomName('Navigator.plugins')
+ @DomName('Navigator.plugins')
+ @DocsEditable
final DomPluginArray plugins;
- @DocsEditable @DomName('Navigator.product')
+ @DomName('Navigator.product')
+ @DocsEditable
final String product;
- @DocsEditable @DomName('Navigator.productSub')
+ @DomName('Navigator.productSub')
+ @DocsEditable
final String productSub;
- @DocsEditable @DomName('Navigator.userAgent')
+ @DomName('Navigator.userAgent')
+ @DocsEditable
final String userAgent;
- @DocsEditable @DomName('Navigator.vendor')
+ @DomName('Navigator.vendor')
+ @DocsEditable
final String vendor;
- @DocsEditable @DomName('Navigator.vendorSub')
+ @DomName('Navigator.vendorSub')
+ @DocsEditable
final String vendorSub;
- @DocsEditable @DomName('Navigator.webkitBattery')
+ @DomName('Navigator.webkitBattery')
+ @DocsEditable
final BatteryManager webkitBattery;
- @DocsEditable @DomName('Navigator.getStorageUpdates')
+ @DomName('Navigator.getStorageUpdates')
+ @DocsEditable
void getStorageUpdates() native;
- @DocsEditable @DomName('Navigator.javaEnabled')
+ @DomName('Navigator.javaEnabled')
+ @DocsEditable
bool javaEnabled() native;
- @DocsEditable @DomName('Navigator.webkitGetGamepads')
- @Returns('_GamepadList') @Creates('_GamepadList')
+ @DomName('Navigator.webkitGetGamepads')
+ @DocsEditable
+ @Returns('_GamepadList')
+ @Creates('_GamepadList')
List<Gamepad> webkitGetGamepads() native;
}
@@ -15169,14 +16796,14 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('NavigatorUserMediaError')
class NavigatorUserMediaError native "*NavigatorUserMediaError" {
static const int PERMISSION_DENIED = 1;
- @DocsEditable @DomName('NavigatorUserMediaError.code')
+ @DomName('NavigatorUserMediaError.code')
+ @DocsEditable
final int code;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -15366,6 +16993,9 @@
return this[index];
}
+ List<Node> get reversed =>
+ new ReversedListView<Node>(this, 0, null);
+
// TODO(jacobr): this could be implemented for child node lists.
// The exception we throw here is misleading.
void sort([int compare(Node a, Node b)]) {
@@ -15408,7 +17038,6 @@
Node operator[](int index) => _this.$dom_childNodes[index];
}
-@DocsEditable
@DomName('Node')
class Node extends EventTarget native "*Node" {
List<Node> get nodes {
@@ -15454,94 +17083,118 @@
@JSName('attributes')
- @DocsEditable @DomName('Node.attributes')
+ @DomName('Node.attributes')
+ @DocsEditable
final NamedNodeMap $dom_attributes;
@JSName('childNodes')
- @DocsEditable @DomName('Node.childNodes')
- @Returns('NodeList') @Creates('NodeList')
+ @DomName('Node.childNodes')
+ @DocsEditable
+ @Returns('NodeList')
+ @Creates('NodeList')
final List<Node> $dom_childNodes;
@JSName('firstChild')
- @DocsEditable @DomName('Node.firstChild')
+ @DomName('Node.firstChild')
+ @DocsEditable
final Node $dom_firstChild;
@JSName('lastChild')
- @DocsEditable @DomName('Node.lastChild')
+ @DomName('Node.lastChild')
+ @DocsEditable
final Node $dom_lastChild;
@JSName('localName')
- @DocsEditable @DomName('Node.localName')
+ @DomName('Node.localName')
+ @DocsEditable
final String $dom_localName;
@JSName('namespaceURI')
- @DocsEditable @DomName('Node.namespaceURI')
+ @DomName('Node.namespaceURI')
+ @DocsEditable
final String $dom_namespaceUri;
@JSName('nextSibling')
- @DocsEditable @DomName('Node.nextSibling')
+ @DomName('Node.nextSibling')
+ @DocsEditable
final Node nextNode;
- @DocsEditable @DomName('Node.nodeType')
+ @DomName('Node.nodeType')
+ @DocsEditable
final int nodeType;
- @DocsEditable @DomName('Node.nodeValue')
+ @DomName('Node.nodeValue')
+ @DocsEditable
final String nodeValue;
@JSName('ownerDocument')
- @DocsEditable @DomName('Node.ownerDocument')
+ @DomName('Node.ownerDocument')
+ @DocsEditable
final Document document;
@JSName('parentElement')
- @DocsEditable @DomName('Node.parentElement')
+ @DomName('Node.parentElement')
+ @DocsEditable
final Element parent;
- @DocsEditable @DomName('Node.parentNode')
+ @DomName('Node.parentNode')
+ @DocsEditable
final Node parentNode;
@JSName('previousSibling')
- @DocsEditable @DomName('Node.previousSibling')
+ @DomName('Node.previousSibling')
+ @DocsEditable
final Node previousNode;
@JSName('textContent')
- @DocsEditable @DomName('Node.textContent')
+ @DomName('Node.textContent')
+ @DocsEditable
String text;
@JSName('addEventListener')
- @DocsEditable @DomName('Node.addEventListener')
+ @DomName('Node.addEventListener')
+ @DocsEditable
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native;
@JSName('appendChild')
- @DocsEditable @DomName('Node.appendChild')
+ @DomName('Node.appendChild')
+ @DocsEditable
Node $dom_appendChild(Node newChild) native;
@JSName('cloneNode')
- @DocsEditable @DomName('Node.cloneNode')
+ @DomName('Node.cloneNode')
+ @DocsEditable
Node clone(bool deep) native;
- @DocsEditable @DomName('Node.contains')
+ @DomName('Node.contains')
+ @DocsEditable
bool contains(Node other) native;
- @JSName('dispatchEvent')
- @DocsEditable @DomName('Node.dispatchEvent')
- bool $dom_dispatchEvent(Event event) native;
+ @DomName('Node.dispatchEvent')
+ @DocsEditable
+ bool dispatchEvent(Event event) native;
- @DocsEditable @DomName('Node.hasChildNodes')
+ @DomName('Node.hasChildNodes')
+ @DocsEditable
bool hasChildNodes() native;
- @DocsEditable @DomName('Node.insertBefore')
+ @DomName('Node.insertBefore')
+ @DocsEditable
Node insertBefore(Node newChild, Node refChild) native;
@JSName('removeChild')
- @DocsEditable @DomName('Node.removeChild')
+ @DomName('Node.removeChild')
+ @DocsEditable
Node $dom_removeChild(Node oldChild) native;
@JSName('removeEventListener')
- @DocsEditable @DomName('Node.removeEventListener')
+ @DomName('Node.removeEventListener')
+ @DocsEditable
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native;
@JSName('replaceChild')
- @DocsEditable @DomName('Node.replaceChild')
+ @DomName('Node.replaceChild')
+ @DocsEditable
Node $dom_replaceChild(Node newChild, Node oldChild) native;
}
@@ -15550,7 +17203,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('NodeFilter')
class NodeFilter native "*NodeFilter" {
@@ -15587,7 +17239,8 @@
static const int SHOW_TEXT = 0x00000004;
- @DocsEditable @DomName('NodeFilter.acceptNode')
+ @DomName('NodeFilter.acceptNode')
+ @DocsEditable
int acceptNode(Node n) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -15595,36 +17248,44 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('NodeIterator')
class NodeIterator native "*NodeIterator" {
- @DocsEditable @DomName('NodeIterator.expandEntityReferences')
+ @DomName('NodeIterator.expandEntityReferences')
+ @DocsEditable
final bool expandEntityReferences;
- @DocsEditable @DomName('NodeIterator.filter')
+ @DomName('NodeIterator.filter')
+ @DocsEditable
final NodeFilter filter;
- @DocsEditable @DomName('NodeIterator.pointerBeforeReferenceNode')
+ @DomName('NodeIterator.pointerBeforeReferenceNode')
+ @DocsEditable
final bool pointerBeforeReferenceNode;
- @DocsEditable @DomName('NodeIterator.referenceNode')
+ @DomName('NodeIterator.referenceNode')
+ @DocsEditable
final Node referenceNode;
- @DocsEditable @DomName('NodeIterator.root')
+ @DomName('NodeIterator.root')
+ @DocsEditable
final Node root;
- @DocsEditable @DomName('NodeIterator.whatToShow')
+ @DomName('NodeIterator.whatToShow')
+ @DocsEditable
final int whatToShow;
- @DocsEditable @DomName('NodeIterator.detach')
+ @DomName('NodeIterator.detach')
+ @DocsEditable
void detach() native;
- @DocsEditable @DomName('NodeIterator.nextNode')
+ @DomName('NodeIterator.nextNode')
+ @DocsEditable
Node nextNode() native;
- @DocsEditable @DomName('NodeIterator.previousNode')
+ @DomName('NodeIterator.previousNode')
+ @DocsEditable
Node previousNode() native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -15632,12 +17293,12 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('NodeList')
class NodeList implements JavaScriptIndexingBehavior, List<Node> native "*NodeList" {
- @DocsEditable @DomName('NodeList.length')
+ @DomName('NodeList.length')
+ @DocsEditable
int get length => JS("int", "#.length", this);
Node operator[](int index) => JS("Node", "#[#]", this, index);
@@ -15665,11 +17326,13 @@
void forEach(void f(Node element)) => IterableMixinWorkaround.forEach(this, f);
- String join([String separator]) => IterableMixinWorkaround.joinList(this, separator);
+ String join([String separator]) =>
+ IterableMixinWorkaround.joinList(this, separator);
List mappedBy(f(Node element)) => IterableMixinWorkaround.mappedByList(this, f);
- Iterable<Node> where(bool f(Node element)) => IterableMixinWorkaround.where(this, f);
+ Iterable<Node> where(bool f(Node element)) =>
+ IterableMixinWorkaround.where(this, f);
bool every(bool f(Node element)) => IterableMixinWorkaround.every(this, f);
@@ -15731,6 +17394,9 @@
throw new UnsupportedError("Cannot clear immutable List.");
}
+ List<Node> get reversed =>
+ new ReversedListView<Node>(this, 0, null);
+
void sort([int compare(Node a, Node b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -15759,9 +17425,11 @@
throw new StateError("More than one element");
}
- Node min([int compare(Node a, Node b)]) => IterableMixinWorkaround.min(this, compare);
+ Node min([int compare(Node a, Node b)]) =>
+ IterableMixinWorkaround.min(this, compare);
- Node max([int compare(Node a, Node b)]) => IterableMixinWorkaround.max(this, compare);
+ Node max([int compare(Node a, Node b)]) =>
+ IterableMixinWorkaround.max(this, compare);
Node removeAt(int pos) {
throw new UnsupportedError("Cannot remove from immutable List.");
@@ -15809,7 +17477,8 @@
// -- end List<Node> mixins.
@JSName('item')
- @DocsEditable @DomName('NodeList.item')
+ @DomName('NodeList.item')
+ @DocsEditable
Node _item(int index) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -15817,15 +17486,16 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('Notation')
class Notation extends Node native "*Notation" {
- @DocsEditable @DomName('Notation.publicId')
+ @DomName('Notation.publicId')
+ @DocsEditable
final String publicId;
- @DocsEditable @DomName('Notation.systemId')
+ @DomName('Notation.systemId')
+ @DocsEditable
final String systemId;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -15833,19 +17503,28 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('Notification')
class Notification extends EventTarget native "*Notification" {
+ @DomName('Notification.click')
+ @DocsEditable
static const EventStreamProvider<Event> clickEvent = const EventStreamProvider<Event>('click');
+ @DomName('Notification.close')
+ @DocsEditable
static const EventStreamProvider<Event> closeEvent = const EventStreamProvider<Event>('close');
+ @DomName('Notification.display')
+ @DocsEditable
static const EventStreamProvider<Event> displayEvent = const EventStreamProvider<Event>('display');
+ @DomName('Notification.error')
+ @DocsEditable
static const EventStreamProvider<Event> errorEvent = const EventStreamProvider<Event>('error');
+ @DomName('Notification.show')
+ @DocsEditable
static const EventStreamProvider<Event> showEvent = const EventStreamProvider<Event>('show');
@DocsEditable
@@ -15864,57 +17543,79 @@
@DocsEditable
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
+ @deprecated
NotificationEvents get on =>
new NotificationEvents(this);
- @DocsEditable @DomName('Notification.dir')
+ @DomName('Notification.dir')
+ @DocsEditable
String dir;
- @DocsEditable @DomName('Notification.permission')
+ @DomName('Notification.permission')
+ @DocsEditable
final String permission;
- @DocsEditable @DomName('Notification.replaceId')
+ @DomName('Notification.replaceId')
+ @DocsEditable
String replaceId;
- @DocsEditable @DomName('Notification.tag')
+ @DomName('Notification.tag')
+ @DocsEditable
String tag;
@JSName('addEventListener')
- @DocsEditable @DomName('Notification.addEventListener')
+ @DomName('Notification.addEventListener')
+ @DocsEditable
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native;
- @DocsEditable @DomName('Notification.cancel')
+ @DomName('Notification.cancel')
+ @DocsEditable
void cancel() native;
- @DocsEditable @DomName('Notification.close')
+ @DomName('Notification.close')
+ @DocsEditable
void close() native;
- @JSName('dispatchEvent')
- @DocsEditable @DomName('Notification.dispatchEvent')
- bool $dom_dispatchEvent(Event evt) native;
+ @DomName('Notification.dispatchEvent')
+ @DocsEditable
+ bool dispatchEvent(Event evt) native;
@JSName('removeEventListener')
- @DocsEditable @DomName('Notification.removeEventListener')
+ @DomName('Notification.removeEventListener')
+ @DocsEditable
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native;
- @DocsEditable @DomName('Notification.requestPermission')
+ @DomName('Notification.requestPermission')
+ @DocsEditable
static void requestPermission(NotificationPermissionCallback callback) native;
- @DocsEditable @DomName('Notification.show')
+ @DomName('Notification.show')
+ @DocsEditable
void show() native;
+ @DomName('Notification.click')
+ @DocsEditable
Stream<Event> get onClick => clickEvent.forTarget(this);
+ @DomName('Notification.close')
+ @DocsEditable
Stream<Event> get onClose => closeEvent.forTarget(this);
+ @DomName('Notification.display')
+ @DocsEditable
Stream<Event> get onDisplay => displayEvent.forTarget(this);
+ @DomName('Notification.error')
+ @DocsEditable
Stream<Event> get onError => errorEvent.forTarget(this);
+ @DomName('Notification.show')
+ @DocsEditable
Stream<Event> get onShow => showEvent.forTarget(this);
}
@DocsEditable
+@deprecated
class NotificationEvents extends Events {
@DocsEditable
NotificationEvents(EventTarget _ptr) : super(_ptr);
@@ -15939,28 +17640,31 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('NotificationCenter')
@SupportedBrowser(SupportedBrowser.CHROME)
@SupportedBrowser(SupportedBrowser.SAFARI)
-@Experimental()
+@Experimental
class NotificationCenter native "*NotificationCenter" {
/// Checks if this type is supported on the current platform.
static bool get supported => JS('bool', '!!(window.webkitNotifications)');
- @DocsEditable @DomName('NotificationCenter.checkPermission')
+ @DomName('NotificationCenter.checkPermission')
+ @DocsEditable
int checkPermission() native;
@JSName('createHTMLNotification')
- @DocsEditable @DomName('NotificationCenter.createHTMLNotification')
+ @DomName('NotificationCenter.createHTMLNotification')
+ @DocsEditable
Notification createHtmlNotification(String url) native;
- @DocsEditable @DomName('NotificationCenter.createNotification')
+ @DomName('NotificationCenter.createNotification')
+ @DocsEditable
Notification createNotification(String iconUrl, String title, String body) native;
- @DocsEditable @DomName('NotificationCenter.requestPermission')
+ @DomName('NotificationCenter.requestPermission')
+ @DocsEditable
void requestPermission(VoidCallback callback) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -15976,7 +17680,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('HTMLOListElement')
class OListElement extends Element native "*HTMLOListElement" {
@@ -15984,13 +17687,16 @@
@DocsEditable
factory OListElement() => document.$dom_createElement("ol");
- @DocsEditable @DomName('HTMLOListElement.reversed')
+ @DomName('HTMLOListElement.reversed')
+ @DocsEditable
bool reversed;
- @DocsEditable @DomName('HTMLOListElement.start')
+ @DomName('HTMLOListElement.start')
+ @DocsEditable
int start;
- @DocsEditable @DomName('HTMLOListElement.type')
+ @DomName('HTMLOListElement.type')
+ @DocsEditable
String type;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -15998,7 +17704,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('HTMLObjectElement')
@SupportedBrowser(SupportedBrowser.CHROME)
@@ -16012,43 +17717,56 @@
/// Checks if this type is supported on the current platform.
static bool get supported => Element.isTagSupported('object');
- @DocsEditable @DomName('HTMLObjectElement.code')
+ @DomName('HTMLObjectElement.code')
+ @DocsEditable
String code;
- @DocsEditable @DomName('HTMLObjectElement.data')
+ @DomName('HTMLObjectElement.data')
+ @DocsEditable
String data;
- @DocsEditable @DomName('HTMLObjectElement.form')
+ @DomName('HTMLObjectElement.form')
+ @DocsEditable
final FormElement form;
- @DocsEditable @DomName('HTMLObjectElement.height')
+ @DomName('HTMLObjectElement.height')
+ @DocsEditable
String height;
- @DocsEditable @DomName('HTMLObjectElement.name')
+ @DomName('HTMLObjectElement.name')
+ @DocsEditable
String name;
- @DocsEditable @DomName('HTMLObjectElement.type')
+ @DomName('HTMLObjectElement.type')
+ @DocsEditable
String type;
- @DocsEditable @DomName('HTMLObjectElement.useMap')
+ @DomName('HTMLObjectElement.useMap')
+ @DocsEditable
String useMap;
- @DocsEditable @DomName('HTMLObjectElement.validationMessage')
+ @DomName('HTMLObjectElement.validationMessage')
+ @DocsEditable
final String validationMessage;
- @DocsEditable @DomName('HTMLObjectElement.validity')
+ @DomName('HTMLObjectElement.validity')
+ @DocsEditable
final ValidityState validity;
- @DocsEditable @DomName('HTMLObjectElement.width')
+ @DomName('HTMLObjectElement.width')
+ @DocsEditable
String width;
- @DocsEditable @DomName('HTMLObjectElement.willValidate')
+ @DomName('HTMLObjectElement.willValidate')
+ @DocsEditable
final bool willValidate;
- @DocsEditable @DomName('HTMLObjectElement.checkValidity')
+ @DomName('HTMLObjectElement.checkValidity')
+ @DocsEditable
bool checkValidity() native;
- @DocsEditable @DomName('HTMLObjectElement.setCustomValidity')
+ @DomName('HTMLObjectElement.setCustomValidity')
+ @DocsEditable
void setCustomValidity(String error) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -16056,7 +17774,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('OESElementIndexUint')
class OesElementIndexUint native "*OESElementIndexUint" {
@@ -16066,7 +17783,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('OESStandardDerivatives')
class OesStandardDerivatives native "*OESStandardDerivatives" {
@@ -16078,7 +17794,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('OESTextureFloat')
class OesTextureFloat native "*OESTextureFloat" {
@@ -16088,7 +17803,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('OESVertexArrayObject')
class OesVertexArrayObject native "*OESVertexArrayObject" {
@@ -16096,19 +17810,23 @@
static const int VERTEX_ARRAY_BINDING_OES = 0x85B5;
@JSName('bindVertexArrayOES')
- @DocsEditable @DomName('OESVertexArrayObject.bindVertexArrayOES')
+ @DomName('OESVertexArrayObject.bindVertexArrayOES')
+ @DocsEditable
void bindVertexArray(WebGLVertexArrayObject arrayObject) native;
@JSName('createVertexArrayOES')
- @DocsEditable @DomName('OESVertexArrayObject.createVertexArrayOES')
+ @DomName('OESVertexArrayObject.createVertexArrayOES')
+ @DocsEditable
WebGLVertexArrayObject createVertexArray() native;
@JSName('deleteVertexArrayOES')
- @DocsEditable @DomName('OESVertexArrayObject.deleteVertexArrayOES')
+ @DomName('OESVertexArrayObject.deleteVertexArrayOES')
+ @DocsEditable
void deleteVertexArray(WebGLVertexArrayObject arrayObject) native;
@JSName('isVertexArrayOES')
- @DocsEditable @DomName('OESVertexArrayObject.isVertexArrayOES')
+ @DomName('OESVertexArrayObject.isVertexArrayOES')
+ @DocsEditable
bool isVertexArray(WebGLVertexArrayObject arrayObject) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -16116,7 +17834,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('HTMLOptGroupElement')
class OptGroupElement extends Element native "*HTMLOptGroupElement" {
@@ -16124,10 +17841,12 @@
@DocsEditable
factory OptGroupElement() => document.$dom_createElement("optgroup");
- @DocsEditable @DomName('HTMLOptGroupElement.disabled')
+ @DomName('HTMLOptGroupElement.disabled')
+ @DocsEditable
bool disabled;
- @DocsEditable @DomName('HTMLOptGroupElement.label')
+ @DomName('HTMLOptGroupElement.label')
+ @DocsEditable
String label;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -16135,7 +17854,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('HTMLOptionElement')
class OptionElement extends Element native "*HTMLOptionElement" {
@@ -16172,25 +17890,32 @@
return JS('OptionElement', 'new Option(#,#,#,#)', data, value, defaultSelected, selected);
}
- @DocsEditable @DomName('HTMLOptionElement.defaultSelected')
+ @DomName('HTMLOptionElement.defaultSelected')
+ @DocsEditable
bool defaultSelected;
- @DocsEditable @DomName('HTMLOptionElement.disabled')
+ @DomName('HTMLOptionElement.disabled')
+ @DocsEditable
bool disabled;
- @DocsEditable @DomName('HTMLOptionElement.form')
+ @DomName('HTMLOptionElement.form')
+ @DocsEditable
final FormElement form;
- @DocsEditable @DomName('HTMLOptionElement.index')
+ @DomName('HTMLOptionElement.index')
+ @DocsEditable
final int index;
- @DocsEditable @DomName('HTMLOptionElement.label')
+ @DomName('HTMLOptionElement.label')
+ @DocsEditable
String label;
- @DocsEditable @DomName('HTMLOptionElement.selected')
+ @DomName('HTMLOptionElement.selected')
+ @DocsEditable
bool selected;
- @DocsEditable @DomName('HTMLOptionElement.value')
+ @DomName('HTMLOptionElement.value')
+ @DocsEditable
String value;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -16198,7 +17923,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('HTMLOutputElement')
@SupportedBrowser(SupportedBrowser.CHROME)
@@ -16212,41 +17936,54 @@
/// Checks if this type is supported on the current platform.
static bool get supported => Element.isTagSupported('output');
- @DocsEditable @DomName('HTMLOutputElement.defaultValue')
+ @DomName('HTMLOutputElement.defaultValue')
+ @DocsEditable
String defaultValue;
- @DocsEditable @DomName('HTMLOutputElement.form')
+ @DomName('HTMLOutputElement.form')
+ @DocsEditable
final FormElement form;
- @DocsEditable @DomName('HTMLOutputElement.htmlFor')
+ @DomName('HTMLOutputElement.htmlFor')
+ @DocsEditable
DomSettableTokenList htmlFor;
- @DocsEditable @DomName('HTMLOutputElement.labels')
- @Returns('NodeList') @Creates('NodeList')
+ @DomName('HTMLOutputElement.labels')
+ @DocsEditable
+ @Returns('NodeList')
+ @Creates('NodeList')
final List<Node> labels;
- @DocsEditable @DomName('HTMLOutputElement.name')
+ @DomName('HTMLOutputElement.name')
+ @DocsEditable
String name;
- @DocsEditable @DomName('HTMLOutputElement.type')
+ @DomName('HTMLOutputElement.type')
+ @DocsEditable
final String type;
- @DocsEditable @DomName('HTMLOutputElement.validationMessage')
+ @DomName('HTMLOutputElement.validationMessage')
+ @DocsEditable
final String validationMessage;
- @DocsEditable @DomName('HTMLOutputElement.validity')
+ @DomName('HTMLOutputElement.validity')
+ @DocsEditable
final ValidityState validity;
- @DocsEditable @DomName('HTMLOutputElement.value')
+ @DomName('HTMLOutputElement.value')
+ @DocsEditable
String value;
- @DocsEditable @DomName('HTMLOutputElement.willValidate')
+ @DomName('HTMLOutputElement.willValidate')
+ @DocsEditable
final bool willValidate;
- @DocsEditable @DomName('HTMLOutputElement.checkValidity')
+ @DomName('HTMLOutputElement.checkValidity')
+ @DocsEditable
bool checkValidity() native;
- @DocsEditable @DomName('HTMLOutputElement.setCustomValidity')
+ @DomName('HTMLOutputElement.setCustomValidity')
+ @DocsEditable
void setCustomValidity(String error) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -16254,7 +17991,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('OverflowEvent')
class OverflowEvent extends Event native "*OverflowEvent" {
@@ -16265,13 +18001,16 @@
static const int VERTICAL = 1;
- @DocsEditable @DomName('OverflowEvent.horizontalOverflow')
+ @DomName('OverflowEvent.horizontalOverflow')
+ @DocsEditable
final bool horizontalOverflow;
- @DocsEditable @DomName('OverflowEvent.orient')
+ @DomName('OverflowEvent.orient')
+ @DocsEditable
final int orient;
- @DocsEditable @DomName('OverflowEvent.verticalOverflow')
+ @DomName('OverflowEvent.verticalOverflow')
+ @DocsEditable
final bool verticalOverflow;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -16279,21 +18018,24 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('PagePopupController')
class PagePopupController native "*PagePopupController" {
- @DocsEditable @DomName('PagePopupController.formatMonth')
+ @DomName('PagePopupController.formatMonth')
+ @DocsEditable
String formatMonth(int year, int zeroBaseMonth) native;
- @DocsEditable @DomName('PagePopupController.histogramEnumeration')
+ @DomName('PagePopupController.histogramEnumeration')
+ @DocsEditable
void histogramEnumeration(String name, int sample, int boundaryValue) native;
- @DocsEditable @DomName('PagePopupController.localizeNumberString')
+ @DomName('PagePopupController.localizeNumberString')
+ @DocsEditable
String localizeNumberString(String numberString) native;
- @DocsEditable @DomName('PagePopupController.setValueAndClosePopup')
+ @DomName('PagePopupController.setValueAndClosePopup')
+ @DocsEditable
void setValueAndClosePopup(int numberValue, String stringValue) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -16301,12 +18043,12 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('PageTransitionEvent')
class PageTransitionEvent extends Event native "*PageTransitionEvent" {
- @DocsEditable @DomName('PageTransitionEvent.persisted')
+ @DomName('PageTransitionEvent.persisted')
+ @DocsEditable
final bool persisted;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -16314,7 +18056,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('HTMLParagraphElement')
class ParagraphElement extends Element native "*HTMLParagraphElement" {
@@ -16327,7 +18068,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('HTMLParamElement')
class ParamElement extends Element native "*HTMLParamElement" {
@@ -16335,10 +18075,12 @@
@DocsEditable
factory ParamElement() => document.$dom_createElement("param");
- @DocsEditable @DomName('HTMLParamElement.name')
+ @DomName('HTMLParamElement.name')
+ @DocsEditable
String name;
- @DocsEditable @DomName('HTMLParamElement.value')
+ @DomName('HTMLParamElement.value')
+ @DocsEditable
String value;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -16346,7 +18088,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('Performance')
@SupportedBrowser(SupportedBrowser.CHROME)
@@ -16357,16 +18098,20 @@
/// Checks if this type is supported on the current platform.
static bool get supported => JS('bool', '!!(window.performance)');
- @DocsEditable @DomName('Performance.memory')
+ @DomName('Performance.memory')
+ @DocsEditable
final MemoryInfo memory;
- @DocsEditable @DomName('Performance.navigation')
+ @DomName('Performance.navigation')
+ @DocsEditable
final PerformanceNavigation navigation;
- @DocsEditable @DomName('Performance.timing')
+ @DomName('Performance.timing')
+ @DocsEditable
final PerformanceTiming timing;
- @DocsEditable @DomName('Performance.now')
+ @DomName('Performance.now')
+ @DocsEditable
num now() native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -16374,7 +18119,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('PerformanceNavigation')
class PerformanceNavigation native "*PerformanceNavigation" {
@@ -16387,10 +18131,12 @@
static const int TYPE_RESERVED = 255;
- @DocsEditable @DomName('PerformanceNavigation.redirectCount')
+ @DomName('PerformanceNavigation.redirectCount')
+ @DocsEditable
final int redirectCount;
- @DocsEditable @DomName('PerformanceNavigation.type')
+ @DomName('PerformanceNavigation.type')
+ @DocsEditable
final int type;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -16398,72 +18144,92 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('PerformanceTiming')
class PerformanceTiming native "*PerformanceTiming" {
- @DocsEditable @DomName('PerformanceTiming.connectEnd')
+ @DomName('PerformanceTiming.connectEnd')
+ @DocsEditable
final int connectEnd;
- @DocsEditable @DomName('PerformanceTiming.connectStart')
+ @DomName('PerformanceTiming.connectStart')
+ @DocsEditable
final int connectStart;
- @DocsEditable @DomName('PerformanceTiming.domComplete')
+ @DomName('PerformanceTiming.domComplete')
+ @DocsEditable
final int domComplete;
- @DocsEditable @DomName('PerformanceTiming.domContentLoadedEventEnd')
+ @DomName('PerformanceTiming.domContentLoadedEventEnd')
+ @DocsEditable
final int domContentLoadedEventEnd;
- @DocsEditable @DomName('PerformanceTiming.domContentLoadedEventStart')
+ @DomName('PerformanceTiming.domContentLoadedEventStart')
+ @DocsEditable
final int domContentLoadedEventStart;
- @DocsEditable @DomName('PerformanceTiming.domInteractive')
+ @DomName('PerformanceTiming.domInteractive')
+ @DocsEditable
final int domInteractive;
- @DocsEditable @DomName('PerformanceTiming.domLoading')
+ @DomName('PerformanceTiming.domLoading')
+ @DocsEditable
final int domLoading;
- @DocsEditable @DomName('PerformanceTiming.domainLookupEnd')
+ @DomName('PerformanceTiming.domainLookupEnd')
+ @DocsEditable
final int domainLookupEnd;
- @DocsEditable @DomName('PerformanceTiming.domainLookupStart')
+ @DomName('PerformanceTiming.domainLookupStart')
+ @DocsEditable
final int domainLookupStart;
- @DocsEditable @DomName('PerformanceTiming.fetchStart')
+ @DomName('PerformanceTiming.fetchStart')
+ @DocsEditable
final int fetchStart;
- @DocsEditable @DomName('PerformanceTiming.loadEventEnd')
+ @DomName('PerformanceTiming.loadEventEnd')
+ @DocsEditable
final int loadEventEnd;
- @DocsEditable @DomName('PerformanceTiming.loadEventStart')
+ @DomName('PerformanceTiming.loadEventStart')
+ @DocsEditable
final int loadEventStart;
- @DocsEditable @DomName('PerformanceTiming.navigationStart')
+ @DomName('PerformanceTiming.navigationStart')
+ @DocsEditable
final int navigationStart;
- @DocsEditable @DomName('PerformanceTiming.redirectEnd')
+ @DomName('PerformanceTiming.redirectEnd')
+ @DocsEditable
final int redirectEnd;
- @DocsEditable @DomName('PerformanceTiming.redirectStart')
+ @DomName('PerformanceTiming.redirectStart')
+ @DocsEditable
final int redirectStart;
- @DocsEditable @DomName('PerformanceTiming.requestStart')
+ @DomName('PerformanceTiming.requestStart')
+ @DocsEditable
final int requestStart;
- @DocsEditable @DomName('PerformanceTiming.responseEnd')
+ @DomName('PerformanceTiming.responseEnd')
+ @DocsEditable
final int responseEnd;
- @DocsEditable @DomName('PerformanceTiming.responseStart')
+ @DomName('PerformanceTiming.responseStart')
+ @DocsEditable
final int responseStart;
- @DocsEditable @DomName('PerformanceTiming.secureConnectionStart')
+ @DomName('PerformanceTiming.secureConnectionStart')
+ @DocsEditable
final int secureConnectionStart;
- @DocsEditable @DomName('PerformanceTiming.unloadEventEnd')
+ @DomName('PerformanceTiming.unloadEventEnd')
+ @DocsEditable
final int unloadEventEnd;
- @DocsEditable @DomName('PerformanceTiming.unloadEventStart')
+ @DomName('PerformanceTiming.unloadEventStart')
+ @DocsEditable
final int unloadEventStart;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -16471,7 +18237,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('WebKitPoint')
class Point native "*WebKitPoint" {
@@ -16480,10 +18245,12 @@
factory Point(num x, num y) => Point._create(x, y);
static Point _create(num x, num y) => JS('Point', 'new WebKitPoint(#,#)', x, y);
- @DocsEditable @DomName('WebKitPoint.x')
+ @DomName('WebKitPoint.x')
+ @DocsEditable
num x;
- @DocsEditable @DomName('WebKitPoint.y')
+ @DomName('WebKitPoint.y')
+ @DocsEditable
num y;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -16491,14 +18258,20 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('PopStateEvent')
+@SupportedBrowser(SupportedBrowser.CHROME)
+@SupportedBrowser(SupportedBrowser.FIREFOX)
+@SupportedBrowser(SupportedBrowser.IE, '10')
+@SupportedBrowser(SupportedBrowser.SAFARI)
class PopStateEvent extends Event native "*PopStateEvent" {
dynamic get state => convertNativeToDart_SerializedScriptValue(this._state);
@JSName('state')
- @DocsEditable @DomName('PopStateEvent.state') @annotation_Creates_SerializedScriptValue @annotation_Returns_SerializedScriptValue
+ @DomName('PopStateEvent.state')
+ @DocsEditable
+ @annotation_Creates_SerializedScriptValue
+ @annotation_Returns_SerializedScriptValue
final dynamic _state;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -16514,7 +18287,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('PositionError')
class PositionError native "*PositionError" {
@@ -16525,10 +18297,12 @@
static const int TIMEOUT = 3;
- @DocsEditable @DomName('PositionError.code')
+ @DomName('PositionError.code')
+ @DocsEditable
final int code;
- @DocsEditable @DomName('PositionError.message')
+ @DomName('PositionError.message')
+ @DocsEditable
final String message;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -16544,7 +18318,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('HTMLPreElement')
class PreElement extends Element native "*HTMLPreElement" {
@@ -16552,7 +18325,8 @@
@DocsEditable
factory PreElement() => document.$dom_createElement("pre");
- @DocsEditable @DomName('HTMLPreElement.wrap')
+ @DomName('HTMLPreElement.wrap')
+ @DocsEditable
bool wrap;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -16560,18 +18334,20 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('ProcessingInstruction')
class ProcessingInstruction extends Node native "*ProcessingInstruction" {
- @DocsEditable @DomName('ProcessingInstruction.data')
+ @DomName('ProcessingInstruction.data')
+ @DocsEditable
String data;
- @DocsEditable @DomName('ProcessingInstruction.sheet')
+ @DomName('ProcessingInstruction.sheet')
+ @DocsEditable
final StyleSheet sheet;
- @DocsEditable @DomName('ProcessingInstruction.target')
+ @DomName('ProcessingInstruction.target')
+ @DocsEditable
final String target;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -16579,7 +18355,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('HTMLProgressElement')
@SupportedBrowser(SupportedBrowser.CHROME)
@@ -16594,17 +18369,22 @@
/// Checks if this type is supported on the current platform.
static bool get supported => Element.isTagSupported('progress');
- @DocsEditable @DomName('HTMLProgressElement.labels')
- @Returns('NodeList') @Creates('NodeList')
+ @DomName('HTMLProgressElement.labels')
+ @DocsEditable
+ @Returns('NodeList')
+ @Creates('NodeList')
final List<Node> labels;
- @DocsEditable @DomName('HTMLProgressElement.max')
+ @DomName('HTMLProgressElement.max')
+ @DocsEditable
num max;
- @DocsEditable @DomName('HTMLProgressElement.position')
+ @DomName('HTMLProgressElement.position')
+ @DocsEditable
final num position;
- @DocsEditable @DomName('HTMLProgressElement.value')
+ @DomName('HTMLProgressElement.value')
+ @DocsEditable
num value;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -16612,18 +18392,20 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('ProgressEvent')
class ProgressEvent extends Event native "*ProgressEvent" {
- @DocsEditable @DomName('ProgressEvent.lengthComputable')
+ @DomName('ProgressEvent.lengthComputable')
+ @DocsEditable
final bool lengthComputable;
- @DocsEditable @DomName('ProgressEvent.loaded')
+ @DomName('ProgressEvent.loaded')
+ @DocsEditable
final int loaded;
- @DocsEditable @DomName('ProgressEvent.total')
+ @DomName('ProgressEvent.total')
+ @DocsEditable
final int total;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -16631,12 +18413,12 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('HTMLQuoteElement')
class QuoteElement extends Element native "*HTMLQuoteElement" {
- @DocsEditable @DomName('HTMLQuoteElement.cite')
+ @DomName('HTMLQuoteElement.cite')
+ @DocsEditable
String cite;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -16668,12 +18450,12 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('RadioNodeList')
class RadioNodeList extends NodeList native "*RadioNodeList" {
- @DocsEditable @DomName('RadioNodeList.value')
+ @DomName('RadioNodeList.value')
+ @DocsEditable
String value;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -16683,7 +18465,6 @@
// WARNING: Do not edit - generated code.
-@DocsEditable
@DomName('Range')
class Range native "*Range" {
factory Range() => document.$dom_createRange();
@@ -16705,98 +18486,130 @@
static const int START_TO_START = 0;
- @DocsEditable @DomName('Range.collapsed')
+ @DomName('Range.collapsed')
+ @DocsEditable
final bool collapsed;
- @DocsEditable @DomName('Range.commonAncestorContainer')
+ @DomName('Range.commonAncestorContainer')
+ @DocsEditable
final Node commonAncestorContainer;
- @DocsEditable @DomName('Range.endContainer')
+ @DomName('Range.endContainer')
+ @DocsEditable
final Node endContainer;
- @DocsEditable @DomName('Range.endOffset')
+ @DomName('Range.endOffset')
+ @DocsEditable
final int endOffset;
- @DocsEditable @DomName('Range.startContainer')
+ @DomName('Range.startContainer')
+ @DocsEditable
final Node startContainer;
- @DocsEditable @DomName('Range.startOffset')
+ @DomName('Range.startOffset')
+ @DocsEditable
final int startOffset;
- @DocsEditable @DomName('Range.cloneContents')
+ @DomName('Range.cloneContents')
+ @DocsEditable
DocumentFragment cloneContents() native;
- @DocsEditable @DomName('Range.cloneRange')
+ @DomName('Range.cloneRange')
+ @DocsEditable
Range cloneRange() native;
- @DocsEditable @DomName('Range.collapse')
+ @DomName('Range.collapse')
+ @DocsEditable
void collapse(bool toStart) native;
- @DocsEditable @DomName('Range.compareNode')
+ @DomName('Range.compareNode')
+ @DocsEditable
int compareNode(Node refNode) native;
- @DocsEditable @DomName('Range.comparePoint')
+ @DomName('Range.comparePoint')
+ @DocsEditable
int comparePoint(Node refNode, int offset) native;
- @DocsEditable @DomName('Range.createContextualFragment')
+ @DomName('Range.createContextualFragment')
+ @DocsEditable
DocumentFragment createContextualFragment(String html) native;
- @DocsEditable @DomName('Range.deleteContents')
+ @DomName('Range.deleteContents')
+ @DocsEditable
void deleteContents() native;
- @DocsEditable @DomName('Range.detach')
+ @DomName('Range.detach')
+ @DocsEditable
void detach() native;
- @DocsEditable @DomName('Range.expand')
+ @DomName('Range.expand')
+ @DocsEditable
void expand(String unit) native;
- @DocsEditable @DomName('Range.extractContents')
+ @DomName('Range.extractContents')
+ @DocsEditable
DocumentFragment extractContents() native;
- @DocsEditable @DomName('Range.getBoundingClientRect')
+ @DomName('Range.getBoundingClientRect')
+ @DocsEditable
ClientRect getBoundingClientRect() native;
- @DocsEditable @DomName('Range.getClientRects')
- @Returns('_ClientRectList') @Creates('_ClientRectList')
+ @DomName('Range.getClientRects')
+ @DocsEditable
+ @Returns('_ClientRectList')
+ @Creates('_ClientRectList')
List<ClientRect> getClientRects() native;
- @DocsEditable @DomName('Range.insertNode')
+ @DomName('Range.insertNode')
+ @DocsEditable
void insertNode(Node newNode) native;
- @DocsEditable @DomName('Range.intersectsNode')
+ @DomName('Range.intersectsNode')
+ @DocsEditable
bool intersectsNode(Node refNode) native;
- @DocsEditable @DomName('Range.isPointInRange')
+ @DomName('Range.isPointInRange')
+ @DocsEditable
bool isPointInRange(Node refNode, int offset) native;
- @DocsEditable @DomName('Range.selectNode')
+ @DomName('Range.selectNode')
+ @DocsEditable
void selectNode(Node refNode) native;
- @DocsEditable @DomName('Range.selectNodeContents')
+ @DomName('Range.selectNodeContents')
+ @DocsEditable
void selectNodeContents(Node refNode) native;
- @DocsEditable @DomName('Range.setEnd')
+ @DomName('Range.setEnd')
+ @DocsEditable
void setEnd(Node refNode, int offset) native;
- @DocsEditable @DomName('Range.setEndAfter')
+ @DomName('Range.setEndAfter')
+ @DocsEditable
void setEndAfter(Node refNode) native;
- @DocsEditable @DomName('Range.setEndBefore')
+ @DomName('Range.setEndBefore')
+ @DocsEditable
void setEndBefore(Node refNode) native;
- @DocsEditable @DomName('Range.setStart')
+ @DomName('Range.setStart')
+ @DocsEditable
void setStart(Node refNode, int offset) native;
- @DocsEditable @DomName('Range.setStartAfter')
+ @DomName('Range.setStartAfter')
+ @DocsEditable
void setStartAfter(Node refNode) native;
- @DocsEditable @DomName('Range.setStartBefore')
+ @DomName('Range.setStartBefore')
+ @DocsEditable
void setStartBefore(Node refNode) native;
- @DocsEditable @DomName('Range.surroundContents')
+ @DomName('Range.surroundContents')
+ @DocsEditable
void surroundContents(Node newParent) native;
- @DocsEditable @DomName('Range.toString')
+ @DomName('Range.toString')
+ @DocsEditable
String toString() native;
}
@@ -16805,7 +18618,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('RangeException')
class RangeException native "*RangeException" {
@@ -16814,16 +18626,20 @@
static const int INVALID_NODE_TYPE_ERR = 2;
- @DocsEditable @DomName('RangeException.code')
+ @DomName('RangeException.code')
+ @DocsEditable
final int code;
- @DocsEditable @DomName('RangeException.message')
+ @DomName('RangeException.message')
+ @DocsEditable
final String message;
- @DocsEditable @DomName('RangeException.name')
+ @DomName('RangeException.name')
+ @DocsEditable
final String name;
- @DocsEditable @DomName('RangeException.toString')
+ @DomName('RangeException.toString')
+ @DocsEditable
String toString() native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -16831,21 +18647,24 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('Rect')
class Rect native "*Rect" {
- @DocsEditable @DomName('Rect.bottom')
+ @DomName('Rect.bottom')
+ @DocsEditable
final CssPrimitiveValue bottom;
- @DocsEditable @DomName('Rect.left')
+ @DomName('Rect.left')
+ @DocsEditable
final CssPrimitiveValue left;
- @DocsEditable @DomName('Rect.right')
+ @DomName('Rect.right')
+ @DocsEditable
final CssPrimitiveValue right;
- @DocsEditable @DomName('Rect.top')
+ @DomName('Rect.top')
+ @DocsEditable
final CssPrimitiveValue top;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -16861,18 +18680,20 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('RGBColor')
class RgbColor native "*RGBColor" {
- @DocsEditable @DomName('RGBColor.blue')
+ @DomName('RGBColor.blue')
+ @DocsEditable
final CssPrimitiveValue blue;
- @DocsEditable @DomName('RGBColor.green')
+ @DomName('RGBColor.green')
+ @DocsEditable
final CssPrimitiveValue green;
- @DocsEditable @DomName('RGBColor.red')
+ @DomName('RGBColor.red')
+ @DocsEditable
final CssPrimitiveValue red;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -16880,67 +18701,93 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('RTCDataChannel')
class RtcDataChannel extends EventTarget native "*RTCDataChannel" {
+ @DomName('RTCDataChannel.close')
+ @DocsEditable
static const EventStreamProvider<Event> closeEvent = const EventStreamProvider<Event>('close');
+ @DomName('RTCDataChannel.error')
+ @DocsEditable
static const EventStreamProvider<Event> errorEvent = const EventStreamProvider<Event>('error');
+ @DomName('RTCDataChannel.message')
+ @DocsEditable
static const EventStreamProvider<MessageEvent> messageEvent = const EventStreamProvider<MessageEvent>('message');
+ @DomName('RTCDataChannel.open')
+ @DocsEditable
static const EventStreamProvider<Event> openEvent = const EventStreamProvider<Event>('open');
@DocsEditable
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
+ @deprecated
RtcDataChannelEvents get on =>
new RtcDataChannelEvents(this);
- @DocsEditable @DomName('RTCDataChannel.binaryType')
+ @DomName('RTCDataChannel.binaryType')
+ @DocsEditable
String binaryType;
- @DocsEditable @DomName('RTCDataChannel.bufferedAmount')
+ @DomName('RTCDataChannel.bufferedAmount')
+ @DocsEditable
final int bufferedAmount;
- @DocsEditable @DomName('RTCDataChannel.label')
+ @DomName('RTCDataChannel.label')
+ @DocsEditable
final String label;
- @DocsEditable @DomName('RTCDataChannel.readyState')
+ @DomName('RTCDataChannel.readyState')
+ @DocsEditable
final String readyState;
- @DocsEditable @DomName('RTCDataChannel.reliable')
+ @DomName('RTCDataChannel.reliable')
+ @DocsEditable
final bool reliable;
@JSName('addEventListener')
- @DocsEditable @DomName('RTCDataChannel.addEventListener')
+ @DomName('RTCDataChannel.addEventListener')
+ @DocsEditable
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native;
- @DocsEditable @DomName('RTCDataChannel.close')
+ @DomName('RTCDataChannel.close')
+ @DocsEditable
void close() native;
- @JSName('dispatchEvent')
- @DocsEditable @DomName('RTCDataChannel.dispatchEvent')
- bool $dom_dispatchEvent(Event event) native;
+ @DomName('RTCDataChannel.dispatchEvent')
+ @DocsEditable
+ bool dispatchEvent(Event event) native;
@JSName('removeEventListener')
- @DocsEditable @DomName('RTCDataChannel.removeEventListener')
+ @DomName('RTCDataChannel.removeEventListener')
+ @DocsEditable
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native;
- @DocsEditable @DomName('RTCDataChannel.send')
+ @DomName('RTCDataChannel.send')
+ @DocsEditable
void send(data) native;
+ @DomName('RTCDataChannel.close')
+ @DocsEditable
Stream<Event> get onClose => closeEvent.forTarget(this);
+ @DomName('RTCDataChannel.error')
+ @DocsEditable
Stream<Event> get onError => errorEvent.forTarget(this);
+ @DomName('RTCDataChannel.message')
+ @DocsEditable
Stream<MessageEvent> get onMessage => messageEvent.forTarget(this);
+ @DomName('RTCDataChannel.open')
+ @DocsEditable
Stream<Event> get onOpen => openEvent.forTarget(this);
}
@DocsEditable
+@deprecated
class RtcDataChannelEvents extends Events {
@DocsEditable
RtcDataChannelEvents(EventTarget _ptr) : super(_ptr);
@@ -16962,12 +18809,12 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('RTCDataChannelEvent')
class RtcDataChannelEvent extends Event native "*RTCDataChannelEvent" {
- @DocsEditable @DomName('RTCDataChannelEvent.channel')
+ @DomName('RTCDataChannelEvent.channel')
+ @DocsEditable
final RtcDataChannel channel;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -16975,7 +18822,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('RTCIceCandidate')
class RtcIceCandidate native "*RTCIceCandidate" {
@@ -16984,13 +18830,16 @@
factory RtcIceCandidate(Map dictionary) => RtcIceCandidate._create(dictionary);
static RtcIceCandidate _create(Map dictionary) => JS('RtcIceCandidate', 'new RTCIceCandidate(#)', dictionary);
- @DocsEditable @DomName('RTCIceCandidate.candidate')
+ @DomName('RTCIceCandidate.candidate')
+ @DocsEditable
final String candidate;
- @DocsEditable @DomName('RTCIceCandidate.sdpMLineIndex')
+ @DomName('RTCIceCandidate.sdpMLineIndex')
+ @DocsEditable
final int sdpMLineIndex;
- @DocsEditable @DomName('RTCIceCandidate.sdpMid')
+ @DomName('RTCIceCandidate.sdpMid')
+ @DocsEditable
final String sdpMid;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -16998,12 +18847,12 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('RTCIceCandidateEvent')
class RtcIceCandidateEvent extends Event native "*RTCIceCandidateEvent" {
- @DocsEditable @DomName('RTCIceCandidateEvent.candidate')
+ @DomName('RTCIceCandidateEvent.candidate')
+ @DocsEditable
final RtcIceCandidate candidate;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -17011,25 +18860,40 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('RTCPeerConnection')
class RtcPeerConnection extends EventTarget native "*RTCPeerConnection" {
+ @DomName('RTCPeerConnection.addstream')
+ @DocsEditable
static const EventStreamProvider<MediaStreamEvent> addStreamEvent = const EventStreamProvider<MediaStreamEvent>('addstream');
+ @DomName('RTCPeerConnection.datachannel')
+ @DocsEditable
static const EventStreamProvider<RtcDataChannelEvent> dataChannelEvent = const EventStreamProvider<RtcDataChannelEvent>('datachannel');
+ @DomName('RTCPeerConnection.icecandidate')
+ @DocsEditable
static const EventStreamProvider<RtcIceCandidateEvent> iceCandidateEvent = const EventStreamProvider<RtcIceCandidateEvent>('icecandidate');
+ @DomName('RTCPeerConnection.icechange')
+ @DocsEditable
static const EventStreamProvider<Event> iceChangeEvent = const EventStreamProvider<Event>('icechange');
+ @DomName('RTCPeerConnection.negotiationneeded')
+ @DocsEditable
static const EventStreamProvider<Event> negotiationNeededEvent = const EventStreamProvider<Event>('negotiationneeded');
+ @DomName('RTCPeerConnection.open')
+ @DocsEditable
static const EventStreamProvider<Event> openEvent = const EventStreamProvider<Event>('open');
+ @DomName('RTCPeerConnection.removestream')
+ @DocsEditable
static const EventStreamProvider<MediaStreamEvent> removeStreamEvent = const EventStreamProvider<MediaStreamEvent>('removestream');
+ @DomName('RTCPeerConnection.statechange')
+ @DocsEditable
static const EventStreamProvider<Event> stateChangeEvent = const EventStreamProvider<Event>('statechange');
@DocsEditable
@@ -17048,37 +18912,49 @@
@DocsEditable
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
+ @deprecated
RtcPeerConnectionEvents get on =>
new RtcPeerConnectionEvents(this);
- @DocsEditable @DomName('RTCPeerConnection.iceGatheringState')
+ @DomName('RTCPeerConnection.iceGatheringState')
+ @DocsEditable
final String iceGatheringState;
- @DocsEditable @DomName('RTCPeerConnection.iceState')
+ @DomName('RTCPeerConnection.iceState')
+ @DocsEditable
final String iceState;
- @DocsEditable @DomName('RTCPeerConnection.localDescription')
+ @DomName('RTCPeerConnection.localDescription')
+ @DocsEditable
final RtcSessionDescription localDescription;
- @DocsEditable @DomName('RTCPeerConnection.localStreams')
- @Returns('_MediaStreamList') @Creates('_MediaStreamList')
+ @DomName('RTCPeerConnection.localStreams')
+ @DocsEditable
+ @Returns('_MediaStreamList')
+ @Creates('_MediaStreamList')
final List<MediaStream> localStreams;
- @DocsEditable @DomName('RTCPeerConnection.readyState')
+ @DomName('RTCPeerConnection.readyState')
+ @DocsEditable
final String readyState;
- @DocsEditable @DomName('RTCPeerConnection.remoteDescription')
+ @DomName('RTCPeerConnection.remoteDescription')
+ @DocsEditable
final RtcSessionDescription remoteDescription;
- @DocsEditable @DomName('RTCPeerConnection.remoteStreams')
- @Returns('_MediaStreamList') @Creates('_MediaStreamList')
+ @DomName('RTCPeerConnection.remoteStreams')
+ @DocsEditable
+ @Returns('_MediaStreamList')
+ @Creates('_MediaStreamList')
final List<MediaStream> remoteStreams;
@JSName('addEventListener')
- @DocsEditable @DomName('RTCPeerConnection.addEventListener')
+ @DomName('RTCPeerConnection.addEventListener')
+ @DocsEditable
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native;
- @DocsEditable @DomName('RTCPeerConnection.addIceCandidate')
+ @DomName('RTCPeerConnection.addIceCandidate')
+ @DocsEditable
void addIceCandidate(RtcIceCandidate candidate) native;
void addStream(MediaStream stream, [Map mediaConstraints]) {
@@ -17091,13 +18967,16 @@
return;
}
@JSName('addStream')
- @DocsEditable @DomName('RTCPeerConnection.addStream')
+ @DomName('RTCPeerConnection.addStream')
+ @DocsEditable
void _addStream_1(MediaStream stream, mediaConstraints) native;
@JSName('addStream')
- @DocsEditable @DomName('RTCPeerConnection.addStream')
+ @DomName('RTCPeerConnection.addStream')
+ @DocsEditable
void _addStream_2(MediaStream stream) native;
- @DocsEditable @DomName('RTCPeerConnection.close')
+ @DomName('RTCPeerConnection.close')
+ @DocsEditable
void close() native;
void createAnswer(RtcSessionDescriptionCallback successCallback, [RtcErrorCallback failureCallback, Map mediaConstraints]) {
@@ -17110,10 +18989,12 @@
return;
}
@JSName('createAnswer')
- @DocsEditable @DomName('RTCPeerConnection.createAnswer')
+ @DomName('RTCPeerConnection.createAnswer')
+ @DocsEditable
void _createAnswer_1(RtcSessionDescriptionCallback successCallback, RtcErrorCallback failureCallback, mediaConstraints) native;
@JSName('createAnswer')
- @DocsEditable @DomName('RTCPeerConnection.createAnswer')
+ @DomName('RTCPeerConnection.createAnswer')
+ @DocsEditable
void _createAnswer_2(RtcSessionDescriptionCallback successCallback, RtcErrorCallback failureCallback) native;
RtcDataChannel createDataChannel(String label, [Map options]) {
@@ -17124,10 +19005,12 @@
return _createDataChannel_2(label);
}
@JSName('createDataChannel')
- @DocsEditable @DomName('RTCPeerConnection.createDataChannel')
+ @DomName('RTCPeerConnection.createDataChannel')
+ @DocsEditable
RtcDataChannel _createDataChannel_1(label, options) native;
@JSName('createDataChannel')
- @DocsEditable @DomName('RTCPeerConnection.createDataChannel')
+ @DomName('RTCPeerConnection.createDataChannel')
+ @DocsEditable
RtcDataChannel _createDataChannel_2(label) native;
void createOffer(RtcSessionDescriptionCallback successCallback, [RtcErrorCallback failureCallback, Map mediaConstraints]) {
@@ -17140,30 +19023,37 @@
return;
}
@JSName('createOffer')
- @DocsEditable @DomName('RTCPeerConnection.createOffer')
+ @DomName('RTCPeerConnection.createOffer')
+ @DocsEditable
void _createOffer_1(RtcSessionDescriptionCallback successCallback, RtcErrorCallback failureCallback, mediaConstraints) native;
@JSName('createOffer')
- @DocsEditable @DomName('RTCPeerConnection.createOffer')
+ @DomName('RTCPeerConnection.createOffer')
+ @DocsEditable
void _createOffer_2(RtcSessionDescriptionCallback successCallback, RtcErrorCallback failureCallback) native;
- @JSName('dispatchEvent')
- @DocsEditable @DomName('RTCPeerConnection.dispatchEvent')
- bool $dom_dispatchEvent(Event event) native;
+ @DomName('RTCPeerConnection.dispatchEvent')
+ @DocsEditable
+ bool dispatchEvent(Event event) native;
- @DocsEditable @DomName('RTCPeerConnection.getStats')
+ @DomName('RTCPeerConnection.getStats')
+ @DocsEditable
void getStats(RtcStatsCallback successCallback, MediaStreamTrack selector) native;
@JSName('removeEventListener')
- @DocsEditable @DomName('RTCPeerConnection.removeEventListener')
+ @DomName('RTCPeerConnection.removeEventListener')
+ @DocsEditable
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native;
- @DocsEditable @DomName('RTCPeerConnection.removeStream')
+ @DomName('RTCPeerConnection.removeStream')
+ @DocsEditable
void removeStream(MediaStream stream) native;
- @DocsEditable @DomName('RTCPeerConnection.setLocalDescription')
+ @DomName('RTCPeerConnection.setLocalDescription')
+ @DocsEditable
void setLocalDescription(RtcSessionDescription description, [VoidCallback successCallback, RtcErrorCallback failureCallback]) native;
- @DocsEditable @DomName('RTCPeerConnection.setRemoteDescription')
+ @DomName('RTCPeerConnection.setRemoteDescription')
+ @DocsEditable
void setRemoteDescription(RtcSessionDescription description, [VoidCallback successCallback, RtcErrorCallback failureCallback]) native;
void updateIce([Map configuration, Map mediaConstraints]) {
@@ -17182,33 +19072,53 @@
return;
}
@JSName('updateIce')
- @DocsEditable @DomName('RTCPeerConnection.updateIce')
+ @DomName('RTCPeerConnection.updateIce')
+ @DocsEditable
void _updateIce_1(configuration, mediaConstraints) native;
@JSName('updateIce')
- @DocsEditable @DomName('RTCPeerConnection.updateIce')
+ @DomName('RTCPeerConnection.updateIce')
+ @DocsEditable
void _updateIce_2(configuration) native;
@JSName('updateIce')
- @DocsEditable @DomName('RTCPeerConnection.updateIce')
+ @DomName('RTCPeerConnection.updateIce')
+ @DocsEditable
void _updateIce_3() native;
+ @DomName('RTCPeerConnection.addstream')
+ @DocsEditable
Stream<MediaStreamEvent> get onAddStream => addStreamEvent.forTarget(this);
+ @DomName('RTCPeerConnection.datachannel')
+ @DocsEditable
Stream<RtcDataChannelEvent> get onDataChannel => dataChannelEvent.forTarget(this);
+ @DomName('RTCPeerConnection.icecandidate')
+ @DocsEditable
Stream<RtcIceCandidateEvent> get onIceCandidate => iceCandidateEvent.forTarget(this);
+ @DomName('RTCPeerConnection.icechange')
+ @DocsEditable
Stream<Event> get onIceChange => iceChangeEvent.forTarget(this);
+ @DomName('RTCPeerConnection.negotiationneeded')
+ @DocsEditable
Stream<Event> get onNegotiationNeeded => negotiationNeededEvent.forTarget(this);
+ @DomName('RTCPeerConnection.open')
+ @DocsEditable
Stream<Event> get onOpen => openEvent.forTarget(this);
+ @DomName('RTCPeerConnection.removestream')
+ @DocsEditable
Stream<MediaStreamEvent> get onRemoveStream => removeStreamEvent.forTarget(this);
+ @DomName('RTCPeerConnection.statechange')
+ @DocsEditable
Stream<Event> get onStateChange => stateChangeEvent.forTarget(this);
}
@DocsEditable
+@deprecated
class RtcPeerConnectionEvents extends Events {
@DocsEditable
RtcPeerConnectionEvents(EventTarget _ptr) : super(_ptr);
@@ -17239,7 +19149,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('RTCSessionDescription')
class RtcSessionDescription native "*RTCSessionDescription" {
@@ -17248,10 +19157,12 @@
factory RtcSessionDescription(Map dictionary) => RtcSessionDescription._create(dictionary);
static RtcSessionDescription _create(Map dictionary) => JS('RtcSessionDescription', 'new RTCSessionDescription(#)', dictionary);
- @DocsEditable @DomName('RTCSessionDescription.sdp')
+ @DomName('RTCSessionDescription.sdp')
+ @DocsEditable
String sdp;
- @DocsEditable @DomName('RTCSessionDescription.type')
+ @DomName('RTCSessionDescription.type')
+ @DocsEditable
String type;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -17259,18 +19170,20 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('RTCStatsElement')
class RtcStatsElement native "*RTCStatsElement" {
- @DocsEditable @DomName('RTCStatsElement.timestamp')
+ @DomName('RTCStatsElement.timestamp')
+ @DocsEditable
final Date timestamp;
- @DocsEditable @DomName('RTCStatsElement.names')
+ @DomName('RTCStatsElement.names')
+ @DocsEditable
List<String> names() native;
- @DocsEditable @DomName('RTCStatsElement.stat')
+ @DomName('RTCStatsElement.stat')
+ @DocsEditable
String stat(String name) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -17278,15 +19191,16 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('RTCStatsReport')
class RtcStatsReport native "*RTCStatsReport" {
- @DocsEditable @DomName('RTCStatsReport.local')
+ @DomName('RTCStatsReport.local')
+ @DocsEditable
final RtcStatsElement local;
- @DocsEditable @DomName('RTCStatsReport.remote')
+ @DomName('RTCStatsReport.remote')
+ @DocsEditable
final RtcStatsElement remote;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -17294,12 +19208,12 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('RTCStatsResponse')
class RtcStatsResponse native "*RTCStatsResponse" {
- @DocsEditable @DomName('RTCStatsResponse.result')
+ @DomName('RTCStatsResponse.result')
+ @DocsEditable
List<RtcStatsReport> result() native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -17347,33 +19261,40 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('Screen')
class Screen native "*Screen" {
- @DocsEditable @DomName('Screen.availHeight')
+ @DomName('Screen.availHeight')
+ @DocsEditable
final int availHeight;
- @DocsEditable @DomName('Screen.availLeft')
+ @DomName('Screen.availLeft')
+ @DocsEditable
final int availLeft;
- @DocsEditable @DomName('Screen.availTop')
+ @DomName('Screen.availTop')
+ @DocsEditable
final int availTop;
- @DocsEditable @DomName('Screen.availWidth')
+ @DomName('Screen.availWidth')
+ @DocsEditable
final int availWidth;
- @DocsEditable @DomName('Screen.colorDepth')
+ @DomName('Screen.colorDepth')
+ @DocsEditable
final int colorDepth;
- @DocsEditable @DomName('Screen.height')
+ @DomName('Screen.height')
+ @DocsEditable
final int height;
- @DocsEditable @DomName('Screen.pixelDepth')
+ @DomName('Screen.pixelDepth')
+ @DocsEditable
final int pixelDepth;
- @DocsEditable @DomName('Screen.width')
+ @DomName('Screen.width')
+ @DocsEditable
final int width;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -17381,7 +19302,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('HTMLScriptElement')
class ScriptElement extends Element native "*HTMLScriptElement" {
@@ -17389,28 +19309,36 @@
@DocsEditable
factory ScriptElement() => document.$dom_createElement("script");
- @DocsEditable @DomName('HTMLScriptElement.async')
+ @DomName('HTMLScriptElement.async')
+ @DocsEditable
bool async;
- @DocsEditable @DomName('HTMLScriptElement.charset')
+ @DomName('HTMLScriptElement.charset')
+ @DocsEditable
String charset;
- @DocsEditable @DomName('HTMLScriptElement.crossOrigin')
+ @DomName('HTMLScriptElement.crossOrigin')
+ @DocsEditable
String crossOrigin;
- @DocsEditable @DomName('HTMLScriptElement.defer')
+ @DomName('HTMLScriptElement.defer')
+ @DocsEditable
bool defer;
- @DocsEditable @DomName('HTMLScriptElement.event')
+ @DomName('HTMLScriptElement.event')
+ @DocsEditable
String event;
- @DocsEditable @DomName('HTMLScriptElement.htmlFor')
+ @DomName('HTMLScriptElement.htmlFor')
+ @DocsEditable
String htmlFor;
- @DocsEditable @DomName('HTMLScriptElement.src')
+ @DomName('HTMLScriptElement.src')
+ @DocsEditable
String src;
- @DocsEditable @DomName('HTMLScriptElement.type')
+ @DomName('HTMLScriptElement.type')
+ @DocsEditable
String type;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -17418,21 +19346,24 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('ScriptProfile')
class ScriptProfile native "*ScriptProfile" {
- @DocsEditable @DomName('ScriptProfile.head')
+ @DomName('ScriptProfile.head')
+ @DocsEditable
final ScriptProfileNode head;
- @DocsEditable @DomName('ScriptProfile.idleTime')
+ @DomName('ScriptProfile.idleTime')
+ @DocsEditable
final num idleTime;
- @DocsEditable @DomName('ScriptProfile.title')
+ @DomName('ScriptProfile.title')
+ @DocsEditable
final String title;
- @DocsEditable @DomName('ScriptProfile.uid')
+ @DomName('ScriptProfile.uid')
+ @DocsEditable
final int uid;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -17440,37 +19371,45 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('ScriptProfileNode')
class ScriptProfileNode native "*ScriptProfileNode" {
@JSName('callUID')
- @DocsEditable @DomName('ScriptProfileNode.callUID')
+ @DomName('ScriptProfileNode.callUID')
+ @DocsEditable
final int callUid;
- @DocsEditable @DomName('ScriptProfileNode.functionName')
+ @DomName('ScriptProfileNode.functionName')
+ @DocsEditable
final String functionName;
- @DocsEditable @DomName('ScriptProfileNode.lineNumber')
+ @DomName('ScriptProfileNode.lineNumber')
+ @DocsEditable
final int lineNumber;
- @DocsEditable @DomName('ScriptProfileNode.numberOfCalls')
+ @DomName('ScriptProfileNode.numberOfCalls')
+ @DocsEditable
final int numberOfCalls;
- @DocsEditable @DomName('ScriptProfileNode.selfTime')
+ @DomName('ScriptProfileNode.selfTime')
+ @DocsEditable
final num selfTime;
- @DocsEditable @DomName('ScriptProfileNode.totalTime')
+ @DomName('ScriptProfileNode.totalTime')
+ @DocsEditable
final num totalTime;
- @DocsEditable @DomName('ScriptProfileNode.url')
+ @DomName('ScriptProfileNode.url')
+ @DocsEditable
final String url;
- @DocsEditable @DomName('ScriptProfileNode.visible')
+ @DomName('ScriptProfileNode.visible')
+ @DocsEditable
final bool visible;
- @DocsEditable @DomName('ScriptProfileNode.children')
+ @DomName('ScriptProfileNode.children')
+ @DocsEditable
List<ScriptProfileNode> children() native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -17478,69 +19417,88 @@
// BSD-style license that can be found in the LICENSE file.
-@DocsEditable
@DomName('HTMLSelectElement')
class SelectElement extends Element native "*HTMLSelectElement" {
@DocsEditable
factory SelectElement() => document.$dom_createElement("select");
- @DocsEditable @DomName('HTMLSelectElement.autofocus')
+ @DomName('HTMLSelectElement.autofocus')
+ @DocsEditable
bool autofocus;
- @DocsEditable @DomName('HTMLSelectElement.disabled')
+ @DomName('HTMLSelectElement.disabled')
+ @DocsEditable
bool disabled;
- @DocsEditable @DomName('HTMLSelectElement.form')
+ @DomName('HTMLSelectElement.form')
+ @DocsEditable
final FormElement form;
- @DocsEditable @DomName('HTMLSelectElement.labels')
- @Returns('NodeList') @Creates('NodeList')
+ @DomName('HTMLSelectElement.labels')
+ @DocsEditable
+ @Returns('NodeList')
+ @Creates('NodeList')
final List<Node> labels;
- @DocsEditable @DomName('HTMLSelectElement.length')
+ @DomName('HTMLSelectElement.length')
+ @DocsEditable
int length;
- @DocsEditable @DomName('HTMLSelectElement.multiple')
+ @DomName('HTMLSelectElement.multiple')
+ @DocsEditable
bool multiple;
- @DocsEditable @DomName('HTMLSelectElement.name')
+ @DomName('HTMLSelectElement.name')
+ @DocsEditable
String name;
- @DocsEditable @DomName('HTMLSelectElement.required')
+ @DomName('HTMLSelectElement.required')
+ @DocsEditable
bool required;
- @DocsEditable @DomName('HTMLSelectElement.selectedIndex')
+ @DomName('HTMLSelectElement.selectedIndex')
+ @DocsEditable
int selectedIndex;
- @DocsEditable @DomName('HTMLSelectElement.size')
+ @DomName('HTMLSelectElement.size')
+ @DocsEditable
int size;
- @DocsEditable @DomName('HTMLSelectElement.type')
+ @DomName('HTMLSelectElement.type')
+ @DocsEditable
final String type;
- @DocsEditable @DomName('HTMLSelectElement.validationMessage')
+ @DomName('HTMLSelectElement.validationMessage')
+ @DocsEditable
final String validationMessage;
- @DocsEditable @DomName('HTMLSelectElement.validity')
+ @DomName('HTMLSelectElement.validity')
+ @DocsEditable
final ValidityState validity;
- @DocsEditable @DomName('HTMLSelectElement.value')
+ @DomName('HTMLSelectElement.value')
+ @DocsEditable
String value;
- @DocsEditable @DomName('HTMLSelectElement.willValidate')
+ @DomName('HTMLSelectElement.willValidate')
+ @DocsEditable
final bool willValidate;
- @DocsEditable @DomName('HTMLSelectElement.checkValidity')
+ @DomName('HTMLSelectElement.checkValidity')
+ @DocsEditable
bool checkValidity() native;
- @DocsEditable @DomName('HTMLSelectElement.item')
+ @DomName('HTMLSelectElement.item')
+ @DocsEditable
Node item(int index) native;
- @DocsEditable @DomName('HTMLSelectElement.namedItem')
+ @DomName('HTMLSelectElement.namedItem')
+ @DocsEditable
Node namedItem(String name) native;
- @DocsEditable @DomName('HTMLSelectElement.setCustomValidity')
+ @DomName('HTMLSelectElement.setCustomValidity')
+ @DocsEditable
void setCustomValidity(String error) native;
@@ -17548,14 +19506,16 @@
// does not operate as a List.
List<OptionElement> get options {
var options = this.children.where((e) => e is OptionElement).toList();
- return new ListView(options, 0, options.length);
+ // TODO(floitsch): find better way to create a read-only list view.
+ return options.take(options.length);
}
List<OptionElement> get selectedOptions {
// IE does not change the selected flag for single-selection items.
if (this.multiple) {
var options = this.options.where((o) => o.selected).toList();
- return new ListView(options, 0, options.length);
+ // TODO(floitsch): find better way to create a read-only list view.
+ return options.take(options.length);
} else {
return [this.options[this.selectedIndex]];
}
@@ -17566,20 +19526,21 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('HTMLShadowElement')
@SupportedBrowser(SupportedBrowser.CHROME, '25')
-@Experimental()
+@Experimental
class ShadowElement extends Element native "*HTMLShadowElement" {
/// Checks if this type is supported on the current platform.
static bool get supported => Element.isTagSupported('shadow');
- @DocsEditable @DomName('HTMLShadowElement.olderShadowRoot')
+ @DomName('HTMLShadowElement.olderShadowRoot')
+ @DocsEditable
final ShadowRoot olderShadowRoot;
- @DocsEditable @DomName('HTMLShadowElement.resetStyleInheritance')
+ @DomName('HTMLShadowElement.resetStyleInheritance')
+ @DocsEditable
bool resetStyleInheritance;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -17589,47 +19550,58 @@
// WARNING: Do not edit - generated code.
-@DocsEditable
@DomName('ShadowRoot')
@SupportedBrowser(SupportedBrowser.CHROME, '25')
-@Experimental()
+@Experimental
class ShadowRoot extends DocumentFragment native "*ShadowRoot" {
- @DocsEditable @DomName('ShadowRoot.activeElement')
+ @DomName('ShadowRoot.activeElement')
+ @DocsEditable
final Element activeElement;
- @DocsEditable @DomName('ShadowRoot.applyAuthorStyles')
+ @DomName('ShadowRoot.applyAuthorStyles')
+ @DocsEditable
bool applyAuthorStyles;
@JSName('innerHTML')
- @DocsEditable @DomName('ShadowRoot.innerHTML')
+ @DomName('ShadowRoot.innerHTML')
+ @DocsEditable
String innerHtml;
- @DocsEditable @DomName('ShadowRoot.resetStyleInheritance')
+ @DomName('ShadowRoot.resetStyleInheritance')
+ @DocsEditable
bool resetStyleInheritance;
@JSName('cloneNode')
- @DocsEditable @DomName('ShadowRoot.cloneNode')
+ @DomName('ShadowRoot.cloneNode')
+ @DocsEditable
Node clone(bool deep) native;
- @DocsEditable @DomName('ShadowRoot.elementFromPoint')
+ @DomName('ShadowRoot.elementFromPoint')
+ @DocsEditable
Element elementFromPoint(int x, int y) native;
@JSName('getElementById')
- @DocsEditable @DomName('ShadowRoot.getElementById')
+ @DomName('ShadowRoot.getElementById')
+ @DocsEditable
Element $dom_getElementById(String elementId) native;
@JSName('getElementsByClassName')
- @DocsEditable @DomName('ShadowRoot.getElementsByClassName')
- @Returns('NodeList') @Creates('NodeList')
+ @DomName('ShadowRoot.getElementsByClassName')
+ @DocsEditable
+ @Returns('NodeList')
+ @Creates('NodeList')
List<Node> $dom_getElementsByClassName(String className) native;
@JSName('getElementsByTagName')
- @DocsEditable @DomName('ShadowRoot.getElementsByTagName')
- @Returns('NodeList') @Creates('NodeList')
+ @DomName('ShadowRoot.getElementsByTagName')
+ @DocsEditable
+ @Returns('NodeList')
+ @Creates('NodeList')
List<Node> $dom_getElementsByTagName(String tagName) native;
- @DocsEditable @DomName('ShadowRoot.getSelection')
+ @DomName('ShadowRoot.getSelection')
+ @DocsEditable
DomSelection getSelection() native;
static bool get supported =>
@@ -17640,7 +19612,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SharedWorker')
class SharedWorker extends AbstractWorker native "*SharedWorker" {
@@ -17659,7 +19630,8 @@
return JS('SharedWorker', 'new SharedWorker(#,#)', scriptURL, name);
}
- @DocsEditable @DomName('SharedWorker.port')
+ @DomName('SharedWorker.port')
+ @DocsEditable
final MessagePort port;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -17667,25 +19639,31 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SharedWorkerContext')
class SharedWorkerContext extends WorkerContext native "*SharedWorkerContext" {
+ @DomName('SharedWorkerContext.connect')
+ @DocsEditable
static const EventStreamProvider<Event> connectEvent = const EventStreamProvider<Event>('connect');
@DocsEditable
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
+ @deprecated
SharedWorkerContextEvents get on =>
new SharedWorkerContextEvents(this);
- @DocsEditable @DomName('SharedWorkerContext.name')
+ @DomName('SharedWorkerContext.name')
+ @DocsEditable
final String name;
+ @DomName('SharedWorkerContext.connect')
+ @DocsEditable
Stream<Event> get onConnect => connectEvent.forTarget(this);
}
@DocsEditable
+@deprecated
class SharedWorkerContextEvents extends WorkerContextEvents {
@DocsEditable
SharedWorkerContextEvents(EventTarget _ptr) : super(_ptr);
@@ -17698,21 +19676,24 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SourceBuffer')
class SourceBuffer native "*SourceBuffer" {
- @DocsEditable @DomName('SourceBuffer.buffered')
+ @DomName('SourceBuffer.buffered')
+ @DocsEditable
final TimeRanges buffered;
- @DocsEditable @DomName('SourceBuffer.timestampOffset')
+ @DomName('SourceBuffer.timestampOffset')
+ @DocsEditable
num timestampOffset;
- @DocsEditable @DomName('SourceBuffer.abort')
+ @DomName('SourceBuffer.abort')
+ @DocsEditable
void abort() native;
- @DocsEditable @DomName('SourceBuffer.append')
+ @DomName('SourceBuffer.append')
+ @DocsEditable
void append(Uint8Array data) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -17720,12 +19701,12 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SourceBufferList')
class SourceBufferList extends EventTarget implements JavaScriptIndexingBehavior, List<SourceBuffer> native "*SourceBufferList" {
- @DocsEditable @DomName('SourceBufferList.length')
+ @DomName('SourceBufferList.length')
+ @DocsEditable
int get length => JS("int", "#.length", this);
SourceBuffer operator[](int index) => JS("SourceBuffer", "#[#]", this, index);
@@ -17753,11 +19734,13 @@
void forEach(void f(SourceBuffer element)) => IterableMixinWorkaround.forEach(this, f);
- String join([String separator]) => IterableMixinWorkaround.joinList(this, separator);
+ String join([String separator]) =>
+ IterableMixinWorkaround.joinList(this, separator);
List mappedBy(f(SourceBuffer element)) => IterableMixinWorkaround.mappedByList(this, f);
- Iterable<SourceBuffer> where(bool f(SourceBuffer element)) => IterableMixinWorkaround.where(this, f);
+ Iterable<SourceBuffer> where(bool f(SourceBuffer element)) =>
+ IterableMixinWorkaround.where(this, f);
bool every(bool f(SourceBuffer element)) => IterableMixinWorkaround.every(this, f);
@@ -17819,6 +19802,9 @@
throw new UnsupportedError("Cannot clear immutable List.");
}
+ List<SourceBuffer> get reversed =>
+ new ReversedListView<SourceBuffer>(this, 0, null);
+
void sort([int compare(SourceBuffer a, SourceBuffer b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -17847,9 +19833,11 @@
throw new StateError("More than one element");
}
- SourceBuffer min([int compare(SourceBuffer a, SourceBuffer b)]) => IterableMixinWorkaround.min(this, compare);
+ SourceBuffer min([int compare(SourceBuffer a, SourceBuffer b)]) =>
+ IterableMixinWorkaround.min(this, compare);
- SourceBuffer max([int compare(SourceBuffer a, SourceBuffer b)]) => IterableMixinWorkaround.max(this, compare);
+ SourceBuffer max([int compare(SourceBuffer a, SourceBuffer b)]) =>
+ IterableMixinWorkaround.max(this, compare);
SourceBuffer removeAt(int pos) {
throw new UnsupportedError("Cannot remove from immutable List.");
@@ -17897,18 +19885,21 @@
// -- end List<SourceBuffer> mixins.
@JSName('addEventListener')
- @DocsEditable @DomName('SourceBufferList.addEventListener')
+ @DomName('SourceBufferList.addEventListener')
+ @DocsEditable
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native;
- @JSName('dispatchEvent')
- @DocsEditable @DomName('SourceBufferList.dispatchEvent')
- bool $dom_dispatchEvent(Event event) native;
+ @DomName('SourceBufferList.dispatchEvent')
+ @DocsEditable
+ bool dispatchEvent(Event event) native;
- @DocsEditable @DomName('SourceBufferList.item')
+ @DomName('SourceBufferList.item')
+ @DocsEditable
SourceBuffer item(int index) native;
@JSName('removeEventListener')
- @DocsEditable @DomName('SourceBufferList.removeEventListener')
+ @DomName('SourceBufferList.removeEventListener')
+ @DocsEditable
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -17916,7 +19907,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('HTMLSourceElement')
class SourceElement extends Element native "*HTMLSourceElement" {
@@ -17924,13 +19914,16 @@
@DocsEditable
factory SourceElement() => document.$dom_createElement("source");
- @DocsEditable @DomName('HTMLSourceElement.media')
+ @DomName('HTMLSourceElement.media')
+ @DocsEditable
String media;
- @DocsEditable @DomName('HTMLSourceElement.src')
+ @DomName('HTMLSourceElement.src')
+ @DocsEditable
String src;
- @DocsEditable @DomName('HTMLSourceElement.type')
+ @DomName('HTMLSourceElement.type')
+ @DocsEditable
String type;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -17938,7 +19931,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('HTMLSpanElement')
class SpanElement extends Element native "*HTMLSpanElement" {
@@ -17951,7 +19943,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SpeechGrammar')
class SpeechGrammar native "*SpeechGrammar" {
@@ -17960,10 +19951,12 @@
factory SpeechGrammar() => SpeechGrammar._create();
static SpeechGrammar _create() => JS('SpeechGrammar', 'new SpeechGrammar()');
- @DocsEditable @DomName('SpeechGrammar.src')
+ @DomName('SpeechGrammar.src')
+ @DocsEditable
String src;
- @DocsEditable @DomName('SpeechGrammar.weight')
+ @DomName('SpeechGrammar.weight')
+ @DocsEditable
num weight;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -17971,7 +19964,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SpeechGrammarList')
class SpeechGrammarList implements JavaScriptIndexingBehavior, List<SpeechGrammar> native "*SpeechGrammarList" {
@@ -17980,7 +19972,8 @@
factory SpeechGrammarList() => SpeechGrammarList._create();
static SpeechGrammarList _create() => JS('SpeechGrammarList', 'new SpeechGrammarList()');
- @DocsEditable @DomName('SpeechGrammarList.length')
+ @DomName('SpeechGrammarList.length')
+ @DocsEditable
int get length => JS("int", "#.length", this);
SpeechGrammar operator[](int index) => JS("SpeechGrammar", "#[#]", this, index);
@@ -18008,11 +20001,13 @@
void forEach(void f(SpeechGrammar element)) => IterableMixinWorkaround.forEach(this, f);
- String join([String separator]) => IterableMixinWorkaround.joinList(this, separator);
+ String join([String separator]) =>
+ IterableMixinWorkaround.joinList(this, separator);
List mappedBy(f(SpeechGrammar element)) => IterableMixinWorkaround.mappedByList(this, f);
- Iterable<SpeechGrammar> where(bool f(SpeechGrammar element)) => IterableMixinWorkaround.where(this, f);
+ Iterable<SpeechGrammar> where(bool f(SpeechGrammar element)) =>
+ IterableMixinWorkaround.where(this, f);
bool every(bool f(SpeechGrammar element)) => IterableMixinWorkaround.every(this, f);
@@ -18074,6 +20069,9 @@
throw new UnsupportedError("Cannot clear immutable List.");
}
+ List<SpeechGrammar> get reversed =>
+ new ReversedListView<SpeechGrammar>(this, 0, null);
+
void sort([int compare(SpeechGrammar a, SpeechGrammar b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -18102,9 +20100,11 @@
throw new StateError("More than one element");
}
- SpeechGrammar min([int compare(SpeechGrammar a, SpeechGrammar b)]) => IterableMixinWorkaround.min(this, compare);
+ SpeechGrammar min([int compare(SpeechGrammar a, SpeechGrammar b)]) =>
+ IterableMixinWorkaround.min(this, compare);
- SpeechGrammar max([int compare(SpeechGrammar a, SpeechGrammar b)]) => IterableMixinWorkaround.max(this, compare);
+ SpeechGrammar max([int compare(SpeechGrammar a, SpeechGrammar b)]) =>
+ IterableMixinWorkaround.max(this, compare);
SpeechGrammar removeAt(int pos) {
throw new UnsupportedError("Cannot remove from immutable List.");
@@ -18151,13 +20151,16 @@
// -- end List<SpeechGrammar> mixins.
- @DocsEditable @DomName('SpeechGrammarList.addFromString')
+ @DomName('SpeechGrammarList.addFromString')
+ @DocsEditable
void addFromString(String string, [num weight]) native;
- @DocsEditable @DomName('SpeechGrammarList.addFromUri')
+ @DomName('SpeechGrammarList.addFromUri')
+ @DocsEditable
void addFromUri(String src, [num weight]) native;
- @DocsEditable @DomName('SpeechGrammarList.item')
+ @DomName('SpeechGrammarList.item')
+ @DocsEditable
SpeechGrammar item(int index) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -18165,13 +20168,14 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SpeechInputEvent')
class SpeechInputEvent extends Event native "*SpeechInputEvent" {
- @DocsEditable @DomName('SpeechInputEvent.results')
- @Returns('_SpeechInputResultList') @Creates('_SpeechInputResultList')
+ @DomName('SpeechInputEvent.results')
+ @DocsEditable
+ @Returns('_SpeechInputResultList')
+ @Creates('_SpeechInputResultList')
final List<SpeechInputResult> results;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -18179,118 +20183,182 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SpeechInputResult')
class SpeechInputResult native "*SpeechInputResult" {
- @DocsEditable @DomName('SpeechInputResult.confidence')
+ @DomName('SpeechInputResult.confidence')
+ @DocsEditable
final num confidence;
- @DocsEditable @DomName('SpeechInputResult.utterance')
+ @DomName('SpeechInputResult.utterance')
+ @DocsEditable
final String utterance;
}
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-
-@DocsEditable
@DomName('SpeechRecognition')
+@SupportedBrowser(SupportedBrowser.CHROME, '25')
+@Experimental
class SpeechRecognition extends EventTarget native "*SpeechRecognition" {
+ @DomName('SpeechRecognition.audioend')
+ @DocsEditable
static const EventStreamProvider<Event> audioEndEvent = const EventStreamProvider<Event>('audioend');
+ @DomName('SpeechRecognition.audiostart')
+ @DocsEditable
static const EventStreamProvider<Event> audioStartEvent = const EventStreamProvider<Event>('audiostart');
+ @DomName('SpeechRecognition.end')
+ @DocsEditable
static const EventStreamProvider<Event> endEvent = const EventStreamProvider<Event>('end');
+ @DomName('SpeechRecognition.error')
+ @DocsEditable
static const EventStreamProvider<SpeechRecognitionError> errorEvent = const EventStreamProvider<SpeechRecognitionError>('error');
+ @DomName('SpeechRecognition.nomatch')
+ @DocsEditable
static const EventStreamProvider<SpeechRecognitionEvent> noMatchEvent = const EventStreamProvider<SpeechRecognitionEvent>('nomatch');
+ @DomName('SpeechRecognition.result')
+ @DocsEditable
static const EventStreamProvider<SpeechRecognitionEvent> resultEvent = const EventStreamProvider<SpeechRecognitionEvent>('result');
+ @DomName('SpeechRecognition.soundend')
+ @DocsEditable
static const EventStreamProvider<Event> soundEndEvent = const EventStreamProvider<Event>('soundend');
+ @DomName('SpeechRecognition.soundstart')
+ @DocsEditable
static const EventStreamProvider<Event> soundStartEvent = const EventStreamProvider<Event>('soundstart');
+ @DomName('SpeechRecognition.speechend')
+ @DocsEditable
static const EventStreamProvider<Event> speechEndEvent = const EventStreamProvider<Event>('speechend');
+ @DomName('SpeechRecognition.speechstart')
+ @DocsEditable
static const EventStreamProvider<Event> speechStartEvent = const EventStreamProvider<Event>('speechstart');
+ @DomName('SpeechRecognition.start')
+ @DocsEditable
static const EventStreamProvider<Event> startEvent = const EventStreamProvider<Event>('start');
@DocsEditable
factory SpeechRecognition() => SpeechRecognition._create();
- static SpeechRecognition _create() => JS('SpeechRecognition', 'new SpeechRecognition()');
+
+ /// Checks if this type is supported on the current platform.
+ static bool get supported => JS('bool', '!!(window.SpeechRecognition || window.webkitSpeechRecognition)');
@DocsEditable
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
+ @deprecated
SpeechRecognitionEvents get on =>
new SpeechRecognitionEvents(this);
- @DocsEditable @DomName('SpeechRecognition.continuous')
+ @DomName('SpeechRecognition.continuous')
+ @DocsEditable
bool continuous;
- @DocsEditable @DomName('SpeechRecognition.grammars')
+ @DomName('SpeechRecognition.grammars')
+ @DocsEditable
SpeechGrammarList grammars;
- @DocsEditable @DomName('SpeechRecognition.interimResults')
+ @DomName('SpeechRecognition.interimResults')
+ @DocsEditable
bool interimResults;
- @DocsEditable @DomName('SpeechRecognition.lang')
+ @DomName('SpeechRecognition.lang')
+ @DocsEditable
String lang;
- @DocsEditable @DomName('SpeechRecognition.maxAlternatives')
+ @DomName('SpeechRecognition.maxAlternatives')
+ @DocsEditable
int maxAlternatives;
- @DocsEditable @DomName('SpeechRecognition.abort')
+ @DomName('SpeechRecognition.abort')
+ @DocsEditable
void abort() native;
@JSName('addEventListener')
- @DocsEditable @DomName('SpeechRecognition.addEventListener')
+ @DomName('SpeechRecognition.addEventListener')
+ @DocsEditable
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native;
- @JSName('dispatchEvent')
- @DocsEditable @DomName('SpeechRecognition.dispatchEvent')
- bool $dom_dispatchEvent(Event evt) native;
+ @DomName('SpeechRecognition.dispatchEvent')
+ @DocsEditable
+ bool dispatchEvent(Event evt) native;
@JSName('removeEventListener')
- @DocsEditable @DomName('SpeechRecognition.removeEventListener')
+ @DomName('SpeechRecognition.removeEventListener')
+ @DocsEditable
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native;
- @DocsEditable @DomName('SpeechRecognition.start')
+ @DomName('SpeechRecognition.start')
+ @DocsEditable
void start() native;
- @DocsEditable @DomName('SpeechRecognition.stop')
+ @DomName('SpeechRecognition.stop')
+ @DocsEditable
void stop() native;
+ @DomName('SpeechRecognition.audioend')
+ @DocsEditable
Stream<Event> get onAudioEnd => audioEndEvent.forTarget(this);
+ @DomName('SpeechRecognition.audiostart')
+ @DocsEditable
Stream<Event> get onAudioStart => audioStartEvent.forTarget(this);
+ @DomName('SpeechRecognition.end')
+ @DocsEditable
Stream<Event> get onEnd => endEvent.forTarget(this);
+ @DomName('SpeechRecognition.error')
+ @DocsEditable
Stream<SpeechRecognitionError> get onError => errorEvent.forTarget(this);
+ @DomName('SpeechRecognition.nomatch')
+ @DocsEditable
Stream<SpeechRecognitionEvent> get onNoMatch => noMatchEvent.forTarget(this);
+ @DomName('SpeechRecognition.result')
+ @DocsEditable
Stream<SpeechRecognitionEvent> get onResult => resultEvent.forTarget(this);
+ @DomName('SpeechRecognition.soundend')
+ @DocsEditable
Stream<Event> get onSoundEnd => soundEndEvent.forTarget(this);
+ @DomName('SpeechRecognition.soundstart')
+ @DocsEditable
Stream<Event> get onSoundStart => soundStartEvent.forTarget(this);
+ @DomName('SpeechRecognition.speechend')
+ @DocsEditable
Stream<Event> get onSpeechEnd => speechEndEvent.forTarget(this);
+ @DomName('SpeechRecognition.speechstart')
+ @DocsEditable
Stream<Event> get onSpeechStart => speechStartEvent.forTarget(this);
+ @DomName('SpeechRecognition.start')
+ @DocsEditable
Stream<Event> get onStart => startEvent.forTarget(this);
+
+ static SpeechRecognition _create() {
+ return JS('SpeechRecognition',
+ 'new (window.SpeechRecognition || window.webkitSpeechRecognition)()');
+ }
}
@DocsEditable
+@deprecated
class SpeechRecognitionEvents extends Events {
@DocsEditable
SpeechRecognitionEvents(EventTarget _ptr) : super(_ptr);
@@ -18333,15 +20401,18 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SpeechRecognitionAlternative')
+@SupportedBrowser(SupportedBrowser.CHROME, '25')
+@Experimental
class SpeechRecognitionAlternative native "*SpeechRecognitionAlternative" {
- @DocsEditable @DomName('SpeechRecognitionAlternative.confidence')
+ @DomName('SpeechRecognitionAlternative.confidence')
+ @DocsEditable
final num confidence;
- @DocsEditable @DomName('SpeechRecognitionAlternative.transcript')
+ @DomName('SpeechRecognitionAlternative.transcript')
+ @DocsEditable
final String transcript;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -18349,15 +20420,18 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SpeechRecognitionError')
+@SupportedBrowser(SupportedBrowser.CHROME, '25')
+@Experimental
class SpeechRecognitionError extends Event native "*SpeechRecognitionError" {
- @DocsEditable @DomName('SpeechRecognitionError.error')
+ @DomName('SpeechRecognitionError.error')
+ @DocsEditable
final String error;
- @DocsEditable @DomName('SpeechRecognitionError.message')
+ @DomName('SpeechRecognitionError.message')
+ @DocsEditable
final String message;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -18365,23 +20439,30 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SpeechRecognitionEvent')
+@SupportedBrowser(SupportedBrowser.CHROME, '25')
+@Experimental
class SpeechRecognitionEvent extends Event native "*SpeechRecognitionEvent" {
- @DocsEditable @DomName('SpeechRecognitionEvent.result')
+ @DomName('SpeechRecognitionEvent.result')
+ @DocsEditable
final SpeechRecognitionResult result;
- @DocsEditable @DomName('SpeechRecognitionEvent.resultHistory')
- @Returns('_SpeechRecognitionResultList') @Creates('_SpeechRecognitionResultList')
+ @DomName('SpeechRecognitionEvent.resultHistory')
+ @DocsEditable
+ @Returns('_SpeechRecognitionResultList')
+ @Creates('_SpeechRecognitionResultList')
final List<SpeechRecognitionResult> resultHistory;
- @DocsEditable @DomName('SpeechRecognitionEvent.resultIndex')
+ @DomName('SpeechRecognitionEvent.resultIndex')
+ @DocsEditable
final int resultIndex;
- @DocsEditable @DomName('SpeechRecognitionEvent.results')
- @Returns('_SpeechRecognitionResultList') @Creates('_SpeechRecognitionResultList')
+ @DomName('SpeechRecognitionEvent.results')
+ @DocsEditable
+ @Returns('_SpeechRecognitionResultList')
+ @Creates('_SpeechRecognitionResultList')
final List<SpeechRecognitionResult> results;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -18389,18 +20470,22 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SpeechRecognitionResult')
+@SupportedBrowser(SupportedBrowser.CHROME, '25')
+@Experimental
class SpeechRecognitionResult native "*SpeechRecognitionResult" {
- @DocsEditable @DomName('SpeechRecognitionResult.isFinal')
+ @DomName('SpeechRecognitionResult.isFinal')
+ @DocsEditable
final bool isFinal;
- @DocsEditable @DomName('SpeechRecognitionResult.length')
+ @DomName('SpeechRecognitionResult.length')
+ @DocsEditable
final int length;
- @DocsEditable @DomName('SpeechRecognitionResult.item')
+ @DomName('SpeechRecognitionResult.item')
+ @DocsEditable
SpeechRecognitionAlternative item(int index) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -18408,7 +20493,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SQLError')
class SqlError native "*SQLError" {
@@ -18429,10 +20513,12 @@
static const int VERSION_ERR = 2;
- @DocsEditable @DomName('SQLError.code')
+ @DomName('SQLError.code')
+ @DocsEditable
final int code;
- @DocsEditable @DomName('SQLError.message')
+ @DomName('SQLError.message')
+ @DocsEditable
final String message;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -18440,7 +20526,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SQLException')
class SqlException native "*SQLException" {
@@ -18461,10 +20546,12 @@
static const int VERSION_ERR = 2;
- @DocsEditable @DomName('SQLException.code')
+ @DomName('SQLException.code')
+ @DocsEditable
final int code;
- @DocsEditable @DomName('SQLException.message')
+ @DomName('SQLException.message')
+ @DocsEditable
final String message;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -18472,18 +20559,20 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SQLResultSet')
class SqlResultSet native "*SQLResultSet" {
- @DocsEditable @DomName('SQLResultSet.insertId')
+ @DomName('SQLResultSet.insertId')
+ @DocsEditable
final int insertId;
- @DocsEditable @DomName('SQLResultSet.rows')
+ @DomName('SQLResultSet.rows')
+ @DocsEditable
final SqlResultSetRowList rows;
- @DocsEditable @DomName('SQLResultSet.rowsAffected')
+ @DomName('SQLResultSet.rowsAffected')
+ @DocsEditable
final int rowsAffected;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -18491,12 +20580,12 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SQLResultSetRowList')
class SqlResultSetRowList implements JavaScriptIndexingBehavior, List<Map> native "*SQLResultSetRowList" {
- @DocsEditable @DomName('SQLResultSetRowList.length')
+ @DomName('SQLResultSetRowList.length')
+ @DocsEditable
int get length => JS("int", "#.length", this);
Map operator[](int index) => JS("Map", "#[#]", this, index);
@@ -18524,11 +20613,13 @@
void forEach(void f(Map element)) => IterableMixinWorkaround.forEach(this, f);
- String join([String separator]) => IterableMixinWorkaround.joinList(this, separator);
+ String join([String separator]) =>
+ IterableMixinWorkaround.joinList(this, separator);
List mappedBy(f(Map element)) => IterableMixinWorkaround.mappedByList(this, f);
- Iterable<Map> where(bool f(Map element)) => IterableMixinWorkaround.where(this, f);
+ Iterable<Map> where(bool f(Map element)) =>
+ IterableMixinWorkaround.where(this, f);
bool every(bool f(Map element)) => IterableMixinWorkaround.every(this, f);
@@ -18590,6 +20681,9 @@
throw new UnsupportedError("Cannot clear immutable List.");
}
+ List<Map> get reversed =>
+ new ReversedListView<Map>(this, 0, null);
+
void sort([int compare(Map a, Map b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -18618,9 +20712,11 @@
throw new StateError("More than one element");
}
- Map min([int compare(Map a, Map b)]) => IterableMixinWorkaround.min(this, compare);
+ Map min([int compare(Map a, Map b)]) =>
+ IterableMixinWorkaround.min(this, compare);
- Map max([int compare(Map a, Map b)]) => IterableMixinWorkaround.max(this, compare);
+ Map max([int compare(Map a, Map b)]) =>
+ IterableMixinWorkaround.max(this, compare);
Map removeAt(int pos) {
throw new UnsupportedError("Cannot remove from immutable List.");
@@ -18671,7 +20767,9 @@
return convertNativeToDart_Dictionary(_item_1(index));
}
@JSName('item')
- @DocsEditable @DomName('SQLResultSetRowList.item') @Creates('=Object')
+ @DomName('SQLResultSetRowList.item')
+ @DocsEditable
+ @Creates('=Object')
_item_1(index) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -18679,12 +20777,12 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SQLTransaction')
class SqlTransaction native "*SQLTransaction" {
- @DocsEditable @DomName('SQLTransaction.executeSql')
+ @DomName('SQLTransaction.executeSql')
+ @DocsEditable
void executeSql(String sqlStatement, List arguments, [SqlStatementCallback callback, SqlStatementErrorCallback errorCallback]) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -18692,12 +20790,12 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SQLTransactionSync')
class SqlTransactionSync native "*SQLTransactionSync" {
- @DocsEditable @DomName('SQLTransactionSync.executeSql')
+ @DomName('SQLTransactionSync.executeSql')
+ @DocsEditable
SqlResultSet executeSql(String sqlStatement, List arguments) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -18705,9 +20803,9 @@
// BSD-style license that can be found in the LICENSE file.
-@DocsEditable
@DomName('Storage')
-class Storage implements Map<String, String> native "*Storage" {
+class Storage implements Map<String, String>
+ native "*Storage" {
// TODO(nweiz): update this when maps support lazy iteration
bool containsValue(String value) => values.any((e) => e == value);
@@ -18757,64 +20855,86 @@
bool get isEmpty => $dom_key(0) == null;
@JSName('length')
- @DocsEditable @DomName('Storage.length')
+ @DomName('Storage.length')
+ @DocsEditable
final int $dom_length;
@JSName('clear')
- @DocsEditable @DomName('Storage.clear')
+ @DomName('Storage.clear')
+ @DocsEditable
void $dom_clear() native;
@JSName('getItem')
- @DocsEditable @DomName('Storage.getItem')
+ @DomName('Storage.getItem')
+ @DocsEditable
String $dom_getItem(String key) native;
@JSName('key')
- @DocsEditable @DomName('Storage.key')
+ @DomName('Storage.key')
+ @DocsEditable
String $dom_key(int index) native;
@JSName('removeItem')
- @DocsEditable @DomName('Storage.removeItem')
+ @DomName('Storage.removeItem')
+ @DocsEditable
void $dom_removeItem(String key) native;
@JSName('setItem')
- @DocsEditable @DomName('Storage.setItem')
+ @DomName('Storage.setItem')
+ @DocsEditable
void $dom_setItem(String key, String data) native;
}
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
+// WARNING: Do not edit - generated code.
-@DocsEditable
@DomName('StorageEvent')
class StorageEvent extends Event native "*StorageEvent" {
+ factory StorageEvent(String type,
+ {bool canBubble: false, bool cancelable: false, String key, String oldValue,
+ String newValue, String url, Storage storageArea}) {
- @DocsEditable @DomName('StorageEvent.key')
+ var e = document.$dom_createEvent("StorageEvent");
+ e.$dom_initStorageEvent(type, canBubble, cancelable, key, oldValue,
+ newValue, url, storageArea);
+ return e;
+ }
+
+ @DomName('StorageEvent.key')
+ @DocsEditable
final String key;
- @DocsEditable @DomName('StorageEvent.newValue')
+ @DomName('StorageEvent.newValue')
+ @DocsEditable
final String newValue;
- @DocsEditable @DomName('StorageEvent.oldValue')
+ @DomName('StorageEvent.oldValue')
+ @DocsEditable
final String oldValue;
- @DocsEditable @DomName('StorageEvent.storageArea')
+ @DomName('StorageEvent.storageArea')
+ @DocsEditable
final Storage storageArea;
- @DocsEditable @DomName('StorageEvent.url')
+ @DomName('StorageEvent.url')
+ @DocsEditable
final String url;
- @DocsEditable @DomName('StorageEvent.initStorageEvent')
- void initStorageEvent(String typeArg, bool canBubbleArg, bool cancelableArg, String keyArg, String oldValueArg, String newValueArg, String urlArg, Storage storageAreaArg) native;
+ @JSName('initStorageEvent')
+ @DomName('StorageEvent.initStorageEvent')
+ @DocsEditable
+ void $dom_initStorageEvent(String typeArg, bool canBubbleArg, bool cancelableArg, String keyArg, String oldValueArg, String newValueArg, String urlArg, Storage storageAreaArg) native;
+
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('StorageInfo')
class StorageInfo native "*StorageInfo" {
@@ -18823,10 +20943,12 @@
static const int TEMPORARY = 0;
- @DocsEditable @DomName('StorageInfo.queryUsageAndQuota')
+ @DomName('StorageInfo.queryUsageAndQuota')
+ @DocsEditable
void queryUsageAndQuota(int storageType, [StorageInfoUsageCallback usageCallback, StorageInfoErrorCallback errorCallback]) native;
- @DocsEditable @DomName('StorageInfo.requestQuota')
+ @DomName('StorageInfo.requestQuota')
+ @DocsEditable
void requestQuota(int storageType, int newQuotaInBytes, [StorageInfoQuotaCallback quotaCallback, StorageInfoErrorCallback errorCallback]) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -18866,7 +20988,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('HTMLStyleElement')
class StyleElement extends Element native "*HTMLStyleElement" {
@@ -18874,19 +20995,24 @@
@DocsEditable
factory StyleElement() => document.$dom_createElement("style");
- @DocsEditable @DomName('HTMLStyleElement.disabled')
+ @DomName('HTMLStyleElement.disabled')
+ @DocsEditable
bool disabled;
- @DocsEditable @DomName('HTMLStyleElement.media')
+ @DomName('HTMLStyleElement.media')
+ @DocsEditable
String media;
- @DocsEditable @DomName('HTMLStyleElement.scoped')
+ @DomName('HTMLStyleElement.scoped')
+ @DocsEditable
bool scoped;
- @DocsEditable @DomName('HTMLStyleElement.sheet')
+ @DomName('HTMLStyleElement.sheet')
+ @DocsEditable
final StyleSheet sheet;
- @DocsEditable @DomName('HTMLStyleElement.type')
+ @DomName('HTMLStyleElement.type')
+ @DocsEditable
String type;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -18894,15 +21020,16 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('StyleMedia')
class StyleMedia native "*StyleMedia" {
- @DocsEditable @DomName('StyleMedia.type')
+ @DomName('StyleMedia.type')
+ @DocsEditable
final String type;
- @DocsEditable @DomName('StyleMedia.matchMedium')
+ @DomName('StyleMedia.matchMedium')
+ @DocsEditable
bool matchMedium(String mediaquery) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -18910,30 +21037,36 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('StyleSheet')
class StyleSheet native "*StyleSheet" {
- @DocsEditable @DomName('StyleSheet.disabled')
+ @DomName('StyleSheet.disabled')
+ @DocsEditable
bool disabled;
- @DocsEditable @DomName('StyleSheet.href')
+ @DomName('StyleSheet.href')
+ @DocsEditable
final String href;
- @DocsEditable @DomName('StyleSheet.media')
+ @DomName('StyleSheet.media')
+ @DocsEditable
final MediaList media;
- @DocsEditable @DomName('StyleSheet.ownerNode')
+ @DomName('StyleSheet.ownerNode')
+ @DocsEditable
final Node ownerNode;
- @DocsEditable @DomName('StyleSheet.parentStyleSheet')
+ @DomName('StyleSheet.parentStyleSheet')
+ @DocsEditable
final StyleSheet parentStyleSheet;
- @DocsEditable @DomName('StyleSheet.title')
+ @DomName('StyleSheet.title')
+ @DocsEditable
final String title;
- @DocsEditable @DomName('StyleSheet.type')
+ @DomName('StyleSheet.type')
+ @DocsEditable
final String type;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -18941,7 +21074,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('HTMLTableCaptionElement')
class TableCaptionElement extends Element native "*HTMLTableCaptionElement" {
@@ -18954,7 +21086,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('HTMLTableCellElement')
class TableCellElement extends Element native "*HTMLTableCellElement" {
@@ -18962,16 +21093,20 @@
@DocsEditable
factory TableCellElement() => document.$dom_createElement("td");
- @DocsEditable @DomName('HTMLTableCellElement.cellIndex')
+ @DomName('HTMLTableCellElement.cellIndex')
+ @DocsEditable
final int cellIndex;
- @DocsEditable @DomName('HTMLTableCellElement.colSpan')
+ @DomName('HTMLTableCellElement.colSpan')
+ @DocsEditable
int colSpan;
- @DocsEditable @DomName('HTMLTableCellElement.headers')
+ @DomName('HTMLTableCellElement.headers')
+ @DocsEditable
String headers;
- @DocsEditable @DomName('HTMLTableCellElement.rowSpan')
+ @DomName('HTMLTableCellElement.rowSpan')
+ @DocsEditable
int rowSpan;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -18979,7 +21114,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('HTMLTableColElement')
class TableColElement extends Element native "*HTMLTableColElement" {
@@ -18987,7 +21121,8 @@
@DocsEditable
factory TableColElement() => document.$dom_createElement("col");
- @DocsEditable @DomName('HTMLTableColElement.span')
+ @DomName('HTMLTableColElement.span')
+ @DocsEditable
int span;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -18995,53 +21130,66 @@
// BSD-style license that can be found in the LICENSE file.
-@DocsEditable
@DomName('HTMLTableElement')
class TableElement extends Element native "*HTMLTableElement" {
@DocsEditable
factory TableElement() => document.$dom_createElement("table");
- @DocsEditable @DomName('HTMLTableElement.border')
+ @DomName('HTMLTableElement.border')
+ @DocsEditable
String border;
- @DocsEditable @DomName('HTMLTableElement.caption')
+ @DomName('HTMLTableElement.caption')
+ @DocsEditable
TableCaptionElement caption;
- @DocsEditable @DomName('HTMLTableElement.rows')
+ @DomName('HTMLTableElement.rows')
+ @DocsEditable
final HtmlCollection rows;
- @DocsEditable @DomName('HTMLTableElement.tBodies')
+ @DomName('HTMLTableElement.tBodies')
+ @DocsEditable
final HtmlCollection tBodies;
- @DocsEditable @DomName('HTMLTableElement.tFoot')
+ @DomName('HTMLTableElement.tFoot')
+ @DocsEditable
TableSectionElement tFoot;
- @DocsEditable @DomName('HTMLTableElement.tHead')
+ @DomName('HTMLTableElement.tHead')
+ @DocsEditable
TableSectionElement tHead;
- @DocsEditable @DomName('HTMLTableElement.createCaption')
+ @DomName('HTMLTableElement.createCaption')
+ @DocsEditable
Element createCaption() native;
- @DocsEditable @DomName('HTMLTableElement.createTFoot')
+ @DomName('HTMLTableElement.createTFoot')
+ @DocsEditable
Element createTFoot() native;
- @DocsEditable @DomName('HTMLTableElement.createTHead')
+ @DomName('HTMLTableElement.createTHead')
+ @DocsEditable
Element createTHead() native;
- @DocsEditable @DomName('HTMLTableElement.deleteCaption')
+ @DomName('HTMLTableElement.deleteCaption')
+ @DocsEditable
void deleteCaption() native;
- @DocsEditable @DomName('HTMLTableElement.deleteRow')
+ @DomName('HTMLTableElement.deleteRow')
+ @DocsEditable
void deleteRow(int index) native;
- @DocsEditable @DomName('HTMLTableElement.deleteTFoot')
+ @DomName('HTMLTableElement.deleteTFoot')
+ @DocsEditable
void deleteTFoot() native;
- @DocsEditable @DomName('HTMLTableElement.deleteTHead')
+ @DomName('HTMLTableElement.deleteTHead')
+ @DocsEditable
void deleteTHead() native;
- @DocsEditable @DomName('HTMLTableElement.insertRow')
+ @DomName('HTMLTableElement.insertRow')
+ @DocsEditable
Element insertRow(int index) native;
@@ -19062,7 +21210,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('HTMLTableRowElement')
class TableRowElement extends Element native "*HTMLTableRowElement" {
@@ -19070,19 +21217,24 @@
@DocsEditable
factory TableRowElement() => document.$dom_createElement("tr");
- @DocsEditable @DomName('HTMLTableRowElement.cells')
+ @DomName('HTMLTableRowElement.cells')
+ @DocsEditable
final HtmlCollection cells;
- @DocsEditable @DomName('HTMLTableRowElement.rowIndex')
+ @DomName('HTMLTableRowElement.rowIndex')
+ @DocsEditable
final int rowIndex;
- @DocsEditable @DomName('HTMLTableRowElement.sectionRowIndex')
+ @DomName('HTMLTableRowElement.sectionRowIndex')
+ @DocsEditable
final int sectionRowIndex;
- @DocsEditable @DomName('HTMLTableRowElement.deleteCell')
+ @DomName('HTMLTableRowElement.deleteCell')
+ @DocsEditable
void deleteCell(int index) native;
- @DocsEditable @DomName('HTMLTableRowElement.insertCell')
+ @DomName('HTMLTableRowElement.insertCell')
+ @DocsEditable
Element insertCell(int index) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -19090,18 +21242,20 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('HTMLTableSectionElement')
class TableSectionElement extends Element native "*HTMLTableSectionElement" {
- @DocsEditable @DomName('HTMLTableSectionElement.rows')
+ @DomName('HTMLTableSectionElement.rows')
+ @DocsEditable
final HtmlCollection rows;
- @DocsEditable @DomName('HTMLTableSectionElement.deleteRow')
+ @DomName('HTMLTableSectionElement.deleteRow')
+ @DocsEditable
void deleteRow(int index) native;
- @DocsEditable @DomName('HTMLTableSectionElement.insertRow')
+ @DomName('HTMLTableSectionElement.insertRow')
+ @DocsEditable
Element insertRow(int index) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -19111,18 +21265,20 @@
// WARNING: Do not edit - generated code.
-@DocsEditable
@DomName('Text')
class Text extends CharacterData native "*Text" {
factory Text(String data) => _TextFactoryProvider.createText(data);
- @DocsEditable @DomName('Text.wholeText')
+ @DomName('Text.wholeText')
+ @DocsEditable
final String wholeText;
- @DocsEditable @DomName('Text.replaceWholeText')
+ @DomName('Text.replaceWholeText')
+ @DocsEditable
Text replaceWholeText(String content) native;
- @DocsEditable @DomName('Text.splitText')
+ @DomName('Text.splitText')
+ @DocsEditable
Text splitText(int offset) native;
}
@@ -19131,7 +21287,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('HTMLTextAreaElement')
class TextAreaElement extends Element native "*HTMLTextAreaElement" {
@@ -19139,118 +21294,160 @@
@DocsEditable
factory TextAreaElement() => document.$dom_createElement("textarea");
- @DocsEditable @DomName('HTMLTextAreaElement.autofocus')
+ @DomName('HTMLTextAreaElement.autofocus')
+ @DocsEditable
bool autofocus;
- @DocsEditable @DomName('HTMLTextAreaElement.cols')
+ @DomName('HTMLTextAreaElement.cols')
+ @DocsEditable
int cols;
- @DocsEditable @DomName('HTMLTextAreaElement.defaultValue')
+ @DomName('HTMLTextAreaElement.defaultValue')
+ @DocsEditable
String defaultValue;
- @DocsEditable @DomName('HTMLTextAreaElement.dirName')
+ @DomName('HTMLTextAreaElement.dirName')
+ @DocsEditable
String dirName;
- @DocsEditable @DomName('HTMLTextAreaElement.disabled')
+ @DomName('HTMLTextAreaElement.disabled')
+ @DocsEditable
bool disabled;
- @DocsEditable @DomName('HTMLTextAreaElement.form')
+ @DomName('HTMLTextAreaElement.form')
+ @DocsEditable
final FormElement form;
- @DocsEditable @DomName('HTMLTextAreaElement.labels')
- @Returns('NodeList') @Creates('NodeList')
+ @DomName('HTMLTextAreaElement.labels')
+ @DocsEditable
+ @Returns('NodeList')
+ @Creates('NodeList')
final List<Node> labels;
- @DocsEditable @DomName('HTMLTextAreaElement.maxLength')
+ @DomName('HTMLTextAreaElement.maxLength')
+ @DocsEditable
int maxLength;
- @DocsEditable @DomName('HTMLTextAreaElement.name')
+ @DomName('HTMLTextAreaElement.name')
+ @DocsEditable
String name;
- @DocsEditable @DomName('HTMLTextAreaElement.placeholder')
+ @DomName('HTMLTextAreaElement.placeholder')
+ @DocsEditable
String placeholder;
- @DocsEditable @DomName('HTMLTextAreaElement.readOnly')
+ @DomName('HTMLTextAreaElement.readOnly')
+ @DocsEditable
bool readOnly;
- @DocsEditable @DomName('HTMLTextAreaElement.required')
+ @DomName('HTMLTextAreaElement.required')
+ @DocsEditable
bool required;
- @DocsEditable @DomName('HTMLTextAreaElement.rows')
+ @DomName('HTMLTextAreaElement.rows')
+ @DocsEditable
int rows;
- @DocsEditable @DomName('HTMLTextAreaElement.selectionDirection')
+ @DomName('HTMLTextAreaElement.selectionDirection')
+ @DocsEditable
String selectionDirection;
- @DocsEditable @DomName('HTMLTextAreaElement.selectionEnd')
+ @DomName('HTMLTextAreaElement.selectionEnd')
+ @DocsEditable
int selectionEnd;
- @DocsEditable @DomName('HTMLTextAreaElement.selectionStart')
+ @DomName('HTMLTextAreaElement.selectionStart')
+ @DocsEditable
int selectionStart;
- @DocsEditable @DomName('HTMLTextAreaElement.textLength')
+ @DomName('HTMLTextAreaElement.textLength')
+ @DocsEditable
final int textLength;
- @DocsEditable @DomName('HTMLTextAreaElement.type')
+ @DomName('HTMLTextAreaElement.type')
+ @DocsEditable
final String type;
- @DocsEditable @DomName('HTMLTextAreaElement.validationMessage')
+ @DomName('HTMLTextAreaElement.validationMessage')
+ @DocsEditable
final String validationMessage;
- @DocsEditable @DomName('HTMLTextAreaElement.validity')
+ @DomName('HTMLTextAreaElement.validity')
+ @DocsEditable
final ValidityState validity;
- @DocsEditable @DomName('HTMLTextAreaElement.value')
+ @DomName('HTMLTextAreaElement.value')
+ @DocsEditable
String value;
- @DocsEditable @DomName('HTMLTextAreaElement.willValidate')
+ @DomName('HTMLTextAreaElement.willValidate')
+ @DocsEditable
final bool willValidate;
- @DocsEditable @DomName('HTMLTextAreaElement.wrap')
+ @DomName('HTMLTextAreaElement.wrap')
+ @DocsEditable
String wrap;
- @DocsEditable @DomName('HTMLTextAreaElement.checkValidity')
+ @DomName('HTMLTextAreaElement.checkValidity')
+ @DocsEditable
bool checkValidity() native;
- @DocsEditable @DomName('HTMLTextAreaElement.select')
+ @DomName('HTMLTextAreaElement.select')
+ @DocsEditable
void select() native;
- @DocsEditable @DomName('HTMLTextAreaElement.setCustomValidity')
+ @DomName('HTMLTextAreaElement.setCustomValidity')
+ @DocsEditable
void setCustomValidity(String error) native;
- @DocsEditable @DomName('HTMLTextAreaElement.setRangeText')
+ @DomName('HTMLTextAreaElement.setRangeText')
+ @DocsEditable
void setRangeText(String replacement, [int start, int end, String selectionMode]) native;
- @DocsEditable @DomName('HTMLTextAreaElement.setSelectionRange')
+ @DomName('HTMLTextAreaElement.setSelectionRange')
+ @DocsEditable
void setSelectionRange(int start, int end, [String direction]) native;
}
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
+// WARNING: Do not edit - generated code.
-@DocsEditable
@DomName('TextEvent')
class TextEvent extends UIEvent native "*TextEvent" {
+ factory TextEvent(String type,
+ {bool canBubble: false, bool cancelable: false, Window view, String data}) {
+ if (view == null) {
+ view = window;
+ }
+ var e = document.$dom_createEvent("TextEvent");
+ e.$dom_initTextEvent(type, canBubble, cancelable, view, data);
+ return e;
+ }
- @DocsEditable @DomName('TextEvent.data')
+ @DomName('TextEvent.data')
+ @DocsEditable
final String data;
- @DocsEditable @DomName('TextEvent.initTextEvent')
- void initTextEvent(String typeArg, bool canBubbleArg, bool cancelableArg, Window viewArg, String dataArg) native;
+ @JSName('initTextEvent')
+ @DomName('TextEvent.initTextEvent')
+ @DocsEditable
+ void $dom_initTextEvent(String typeArg, bool canBubbleArg, bool cancelableArg, Window viewArg, String dataArg) native;
+
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('TextMetrics')
class TextMetrics native "*TextMetrics" {
- @DocsEditable @DomName('TextMetrics.width')
+ @DomName('TextMetrics.width')
+ @DocsEditable
final num width;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -19258,58 +21455,73 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('TextTrack')
class TextTrack extends EventTarget native "*TextTrack" {
+ @DomName('TextTrack.cuechange')
+ @DocsEditable
static const EventStreamProvider<Event> cueChangeEvent = const EventStreamProvider<Event>('cuechange');
@DocsEditable
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
+ @deprecated
TextTrackEvents get on =>
new TextTrackEvents(this);
- @DocsEditable @DomName('TextTrack.activeCues')
+ @DomName('TextTrack.activeCues')
+ @DocsEditable
final TextTrackCueList activeCues;
- @DocsEditable @DomName('TextTrack.cues')
+ @DomName('TextTrack.cues')
+ @DocsEditable
final TextTrackCueList cues;
- @DocsEditable @DomName('TextTrack.kind')
+ @DomName('TextTrack.kind')
+ @DocsEditable
final String kind;
- @DocsEditable @DomName('TextTrack.label')
+ @DomName('TextTrack.label')
+ @DocsEditable
final String label;
- @DocsEditable @DomName('TextTrack.language')
+ @DomName('TextTrack.language')
+ @DocsEditable
final String language;
- @DocsEditable @DomName('TextTrack.mode')
+ @DomName('TextTrack.mode')
+ @DocsEditable
String mode;
- @DocsEditable @DomName('TextTrack.addCue')
+ @DomName('TextTrack.addCue')
+ @DocsEditable
void addCue(TextTrackCue cue) native;
@JSName('addEventListener')
- @DocsEditable @DomName('TextTrack.addEventListener')
+ @DomName('TextTrack.addEventListener')
+ @DocsEditable
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native;
- @JSName('dispatchEvent')
- @DocsEditable @DomName('TextTrack.dispatchEvent')
- bool $dom_dispatchEvent(Event evt) native;
+ @DomName('TextTrack.dispatchEvent')
+ @DocsEditable
+ bool dispatchEvent(Event evt) native;
- @DocsEditable @DomName('TextTrack.removeCue')
+ @DomName('TextTrack.removeCue')
+ @DocsEditable
void removeCue(TextTrackCue cue) native;
@JSName('removeEventListener')
- @DocsEditable @DomName('TextTrack.removeEventListener')
+ @DomName('TextTrack.removeEventListener')
+ @DocsEditable
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native;
+ @DomName('TextTrack.cuechange')
+ @DocsEditable
Stream<Event> get onCueChange => cueChangeEvent.forTarget(this);
}
@DocsEditable
+@deprecated
class TextTrackEvents extends Events {
@DocsEditable
TextTrackEvents(EventTarget _ptr) : super(_ptr);
@@ -19322,13 +21534,16 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('TextTrackCue')
class TextTrackCue extends EventTarget native "*TextTrackCue" {
+ @DomName('TextTrackCue.enter')
+ @DocsEditable
static const EventStreamProvider<Event> enterEvent = const EventStreamProvider<Event>('enter');
+ @DomName('TextTrackCue.exit')
+ @DocsEditable
static const EventStreamProvider<Event> exitEvent = const EventStreamProvider<Event>('exit');
@DocsEditable
@@ -19337,67 +21552,88 @@
@DocsEditable
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
+ @deprecated
TextTrackCueEvents get on =>
new TextTrackCueEvents(this);
- @DocsEditable @DomName('TextTrackCue.align')
+ @DomName('TextTrackCue.align')
+ @DocsEditable
String align;
- @DocsEditable @DomName('TextTrackCue.endTime')
+ @DomName('TextTrackCue.endTime')
+ @DocsEditable
num endTime;
- @DocsEditable @DomName('TextTrackCue.id')
+ @DomName('TextTrackCue.id')
+ @DocsEditable
String id;
- @DocsEditable @DomName('TextTrackCue.line')
+ @DomName('TextTrackCue.line')
+ @DocsEditable
int line;
- @DocsEditable @DomName('TextTrackCue.pauseOnExit')
+ @DomName('TextTrackCue.pauseOnExit')
+ @DocsEditable
bool pauseOnExit;
- @DocsEditable @DomName('TextTrackCue.position')
+ @DomName('TextTrackCue.position')
+ @DocsEditable
int position;
- @DocsEditable @DomName('TextTrackCue.size')
+ @DomName('TextTrackCue.size')
+ @DocsEditable
int size;
- @DocsEditable @DomName('TextTrackCue.snapToLines')
+ @DomName('TextTrackCue.snapToLines')
+ @DocsEditable
bool snapToLines;
- @DocsEditable @DomName('TextTrackCue.startTime')
+ @DomName('TextTrackCue.startTime')
+ @DocsEditable
num startTime;
- @DocsEditable @DomName('TextTrackCue.text')
+ @DomName('TextTrackCue.text')
+ @DocsEditable
String text;
- @DocsEditable @DomName('TextTrackCue.track')
+ @DomName('TextTrackCue.track')
+ @DocsEditable
final TextTrack track;
- @DocsEditable @DomName('TextTrackCue.vertical')
+ @DomName('TextTrackCue.vertical')
+ @DocsEditable
String vertical;
@JSName('addEventListener')
- @DocsEditable @DomName('TextTrackCue.addEventListener')
+ @DomName('TextTrackCue.addEventListener')
+ @DocsEditable
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native;
- @JSName('dispatchEvent')
- @DocsEditable @DomName('TextTrackCue.dispatchEvent')
- bool $dom_dispatchEvent(Event evt) native;
+ @DomName('TextTrackCue.dispatchEvent')
+ @DocsEditable
+ bool dispatchEvent(Event evt) native;
@JSName('getCueAsHTML')
- @DocsEditable @DomName('TextTrackCue.getCueAsHTML')
+ @DomName('TextTrackCue.getCueAsHTML')
+ @DocsEditable
DocumentFragment getCueAsHtml() native;
@JSName('removeEventListener')
- @DocsEditable @DomName('TextTrackCue.removeEventListener')
+ @DomName('TextTrackCue.removeEventListener')
+ @DocsEditable
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native;
+ @DomName('TextTrackCue.enter')
+ @DocsEditable
Stream<Event> get onEnter => enterEvent.forTarget(this);
+ @DomName('TextTrackCue.exit')
+ @DocsEditable
Stream<Event> get onExit => exitEvent.forTarget(this);
}
@DocsEditable
+@deprecated
class TextTrackCueEvents extends Events {
@DocsEditable
TextTrackCueEvents(EventTarget _ptr) : super(_ptr);
@@ -19413,12 +21649,12 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('TextTrackCueList')
class TextTrackCueList implements List<TextTrackCue>, JavaScriptIndexingBehavior native "*TextTrackCueList" {
- @DocsEditable @DomName('TextTrackCueList.length')
+ @DomName('TextTrackCueList.length')
+ @DocsEditable
int get length => JS("int", "#.length", this);
TextTrackCue operator[](int index) => JS("TextTrackCue", "#[#]", this, index);
@@ -19446,11 +21682,13 @@
void forEach(void f(TextTrackCue element)) => IterableMixinWorkaround.forEach(this, f);
- String join([String separator]) => IterableMixinWorkaround.joinList(this, separator);
+ String join([String separator]) =>
+ IterableMixinWorkaround.joinList(this, separator);
List mappedBy(f(TextTrackCue element)) => IterableMixinWorkaround.mappedByList(this, f);
- Iterable<TextTrackCue> where(bool f(TextTrackCue element)) => IterableMixinWorkaround.where(this, f);
+ Iterable<TextTrackCue> where(bool f(TextTrackCue element)) =>
+ IterableMixinWorkaround.where(this, f);
bool every(bool f(TextTrackCue element)) => IterableMixinWorkaround.every(this, f);
@@ -19512,6 +21750,9 @@
throw new UnsupportedError("Cannot clear immutable List.");
}
+ List<TextTrackCue> get reversed =>
+ new ReversedListView<TextTrackCue>(this, 0, null);
+
void sort([int compare(TextTrackCue a, TextTrackCue b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -19540,9 +21781,11 @@
throw new StateError("More than one element");
}
- TextTrackCue min([int compare(TextTrackCue a, TextTrackCue b)]) => IterableMixinWorkaround.min(this, compare);
+ TextTrackCue min([int compare(TextTrackCue a, TextTrackCue b)]) =>
+ IterableMixinWorkaround.min(this, compare);
- TextTrackCue max([int compare(TextTrackCue a, TextTrackCue b)]) => IterableMixinWorkaround.max(this, compare);
+ TextTrackCue max([int compare(TextTrackCue a, TextTrackCue b)]) =>
+ IterableMixinWorkaround.max(this, compare);
TextTrackCue removeAt(int pos) {
throw new UnsupportedError("Cannot remove from immutable List.");
@@ -19589,10 +21832,12 @@
// -- end List<TextTrackCue> mixins.
- @DocsEditable @DomName('TextTrackCueList.getCueById')
+ @DomName('TextTrackCueList.getCueById')
+ @DocsEditable
TextTrackCue getCueById(String id) native;
- @DocsEditable @DomName('TextTrackCueList.item')
+ @DomName('TextTrackCueList.item')
+ @DocsEditable
TextTrackCue item(int index) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -19600,19 +21845,22 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('TextTrackList')
class TextTrackList extends EventTarget implements JavaScriptIndexingBehavior, List<TextTrack> native "*TextTrackList" {
+ @DomName('TextTrackList.addtrack')
+ @DocsEditable
static const EventStreamProvider<TrackEvent> addTrackEvent = const EventStreamProvider<TrackEvent>('addtrack');
@DocsEditable
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
+ @deprecated
TextTrackListEvents get on =>
new TextTrackListEvents(this);
- @DocsEditable @DomName('TextTrackList.length')
+ @DomName('TextTrackList.length')
+ @DocsEditable
int get length => JS("int", "#.length", this);
TextTrack operator[](int index) => JS("TextTrack", "#[#]", this, index);
@@ -19640,11 +21888,13 @@
void forEach(void f(TextTrack element)) => IterableMixinWorkaround.forEach(this, f);
- String join([String separator]) => IterableMixinWorkaround.joinList(this, separator);
+ String join([String separator]) =>
+ IterableMixinWorkaround.joinList(this, separator);
List mappedBy(f(TextTrack element)) => IterableMixinWorkaround.mappedByList(this, f);
- Iterable<TextTrack> where(bool f(TextTrack element)) => IterableMixinWorkaround.where(this, f);
+ Iterable<TextTrack> where(bool f(TextTrack element)) =>
+ IterableMixinWorkaround.where(this, f);
bool every(bool f(TextTrack element)) => IterableMixinWorkaround.every(this, f);
@@ -19706,6 +21956,9 @@
throw new UnsupportedError("Cannot clear immutable List.");
}
+ List<TextTrack> get reversed =>
+ new ReversedListView<TextTrack>(this, 0, null);
+
void sort([int compare(TextTrack a, TextTrack b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -19734,9 +21987,11 @@
throw new StateError("More than one element");
}
- TextTrack min([int compare(TextTrack a, TextTrack b)]) => IterableMixinWorkaround.min(this, compare);
+ TextTrack min([int compare(TextTrack a, TextTrack b)]) =>
+ IterableMixinWorkaround.min(this, compare);
- TextTrack max([int compare(TextTrack a, TextTrack b)]) => IterableMixinWorkaround.max(this, compare);
+ TextTrack max([int compare(TextTrack a, TextTrack b)]) =>
+ IterableMixinWorkaround.max(this, compare);
TextTrack removeAt(int pos) {
throw new UnsupportedError("Cannot remove from immutable List.");
@@ -19784,24 +22039,30 @@
// -- end List<TextTrack> mixins.
@JSName('addEventListener')
- @DocsEditable @DomName('TextTrackList.addEventListener')
+ @DomName('TextTrackList.addEventListener')
+ @DocsEditable
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native;
- @JSName('dispatchEvent')
- @DocsEditable @DomName('TextTrackList.dispatchEvent')
- bool $dom_dispatchEvent(Event evt) native;
+ @DomName('TextTrackList.dispatchEvent')
+ @DocsEditable
+ bool dispatchEvent(Event evt) native;
- @DocsEditable @DomName('TextTrackList.item')
+ @DomName('TextTrackList.item')
+ @DocsEditable
TextTrack item(int index) native;
@JSName('removeEventListener')
- @DocsEditable @DomName('TextTrackList.removeEventListener')
+ @DomName('TextTrackList.removeEventListener')
+ @DocsEditable
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native;
+ @DomName('TextTrackList.addtrack')
+ @DocsEditable
Stream<TrackEvent> get onAddTrack => addTrackEvent.forTarget(this);
}
@DocsEditable
+@deprecated
class TextTrackListEvents extends Events {
@DocsEditable
TextTrackListEvents(EventTarget _ptr) : super(_ptr);
@@ -19814,18 +22075,20 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('TimeRanges')
class TimeRanges native "*TimeRanges" {
- @DocsEditable @DomName('TimeRanges.length')
+ @DomName('TimeRanges.length')
+ @DocsEditable
final int length;
- @DocsEditable @DomName('TimeRanges.end')
+ @DomName('TimeRanges.end')
+ @DocsEditable
num end(int index) native;
- @DocsEditable @DomName('TimeRanges.start')
+ @DomName('TimeRanges.start')
+ @DocsEditable
num start(int index) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -19841,7 +22104,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('HTMLTitleElement')
class TitleElement extends Element native "*HTMLTitleElement" {
@@ -19854,94 +22116,130 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('Touch')
class Touch native "*Touch" {
- @DocsEditable @DomName('Touch.clientX')
+ @DomName('Touch.clientX')
+ @DocsEditable
final int clientX;
- @DocsEditable @DomName('Touch.clientY')
+ @DomName('Touch.clientY')
+ @DocsEditable
final int clientY;
- @DocsEditable @DomName('Touch.identifier')
+ @DomName('Touch.identifier')
+ @DocsEditable
final int identifier;
- @DocsEditable @DomName('Touch.pageX')
+ @DomName('Touch.pageX')
+ @DocsEditable
final int pageX;
- @DocsEditable @DomName('Touch.pageY')
+ @DomName('Touch.pageY')
+ @DocsEditable
final int pageY;
- @DocsEditable @DomName('Touch.screenX')
+ @DomName('Touch.screenX')
+ @DocsEditable
final int screenX;
- @DocsEditable @DomName('Touch.screenY')
+ @DomName('Touch.screenY')
+ @DocsEditable
final int screenY;
EventTarget get target => _convertNativeToDart_EventTarget(this._target);
@JSName('target')
- @DocsEditable @DomName('Touch.target') @Creates('Element|Document') @Returns('Element|Document')
+ @DomName('Touch.target')
+ @DocsEditable
+ @Creates('Element|Document')
+ @Returns('Element|Document')
final dynamic _target;
- @DocsEditable @DomName('Touch.webkitForce')
+ @DomName('Touch.webkitForce')
+ @DocsEditable
final num webkitForce;
- @DocsEditable @DomName('Touch.webkitRadiusX')
+ @DomName('Touch.webkitRadiusX')
+ @DocsEditable
final int webkitRadiusX;
- @DocsEditable @DomName('Touch.webkitRadiusY')
+ @DomName('Touch.webkitRadiusY')
+ @DocsEditable
final int webkitRadiusY;
- @DocsEditable @DomName('Touch.webkitRotationAngle')
+ @DomName('Touch.webkitRotationAngle')
+ @DocsEditable
final num webkitRotationAngle;
}
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
+// WARNING: Do not edit - generated code.
-@DocsEditable
@DomName('TouchEvent')
class TouchEvent extends UIEvent native "*TouchEvent" {
+ factory TouchEvent(TouchList touches, TouchList targetTouches,
+ TouchList changedTouches, String type,
+ {Window view, int screenX: 0, int screenY: 0, int clientX: 0,
+ int clientY: 0, bool ctrlKey: false, bool altKey: false,
+ bool shiftKey: false, bool metaKey: false}) {
+ if (view == null) {
+ view = window;
+ }
+ var e = document.$dom_createEvent("TouchEvent");
+ e.$dom_initTouchEvent(touches, targetTouches, changedTouches, type, view,
+ screenX, screenY, clientX, clientY, ctrlKey, altKey, shiftKey, metaKey);
+ return e;
+ }
- @DocsEditable @DomName('TouchEvent.altKey')
+ @DomName('TouchEvent.altKey')
+ @DocsEditable
final bool altKey;
- @DocsEditable @DomName('TouchEvent.changedTouches')
+ @DomName('TouchEvent.changedTouches')
+ @DocsEditable
final TouchList changedTouches;
- @DocsEditable @DomName('TouchEvent.ctrlKey')
+ @DomName('TouchEvent.ctrlKey')
+ @DocsEditable
final bool ctrlKey;
- @DocsEditable @DomName('TouchEvent.metaKey')
+ @DomName('TouchEvent.metaKey')
+ @DocsEditable
final bool metaKey;
- @DocsEditable @DomName('TouchEvent.shiftKey')
+ @DomName('TouchEvent.shiftKey')
+ @DocsEditable
final bool shiftKey;
- @DocsEditable @DomName('TouchEvent.targetTouches')
+ @DomName('TouchEvent.targetTouches')
+ @DocsEditable
final TouchList targetTouches;
- @DocsEditable @DomName('TouchEvent.touches')
+ @DomName('TouchEvent.touches')
+ @DocsEditable
final TouchList touches;
- @DocsEditable @DomName('TouchEvent.initTouchEvent')
- void initTouchEvent(TouchList touches, TouchList targetTouches, TouchList changedTouches, String type, Window view, int screenX, int screenY, int clientX, int clientY, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey) native;
+ @JSName('initTouchEvent')
+ @DomName('TouchEvent.initTouchEvent')
+ @DocsEditable
+ void $dom_initTouchEvent(TouchList touches, TouchList targetTouches, TouchList changedTouches, String type, Window view, int screenX, int screenY, int clientX, int clientY, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey) native;
+
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('TouchList')
class TouchList implements JavaScriptIndexingBehavior, List<Touch> native "*TouchList" {
- @DocsEditable @DomName('TouchList.length')
+ @DomName('TouchList.length')
+ @DocsEditable
int get length => JS("int", "#.length", this);
Touch operator[](int index) => JS("Touch", "#[#]", this, index);
@@ -19969,11 +22267,13 @@
void forEach(void f(Touch element)) => IterableMixinWorkaround.forEach(this, f);
- String join([String separator]) => IterableMixinWorkaround.joinList(this, separator);
+ String join([String separator]) =>
+ IterableMixinWorkaround.joinList(this, separator);
List mappedBy(f(Touch element)) => IterableMixinWorkaround.mappedByList(this, f);
- Iterable<Touch> where(bool f(Touch element)) => IterableMixinWorkaround.where(this, f);
+ Iterable<Touch> where(bool f(Touch element)) =>
+ IterableMixinWorkaround.where(this, f);
bool every(bool f(Touch element)) => IterableMixinWorkaround.every(this, f);
@@ -20035,6 +22335,9 @@
throw new UnsupportedError("Cannot clear immutable List.");
}
+ List<Touch> get reversed =>
+ new ReversedListView<Touch>(this, 0, null);
+
void sort([int compare(Touch a, Touch b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -20063,9 +22366,11 @@
throw new StateError("More than one element");
}
- Touch min([int compare(Touch a, Touch b)]) => IterableMixinWorkaround.min(this, compare);
+ Touch min([int compare(Touch a, Touch b)]) =>
+ IterableMixinWorkaround.min(this, compare);
- Touch max([int compare(Touch a, Touch b)]) => IterableMixinWorkaround.max(this, compare);
+ Touch max([int compare(Touch a, Touch b)]) =>
+ IterableMixinWorkaround.max(this, compare);
Touch removeAt(int pos) {
throw new UnsupportedError("Cannot remove from immutable List.");
@@ -20112,7 +22417,8 @@
// -- end List<Touch> mixins.
- @DocsEditable @DomName('TouchList.item')
+ @DomName('TouchList.item')
+ @DocsEditable
Touch item(int index) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -20120,7 +22426,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('HTMLTrackElement')
@SupportedBrowser(SupportedBrowser.CHROME)
@@ -20143,25 +22448,32 @@
static const int NONE = 0;
@JSName('default')
- @DocsEditable @DomName('HTMLTrackElement.default')
+ @DomName('HTMLTrackElement.default')
+ @DocsEditable
bool defaultValue;
- @DocsEditable @DomName('HTMLTrackElement.kind')
+ @DomName('HTMLTrackElement.kind')
+ @DocsEditable
String kind;
- @DocsEditable @DomName('HTMLTrackElement.label')
+ @DomName('HTMLTrackElement.label')
+ @DocsEditable
String label;
- @DocsEditable @DomName('HTMLTrackElement.readyState')
+ @DomName('HTMLTrackElement.readyState')
+ @DocsEditable
final int readyState;
- @DocsEditable @DomName('HTMLTrackElement.src')
+ @DomName('HTMLTrackElement.src')
+ @DocsEditable
String src;
- @DocsEditable @DomName('HTMLTrackElement.srclang')
+ @DomName('HTMLTrackElement.srclang')
+ @DocsEditable
String srclang;
- @DocsEditable @DomName('HTMLTrackElement.track')
+ @DomName('HTMLTrackElement.track')
+ @DocsEditable
final TextTrack track;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -20169,12 +22481,12 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('TrackEvent')
class TrackEvent extends Event native "*TrackEvent" {
- @DocsEditable @DomName('TrackEvent.track')
+ @DomName('TrackEvent.track')
+ @DocsEditable
final Object track;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -20182,15 +22494,16 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('WebKitTransitionEvent')
class TransitionEvent extends Event native "*WebKitTransitionEvent" {
- @DocsEditable @DomName('WebKitTransitionEvent.elapsedTime')
+ @DomName('WebKitTransitionEvent.elapsedTime')
+ @DocsEditable
final num elapsedTime;
- @DocsEditable @DomName('WebKitTransitionEvent.propertyName')
+ @DomName('WebKitTransitionEvent.propertyName')
+ @DocsEditable
final String propertyName;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -20198,45 +22511,56 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('TreeWalker')
class TreeWalker native "*TreeWalker" {
- @DocsEditable @DomName('TreeWalker.currentNode')
+ @DomName('TreeWalker.currentNode')
+ @DocsEditable
Node currentNode;
- @DocsEditable @DomName('TreeWalker.expandEntityReferences')
+ @DomName('TreeWalker.expandEntityReferences')
+ @DocsEditable
final bool expandEntityReferences;
- @DocsEditable @DomName('TreeWalker.filter')
+ @DomName('TreeWalker.filter')
+ @DocsEditable
final NodeFilter filter;
- @DocsEditable @DomName('TreeWalker.root')
+ @DomName('TreeWalker.root')
+ @DocsEditable
final Node root;
- @DocsEditable @DomName('TreeWalker.whatToShow')
+ @DomName('TreeWalker.whatToShow')
+ @DocsEditable
final int whatToShow;
- @DocsEditable @DomName('TreeWalker.firstChild')
+ @DomName('TreeWalker.firstChild')
+ @DocsEditable
Node firstChild() native;
- @DocsEditable @DomName('TreeWalker.lastChild')
+ @DomName('TreeWalker.lastChild')
+ @DocsEditable
Node lastChild() native;
- @DocsEditable @DomName('TreeWalker.nextNode')
+ @DomName('TreeWalker.nextNode')
+ @DocsEditable
Node nextNode() native;
- @DocsEditable @DomName('TreeWalker.nextSibling')
+ @DomName('TreeWalker.nextSibling')
+ @DocsEditable
Node nextSibling() native;
- @DocsEditable @DomName('TreeWalker.parentNode')
+ @DomName('TreeWalker.parentNode')
+ @DocsEditable
Node parentNode() native;
- @DocsEditable @DomName('TreeWalker.previousNode')
+ @DomName('TreeWalker.previousNode')
+ @DocsEditable
Node previousNode() native;
- @DocsEditable @DomName('TreeWalker.previousSibling')
+ @DomName('TreeWalker.previousSibling')
+ @DocsEditable
Node previousSibling() native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -20246,7 +22570,6 @@
// WARNING: Do not edit - generated code.
-@DocsEditable
@DomName('UIEvent')
class UIEvent extends Event native "*UIEvent" {
// In JS, canBubble and cancelable are technically required parameters to
@@ -20255,46 +22578,62 @@
//
// Contrary to JS, we default canBubble and cancelable to true, since that's
// what people want most of the time anyway.
- factory UIEvent(String type, Window view, int detail,
- [bool canBubble = true, bool cancelable = true]) {
+ factory UIEvent(String type,
+ {Window view, int detail: 0, bool canBubble: true,
+ bool cancelable: true}) {
+ if (view == null) {
+ view = window;
+ }
final e = document.$dom_createEvent("UIEvent");
e.$dom_initUIEvent(type, canBubble, cancelable, view, detail);
return e;
}
@JSName('charCode')
- @DocsEditable @DomName('UIEvent.charCode')
+ @DomName('UIEvent.charCode')
+ @DocsEditable
final int $dom_charCode;
- @DocsEditable @DomName('UIEvent.detail')
+ @DomName('UIEvent.detail')
+ @DocsEditable
final int detail;
@JSName('keyCode')
- @DocsEditable @DomName('UIEvent.keyCode')
+ @DomName('UIEvent.keyCode')
+ @DocsEditable
final int $dom_keyCode;
- @DocsEditable @DomName('UIEvent.layerX')
+ @DomName('UIEvent.layerX')
+ @DocsEditable
final int layerX;
- @DocsEditable @DomName('UIEvent.layerY')
+ @DomName('UIEvent.layerY')
+ @DocsEditable
final int layerY;
- @DocsEditable @DomName('UIEvent.pageX')
+ @DomName('UIEvent.pageX')
+ @DocsEditable
final int pageX;
- @DocsEditable @DomName('UIEvent.pageY')
+ @DomName('UIEvent.pageY')
+ @DocsEditable
final int pageY;
WindowBase get view => _convertNativeToDart_Window(this._view);
@JSName('view')
- @DocsEditable @DomName('UIEvent.view') @Creates('Window|=Object') @Returns('Window|=Object')
+ @DomName('UIEvent.view')
+ @DocsEditable
+ @Creates('Window|=Object')
+ @Returns('Window|=Object')
final dynamic _view;
- @DocsEditable @DomName('UIEvent.which')
+ @DomName('UIEvent.which')
+ @DocsEditable
final int which;
@JSName('initUIEvent')
- @DocsEditable @DomName('UIEvent.initUIEvent')
+ @DomName('UIEvent.initUIEvent')
+ @DocsEditable
void $dom_initUIEvent(String type, bool canBubble, bool cancelable, Window view, int detail) native;
}
@@ -20303,7 +22642,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('HTMLUListElement')
class UListElement extends Element native "*HTMLUListElement" {
@@ -20316,7 +22654,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('Uint16Array')
class Uint16Array extends ArrayBufferView implements JavaScriptIndexingBehavior, List<int> native "*Uint16Array" {
@@ -20332,7 +22669,8 @@
static const int BYTES_PER_ELEMENT = 2;
- @DocsEditable @DomName('Uint16Array.length')
+ @DomName('Uint16Array.length')
+ @DocsEditable
int get length => JS("int", "#.length", this);
int operator[](int index) => JS("int", "#[#]", this, index);
@@ -20357,11 +22695,13 @@
void forEach(void f(int element)) => IterableMixinWorkaround.forEach(this, f);
- String join([String separator]) => IterableMixinWorkaround.joinList(this, separator);
+ String join([String separator]) =>
+ IterableMixinWorkaround.joinList(this, separator);
List mappedBy(f(int element)) => IterableMixinWorkaround.mappedByList(this, f);
- Iterable<int> where(bool f(int element)) => IterableMixinWorkaround.where(this, f);
+ Iterable<int> where(bool f(int element)) =>
+ IterableMixinWorkaround.where(this, f);
bool every(bool f(int element)) => IterableMixinWorkaround.every(this, f);
@@ -20423,6 +22763,9 @@
throw new UnsupportedError("Cannot clear immutable List.");
}
+ List<int> get reversed =>
+ new ReversedListView<int>(this, 0, null);
+
void sort([int compare(int a, int b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -20451,9 +22794,11 @@
throw new StateError("More than one element");
}
- int min([int compare(int a, int b)]) => IterableMixinWorkaround.min(this, compare);
+ int min([int compare(int a, int b)]) =>
+ IterableMixinWorkaround.min(this, compare);
- int max([int compare(int a, int b)]) => IterableMixinWorkaround.max(this, compare);
+ int max([int compare(int a, int b)]) =>
+ IterableMixinWorkaround.max(this, compare);
int removeAt(int pos) {
throw new UnsupportedError("Cannot remove from immutable List.");
@@ -20501,10 +22846,12 @@
// -- end List<int> mixins.
@JSName('set')
- @DocsEditable @DomName('Uint16Array.set')
+ @DomName('Uint16Array.set')
+ @DocsEditable
void setElements(Object array, [int offset]) native;
- @DocsEditable @DomName('Uint16Array.subarray')
+ @DomName('Uint16Array.subarray')
+ @DocsEditable
Uint16Array subarray(int start, [int end]) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -20512,7 +22859,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('Uint32Array')
class Uint32Array extends ArrayBufferView implements JavaScriptIndexingBehavior, List<int> native "*Uint32Array" {
@@ -20528,7 +22874,8 @@
static const int BYTES_PER_ELEMENT = 4;
- @DocsEditable @DomName('Uint32Array.length')
+ @DomName('Uint32Array.length')
+ @DocsEditable
int get length => JS("int", "#.length", this);
int operator[](int index) => JS("int", "#[#]", this, index);
@@ -20553,11 +22900,13 @@
void forEach(void f(int element)) => IterableMixinWorkaround.forEach(this, f);
- String join([String separator]) => IterableMixinWorkaround.joinList(this, separator);
+ String join([String separator]) =>
+ IterableMixinWorkaround.joinList(this, separator);
List mappedBy(f(int element)) => IterableMixinWorkaround.mappedByList(this, f);
- Iterable<int> where(bool f(int element)) => IterableMixinWorkaround.where(this, f);
+ Iterable<int> where(bool f(int element)) =>
+ IterableMixinWorkaround.where(this, f);
bool every(bool f(int element)) => IterableMixinWorkaround.every(this, f);
@@ -20619,6 +22968,9 @@
throw new UnsupportedError("Cannot clear immutable List.");
}
+ List<int> get reversed =>
+ new ReversedListView<int>(this, 0, null);
+
void sort([int compare(int a, int b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -20647,9 +22999,11 @@
throw new StateError("More than one element");
}
- int min([int compare(int a, int b)]) => IterableMixinWorkaround.min(this, compare);
+ int min([int compare(int a, int b)]) =>
+ IterableMixinWorkaround.min(this, compare);
- int max([int compare(int a, int b)]) => IterableMixinWorkaround.max(this, compare);
+ int max([int compare(int a, int b)]) =>
+ IterableMixinWorkaround.max(this, compare);
int removeAt(int pos) {
throw new UnsupportedError("Cannot remove from immutable List.");
@@ -20697,10 +23051,12 @@
// -- end List<int> mixins.
@JSName('set')
- @DocsEditable @DomName('Uint32Array.set')
+ @DomName('Uint32Array.set')
+ @DocsEditable
void setElements(Object array, [int offset]) native;
- @DocsEditable @DomName('Uint32Array.subarray')
+ @DomName('Uint32Array.subarray')
+ @DocsEditable
Uint32Array subarray(int start, [int end]) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -20708,7 +23064,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('Uint8Array')
class Uint8Array extends ArrayBufferView implements JavaScriptIndexingBehavior, List<int> native "*Uint8Array" {
@@ -20724,7 +23079,8 @@
static const int BYTES_PER_ELEMENT = 1;
- @DocsEditable @DomName('Uint8Array.length')
+ @DomName('Uint8Array.length')
+ @DocsEditable
int get length => JS("int", "#.length", this);
int operator[](int index) => JS("int", "#[#]", this, index);
@@ -20749,11 +23105,13 @@
void forEach(void f(int element)) => IterableMixinWorkaround.forEach(this, f);
- String join([String separator]) => IterableMixinWorkaround.joinList(this, separator);
+ String join([String separator]) =>
+ IterableMixinWorkaround.joinList(this, separator);
List mappedBy(f(int element)) => IterableMixinWorkaround.mappedByList(this, f);
- Iterable<int> where(bool f(int element)) => IterableMixinWorkaround.where(this, f);
+ Iterable<int> where(bool f(int element)) =>
+ IterableMixinWorkaround.where(this, f);
bool every(bool f(int element)) => IterableMixinWorkaround.every(this, f);
@@ -20815,6 +23173,9 @@
throw new UnsupportedError("Cannot clear immutable List.");
}
+ List<int> get reversed =>
+ new ReversedListView<int>(this, 0, null);
+
void sort([int compare(int a, int b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -20843,9 +23204,11 @@
throw new StateError("More than one element");
}
- int min([int compare(int a, int b)]) => IterableMixinWorkaround.min(this, compare);
+ int min([int compare(int a, int b)]) =>
+ IterableMixinWorkaround.min(this, compare);
- int max([int compare(int a, int b)]) => IterableMixinWorkaround.max(this, compare);
+ int max([int compare(int a, int b)]) =>
+ IterableMixinWorkaround.max(this, compare);
int removeAt(int pos) {
throw new UnsupportedError("Cannot remove from immutable List.");
@@ -20893,10 +23256,12 @@
// -- end List<int> mixins.
@JSName('set')
- @DocsEditable @DomName('Uint8Array.set')
+ @DomName('Uint8Array.set')
+ @DocsEditable
void setElements(Object array, [int offset]) native;
- @DocsEditable @DomName('Uint8Array.subarray')
+ @DomName('Uint8Array.subarray')
+ @DocsEditable
Uint8Array subarray(int start, [int end]) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -20904,7 +23269,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('Uint8ClampedArray')
class Uint8ClampedArray extends Uint8Array implements JavaScriptIndexingBehavior, List<int> native "*Uint8ClampedArray" {
@@ -20943,11 +23307,13 @@
void forEach(void f(int element)) => IterableMixinWorkaround.forEach(this, f);
- String join([String separator]) => IterableMixinWorkaround.joinList(this, separator);
+ String join([String separator]) =>
+ IterableMixinWorkaround.joinList(this, separator);
List mappedBy(f(int element)) => IterableMixinWorkaround.mappedByList(this, f);
- Iterable<int> where(bool f(int element)) => IterableMixinWorkaround.where(this, f);
+ Iterable<int> where(bool f(int element)) =>
+ IterableMixinWorkaround.where(this, f);
bool every(bool f(int element)) => IterableMixinWorkaround.every(this, f);
@@ -21009,6 +23375,9 @@
throw new UnsupportedError("Cannot clear immutable List.");
}
+ List<int> get reversed =>
+ new ReversedListView<int>(this, 0, null);
+
void sort([int compare(int a, int b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -21037,9 +23406,11 @@
throw new StateError("More than one element");
}
- int min([int compare(int a, int b)]) => IterableMixinWorkaround.min(this, compare);
+ int min([int compare(int a, int b)]) =>
+ IterableMixinWorkaround.min(this, compare);
- int max([int compare(int a, int b)]) => IterableMixinWorkaround.max(this, compare);
+ int max([int compare(int a, int b)]) =>
+ IterableMixinWorkaround.max(this, compare);
int removeAt(int pos) {
throw new UnsupportedError("Cannot remove from immutable List.");
@@ -21087,10 +23458,12 @@
// -- end List<int> mixins.
@JSName('set')
- @DocsEditable @DomName('Uint8ClampedArray.set')
+ @DomName('Uint8ClampedArray.set')
+ @DocsEditable
void setElements(Object array, [int offset]) native;
- @DocsEditable @DomName('Uint8ClampedArray.subarray')
+ @DomName('Uint8ClampedArray.subarray')
+ @DocsEditable
Uint8ClampedArray subarray(int start, [int end]) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -21098,7 +23471,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('HTMLUnknownElement')
class UnknownElement extends Element native "*HTMLUnknownElement" {
@@ -21108,7 +23480,6 @@
// BSD-style license that can be found in the LICENSE file.
-@DocsEditable
@DomName('URL')
class Url native "*URL" {
@@ -21127,39 +23498,48 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('ValidityState')
class ValidityState native "*ValidityState" {
- @DocsEditable @DomName('ValidityState.badInput')
+ @DomName('ValidityState.badInput')
+ @DocsEditable
final bool badInput;
- @DocsEditable @DomName('ValidityState.customError')
+ @DomName('ValidityState.customError')
+ @DocsEditable
final bool customError;
- @DocsEditable @DomName('ValidityState.patternMismatch')
+ @DomName('ValidityState.patternMismatch')
+ @DocsEditable
final bool patternMismatch;
- @DocsEditable @DomName('ValidityState.rangeOverflow')
+ @DomName('ValidityState.rangeOverflow')
+ @DocsEditable
final bool rangeOverflow;
- @DocsEditable @DomName('ValidityState.rangeUnderflow')
+ @DomName('ValidityState.rangeUnderflow')
+ @DocsEditable
final bool rangeUnderflow;
- @DocsEditable @DomName('ValidityState.stepMismatch')
+ @DomName('ValidityState.stepMismatch')
+ @DocsEditable
final bool stepMismatch;
- @DocsEditable @DomName('ValidityState.tooLong')
+ @DomName('ValidityState.tooLong')
+ @DocsEditable
final bool tooLong;
- @DocsEditable @DomName('ValidityState.typeMismatch')
+ @DomName('ValidityState.typeMismatch')
+ @DocsEditable
final bool typeMismatch;
- @DocsEditable @DomName('ValidityState.valid')
+ @DomName('ValidityState.valid')
+ @DocsEditable
final bool valid;
- @DocsEditable @DomName('ValidityState.valueMissing')
+ @DomName('ValidityState.valueMissing')
+ @DocsEditable
final bool valueMissing;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -21167,7 +23547,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('HTMLVideoElement')
class VideoElement extends MediaElement native "*HTMLVideoElement" {
@@ -21175,43 +23554,56 @@
@DocsEditable
factory VideoElement() => document.$dom_createElement("video");
- @DocsEditable @DomName('HTMLVideoElement.height')
+ @DomName('HTMLVideoElement.height')
+ @DocsEditable
int height;
- @DocsEditable @DomName('HTMLVideoElement.poster')
+ @DomName('HTMLVideoElement.poster')
+ @DocsEditable
String poster;
- @DocsEditable @DomName('HTMLVideoElement.videoHeight')
+ @DomName('HTMLVideoElement.videoHeight')
+ @DocsEditable
final int videoHeight;
- @DocsEditable @DomName('HTMLVideoElement.videoWidth')
+ @DomName('HTMLVideoElement.videoWidth')
+ @DocsEditable
final int videoWidth;
- @DocsEditable @DomName('HTMLVideoElement.webkitDecodedFrameCount')
+ @DomName('HTMLVideoElement.webkitDecodedFrameCount')
+ @DocsEditable
final int webkitDecodedFrameCount;
- @DocsEditable @DomName('HTMLVideoElement.webkitDisplayingFullscreen')
+ @DomName('HTMLVideoElement.webkitDisplayingFullscreen')
+ @DocsEditable
final bool webkitDisplayingFullscreen;
- @DocsEditable @DomName('HTMLVideoElement.webkitDroppedFrameCount')
+ @DomName('HTMLVideoElement.webkitDroppedFrameCount')
+ @DocsEditable
final int webkitDroppedFrameCount;
- @DocsEditable @DomName('HTMLVideoElement.webkitSupportsFullscreen')
+ @DomName('HTMLVideoElement.webkitSupportsFullscreen')
+ @DocsEditable
final bool webkitSupportsFullscreen;
- @DocsEditable @DomName('HTMLVideoElement.width')
+ @DomName('HTMLVideoElement.width')
+ @DocsEditable
int width;
- @DocsEditable @DomName('HTMLVideoElement.webkitEnterFullScreen')
+ @DomName('HTMLVideoElement.webkitEnterFullScreen')
+ @DocsEditable
void webkitEnterFullScreen() native;
- @DocsEditable @DomName('HTMLVideoElement.webkitEnterFullscreen')
+ @DomName('HTMLVideoElement.webkitEnterFullscreen')
+ @DocsEditable
void webkitEnterFullscreen() native;
- @DocsEditable @DomName('HTMLVideoElement.webkitExitFullScreen')
+ @DomName('HTMLVideoElement.webkitExitFullScreen')
+ @DocsEditable
void webkitExitFullScreen() native;
- @DocsEditable @DomName('HTMLVideoElement.webkitExitFullscreen')
+ @DomName('HTMLVideoElement.webkitExitFullscreen')
+ @DocsEditable
void webkitExitFullscreen() native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -21227,18 +23619,20 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('WebGLActiveInfo')
class WebGLActiveInfo native "*WebGLActiveInfo" {
- @DocsEditable @DomName('WebGLActiveInfo.name')
+ @DomName('WebGLActiveInfo.name')
+ @DocsEditable
final String name;
- @DocsEditable @DomName('WebGLActiveInfo.size')
+ @DomName('WebGLActiveInfo.size')
+ @DocsEditable
final int size;
- @DocsEditable @DomName('WebGLActiveInfo.type')
+ @DomName('WebGLActiveInfo.type')
+ @DocsEditable
final int type;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -21246,7 +23640,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('WebGLBuffer')
class WebGLBuffer native "*WebGLBuffer" {
@@ -21256,7 +23649,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('WebGLCompressedTextureS3TC')
class WebGLCompressedTextureS3TC native "*WebGLCompressedTextureS3TC" {
@@ -21274,27 +23666,32 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('WebGLContextAttributes')
class WebGLContextAttributes native "*WebGLContextAttributes" {
- @DocsEditable @DomName('WebGLContextAttributes.alpha')
+ @DomName('WebGLContextAttributes.alpha')
+ @DocsEditable
bool alpha;
- @DocsEditable @DomName('WebGLContextAttributes.antialias')
+ @DomName('WebGLContextAttributes.antialias')
+ @DocsEditable
bool antialias;
- @DocsEditable @DomName('WebGLContextAttributes.depth')
+ @DomName('WebGLContextAttributes.depth')
+ @DocsEditable
bool depth;
- @DocsEditable @DomName('WebGLContextAttributes.premultipliedAlpha')
+ @DomName('WebGLContextAttributes.premultipliedAlpha')
+ @DocsEditable
bool premultipliedAlpha;
- @DocsEditable @DomName('WebGLContextAttributes.preserveDrawingBuffer')
+ @DomName('WebGLContextAttributes.preserveDrawingBuffer')
+ @DocsEditable
bool preserveDrawingBuffer;
- @DocsEditable @DomName('WebGLContextAttributes.stencil')
+ @DomName('WebGLContextAttributes.stencil')
+ @DocsEditable
bool stencil;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -21302,12 +23699,12 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('WebGLContextEvent')
class WebGLContextEvent extends Event native "*WebGLContextEvent" {
- @DocsEditable @DomName('WebGLContextEvent.statusMessage')
+ @DomName('WebGLContextEvent.statusMessage')
+ @DocsEditable
final String statusMessage;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -21315,7 +23712,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('WebGLDebugRendererInfo')
class WebGLDebugRendererInfo native "*WebGLDebugRendererInfo" {
@@ -21329,12 +23725,12 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('WebGLDebugShaders')
class WebGLDebugShaders native "*WebGLDebugShaders" {
- @DocsEditable @DomName('WebGLDebugShaders.getTranslatedShaderSource')
+ @DomName('WebGLDebugShaders.getTranslatedShaderSource')
+ @DocsEditable
String getTranslatedShaderSource(WebGLShader shader) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -21342,7 +23738,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('WebGLDepthTexture')
class WebGLDepthTexture native "*WebGLDepthTexture" {
@@ -21354,7 +23749,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('WebGLFramebuffer')
class WebGLFramebuffer native "*WebGLFramebuffer" {
@@ -21364,15 +23758,16 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('WebGLLoseContext')
class WebGLLoseContext native "*WebGLLoseContext" {
- @DocsEditable @DomName('WebGLLoseContext.loseContext')
+ @DomName('WebGLLoseContext.loseContext')
+ @DocsEditable
void loseContext() native;
- @DocsEditable @DomName('WebGLLoseContext.restoreContext')
+ @DomName('WebGLLoseContext.restoreContext')
+ @DocsEditable
void restoreContext() native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -21380,7 +23775,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('WebGLProgram')
class WebGLProgram native "*WebGLProgram" {
@@ -21390,7 +23784,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('WebGLRenderbuffer')
class WebGLRenderbuffer native "*WebGLRenderbuffer" {
@@ -21400,7 +23793,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('WebGLRenderingContext')
class WebGLRenderingContext extends CanvasRenderingContext native "*WebGLRenderingContext" {
@@ -21995,316 +24387,420 @@
static const int ZERO = 0;
- @DocsEditable @DomName('WebGLRenderingContext.drawingBufferHeight')
+ @DomName('WebGLRenderingContext.drawingBufferHeight')
+ @DocsEditable
final int drawingBufferHeight;
- @DocsEditable @DomName('WebGLRenderingContext.drawingBufferWidth')
+ @DomName('WebGLRenderingContext.drawingBufferWidth')
+ @DocsEditable
final int drawingBufferWidth;
- @DocsEditable @DomName('WebGLRenderingContext.activeTexture')
+ @DomName('WebGLRenderingContext.activeTexture')
+ @DocsEditable
void activeTexture(int texture) native;
- @DocsEditable @DomName('WebGLRenderingContext.attachShader')
+ @DomName('WebGLRenderingContext.attachShader')
+ @DocsEditable
void attachShader(WebGLProgram program, WebGLShader shader) native;
- @DocsEditable @DomName('WebGLRenderingContext.bindAttribLocation')
+ @DomName('WebGLRenderingContext.bindAttribLocation')
+ @DocsEditable
void bindAttribLocation(WebGLProgram program, int index, String name) native;
- @DocsEditable @DomName('WebGLRenderingContext.bindBuffer')
+ @DomName('WebGLRenderingContext.bindBuffer')
+ @DocsEditable
void bindBuffer(int target, WebGLBuffer buffer) native;
- @DocsEditable @DomName('WebGLRenderingContext.bindFramebuffer')
+ @DomName('WebGLRenderingContext.bindFramebuffer')
+ @DocsEditable
void bindFramebuffer(int target, WebGLFramebuffer framebuffer) native;
- @DocsEditable @DomName('WebGLRenderingContext.bindRenderbuffer')
+ @DomName('WebGLRenderingContext.bindRenderbuffer')
+ @DocsEditable
void bindRenderbuffer(int target, WebGLRenderbuffer renderbuffer) native;
- @DocsEditable @DomName('WebGLRenderingContext.bindTexture')
+ @DomName('WebGLRenderingContext.bindTexture')
+ @DocsEditable
void bindTexture(int target, WebGLTexture texture) native;
- @DocsEditable @DomName('WebGLRenderingContext.blendColor')
+ @DomName('WebGLRenderingContext.blendColor')
+ @DocsEditable
void blendColor(num red, num green, num blue, num alpha) native;
- @DocsEditable @DomName('WebGLRenderingContext.blendEquation')
+ @DomName('WebGLRenderingContext.blendEquation')
+ @DocsEditable
void blendEquation(int mode) native;
- @DocsEditable @DomName('WebGLRenderingContext.blendEquationSeparate')
+ @DomName('WebGLRenderingContext.blendEquationSeparate')
+ @DocsEditable
void blendEquationSeparate(int modeRGB, int modeAlpha) native;
- @DocsEditable @DomName('WebGLRenderingContext.blendFunc')
+ @DomName('WebGLRenderingContext.blendFunc')
+ @DocsEditable
void blendFunc(int sfactor, int dfactor) native;
- @DocsEditable @DomName('WebGLRenderingContext.blendFuncSeparate')
+ @DomName('WebGLRenderingContext.blendFuncSeparate')
+ @DocsEditable
void blendFuncSeparate(int srcRGB, int dstRGB, int srcAlpha, int dstAlpha) native;
- @DocsEditable @DomName('WebGLRenderingContext.bufferData')
+ @DomName('WebGLRenderingContext.bufferData')
+ @DocsEditable
void bufferData(int target, data_OR_size, int usage) native;
- @DocsEditable @DomName('WebGLRenderingContext.bufferSubData')
+ @DomName('WebGLRenderingContext.bufferSubData')
+ @DocsEditable
void bufferSubData(int target, int offset, data) native;
- @DocsEditable @DomName('WebGLRenderingContext.checkFramebufferStatus')
+ @DomName('WebGLRenderingContext.checkFramebufferStatus')
+ @DocsEditable
int checkFramebufferStatus(int target) native;
- @DocsEditable @DomName('WebGLRenderingContext.clear')
+ @DomName('WebGLRenderingContext.clear')
+ @DocsEditable
void clear(int mask) native;
- @DocsEditable @DomName('WebGLRenderingContext.clearColor')
+ @DomName('WebGLRenderingContext.clearColor')
+ @DocsEditable
void clearColor(num red, num green, num blue, num alpha) native;
- @DocsEditable @DomName('WebGLRenderingContext.clearDepth')
+ @DomName('WebGLRenderingContext.clearDepth')
+ @DocsEditable
void clearDepth(num depth) native;
- @DocsEditable @DomName('WebGLRenderingContext.clearStencil')
+ @DomName('WebGLRenderingContext.clearStencil')
+ @DocsEditable
void clearStencil(int s) native;
- @DocsEditable @DomName('WebGLRenderingContext.colorMask')
+ @DomName('WebGLRenderingContext.colorMask')
+ @DocsEditable
void colorMask(bool red, bool green, bool blue, bool alpha) native;
- @DocsEditable @DomName('WebGLRenderingContext.compileShader')
+ @DomName('WebGLRenderingContext.compileShader')
+ @DocsEditable
void compileShader(WebGLShader shader) native;
- @DocsEditable @DomName('WebGLRenderingContext.compressedTexImage2D')
+ @DomName('WebGLRenderingContext.compressedTexImage2D')
+ @DocsEditable
void compressedTexImage2D(int target, int level, int internalformat, int width, int height, int border, ArrayBufferView data) native;
- @DocsEditable @DomName('WebGLRenderingContext.compressedTexSubImage2D')
+ @DomName('WebGLRenderingContext.compressedTexSubImage2D')
+ @DocsEditable
void compressedTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, ArrayBufferView data) native;
- @DocsEditable @DomName('WebGLRenderingContext.copyTexImage2D')
+ @DomName('WebGLRenderingContext.copyTexImage2D')
+ @DocsEditable
void copyTexImage2D(int target, int level, int internalformat, int x, int y, int width, int height, int border) native;
- @DocsEditable @DomName('WebGLRenderingContext.copyTexSubImage2D')
+ @DomName('WebGLRenderingContext.copyTexSubImage2D')
+ @DocsEditable
void copyTexSubImage2D(int target, int level, int xoffset, int yoffset, int x, int y, int width, int height) native;
- @DocsEditable @DomName('WebGLRenderingContext.createBuffer')
+ @DomName('WebGLRenderingContext.createBuffer')
+ @DocsEditable
WebGLBuffer createBuffer() native;
- @DocsEditable @DomName('WebGLRenderingContext.createFramebuffer')
+ @DomName('WebGLRenderingContext.createFramebuffer')
+ @DocsEditable
WebGLFramebuffer createFramebuffer() native;
- @DocsEditable @DomName('WebGLRenderingContext.createProgram')
+ @DomName('WebGLRenderingContext.createProgram')
+ @DocsEditable
WebGLProgram createProgram() native;
- @DocsEditable @DomName('WebGLRenderingContext.createRenderbuffer')
+ @DomName('WebGLRenderingContext.createRenderbuffer')
+ @DocsEditable
WebGLRenderbuffer createRenderbuffer() native;
- @DocsEditable @DomName('WebGLRenderingContext.createShader')
+ @DomName('WebGLRenderingContext.createShader')
+ @DocsEditable
WebGLShader createShader(int type) native;
- @DocsEditable @DomName('WebGLRenderingContext.createTexture')
+ @DomName('WebGLRenderingContext.createTexture')
+ @DocsEditable
WebGLTexture createTexture() native;
- @DocsEditable @DomName('WebGLRenderingContext.cullFace')
+ @DomName('WebGLRenderingContext.cullFace')
+ @DocsEditable
void cullFace(int mode) native;
- @DocsEditable @DomName('WebGLRenderingContext.deleteBuffer')
+ @DomName('WebGLRenderingContext.deleteBuffer')
+ @DocsEditable
void deleteBuffer(WebGLBuffer buffer) native;
- @DocsEditable @DomName('WebGLRenderingContext.deleteFramebuffer')
+ @DomName('WebGLRenderingContext.deleteFramebuffer')
+ @DocsEditable
void deleteFramebuffer(WebGLFramebuffer framebuffer) native;
- @DocsEditable @DomName('WebGLRenderingContext.deleteProgram')
+ @DomName('WebGLRenderingContext.deleteProgram')
+ @DocsEditable
void deleteProgram(WebGLProgram program) native;
- @DocsEditable @DomName('WebGLRenderingContext.deleteRenderbuffer')
+ @DomName('WebGLRenderingContext.deleteRenderbuffer')
+ @DocsEditable
void deleteRenderbuffer(WebGLRenderbuffer renderbuffer) native;
- @DocsEditable @DomName('WebGLRenderingContext.deleteShader')
+ @DomName('WebGLRenderingContext.deleteShader')
+ @DocsEditable
void deleteShader(WebGLShader shader) native;
- @DocsEditable @DomName('WebGLRenderingContext.deleteTexture')
+ @DomName('WebGLRenderingContext.deleteTexture')
+ @DocsEditable
void deleteTexture(WebGLTexture texture) native;
- @DocsEditable @DomName('WebGLRenderingContext.depthFunc')
+ @DomName('WebGLRenderingContext.depthFunc')
+ @DocsEditable
void depthFunc(int func) native;
- @DocsEditable @DomName('WebGLRenderingContext.depthMask')
+ @DomName('WebGLRenderingContext.depthMask')
+ @DocsEditable
void depthMask(bool flag) native;
- @DocsEditable @DomName('WebGLRenderingContext.depthRange')
+ @DomName('WebGLRenderingContext.depthRange')
+ @DocsEditable
void depthRange(num zNear, num zFar) native;
- @DocsEditable @DomName('WebGLRenderingContext.detachShader')
+ @DomName('WebGLRenderingContext.detachShader')
+ @DocsEditable
void detachShader(WebGLProgram program, WebGLShader shader) native;
- @DocsEditable @DomName('WebGLRenderingContext.disable')
+ @DomName('WebGLRenderingContext.disable')
+ @DocsEditable
void disable(int cap) native;
- @DocsEditable @DomName('WebGLRenderingContext.disableVertexAttribArray')
+ @DomName('WebGLRenderingContext.disableVertexAttribArray')
+ @DocsEditable
void disableVertexAttribArray(int index) native;
- @DocsEditable @DomName('WebGLRenderingContext.drawArrays')
+ @DomName('WebGLRenderingContext.drawArrays')
+ @DocsEditable
void drawArrays(int mode, int first, int count) native;
- @DocsEditable @DomName('WebGLRenderingContext.drawElements')
+ @DomName('WebGLRenderingContext.drawElements')
+ @DocsEditable
void drawElements(int mode, int count, int type, int offset) native;
- @DocsEditable @DomName('WebGLRenderingContext.enable')
+ @DomName('WebGLRenderingContext.enable')
+ @DocsEditable
void enable(int cap) native;
- @DocsEditable @DomName('WebGLRenderingContext.enableVertexAttribArray')
+ @DomName('WebGLRenderingContext.enableVertexAttribArray')
+ @DocsEditable
void enableVertexAttribArray(int index) native;
- @DocsEditable @DomName('WebGLRenderingContext.finish')
+ @DomName('WebGLRenderingContext.finish')
+ @DocsEditable
void finish() native;
- @DocsEditable @DomName('WebGLRenderingContext.flush')
+ @DomName('WebGLRenderingContext.flush')
+ @DocsEditable
void flush() native;
- @DocsEditable @DomName('WebGLRenderingContext.framebufferRenderbuffer')
+ @DomName('WebGLRenderingContext.framebufferRenderbuffer')
+ @DocsEditable
void framebufferRenderbuffer(int target, int attachment, int renderbuffertarget, WebGLRenderbuffer renderbuffer) native;
- @DocsEditable @DomName('WebGLRenderingContext.framebufferTexture2D')
+ @DomName('WebGLRenderingContext.framebufferTexture2D')
+ @DocsEditable
void framebufferTexture2D(int target, int attachment, int textarget, WebGLTexture texture, int level) native;
- @DocsEditable @DomName('WebGLRenderingContext.frontFace')
+ @DomName('WebGLRenderingContext.frontFace')
+ @DocsEditable
void frontFace(int mode) native;
- @DocsEditable @DomName('WebGLRenderingContext.generateMipmap')
+ @DomName('WebGLRenderingContext.generateMipmap')
+ @DocsEditable
void generateMipmap(int target) native;
- @DocsEditable @DomName('WebGLRenderingContext.getActiveAttrib')
+ @DomName('WebGLRenderingContext.getActiveAttrib')
+ @DocsEditable
WebGLActiveInfo getActiveAttrib(WebGLProgram program, int index) native;
- @DocsEditable @DomName('WebGLRenderingContext.getActiveUniform')
+ @DomName('WebGLRenderingContext.getActiveUniform')
+ @DocsEditable
WebGLActiveInfo getActiveUniform(WebGLProgram program, int index) native;
- @DocsEditable @DomName('WebGLRenderingContext.getAttachedShaders')
+ @DomName('WebGLRenderingContext.getAttachedShaders')
+ @DocsEditable
void getAttachedShaders(WebGLProgram program) native;
- @DocsEditable @DomName('WebGLRenderingContext.getAttribLocation')
+ @DomName('WebGLRenderingContext.getAttribLocation')
+ @DocsEditable
int getAttribLocation(WebGLProgram program, String name) native;
- @DocsEditable @DomName('WebGLRenderingContext.getBufferParameter')
+ @DomName('WebGLRenderingContext.getBufferParameter')
+ @DocsEditable
Object getBufferParameter(int target, int pname) native;
- @DocsEditable @DomName('WebGLRenderingContext.getContextAttributes')
+ @DomName('WebGLRenderingContext.getContextAttributes')
+ @DocsEditable
WebGLContextAttributes getContextAttributes() native;
- @DocsEditable @DomName('WebGLRenderingContext.getError')
+ @DomName('WebGLRenderingContext.getError')
+ @DocsEditable
int getError() native;
- @DocsEditable @DomName('WebGLRenderingContext.getExtension')
+ @DomName('WebGLRenderingContext.getExtension')
+ @DocsEditable
Object getExtension(String name) native;
- @DocsEditable @DomName('WebGLRenderingContext.getFramebufferAttachmentParameter')
+ @DomName('WebGLRenderingContext.getFramebufferAttachmentParameter')
+ @DocsEditable
Object getFramebufferAttachmentParameter(int target, int attachment, int pname) native;
- @DocsEditable @DomName('WebGLRenderingContext.getParameter')
+ @DomName('WebGLRenderingContext.getParameter')
+ @DocsEditable
Object getParameter(int pname) native;
- @DocsEditable @DomName('WebGLRenderingContext.getProgramInfoLog')
+ @DomName('WebGLRenderingContext.getProgramInfoLog')
+ @DocsEditable
String getProgramInfoLog(WebGLProgram program) native;
- @DocsEditable @DomName('WebGLRenderingContext.getProgramParameter')
+ @DomName('WebGLRenderingContext.getProgramParameter')
+ @DocsEditable
Object getProgramParameter(WebGLProgram program, int pname) native;
- @DocsEditable @DomName('WebGLRenderingContext.getRenderbufferParameter')
+ @DomName('WebGLRenderingContext.getRenderbufferParameter')
+ @DocsEditable
Object getRenderbufferParameter(int target, int pname) native;
- @DocsEditable @DomName('WebGLRenderingContext.getShaderInfoLog')
+ @DomName('WebGLRenderingContext.getShaderInfoLog')
+ @DocsEditable
String getShaderInfoLog(WebGLShader shader) native;
- @DocsEditable @DomName('WebGLRenderingContext.getShaderParameter')
+ @DomName('WebGLRenderingContext.getShaderParameter')
+ @DocsEditable
Object getShaderParameter(WebGLShader shader, int pname) native;
- @DocsEditable @DomName('WebGLRenderingContext.getShaderPrecisionFormat')
+ @DomName('WebGLRenderingContext.getShaderPrecisionFormat')
+ @DocsEditable
WebGLShaderPrecisionFormat getShaderPrecisionFormat(int shadertype, int precisiontype) native;
- @DocsEditable @DomName('WebGLRenderingContext.getShaderSource')
+ @DomName('WebGLRenderingContext.getShaderSource')
+ @DocsEditable
String getShaderSource(WebGLShader shader) native;
- @DocsEditable @DomName('WebGLRenderingContext.getSupportedExtensions')
+ @DomName('WebGLRenderingContext.getSupportedExtensions')
+ @DocsEditable
List<String> getSupportedExtensions() native;
- @DocsEditable @DomName('WebGLRenderingContext.getTexParameter')
+ @DomName('WebGLRenderingContext.getTexParameter')
+ @DocsEditable
Object getTexParameter(int target, int pname) native;
- @DocsEditable @DomName('WebGLRenderingContext.getUniform')
+ @DomName('WebGLRenderingContext.getUniform')
+ @DocsEditable
Object getUniform(WebGLProgram program, WebGLUniformLocation location) native;
- @DocsEditable @DomName('WebGLRenderingContext.getUniformLocation')
+ @DomName('WebGLRenderingContext.getUniformLocation')
+ @DocsEditable
WebGLUniformLocation getUniformLocation(WebGLProgram program, String name) native;
- @DocsEditable @DomName('WebGLRenderingContext.getVertexAttrib')
+ @DomName('WebGLRenderingContext.getVertexAttrib')
+ @DocsEditable
Object getVertexAttrib(int index, int pname) native;
- @DocsEditable @DomName('WebGLRenderingContext.getVertexAttribOffset')
+ @DomName('WebGLRenderingContext.getVertexAttribOffset')
+ @DocsEditable
int getVertexAttribOffset(int index, int pname) native;
- @DocsEditable @DomName('WebGLRenderingContext.hint')
+ @DomName('WebGLRenderingContext.hint')
+ @DocsEditable
void hint(int target, int mode) native;
- @DocsEditable @DomName('WebGLRenderingContext.isBuffer')
+ @DomName('WebGLRenderingContext.isBuffer')
+ @DocsEditable
bool isBuffer(WebGLBuffer buffer) native;
- @DocsEditable @DomName('WebGLRenderingContext.isContextLost')
+ @DomName('WebGLRenderingContext.isContextLost')
+ @DocsEditable
bool isContextLost() native;
- @DocsEditable @DomName('WebGLRenderingContext.isEnabled')
+ @DomName('WebGLRenderingContext.isEnabled')
+ @DocsEditable
bool isEnabled(int cap) native;
- @DocsEditable @DomName('WebGLRenderingContext.isFramebuffer')
+ @DomName('WebGLRenderingContext.isFramebuffer')
+ @DocsEditable
bool isFramebuffer(WebGLFramebuffer framebuffer) native;
- @DocsEditable @DomName('WebGLRenderingContext.isProgram')
+ @DomName('WebGLRenderingContext.isProgram')
+ @DocsEditable
bool isProgram(WebGLProgram program) native;
- @DocsEditable @DomName('WebGLRenderingContext.isRenderbuffer')
+ @DomName('WebGLRenderingContext.isRenderbuffer')
+ @DocsEditable
bool isRenderbuffer(WebGLRenderbuffer renderbuffer) native;
- @DocsEditable @DomName('WebGLRenderingContext.isShader')
+ @DomName('WebGLRenderingContext.isShader')
+ @DocsEditable
bool isShader(WebGLShader shader) native;
- @DocsEditable @DomName('WebGLRenderingContext.isTexture')
+ @DomName('WebGLRenderingContext.isTexture')
+ @DocsEditable
bool isTexture(WebGLTexture texture) native;
- @DocsEditable @DomName('WebGLRenderingContext.lineWidth')
+ @DomName('WebGLRenderingContext.lineWidth')
+ @DocsEditable
void lineWidth(num width) native;
- @DocsEditable @DomName('WebGLRenderingContext.linkProgram')
+ @DomName('WebGLRenderingContext.linkProgram')
+ @DocsEditable
void linkProgram(WebGLProgram program) native;
- @DocsEditable @DomName('WebGLRenderingContext.pixelStorei')
+ @DomName('WebGLRenderingContext.pixelStorei')
+ @DocsEditable
void pixelStorei(int pname, int param) native;
- @DocsEditable @DomName('WebGLRenderingContext.polygonOffset')
+ @DomName('WebGLRenderingContext.polygonOffset')
+ @DocsEditable
void polygonOffset(num factor, num units) native;
- @DocsEditable @DomName('WebGLRenderingContext.readPixels')
+ @DomName('WebGLRenderingContext.readPixels')
+ @DocsEditable
void readPixels(int x, int y, int width, int height, int format, int type, ArrayBufferView pixels) native;
- @DocsEditable @DomName('WebGLRenderingContext.releaseShaderCompiler')
+ @DomName('WebGLRenderingContext.releaseShaderCompiler')
+ @DocsEditable
void releaseShaderCompiler() native;
- @DocsEditable @DomName('WebGLRenderingContext.renderbufferStorage')
+ @DomName('WebGLRenderingContext.renderbufferStorage')
+ @DocsEditable
void renderbufferStorage(int target, int internalformat, int width, int height) native;
- @DocsEditable @DomName('WebGLRenderingContext.sampleCoverage')
+ @DomName('WebGLRenderingContext.sampleCoverage')
+ @DocsEditable
void sampleCoverage(num value, bool invert) native;
- @DocsEditable @DomName('WebGLRenderingContext.scissor')
+ @DomName('WebGLRenderingContext.scissor')
+ @DocsEditable
void scissor(int x, int y, int width, int height) native;
- @DocsEditable @DomName('WebGLRenderingContext.shaderSource')
+ @DomName('WebGLRenderingContext.shaderSource')
+ @DocsEditable
void shaderSource(WebGLShader shader, String string) native;
- @DocsEditable @DomName('WebGLRenderingContext.stencilFunc')
+ @DomName('WebGLRenderingContext.stencilFunc')
+ @DocsEditable
void stencilFunc(int func, int ref, int mask) native;
- @DocsEditable @DomName('WebGLRenderingContext.stencilFuncSeparate')
+ @DomName('WebGLRenderingContext.stencilFuncSeparate')
+ @DocsEditable
void stencilFuncSeparate(int face, int func, int ref, int mask) native;
- @DocsEditable @DomName('WebGLRenderingContext.stencilMask')
+ @DomName('WebGLRenderingContext.stencilMask')
+ @DocsEditable
void stencilMask(int mask) native;
- @DocsEditable @DomName('WebGLRenderingContext.stencilMaskSeparate')
+ @DomName('WebGLRenderingContext.stencilMaskSeparate')
+ @DocsEditable
void stencilMaskSeparate(int face, int mask) native;
- @DocsEditable @DomName('WebGLRenderingContext.stencilOp')
+ @DomName('WebGLRenderingContext.stencilOp')
+ @DocsEditable
void stencilOp(int fail, int zfail, int zpass) native;
- @DocsEditable @DomName('WebGLRenderingContext.stencilOpSeparate')
+ @DomName('WebGLRenderingContext.stencilOpSeparate')
+ @DocsEditable
void stencilOpSeparate(int face, int fail, int zfail, int zpass) native;
void texImage2D(int target, int level, int internalformat, int format_OR_width, int height_OR_type, border_OR_canvas_OR_image_OR_pixels_OR_video, [int format, int type, ArrayBufferView pixels]) {
@@ -22312,57 +24808,52 @@
_texImage2D_1(target, level, internalformat, format_OR_width, height_OR_type, border_OR_canvas_OR_image_OR_pixels_OR_video, format, type, pixels);
return;
}
- if ((border_OR_canvas_OR_image_OR_pixels_OR_video is ImageData || border_OR_canvas_OR_image_OR_pixels_OR_video == null) &&
- !?format &&
- !?type &&
- !?pixels) {
+ if ((border_OR_canvas_OR_image_OR_pixels_OR_video is ImageData || border_OR_canvas_OR_image_OR_pixels_OR_video == null) && !?format && !?type && !?pixels) {
var pixels_1 = _convertDartToNative_ImageData(border_OR_canvas_OR_image_OR_pixels_OR_video);
_texImage2D_2(target, level, internalformat, format_OR_width, height_OR_type, pixels_1);
return;
}
- if ((border_OR_canvas_OR_image_OR_pixels_OR_video is ImageElement || border_OR_canvas_OR_image_OR_pixels_OR_video == null) &&
- !?format &&
- !?type &&
- !?pixels) {
+ if ((border_OR_canvas_OR_image_OR_pixels_OR_video is ImageElement || border_OR_canvas_OR_image_OR_pixels_OR_video == null) && !?format && !?type && !?pixels) {
_texImage2D_3(target, level, internalformat, format_OR_width, height_OR_type, border_OR_canvas_OR_image_OR_pixels_OR_video);
return;
}
- if ((border_OR_canvas_OR_image_OR_pixels_OR_video is CanvasElement || border_OR_canvas_OR_image_OR_pixels_OR_video == null) &&
- !?format &&
- !?type &&
- !?pixels) {
+ if ((border_OR_canvas_OR_image_OR_pixels_OR_video is CanvasElement || border_OR_canvas_OR_image_OR_pixels_OR_video == null) && !?format && !?type && !?pixels) {
_texImage2D_4(target, level, internalformat, format_OR_width, height_OR_type, border_OR_canvas_OR_image_OR_pixels_OR_video);
return;
}
- if ((border_OR_canvas_OR_image_OR_pixels_OR_video is VideoElement || border_OR_canvas_OR_image_OR_pixels_OR_video == null) &&
- !?format &&
- !?type &&
- !?pixels) {
+ if ((border_OR_canvas_OR_image_OR_pixels_OR_video is VideoElement || border_OR_canvas_OR_image_OR_pixels_OR_video == null) && !?format && !?type && !?pixels) {
_texImage2D_5(target, level, internalformat, format_OR_width, height_OR_type, border_OR_canvas_OR_image_OR_pixels_OR_video);
return;
}
throw new ArgumentError("Incorrect number or type of arguments");
}
@JSName('texImage2D')
- @DocsEditable @DomName('WebGLRenderingContext.texImage2D')
+ @DomName('WebGLRenderingContext.texImage2D')
+ @DocsEditable
void _texImage2D_1(target, level, internalformat, width, height, int border, format, type, ArrayBufferView pixels) native;
@JSName('texImage2D')
- @DocsEditable @DomName('WebGLRenderingContext.texImage2D')
+ @DomName('WebGLRenderingContext.texImage2D')
+ @DocsEditable
void _texImage2D_2(target, level, internalformat, format, type, pixels) native;
@JSName('texImage2D')
- @DocsEditable @DomName('WebGLRenderingContext.texImage2D')
+ @DomName('WebGLRenderingContext.texImage2D')
+ @DocsEditable
void _texImage2D_3(target, level, internalformat, format, type, ImageElement image) native;
@JSName('texImage2D')
- @DocsEditable @DomName('WebGLRenderingContext.texImage2D')
+ @DomName('WebGLRenderingContext.texImage2D')
+ @DocsEditable
void _texImage2D_4(target, level, internalformat, format, type, CanvasElement canvas) native;
@JSName('texImage2D')
- @DocsEditable @DomName('WebGLRenderingContext.texImage2D')
+ @DomName('WebGLRenderingContext.texImage2D')
+ @DocsEditable
void _texImage2D_5(target, level, internalformat, format, type, VideoElement video) native;
- @DocsEditable @DomName('WebGLRenderingContext.texParameterf')
+ @DomName('WebGLRenderingContext.texParameterf')
+ @DocsEditable
void texParameterf(int target, int pname, num param) native;
- @DocsEditable @DomName('WebGLRenderingContext.texParameteri')
+ @DomName('WebGLRenderingContext.texParameteri')
+ @DocsEditable
void texParameteri(int target, int pname, int param) native;
void texSubImage2D(int target, int level, int xoffset, int yoffset, int format_OR_width, int height_OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video, [int type, ArrayBufferView pixels]) {
@@ -22370,140 +24861,168 @@
_texSubImage2D_1(target, level, xoffset, yoffset, format_OR_width, height_OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video, type, pixels);
return;
}
- if ((canvas_OR_format_OR_image_OR_pixels_OR_video is ImageData || canvas_OR_format_OR_image_OR_pixels_OR_video == null) &&
- !?type &&
- !?pixels) {
+ if ((canvas_OR_format_OR_image_OR_pixels_OR_video is ImageData || canvas_OR_format_OR_image_OR_pixels_OR_video == null) && !?type && !?pixels) {
var pixels_1 = _convertDartToNative_ImageData(canvas_OR_format_OR_image_OR_pixels_OR_video);
_texSubImage2D_2(target, level, xoffset, yoffset, format_OR_width, height_OR_type, pixels_1);
return;
}
- if ((canvas_OR_format_OR_image_OR_pixels_OR_video is ImageElement || canvas_OR_format_OR_image_OR_pixels_OR_video == null) &&
- !?type &&
- !?pixels) {
+ if ((canvas_OR_format_OR_image_OR_pixels_OR_video is ImageElement || canvas_OR_format_OR_image_OR_pixels_OR_video == null) && !?type && !?pixels) {
_texSubImage2D_3(target, level, xoffset, yoffset, format_OR_width, height_OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video);
return;
}
- if ((canvas_OR_format_OR_image_OR_pixels_OR_video is CanvasElement || canvas_OR_format_OR_image_OR_pixels_OR_video == null) &&
- !?type &&
- !?pixels) {
+ if ((canvas_OR_format_OR_image_OR_pixels_OR_video is CanvasElement || canvas_OR_format_OR_image_OR_pixels_OR_video == null) && !?type && !?pixels) {
_texSubImage2D_4(target, level, xoffset, yoffset, format_OR_width, height_OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video);
return;
}
- if ((canvas_OR_format_OR_image_OR_pixels_OR_video is VideoElement || canvas_OR_format_OR_image_OR_pixels_OR_video == null) &&
- !?type &&
- !?pixels) {
+ if ((canvas_OR_format_OR_image_OR_pixels_OR_video is VideoElement || canvas_OR_format_OR_image_OR_pixels_OR_video == null) && !?type && !?pixels) {
_texSubImage2D_5(target, level, xoffset, yoffset, format_OR_width, height_OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video);
return;
}
throw new ArgumentError("Incorrect number or type of arguments");
}
@JSName('texSubImage2D')
- @DocsEditable @DomName('WebGLRenderingContext.texSubImage2D')
+ @DomName('WebGLRenderingContext.texSubImage2D')
+ @DocsEditable
void _texSubImage2D_1(target, level, xoffset, yoffset, width, height, int format, type, ArrayBufferView pixels) native;
@JSName('texSubImage2D')
- @DocsEditable @DomName('WebGLRenderingContext.texSubImage2D')
+ @DomName('WebGLRenderingContext.texSubImage2D')
+ @DocsEditable
void _texSubImage2D_2(target, level, xoffset, yoffset, format, type, pixels) native;
@JSName('texSubImage2D')
- @DocsEditable @DomName('WebGLRenderingContext.texSubImage2D')
+ @DomName('WebGLRenderingContext.texSubImage2D')
+ @DocsEditable
void _texSubImage2D_3(target, level, xoffset, yoffset, format, type, ImageElement image) native;
@JSName('texSubImage2D')
- @DocsEditable @DomName('WebGLRenderingContext.texSubImage2D')
+ @DomName('WebGLRenderingContext.texSubImage2D')
+ @DocsEditable
void _texSubImage2D_4(target, level, xoffset, yoffset, format, type, CanvasElement canvas) native;
@JSName('texSubImage2D')
- @DocsEditable @DomName('WebGLRenderingContext.texSubImage2D')
+ @DomName('WebGLRenderingContext.texSubImage2D')
+ @DocsEditable
void _texSubImage2D_5(target, level, xoffset, yoffset, format, type, VideoElement video) native;
- @DocsEditable @DomName('WebGLRenderingContext.uniform1f')
+ @DomName('WebGLRenderingContext.uniform1f')
+ @DocsEditable
void uniform1f(WebGLUniformLocation location, num x) native;
- @DocsEditable @DomName('WebGLRenderingContext.uniform1fv')
+ @DomName('WebGLRenderingContext.uniform1fv')
+ @DocsEditable
void uniform1fv(WebGLUniformLocation location, Float32Array v) native;
- @DocsEditable @DomName('WebGLRenderingContext.uniform1i')
+ @DomName('WebGLRenderingContext.uniform1i')
+ @DocsEditable
void uniform1i(WebGLUniformLocation location, int x) native;
- @DocsEditable @DomName('WebGLRenderingContext.uniform1iv')
+ @DomName('WebGLRenderingContext.uniform1iv')
+ @DocsEditable
void uniform1iv(WebGLUniformLocation location, Int32Array v) native;
- @DocsEditable @DomName('WebGLRenderingContext.uniform2f')
+ @DomName('WebGLRenderingContext.uniform2f')
+ @DocsEditable
void uniform2f(WebGLUniformLocation location, num x, num y) native;
- @DocsEditable @DomName('WebGLRenderingContext.uniform2fv')
+ @DomName('WebGLRenderingContext.uniform2fv')
+ @DocsEditable
void uniform2fv(WebGLUniformLocation location, Float32Array v) native;
- @DocsEditable @DomName('WebGLRenderingContext.uniform2i')
+ @DomName('WebGLRenderingContext.uniform2i')
+ @DocsEditable
void uniform2i(WebGLUniformLocation location, int x, int y) native;
- @DocsEditable @DomName('WebGLRenderingContext.uniform2iv')
+ @DomName('WebGLRenderingContext.uniform2iv')
+ @DocsEditable
void uniform2iv(WebGLUniformLocation location, Int32Array v) native;
- @DocsEditable @DomName('WebGLRenderingContext.uniform3f')
+ @DomName('WebGLRenderingContext.uniform3f')
+ @DocsEditable
void uniform3f(WebGLUniformLocation location, num x, num y, num z) native;
- @DocsEditable @DomName('WebGLRenderingContext.uniform3fv')
+ @DomName('WebGLRenderingContext.uniform3fv')
+ @DocsEditable
void uniform3fv(WebGLUniformLocation location, Float32Array v) native;
- @DocsEditable @DomName('WebGLRenderingContext.uniform3i')
+ @DomName('WebGLRenderingContext.uniform3i')
+ @DocsEditable
void uniform3i(WebGLUniformLocation location, int x, int y, int z) native;
- @DocsEditable @DomName('WebGLRenderingContext.uniform3iv')
+ @DomName('WebGLRenderingContext.uniform3iv')
+ @DocsEditable
void uniform3iv(WebGLUniformLocation location, Int32Array v) native;
- @DocsEditable @DomName('WebGLRenderingContext.uniform4f')
+ @DomName('WebGLRenderingContext.uniform4f')
+ @DocsEditable
void uniform4f(WebGLUniformLocation location, num x, num y, num z, num w) native;
- @DocsEditable @DomName('WebGLRenderingContext.uniform4fv')
+ @DomName('WebGLRenderingContext.uniform4fv')
+ @DocsEditable
void uniform4fv(WebGLUniformLocation location, Float32Array v) native;
- @DocsEditable @DomName('WebGLRenderingContext.uniform4i')
+ @DomName('WebGLRenderingContext.uniform4i')
+ @DocsEditable
void uniform4i(WebGLUniformLocation location, int x, int y, int z, int w) native;
- @DocsEditable @DomName('WebGLRenderingContext.uniform4iv')
+ @DomName('WebGLRenderingContext.uniform4iv')
+ @DocsEditable
void uniform4iv(WebGLUniformLocation location, Int32Array v) native;
- @DocsEditable @DomName('WebGLRenderingContext.uniformMatrix2fv')
+ @DomName('WebGLRenderingContext.uniformMatrix2fv')
+ @DocsEditable
void uniformMatrix2fv(WebGLUniformLocation location, bool transpose, Float32Array array) native;
- @DocsEditable @DomName('WebGLRenderingContext.uniformMatrix3fv')
+ @DomName('WebGLRenderingContext.uniformMatrix3fv')
+ @DocsEditable
void uniformMatrix3fv(WebGLUniformLocation location, bool transpose, Float32Array array) native;
- @DocsEditable @DomName('WebGLRenderingContext.uniformMatrix4fv')
+ @DomName('WebGLRenderingContext.uniformMatrix4fv')
+ @DocsEditable
void uniformMatrix4fv(WebGLUniformLocation location, bool transpose, Float32Array array) native;
- @DocsEditable @DomName('WebGLRenderingContext.useProgram')
+ @DomName('WebGLRenderingContext.useProgram')
+ @DocsEditable
void useProgram(WebGLProgram program) native;
- @DocsEditable @DomName('WebGLRenderingContext.validateProgram')
+ @DomName('WebGLRenderingContext.validateProgram')
+ @DocsEditable
void validateProgram(WebGLProgram program) native;
- @DocsEditable @DomName('WebGLRenderingContext.vertexAttrib1f')
+ @DomName('WebGLRenderingContext.vertexAttrib1f')
+ @DocsEditable
void vertexAttrib1f(int indx, num x) native;
- @DocsEditable @DomName('WebGLRenderingContext.vertexAttrib1fv')
+ @DomName('WebGLRenderingContext.vertexAttrib1fv')
+ @DocsEditable
void vertexAttrib1fv(int indx, Float32Array values) native;
- @DocsEditable @DomName('WebGLRenderingContext.vertexAttrib2f')
+ @DomName('WebGLRenderingContext.vertexAttrib2f')
+ @DocsEditable
void vertexAttrib2f(int indx, num x, num y) native;
- @DocsEditable @DomName('WebGLRenderingContext.vertexAttrib2fv')
+ @DomName('WebGLRenderingContext.vertexAttrib2fv')
+ @DocsEditable
void vertexAttrib2fv(int indx, Float32Array values) native;
- @DocsEditable @DomName('WebGLRenderingContext.vertexAttrib3f')
+ @DomName('WebGLRenderingContext.vertexAttrib3f')
+ @DocsEditable
void vertexAttrib3f(int indx, num x, num y, num z) native;
- @DocsEditable @DomName('WebGLRenderingContext.vertexAttrib3fv')
+ @DomName('WebGLRenderingContext.vertexAttrib3fv')
+ @DocsEditable
void vertexAttrib3fv(int indx, Float32Array values) native;
- @DocsEditable @DomName('WebGLRenderingContext.vertexAttrib4f')
+ @DomName('WebGLRenderingContext.vertexAttrib4f')
+ @DocsEditable
void vertexAttrib4f(int indx, num x, num y, num z, num w) native;
- @DocsEditable @DomName('WebGLRenderingContext.vertexAttrib4fv')
+ @DomName('WebGLRenderingContext.vertexAttrib4fv')
+ @DocsEditable
void vertexAttrib4fv(int indx, Float32Array values) native;
- @DocsEditable @DomName('WebGLRenderingContext.vertexAttribPointer')
+ @DomName('WebGLRenderingContext.vertexAttribPointer')
+ @DocsEditable
void vertexAttribPointer(int indx, int size, int type, bool normalized, int stride, int offset) native;
- @DocsEditable @DomName('WebGLRenderingContext.viewport')
+ @DomName('WebGLRenderingContext.viewport')
+ @DocsEditable
void viewport(int x, int y, int width, int height) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -22511,7 +25030,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('WebGLShader')
class WebGLShader native "*WebGLShader" {
@@ -22521,18 +25039,20 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('WebGLShaderPrecisionFormat')
class WebGLShaderPrecisionFormat native "*WebGLShaderPrecisionFormat" {
- @DocsEditable @DomName('WebGLShaderPrecisionFormat.precision')
+ @DomName('WebGLShaderPrecisionFormat.precision')
+ @DocsEditable
final int precision;
- @DocsEditable @DomName('WebGLShaderPrecisionFormat.rangeMax')
+ @DomName('WebGLShaderPrecisionFormat.rangeMax')
+ @DocsEditable
final int rangeMax;
- @DocsEditable @DomName('WebGLShaderPrecisionFormat.rangeMin')
+ @DomName('WebGLShaderPrecisionFormat.rangeMin')
+ @DocsEditable
final int rangeMin;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -22540,7 +25060,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('WebGLTexture')
class WebGLTexture native "*WebGLTexture" {
@@ -22550,7 +25069,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('WebGLUniformLocation')
class WebGLUniformLocation native "*WebGLUniformLocation" {
@@ -22560,7 +25078,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('WebGLVertexArrayObjectOES')
class WebGLVertexArrayObject native "*WebGLVertexArrayObjectOES" {
@@ -22570,7 +25087,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('WebKitCSSFilterValue')
class WebKitCssFilterValue extends _CssValueList native "*WebKitCSSFilterValue" {
@@ -22599,7 +25115,8 @@
static const int CSS_FILTER_SEPIA = 3;
- @DocsEditable @DomName('WebKitCSSFilterValue.operationType')
+ @DomName('WebKitCSSFilterValue.operationType')
+ @DocsEditable
final int operationType;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -22607,7 +25124,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('WebKitCSSMixFunctionValue')
class WebKitCssMixFunctionValue extends _CssValueList native "*WebKitCSSMixFunctionValue" {
@@ -22617,42 +25133,52 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('WebKitNamedFlow')
class WebKitNamedFlow extends EventTarget native "*WebKitNamedFlow" {
- @DocsEditable @DomName('WebKitNamedFlow.firstEmptyRegionIndex')
+ @DomName('WebKitNamedFlow.firstEmptyRegionIndex')
+ @DocsEditable
final int firstEmptyRegionIndex;
- @DocsEditable @DomName('WebKitNamedFlow.name')
+ @DomName('WebKitNamedFlow.name')
+ @DocsEditable
final String name;
- @DocsEditable @DomName('WebKitNamedFlow.overset')
+ @DomName('WebKitNamedFlow.overset')
+ @DocsEditable
final bool overset;
@JSName('addEventListener')
- @DocsEditable @DomName('WebKitNamedFlow.addEventListener')
+ @DomName('WebKitNamedFlow.addEventListener')
+ @DocsEditable
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native;
- @JSName('dispatchEvent')
- @DocsEditable @DomName('WebKitNamedFlow.dispatchEvent')
- bool $dom_dispatchEvent(Event event) native;
+ @DomName('WebKitNamedFlow.dispatchEvent')
+ @DocsEditable
+ bool dispatchEvent(Event event) native;
- @DocsEditable @DomName('WebKitNamedFlow.getContent')
- @Returns('NodeList') @Creates('NodeList')
+ @DomName('WebKitNamedFlow.getContent')
+ @DocsEditable
+ @Returns('NodeList')
+ @Creates('NodeList')
List<Node> getContent() native;
- @DocsEditable @DomName('WebKitNamedFlow.getRegions')
- @Returns('NodeList') @Creates('NodeList')
+ @DomName('WebKitNamedFlow.getRegions')
+ @DocsEditable
+ @Returns('NodeList')
+ @Creates('NodeList')
List<Node> getRegions() native;
- @DocsEditable @DomName('WebKitNamedFlow.getRegionsByContent')
- @Returns('NodeList') @Creates('NodeList')
+ @DomName('WebKitNamedFlow.getRegionsByContent')
+ @DocsEditable
+ @Returns('NodeList')
+ @Creates('NodeList')
List<Node> getRegionsByContent(Node contentNode) native;
@JSName('removeEventListener')
- @DocsEditable @DomName('WebKitNamedFlow.removeEventListener')
+ @DomName('WebKitNamedFlow.removeEventListener')
+ @DocsEditable
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -22660,7 +25186,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('WebSocket')
@SupportedBrowser(SupportedBrowser.CHROME)
@@ -22669,12 +25194,20 @@
@SupportedBrowser(SupportedBrowser.SAFARI)
class WebSocket extends EventTarget native "*WebSocket" {
+ @DomName('WebSocket.close')
+ @DocsEditable
static const EventStreamProvider<CloseEvent> closeEvent = const EventStreamProvider<CloseEvent>('close');
+ @DomName('WebSocket.error')
+ @DocsEditable
static const EventStreamProvider<Event> errorEvent = const EventStreamProvider<Event>('error');
+ @DomName('WebSocket.message')
+ @DocsEditable
static const EventStreamProvider<MessageEvent> messageEvent = const EventStreamProvider<MessageEvent>('message');
+ @DomName('WebSocket.open')
+ @DocsEditable
static const EventStreamProvider<Event> openEvent = const EventStreamProvider<Event>('open');
@DocsEditable
@@ -22686,6 +25219,7 @@
@DocsEditable
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
+ @deprecated
WebSocketEvents get on =>
new WebSocketEvents(this);
@@ -22698,55 +25232,75 @@
static const int OPEN = 1;
@JSName('URL')
- @DocsEditable @DomName('WebSocket.URL')
+ @DomName('WebSocket.URL')
+ @DocsEditable
final String Url;
- @DocsEditable @DomName('WebSocket.binaryType')
+ @DomName('WebSocket.binaryType')
+ @DocsEditable
String binaryType;
- @DocsEditable @DomName('WebSocket.bufferedAmount')
+ @DomName('WebSocket.bufferedAmount')
+ @DocsEditable
final int bufferedAmount;
- @DocsEditable @DomName('WebSocket.extensions')
+ @DomName('WebSocket.extensions')
+ @DocsEditable
final String extensions;
- @DocsEditable @DomName('WebSocket.protocol')
+ @DomName('WebSocket.protocol')
+ @DocsEditable
final String protocol;
- @DocsEditable @DomName('WebSocket.readyState')
+ @DomName('WebSocket.readyState')
+ @DocsEditable
final int readyState;
- @DocsEditable @DomName('WebSocket.url')
+ @DomName('WebSocket.url')
+ @DocsEditable
final String url;
@JSName('addEventListener')
- @DocsEditable @DomName('WebSocket.addEventListener')
+ @DomName('WebSocket.addEventListener')
+ @DocsEditable
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native;
- @DocsEditable @DomName('WebSocket.close')
+ @DomName('WebSocket.close')
+ @DocsEditable
void close([int code, String reason]) native;
- @JSName('dispatchEvent')
- @DocsEditable @DomName('WebSocket.dispatchEvent')
- bool $dom_dispatchEvent(Event evt) native;
+ @DomName('WebSocket.dispatchEvent')
+ @DocsEditable
+ bool dispatchEvent(Event evt) native;
@JSName('removeEventListener')
- @DocsEditable @DomName('WebSocket.removeEventListener')
+ @DomName('WebSocket.removeEventListener')
+ @DocsEditable
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native;
- @DocsEditable @DomName('WebSocket.send')
+ @DomName('WebSocket.send')
+ @DocsEditable
void send(data) native;
+ @DomName('WebSocket.close')
+ @DocsEditable
Stream<CloseEvent> get onClose => closeEvent.forTarget(this);
+ @DomName('WebSocket.error')
+ @DocsEditable
Stream<Event> get onError => errorEvent.forTarget(this);
+ @DomName('WebSocket.message')
+ @DocsEditable
Stream<MessageEvent> get onMessage => messageEvent.forTarget(this);
+ @DomName('WebSocket.open')
+ @DocsEditable
Stream<Event> get onOpen => openEvent.forTarget(this);
}
@DocsEditable
+@deprecated
class WebSocketEvents extends Events {
@DocsEditable
WebSocketEvents(EventTarget _ptr) : super(_ptr);
@@ -22768,17 +25322,19 @@
// BSD-style license that can be found in the LICENSE file.
-@DocsEditable
@DomName('WheelEvent')
class WheelEvent extends MouseEvent native "*WheelEvent" {
- factory WheelEvent(String type, Window view, int wheelDeltaX, int wheelDeltaY,
- int detail, int screenX, int screenY, int clientX, int clientY,
- int button,
- [bool canBubble = true, bool cancelable = true, bool ctrlKey = false,
- bool altKey = false, bool shiftKey = false, bool metaKey = false,
- EventTarget relatedTarget = null]) {
+ factory WheelEvent(String type,
+ {Window view, int deltaX: 0, int deltaY: 0,
+ int detail: 0, int screenX: 0, int screenY: 0, int clientX: 0,
+ int clientY: 0, int button: 0, bool canBubble: true,
+ bool cancelable: true, bool ctrlKey: false, bool altKey: false,
+ bool shiftKey: false, bool metaKey: false, EventTarget relatedTarget}) {
+ if (view == null) {
+ view = window;
+ }
var eventType = 'WheelEvent';
if (_Device.isFirefox) {
eventType = 'MouseScrollEvents';
@@ -22800,19 +25356,19 @@
}
event._initWheelEvent(type, canBubble, cancelable, view, detail, screenX,
screenY, clientX, clientY, button, relatedTarget, modifiers.join(' '),
- wheelDeltaX, wheelDeltaY, 0, 0);
+ deltaX, deltaY, 0, 0);
} else if (event._hasInitMouseScrollEvent) {
var axis = 0;
var detail = 0;
- if (wheelDeltaX != 0 && wheelDeltaY != 0) {
+ if (deltaX != 0 && deltaY != 0) {
throw UnsupportedError(
- 'Cannot modify wheelDeltaX and wheelDeltaY simultaneously');
+ 'Cannot modify deltaX and deltaY simultaneously');
}
- if (wheelDeltaY != 0) {
- detail = wheelDeltaY;
+ if (deltaY != 0) {
+ detail = deltaY;
axis = JS('int', 'MouseScrollEvent.VERTICAL_AXIS');
- } else if (wheelDeltaX != 0) {
- detail = wheelDeltaX;
+ } else if (deltaX != 0) {
+ detail = deltaX;
axis = JS('int', 'MouseScrollEvent.HORIZONTAL_AXIS');
}
event._initMouseScrollEvent(type, canBubble, cancelable, view, detail,
@@ -22823,8 +25379,8 @@
event.$dom_initMouseEvent(type, canBubble, cancelable, view, detail,
screenX, screenY, clientX, clientY, ctrlKey, altKey, shiftKey,
metaKey, button, relatedTarget);
- event.$dom_initWebKitWheelEvent(wheelDeltaX,
- wheelDeltaY ~/ 120, // Chrome does an auto-convert to pixels.
+ event.$dom_initWebKitWheelEvent(deltaX,
+ deltaY ~/ 120, // Chrome does an auto-convert to pixels.
view, screenX, screenY, clientX, clientY, ctrlKey, altKey, shiftKey,
metaKey);
}
@@ -22833,11 +25389,13 @@
}
- @DocsEditable @DomName('WheelEvent.webkitDirectionInvertedFromDevice')
+ @DomName('WheelEvent.webkitDirectionInvertedFromDevice')
+ @DocsEditable
final bool webkitDirectionInvertedFromDevice;
@JSName('initWebKitWheelEvent')
- @DocsEditable @DomName('WheelEvent.initWebKitWheelEvent')
+ @DomName('WheelEvent.initWebKitWheelEvent')
+ @DocsEditable
void $dom_initWebKitWheelEvent(int wheelDeltaX, int wheelDeltaY, Window view, int screenX, int screenY, int clientX, int clientY, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey) native;
@@ -22963,7 +25521,6 @@
// BSD-style license that can be found in the LICENSE file.
-@DocsEditable
@DomName('Window')
class Window extends EventTarget implements WindowBase native "@*DOMWindow" {
@@ -23092,7 +25649,7 @@
@SupportedBrowser(SupportedBrowser.CHROME, '23.0')
@SupportedBrowser(SupportedBrowser.FIREFOX, '15.0')
@SupportedBrowser(SupportedBrowser.IE, '10.0')
- @Experimental()
+ @Experimental
IdbFactory get indexedDB =>
JS('IdbFactory',
'#.indexedDB || #.webkitIndexedDB || #.mozIndexedDB',
@@ -23121,42 +25678,77 @@
Console get console => Console.safeConsole;
+ @DomName('DOMWindow.DOMContentLoaded')
+ @DocsEditable
static const EventStreamProvider<Event> contentLoadedEvent = const EventStreamProvider<Event>('DOMContentLoaded');
+ @DomName('DOMWindow.beforeunload')
+ @DocsEditable
static const EventStreamProvider<Event> beforeUnloadEvent = const EventStreamProvider<Event>('beforeunload');
+ @DomName('DOMWindow.devicemotion')
+ @DocsEditable
static const EventStreamProvider<DeviceMotionEvent> deviceMotionEvent = const EventStreamProvider<DeviceMotionEvent>('devicemotion');
+ @DomName('DOMWindow.deviceorientation')
+ @DocsEditable
static const EventStreamProvider<DeviceOrientationEvent> deviceOrientationEvent = const EventStreamProvider<DeviceOrientationEvent>('deviceorientation');
- static const EventStreamProvider<HashChangeEvent> hashChangeEvent = const EventStreamProvider<HashChangeEvent>('hashchange');
+ @DomName('DOMWindow.hashchange')
+ @DocsEditable
+ static const EventStreamProvider<Event> hashChangeEvent = const EventStreamProvider<Event>('hashchange');
+ @DomName('DOMWindow.message')
+ @DocsEditable
static const EventStreamProvider<MessageEvent> messageEvent = const EventStreamProvider<MessageEvent>('message');
+ @DomName('DOMWindow.offline')
+ @DocsEditable
static const EventStreamProvider<Event> offlineEvent = const EventStreamProvider<Event>('offline');
+ @DomName('DOMWindow.online')
+ @DocsEditable
static const EventStreamProvider<Event> onlineEvent = const EventStreamProvider<Event>('online');
+ @DomName('DOMWindow.pagehide')
+ @DocsEditable
static const EventStreamProvider<Event> pageHideEvent = const EventStreamProvider<Event>('pagehide');
+ @DomName('DOMWindow.pageshow')
+ @DocsEditable
static const EventStreamProvider<Event> pageShowEvent = const EventStreamProvider<Event>('pageshow');
+ @DomName('DOMWindow.popstate')
+ @DocsEditable
static const EventStreamProvider<PopStateEvent> popStateEvent = const EventStreamProvider<PopStateEvent>('popstate');
+ @DomName('DOMWindow.resize')
+ @DocsEditable
static const EventStreamProvider<Event> resizeEvent = const EventStreamProvider<Event>('resize');
+ @DomName('DOMWindow.storage')
+ @DocsEditable
static const EventStreamProvider<StorageEvent> storageEvent = const EventStreamProvider<StorageEvent>('storage');
+ @DomName('DOMWindow.unload')
+ @DocsEditable
static const EventStreamProvider<Event> unloadEvent = const EventStreamProvider<Event>('unload');
+ @DomName('DOMWindow.webkitAnimationEnd')
+ @DocsEditable
static const EventStreamProvider<AnimationEvent> animationEndEvent = const EventStreamProvider<AnimationEvent>('webkitAnimationEnd');
+ @DomName('DOMWindow.webkitAnimationIteration')
+ @DocsEditable
static const EventStreamProvider<AnimationEvent> animationIterationEvent = const EventStreamProvider<AnimationEvent>('webkitAnimationIteration');
+ @DomName('DOMWindow.webkitAnimationStart')
+ @DocsEditable
static const EventStreamProvider<AnimationEvent> animationStartEvent = const EventStreamProvider<AnimationEvent>('webkitAnimationStart');
@DocsEditable
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
+ @deprecated
WindowEvents get on =>
new WindowEvents(this);
@@ -23164,208 +25756,286 @@
static const int TEMPORARY = 0;
- @DocsEditable @DomName('DOMWindow.applicationCache')
+ @DomName('DOMWindow.applicationCache')
+ @DocsEditable
final ApplicationCache applicationCache;
- @DocsEditable @DomName('DOMWindow.closed')
+ @DomName('DOMWindow.closed')
+ @DocsEditable
final bool closed;
- @DocsEditable @DomName('DOMWindow.crypto')
+ @DomName('DOMWindow.crypto')
+ @DocsEditable
final Crypto crypto;
- @DocsEditable @DomName('DOMWindow.defaultStatus')
+ @DomName('DOMWindow.defaultStatus')
+ @DocsEditable
String defaultStatus;
- @DocsEditable @DomName('DOMWindow.defaultstatus')
+ @DomName('DOMWindow.defaultstatus')
+ @DocsEditable
String defaultstatus;
- @DocsEditable @DomName('DOMWindow.devicePixelRatio')
+ @DomName('DOMWindow.devicePixelRatio')
+ @DocsEditable
final num devicePixelRatio;
- @DocsEditable @DomName('DOMWindow.event')
+ @DomName('DOMWindow.event')
+ @DocsEditable
final Event event;
- @DocsEditable @DomName('DOMWindow.history')
+ @DomName('DOMWindow.history')
+ @DocsEditable
final History history;
- @DocsEditable @DomName('DOMWindow.innerHeight')
+ @DomName('DOMWindow.innerHeight')
+ @DocsEditable
final int innerHeight;
- @DocsEditable @DomName('DOMWindow.innerWidth')
+ @DomName('DOMWindow.innerWidth')
+ @DocsEditable
final int innerWidth;
- @DocsEditable @DomName('DOMWindow.localStorage')
+ @DomName('DOMWindow.localStorage')
+ @DocsEditable
final Storage localStorage;
- @DocsEditable @DomName('DOMWindow.locationbar')
+ @DomName('DOMWindow.locationbar')
+ @DocsEditable
final BarInfo locationbar;
- @DocsEditable @DomName('DOMWindow.menubar')
+ @DomName('DOMWindow.menubar')
+ @DocsEditable
final BarInfo menubar;
- @DocsEditable @DomName('DOMWindow.name')
+ @DomName('DOMWindow.name')
+ @DocsEditable
String name;
- @DocsEditable @DomName('DOMWindow.navigator')
+ @DomName('DOMWindow.navigator')
+ @DocsEditable
final Navigator navigator;
- @DocsEditable @DomName('DOMWindow.offscreenBuffering')
+ @DomName('DOMWindow.offscreenBuffering')
+ @DocsEditable
final bool offscreenBuffering;
WindowBase get opener => _convertNativeToDart_Window(this._opener);
@JSName('opener')
- @DocsEditable @DomName('DOMWindow.opener') @Creates('Window|=Object') @Returns('Window|=Object')
+ @DomName('DOMWindow.opener')
+ @DocsEditable
+ @Creates('Window|=Object')
+ @Returns('Window|=Object')
final dynamic _opener;
- @DocsEditable @DomName('DOMWindow.outerHeight')
+ @DomName('DOMWindow.outerHeight')
+ @DocsEditable
final int outerHeight;
- @DocsEditable @DomName('DOMWindow.outerWidth')
+ @DomName('DOMWindow.outerWidth')
+ @DocsEditable
final int outerWidth;
- @DocsEditable @DomName('DOMWindow.pagePopupController')
+ @DomName('DOMWindow.pagePopupController')
+ @DocsEditable
final PagePopupController pagePopupController;
- @DocsEditable @DomName('DOMWindow.pageXOffset')
+ @DomName('DOMWindow.pageXOffset')
+ @DocsEditable
final int pageXOffset;
- @DocsEditable @DomName('DOMWindow.pageYOffset')
+ @DomName('DOMWindow.pageYOffset')
+ @DocsEditable
final int pageYOffset;
WindowBase get parent => _convertNativeToDart_Window(this._parent);
@JSName('parent')
- @DocsEditable @DomName('DOMWindow.parent') @Creates('Window|=Object') @Returns('Window|=Object')
+ @DomName('DOMWindow.parent')
+ @DocsEditable
+ @Creates('Window|=Object')
+ @Returns('Window|=Object')
final dynamic _parent;
- @DocsEditable @DomName('DOMWindow.performance') @SupportedBrowser(SupportedBrowser.CHROME) @SupportedBrowser(SupportedBrowser.FIREFOX) @SupportedBrowser(SupportedBrowser.IE)
+ @DomName('DOMWindow.performance')
+ @DocsEditable
+ @SupportedBrowser(SupportedBrowser.CHROME)
+ @SupportedBrowser(SupportedBrowser.FIREFOX)
+ @SupportedBrowser(SupportedBrowser.IE)
final Performance performance;
- @DocsEditable @DomName('DOMWindow.personalbar')
+ @DomName('DOMWindow.personalbar')
+ @DocsEditable
final BarInfo personalbar;
- @DocsEditable @DomName('DOMWindow.screen')
+ @DomName('DOMWindow.screen')
+ @DocsEditable
final Screen screen;
- @DocsEditable @DomName('DOMWindow.screenLeft')
+ @DomName('DOMWindow.screenLeft')
+ @DocsEditable
final int screenLeft;
- @DocsEditable @DomName('DOMWindow.screenTop')
+ @DomName('DOMWindow.screenTop')
+ @DocsEditable
final int screenTop;
- @DocsEditable @DomName('DOMWindow.screenX')
+ @DomName('DOMWindow.screenX')
+ @DocsEditable
final int screenX;
- @DocsEditable @DomName('DOMWindow.screenY')
+ @DomName('DOMWindow.screenY')
+ @DocsEditable
final int screenY;
- @DocsEditable @DomName('DOMWindow.scrollX')
+ @DomName('DOMWindow.scrollX')
+ @DocsEditable
final int scrollX;
- @DocsEditable @DomName('DOMWindow.scrollY')
+ @DomName('DOMWindow.scrollY')
+ @DocsEditable
final int scrollY;
- @DocsEditable @DomName('DOMWindow.scrollbars')
+ @DomName('DOMWindow.scrollbars')
+ @DocsEditable
final BarInfo scrollbars;
WindowBase get self => _convertNativeToDart_Window(this._self);
@JSName('self')
- @DocsEditable @DomName('DOMWindow.self') @Creates('Window|=Object') @Returns('Window|=Object')
+ @DomName('DOMWindow.self')
+ @DocsEditable
+ @Creates('Window|=Object')
+ @Returns('Window|=Object')
final dynamic _self;
- @DocsEditable @DomName('DOMWindow.sessionStorage')
+ @DomName('DOMWindow.sessionStorage')
+ @DocsEditable
final Storage sessionStorage;
- @DocsEditable @DomName('DOMWindow.status')
+ @DomName('DOMWindow.status')
+ @DocsEditable
String status;
- @DocsEditable @DomName('DOMWindow.statusbar')
+ @DomName('DOMWindow.statusbar')
+ @DocsEditable
final BarInfo statusbar;
- @DocsEditable @DomName('DOMWindow.styleMedia')
+ @DomName('DOMWindow.styleMedia')
+ @DocsEditable
final StyleMedia styleMedia;
- @DocsEditable @DomName('DOMWindow.toolbar')
+ @DomName('DOMWindow.toolbar')
+ @DocsEditable
final BarInfo toolbar;
WindowBase get top => _convertNativeToDart_Window(this._top);
@JSName('top')
- @DocsEditable @DomName('DOMWindow.top') @Creates('Window|=Object') @Returns('Window|=Object')
+ @DomName('DOMWindow.top')
+ @DocsEditable
+ @Creates('Window|=Object')
+ @Returns('Window|=Object')
final dynamic _top;
@JSName('webkitNotifications')
- @DocsEditable @DomName('DOMWindow.webkitNotifications') @SupportedBrowser(SupportedBrowser.CHROME) @SupportedBrowser(SupportedBrowser.SAFARI) @Experimental()
+ @DomName('DOMWindow.webkitNotifications')
+ @DocsEditable
+ @SupportedBrowser(SupportedBrowser.CHROME)
+ @SupportedBrowser(SupportedBrowser.SAFARI)
+ @Experimental
final NotificationCenter notifications;
- @DocsEditable @DomName('DOMWindow.webkitStorageInfo')
+ @DomName('DOMWindow.webkitStorageInfo')
+ @DocsEditable
final StorageInfo webkitStorageInfo;
WindowBase get window => _convertNativeToDart_Window(this._window);
@JSName('window')
- @DocsEditable @DomName('DOMWindow.window') @Creates('Window|=Object') @Returns('Window|=Object')
+ @DomName('DOMWindow.window')
+ @DocsEditable
+ @Creates('Window|=Object')
+ @Returns('Window|=Object')
final dynamic _window;
@JSName('addEventListener')
- @DocsEditable @DomName('DOMWindow.addEventListener')
+ @DomName('DOMWindow.addEventListener')
+ @DocsEditable
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native;
- @DocsEditable @DomName('DOMWindow.alert')
+ @DomName('DOMWindow.alert')
+ @DocsEditable
void alert(String message) native;
- @DocsEditable @DomName('DOMWindow.atob')
+ @DomName('DOMWindow.atob')
+ @DocsEditable
String atob(String string) native;
- @DocsEditable @DomName('DOMWindow.btoa')
+ @DomName('DOMWindow.btoa')
+ @DocsEditable
String btoa(String string) native;
- @DocsEditable @DomName('DOMWindow.captureEvents')
+ @DomName('DOMWindow.captureEvents')
+ @DocsEditable
void captureEvents() native;
- @DocsEditable @DomName('DOMWindow.clearInterval')
+ @DomName('DOMWindow.clearInterval')
+ @DocsEditable
void clearInterval(int handle) native;
- @DocsEditable @DomName('DOMWindow.clearTimeout')
+ @DomName('DOMWindow.clearTimeout')
+ @DocsEditable
void clearTimeout(int handle) native;
- @DocsEditable @DomName('DOMWindow.close')
+ @DomName('DOMWindow.close')
+ @DocsEditable
void close() native;
- @DocsEditable @DomName('DOMWindow.confirm')
+ @DomName('DOMWindow.confirm')
+ @DocsEditable
bool confirm(String message) native;
- @JSName('dispatchEvent')
- @DocsEditable @DomName('DOMWindow.dispatchEvent')
- bool $dom_dispatchEvent(Event evt) native;
+ @DomName('DOMWindow.dispatchEvent')
+ @DocsEditable
+ bool dispatchEvent(Event evt) native;
- @DocsEditable @DomName('DOMWindow.find')
+ @DomName('DOMWindow.find')
+ @DocsEditable
bool find(String string, bool caseSensitive, bool backwards, bool wrap, bool wholeWord, bool searchInFrames, bool showDialog) native;
@JSName('getComputedStyle')
- @DocsEditable @DomName('DOMWindow.getComputedStyle')
+ @DomName('DOMWindow.getComputedStyle')
+ @DocsEditable
CssStyleDeclaration $dom_getComputedStyle(Element element, String pseudoElement) native;
@JSName('getMatchedCSSRules')
- @DocsEditable @DomName('DOMWindow.getMatchedCSSRules')
- @Returns('_CssRuleList') @Creates('_CssRuleList')
+ @DomName('DOMWindow.getMatchedCSSRules')
+ @DocsEditable
+ @Returns('_CssRuleList')
+ @Creates('_CssRuleList')
List<CssRule> getMatchedCssRules(Element element, String pseudoElement) native;
- @DocsEditable @DomName('DOMWindow.getSelection')
+ @DomName('DOMWindow.getSelection')
+ @DocsEditable
DomSelection getSelection() native;
- @DocsEditable @DomName('DOMWindow.matchMedia')
+ @DomName('DOMWindow.matchMedia')
+ @DocsEditable
MediaQueryList matchMedia(String query) native;
- @DocsEditable @DomName('DOMWindow.moveBy')
+ @DomName('DOMWindow.moveBy')
+ @DocsEditable
void moveBy(num x, num y) native;
- @DocsEditable @DomName('DOMWindow.moveTo')
+ @DomName('DOMWindow.moveTo')
+ @DocsEditable
void moveTo(num x, num y) native;
- @DocsEditable @DomName('DOMWindow.openDatabase') @Creates('Database') @Creates('DatabaseSync')
+ @DomName('DOMWindow.openDatabase')
+ @DocsEditable
+ @Creates('Database')
+ @Creates('DatabaseSync')
Database openDatabase(String name, String version, String displayName, int estimatedSize, [DatabaseCallback creationCallback]) native;
void postMessage(/*SerializedScriptValue*/ message, String targetOrigin, [List messagePorts]) {
- if (?message &&
- !?messagePorts) {
+ if (?message && !?messagePorts) {
var message_1 = convertDartToNative_SerializedScriptValue(message);
_postMessage_1(message_1, targetOrigin);
return;
@@ -23378,174 +26048,305 @@
throw new ArgumentError("Incorrect number or type of arguments");
}
@JSName('postMessage')
- @DocsEditable @DomName('DOMWindow.postMessage')
+ @DomName('DOMWindow.postMessage')
+ @DocsEditable
void _postMessage_1(message, targetOrigin) native;
@JSName('postMessage')
- @DocsEditable @DomName('DOMWindow.postMessage')
+ @DomName('DOMWindow.postMessage')
+ @DocsEditable
void _postMessage_2(message, targetOrigin, List messagePorts) native;
- @DocsEditable @DomName('DOMWindow.print')
+ @DomName('DOMWindow.print')
+ @DocsEditable
void print() native;
- @DocsEditable @DomName('DOMWindow.releaseEvents')
+ @DomName('DOMWindow.releaseEvents')
+ @DocsEditable
void releaseEvents() native;
@JSName('removeEventListener')
- @DocsEditable @DomName('DOMWindow.removeEventListener')
+ @DomName('DOMWindow.removeEventListener')
+ @DocsEditable
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native;
- @DocsEditable @DomName('DOMWindow.resizeBy')
+ @DomName('DOMWindow.resizeBy')
+ @DocsEditable
void resizeBy(num x, num y) native;
- @DocsEditable @DomName('DOMWindow.resizeTo')
+ @DomName('DOMWindow.resizeTo')
+ @DocsEditable
void resizeTo(num width, num height) native;
- @DocsEditable @DomName('DOMWindow.scroll')
+ @DomName('DOMWindow.scroll')
+ @DocsEditable
void scroll(int x, int y) native;
- @DocsEditable @DomName('DOMWindow.scrollBy')
+ @DomName('DOMWindow.scrollBy')
+ @DocsEditable
void scrollBy(int x, int y) native;
- @DocsEditable @DomName('DOMWindow.scrollTo')
+ @DomName('DOMWindow.scrollTo')
+ @DocsEditable
void scrollTo(int x, int y) native;
- @DocsEditable @DomName('DOMWindow.setInterval')
+ @DomName('DOMWindow.setInterval')
+ @DocsEditable
int setInterval(TimeoutHandler handler, int timeout) native;
- @DocsEditable @DomName('DOMWindow.setTimeout')
+ @DomName('DOMWindow.setTimeout')
+ @DocsEditable
int setTimeout(TimeoutHandler handler, int timeout) native;
- @DocsEditable @DomName('DOMWindow.showModalDialog')
+ @DomName('DOMWindow.showModalDialog')
+ @DocsEditable
Object showModalDialog(String url, [Object dialogArgs, String featureArgs]) native;
- @DocsEditable @DomName('DOMWindow.stop')
+ @DomName('DOMWindow.stop')
+ @DocsEditable
void stop() native;
- @DocsEditable @DomName('DOMWindow.webkitConvertPointFromNodeToPage')
+ @DomName('DOMWindow.webkitConvertPointFromNodeToPage')
+ @DocsEditable
Point webkitConvertPointFromNodeToPage(Node node, Point p) native;
- @DocsEditable @DomName('DOMWindow.webkitConvertPointFromPageToNode')
+ @DomName('DOMWindow.webkitConvertPointFromPageToNode')
+ @DocsEditable
Point webkitConvertPointFromPageToNode(Node node, Point p) native;
@JSName('webkitRequestFileSystem')
- @DocsEditable @DomName('DOMWindow.webkitRequestFileSystem') @SupportedBrowser(SupportedBrowser.CHROME) @Experimental()
+ @DomName('DOMWindow.webkitRequestFileSystem')
+ @DocsEditable
+ @SupportedBrowser(SupportedBrowser.CHROME)
+ @Experimental
void requestFileSystem(int type, int size, FileSystemCallback successCallback, [ErrorCallback errorCallback]) native;
@JSName('webkitResolveLocalFileSystemURL')
- @DocsEditable @DomName('DOMWindow.webkitResolveLocalFileSystemURL') @SupportedBrowser(SupportedBrowser.CHROME) @Experimental()
+ @DomName('DOMWindow.webkitResolveLocalFileSystemURL')
+ @DocsEditable
+ @SupportedBrowser(SupportedBrowser.CHROME)
+ @Experimental
void resolveLocalFileSystemUrl(String url, EntryCallback successCallback, [ErrorCallback errorCallback]) native;
+ @DomName('DOMWindow.DOMContentLoaded')
+ @DocsEditable
Stream<Event> get onContentLoaded => contentLoadedEvent.forTarget(this);
+ @DomName('DOMWindow.abort')
+ @DocsEditable
Stream<Event> get onAbort => Element.abortEvent.forTarget(this);
+ @DomName('DOMWindow.beforeunload')
+ @DocsEditable
Stream<Event> get onBeforeUnload => beforeUnloadEvent.forTarget(this);
+ @DomName('DOMWindow.blur')
+ @DocsEditable
Stream<Event> get onBlur => Element.blurEvent.forTarget(this);
+ @DomName('DOMWindow.change')
+ @DocsEditable
Stream<Event> get onChange => Element.changeEvent.forTarget(this);
+ @DomName('DOMWindow.click')
+ @DocsEditable
Stream<MouseEvent> get onClick => Element.clickEvent.forTarget(this);
+ @DomName('DOMWindow.contextmenu')
+ @DocsEditable
Stream<MouseEvent> get onContextMenu => Element.contextMenuEvent.forTarget(this);
+ @DomName('DOMWindow.dblclick')
+ @DocsEditable
Stream<Event> get onDoubleClick => Element.doubleClickEvent.forTarget(this);
+ @DomName('DOMWindow.devicemotion')
+ @DocsEditable
Stream<DeviceMotionEvent> get onDeviceMotion => deviceMotionEvent.forTarget(this);
+ @DomName('DOMWindow.deviceorientation')
+ @DocsEditable
Stream<DeviceOrientationEvent> get onDeviceOrientation => deviceOrientationEvent.forTarget(this);
+ @DomName('DOMWindow.drag')
+ @DocsEditable
Stream<MouseEvent> get onDrag => Element.dragEvent.forTarget(this);
+ @DomName('DOMWindow.dragend')
+ @DocsEditable
Stream<MouseEvent> get onDragEnd => Element.dragEndEvent.forTarget(this);
+ @DomName('DOMWindow.dragenter')
+ @DocsEditable
Stream<MouseEvent> get onDragEnter => Element.dragEnterEvent.forTarget(this);
+ @DomName('DOMWindow.dragleave')
+ @DocsEditable
Stream<MouseEvent> get onDragLeave => Element.dragLeaveEvent.forTarget(this);
+ @DomName('DOMWindow.dragover')
+ @DocsEditable
Stream<MouseEvent> get onDragOver => Element.dragOverEvent.forTarget(this);
+ @DomName('DOMWindow.dragstart')
+ @DocsEditable
Stream<MouseEvent> get onDragStart => Element.dragStartEvent.forTarget(this);
+ @DomName('DOMWindow.drop')
+ @DocsEditable
Stream<MouseEvent> get onDrop => Element.dropEvent.forTarget(this);
+ @DomName('DOMWindow.error')
+ @DocsEditable
Stream<Event> get onError => Element.errorEvent.forTarget(this);
+ @DomName('DOMWindow.focus')
+ @DocsEditable
Stream<Event> get onFocus => Element.focusEvent.forTarget(this);
- Stream<HashChangeEvent> get onHashChange => hashChangeEvent.forTarget(this);
+ @DomName('DOMWindow.hashchange')
+ @DocsEditable
+ Stream<Event> get onHashChange => hashChangeEvent.forTarget(this);
+ @DomName('DOMWindow.input')
+ @DocsEditable
Stream<Event> get onInput => Element.inputEvent.forTarget(this);
+ @DomName('DOMWindow.invalid')
+ @DocsEditable
Stream<Event> get onInvalid => Element.invalidEvent.forTarget(this);
+ @DomName('DOMWindow.keydown')
+ @DocsEditable
Stream<KeyboardEvent> get onKeyDown => Element.keyDownEvent.forTarget(this);
+ @DomName('DOMWindow.keypress')
+ @DocsEditable
Stream<KeyboardEvent> get onKeyPress => Element.keyPressEvent.forTarget(this);
+ @DomName('DOMWindow.keyup')
+ @DocsEditable
Stream<KeyboardEvent> get onKeyUp => Element.keyUpEvent.forTarget(this);
+ @DomName('DOMWindow.load')
+ @DocsEditable
Stream<Event> get onLoad => Element.loadEvent.forTarget(this);
+ @DomName('DOMWindow.message')
+ @DocsEditable
Stream<MessageEvent> get onMessage => messageEvent.forTarget(this);
+ @DomName('DOMWindow.mousedown')
+ @DocsEditable
Stream<MouseEvent> get onMouseDown => Element.mouseDownEvent.forTarget(this);
+ @DomName('DOMWindow.mousemove')
+ @DocsEditable
Stream<MouseEvent> get onMouseMove => Element.mouseMoveEvent.forTarget(this);
+ @DomName('DOMWindow.mouseout')
+ @DocsEditable
Stream<MouseEvent> get onMouseOut => Element.mouseOutEvent.forTarget(this);
+ @DomName('DOMWindow.mouseover')
+ @DocsEditable
Stream<MouseEvent> get onMouseOver => Element.mouseOverEvent.forTarget(this);
+ @DomName('DOMWindow.mouseup')
+ @DocsEditable
Stream<MouseEvent> get onMouseUp => Element.mouseUpEvent.forTarget(this);
+ @DomName('DOMWindow.mousewheel')
+ @DocsEditable
Stream<WheelEvent> get onMouseWheel => Element.mouseWheelEvent.forTarget(this);
+ @DomName('DOMWindow.offline')
+ @DocsEditable
Stream<Event> get onOffline => offlineEvent.forTarget(this);
+ @DomName('DOMWindow.online')
+ @DocsEditable
Stream<Event> get onOnline => onlineEvent.forTarget(this);
+ @DomName('DOMWindow.pagehide')
+ @DocsEditable
Stream<Event> get onPageHide => pageHideEvent.forTarget(this);
+ @DomName('DOMWindow.pageshow')
+ @DocsEditable
Stream<Event> get onPageShow => pageShowEvent.forTarget(this);
+ @DomName('DOMWindow.popstate')
+ @DocsEditable
Stream<PopStateEvent> get onPopState => popStateEvent.forTarget(this);
+ @DomName('DOMWindow.reset')
+ @DocsEditable
Stream<Event> get onReset => Element.resetEvent.forTarget(this);
+ @DomName('DOMWindow.resize')
+ @DocsEditable
Stream<Event> get onResize => resizeEvent.forTarget(this);
+ @DomName('DOMWindow.scroll')
+ @DocsEditable
Stream<Event> get onScroll => Element.scrollEvent.forTarget(this);
+ @DomName('DOMWindow.search')
+ @DocsEditable
Stream<Event> get onSearch => Element.searchEvent.forTarget(this);
+ @DomName('DOMWindow.select')
+ @DocsEditable
Stream<Event> get onSelect => Element.selectEvent.forTarget(this);
+ @DomName('DOMWindow.storage')
+ @DocsEditable
Stream<StorageEvent> get onStorage => storageEvent.forTarget(this);
+ @DomName('DOMWindow.submit')
+ @DocsEditable
Stream<Event> get onSubmit => Element.submitEvent.forTarget(this);
+ @DomName('DOMWindow.touchcancel')
+ @DocsEditable
Stream<TouchEvent> get onTouchCancel => Element.touchCancelEvent.forTarget(this);
+ @DomName('DOMWindow.touchend')
+ @DocsEditable
Stream<TouchEvent> get onTouchEnd => Element.touchEndEvent.forTarget(this);
+ @DomName('DOMWindow.touchmove')
+ @DocsEditable
Stream<TouchEvent> get onTouchMove => Element.touchMoveEvent.forTarget(this);
+ @DomName('DOMWindow.touchstart')
+ @DocsEditable
Stream<TouchEvent> get onTouchStart => Element.touchStartEvent.forTarget(this);
+ @DomName('DOMWindow.unload')
+ @DocsEditable
Stream<Event> get onUnload => unloadEvent.forTarget(this);
+ @DomName('DOMWindow.webkitAnimationEnd')
+ @DocsEditable
Stream<AnimationEvent> get onAnimationEnd => animationEndEvent.forTarget(this);
+ @DomName('DOMWindow.webkitAnimationIteration')
+ @DocsEditable
Stream<AnimationEvent> get onAnimationIteration => animationIterationEvent.forTarget(this);
+ @DomName('DOMWindow.webkitAnimationStart')
+ @DocsEditable
Stream<AnimationEvent> get onAnimationStart => animationStartEvent.forTarget(this);
+ @DomName('DOMWindow.webkitTransitionEnd')
+ @DocsEditable
Stream<TransitionEvent> get onTransitionEnd => Element.transitionEndEvent.forTarget(this);
}
@DocsEditable
+@deprecated
class WindowEvents extends Events {
@DocsEditable
WindowEvents(EventTarget _ptr) : super(_ptr);
@@ -23777,11 +26578,12 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('Worker')
class Worker extends AbstractWorker native "*Worker" {
+ @DomName('Worker.message')
+ @DocsEditable
static const EventStreamProvider<MessageEvent> messageEvent = const EventStreamProvider<MessageEvent>('message');
@DocsEditable
@@ -23790,6 +26592,7 @@
@DocsEditable
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
+ @deprecated
WorkerEvents get on =>
new WorkerEvents(this);
@@ -23804,19 +26607,25 @@
return;
}
@JSName('postMessage')
- @DocsEditable @DomName('Worker.postMessage')
+ @DomName('Worker.postMessage')
+ @DocsEditable
void _postMessage_1(message, List messagePorts) native;
@JSName('postMessage')
- @DocsEditable @DomName('Worker.postMessage')
+ @DomName('Worker.postMessage')
+ @DocsEditable
void _postMessage_2(message) native;
- @DocsEditable @DomName('Worker.terminate')
+ @DomName('Worker.terminate')
+ @DocsEditable
void terminate() native;
+ @DomName('Worker.message')
+ @DocsEditable
Stream<MessageEvent> get onMessage => messageEvent.forTarget(this);
}
@DocsEditable
+@deprecated
class WorkerEvents extends AbstractWorkerEvents {
@DocsEditable
WorkerEvents(EventTarget _ptr) : super(_ptr);
@@ -23829,14 +26638,16 @@
// BSD-style license that can be found in the LICENSE file.
-@DocsEditable
@DomName('WorkerContext')
class WorkerContext extends EventTarget native "*WorkerContext" {
+ @DomName('WorkerContext.error')
+ @DocsEditable
static const EventStreamProvider<Event> errorEvent = const EventStreamProvider<Event>('error');
@DocsEditable
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
+ @deprecated
WorkerContextEvents get on =>
new WorkerContextEvents(this);
@@ -23844,70 +26655,98 @@
static const int TEMPORARY = 0;
- @DocsEditable @DomName('WorkerContext.location')
+ @DomName('WorkerContext.location')
+ @DocsEditable
final WorkerLocation location;
- @DocsEditable @DomName('WorkerContext.navigator')
+ @DomName('WorkerContext.navigator')
+ @DocsEditable
final WorkerNavigator navigator;
- @DocsEditable @DomName('WorkerContext.self')
+ @DomName('WorkerContext.self')
+ @DocsEditable
final WorkerContext self;
- @DocsEditable @DomName('WorkerContext.webkitNotifications')
+ @DomName('WorkerContext.webkitNotifications')
+ @DocsEditable
final NotificationCenter webkitNotifications;
@JSName('addEventListener')
- @DocsEditable @DomName('WorkerContext.addEventListener')
+ @DomName('WorkerContext.addEventListener')
+ @DocsEditable
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native;
- @DocsEditable @DomName('WorkerContext.clearInterval')
+ @DomName('WorkerContext.clearInterval')
+ @DocsEditable
void clearInterval(int handle) native;
- @DocsEditable @DomName('WorkerContext.clearTimeout')
+ @DomName('WorkerContext.clearTimeout')
+ @DocsEditable
void clearTimeout(int handle) native;
- @DocsEditable @DomName('WorkerContext.close')
+ @DomName('WorkerContext.close')
+ @DocsEditable
void close() native;
- @JSName('dispatchEvent')
- @DocsEditable @DomName('WorkerContext.dispatchEvent')
- bool $dom_dispatchEvent(Event evt) native;
+ @DomName('WorkerContext.dispatchEvent')
+ @DocsEditable
+ bool dispatchEvent(Event evt) native;
- @DocsEditable @DomName('WorkerContext.importScripts')
+ @DomName('WorkerContext.importScripts')
+ @DocsEditable
void importScripts() native;
- @DocsEditable @DomName('WorkerContext.openDatabase')
+ @DomName('WorkerContext.openDatabase')
+ @DocsEditable
Database openDatabase(String name, String version, String displayName, int estimatedSize, [DatabaseCallback creationCallback]) native;
- @DocsEditable @DomName('WorkerContext.openDatabaseSync')
+ @DomName('WorkerContext.openDatabaseSync')
+ @DocsEditable
DatabaseSync openDatabaseSync(String name, String version, String displayName, int estimatedSize, [DatabaseCallback creationCallback]) native;
@JSName('removeEventListener')
- @DocsEditable @DomName('WorkerContext.removeEventListener')
+ @DomName('WorkerContext.removeEventListener')
+ @DocsEditable
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native;
- @DocsEditable @DomName('WorkerContext.setInterval')
+ @DomName('WorkerContext.setInterval')
+ @DocsEditable
int setInterval(TimeoutHandler handler, int timeout) native;
- @DocsEditable @DomName('WorkerContext.setTimeout')
+ @DomName('WorkerContext.setTimeout')
+ @DocsEditable
int setTimeout(TimeoutHandler handler, int timeout) native;
@JSName('webkitRequestFileSystem')
- @DocsEditable @DomName('WorkerContext.webkitRequestFileSystem') @SupportedBrowser(SupportedBrowser.CHROME) @Experimental()
+ @DomName('WorkerContext.webkitRequestFileSystem')
+ @DocsEditable
+ @SupportedBrowser(SupportedBrowser.CHROME)
+ @Experimental
void requestFileSystem(int type, int size, [FileSystemCallback successCallback, ErrorCallback errorCallback]) native;
@JSName('webkitRequestFileSystemSync')
- @DocsEditable @DomName('WorkerContext.webkitRequestFileSystemSync') @SupportedBrowser(SupportedBrowser.CHROME) @Experimental()
+ @DomName('WorkerContext.webkitRequestFileSystemSync')
+ @DocsEditable
+ @SupportedBrowser(SupportedBrowser.CHROME)
+ @Experimental
FileSystemSync requestFileSystemSync(int type, int size) native;
@JSName('webkitResolveLocalFileSystemSyncURL')
- @DocsEditable @DomName('WorkerContext.webkitResolveLocalFileSystemSyncURL') @SupportedBrowser(SupportedBrowser.CHROME) @Experimental()
+ @DomName('WorkerContext.webkitResolveLocalFileSystemSyncURL')
+ @DocsEditable
+ @SupportedBrowser(SupportedBrowser.CHROME)
+ @Experimental
EntrySync resolveLocalFileSystemSyncUrl(String url) native;
@JSName('webkitResolveLocalFileSystemURL')
- @DocsEditable @DomName('WorkerContext.webkitResolveLocalFileSystemURL') @SupportedBrowser(SupportedBrowser.CHROME) @Experimental()
+ @DomName('WorkerContext.webkitResolveLocalFileSystemURL')
+ @DocsEditable
+ @SupportedBrowser(SupportedBrowser.CHROME)
+ @Experimental
void resolveLocalFileSystemUrl(String url, EntryCallback successCallback, [ErrorCallback errorCallback]) native;
+ @DomName('WorkerContext.error')
+ @DocsEditable
Stream<Event> get onError => errorEvent.forTarget(this);
@@ -23920,7 +26759,7 @@
@SupportedBrowser(SupportedBrowser.CHROME, '23.0')
@SupportedBrowser(SupportedBrowser.FIREFOX, '15.0')
@SupportedBrowser(SupportedBrowser.IE, '10.0')
- @Experimental()
+ @Experimental
IdbFactory get indexedDB =>
JS('IdbFactory',
'#.indexedDB || #.webkitIndexedDB || #.mozIndexedDB',
@@ -23928,6 +26767,7 @@
}
@DocsEditable
+@deprecated
class WorkerContextEvents extends Events {
@DocsEditable
WorkerContextEvents(EventTarget _ptr) : super(_ptr);
@@ -23940,36 +26780,44 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('WorkerLocation')
class WorkerLocation native "*WorkerLocation" {
- @DocsEditable @DomName('WorkerLocation.hash')
+ @DomName('WorkerLocation.hash')
+ @DocsEditable
final String hash;
- @DocsEditable @DomName('WorkerLocation.host')
+ @DomName('WorkerLocation.host')
+ @DocsEditable
final String host;
- @DocsEditable @DomName('WorkerLocation.hostname')
+ @DomName('WorkerLocation.hostname')
+ @DocsEditable
final String hostname;
- @DocsEditable @DomName('WorkerLocation.href')
+ @DomName('WorkerLocation.href')
+ @DocsEditable
final String href;
- @DocsEditable @DomName('WorkerLocation.pathname')
+ @DomName('WorkerLocation.pathname')
+ @DocsEditable
final String pathname;
- @DocsEditable @DomName('WorkerLocation.port')
+ @DomName('WorkerLocation.port')
+ @DocsEditable
final String port;
- @DocsEditable @DomName('WorkerLocation.protocol')
+ @DomName('WorkerLocation.protocol')
+ @DocsEditable
final String protocol;
- @DocsEditable @DomName('WorkerLocation.search')
+ @DomName('WorkerLocation.search')
+ @DocsEditable
final String search;
- @DocsEditable @DomName('WorkerLocation.toString')
+ @DomName('WorkerLocation.toString')
+ @DocsEditable
String toString() native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -23977,24 +26825,28 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('WorkerNavigator')
class WorkerNavigator native "*WorkerNavigator" {
- @DocsEditable @DomName('WorkerNavigator.appName')
+ @DomName('WorkerNavigator.appName')
+ @DocsEditable
final String appName;
- @DocsEditable @DomName('WorkerNavigator.appVersion')
+ @DomName('WorkerNavigator.appVersion')
+ @DocsEditable
final String appVersion;
- @DocsEditable @DomName('WorkerNavigator.onLine')
+ @DomName('WorkerNavigator.onLine')
+ @DocsEditable
final bool onLine;
- @DocsEditable @DomName('WorkerNavigator.platform')
+ @DomName('WorkerNavigator.platform')
+ @DocsEditable
final String platform;
- @DocsEditable @DomName('WorkerNavigator.userAgent')
+ @DomName('WorkerNavigator.userAgent')
+ @DocsEditable
final String userAgent;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -24002,7 +26854,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('XPathEvaluator')
class XPathEvaluator native "*XPathEvaluator" {
@@ -24011,13 +26862,16 @@
factory XPathEvaluator() => XPathEvaluator._create();
static XPathEvaluator _create() => JS('XPathEvaluator', 'new XPathEvaluator()');
- @DocsEditable @DomName('XPathEvaluator.createExpression')
+ @DomName('XPathEvaluator.createExpression')
+ @DocsEditable
XPathExpression createExpression(String expression, XPathNSResolver resolver) native;
- @DocsEditable @DomName('XPathEvaluator.createNSResolver')
+ @DomName('XPathEvaluator.createNSResolver')
+ @DocsEditable
XPathNSResolver createNSResolver(Node nodeResolver) native;
- @DocsEditable @DomName('XPathEvaluator.evaluate')
+ @DomName('XPathEvaluator.evaluate')
+ @DocsEditable
XPathResult evaluate(String expression, Node contextNode, XPathNSResolver resolver, int type, XPathResult inResult) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -24025,7 +26879,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('XPathException')
class XPathException native "*XPathException" {
@@ -24034,16 +26887,20 @@
static const int TYPE_ERR = 52;
- @DocsEditable @DomName('XPathException.code')
+ @DomName('XPathException.code')
+ @DocsEditable
final int code;
- @DocsEditable @DomName('XPathException.message')
+ @DomName('XPathException.message')
+ @DocsEditable
final String message;
- @DocsEditable @DomName('XPathException.name')
+ @DomName('XPathException.name')
+ @DocsEditable
final String name;
- @DocsEditable @DomName('XPathException.toString')
+ @DomName('XPathException.toString')
+ @DocsEditable
String toString() native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -24051,12 +26908,12 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('XPathExpression')
class XPathExpression native "*XPathExpression" {
- @DocsEditable @DomName('XPathExpression.evaluate')
+ @DomName('XPathExpression.evaluate')
+ @DocsEditable
XPathResult evaluate(Node contextNode, int type, XPathResult inResult) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -24064,13 +26921,13 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('XPathNSResolver')
class XPathNSResolver native "*XPathNSResolver" {
@JSName('lookupNamespaceURI')
- @DocsEditable @DomName('XPathNSResolver.lookupNamespaceURI')
+ @DomName('XPathNSResolver.lookupNamespaceURI')
+ @DocsEditable
String lookupNamespaceUri(String prefix) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -24078,7 +26935,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('XPathResult')
class XPathResult native "*XPathResult" {
@@ -24103,31 +26959,40 @@
static const int UNORDERED_NODE_SNAPSHOT_TYPE = 6;
- @DocsEditable @DomName('XPathResult.booleanValue')
+ @DomName('XPathResult.booleanValue')
+ @DocsEditable
final bool booleanValue;
- @DocsEditable @DomName('XPathResult.invalidIteratorState')
+ @DomName('XPathResult.invalidIteratorState')
+ @DocsEditable
final bool invalidIteratorState;
- @DocsEditable @DomName('XPathResult.numberValue')
+ @DomName('XPathResult.numberValue')
+ @DocsEditable
final num numberValue;
- @DocsEditable @DomName('XPathResult.resultType')
+ @DomName('XPathResult.resultType')
+ @DocsEditable
final int resultType;
- @DocsEditable @DomName('XPathResult.singleNodeValue')
+ @DomName('XPathResult.singleNodeValue')
+ @DocsEditable
final Node singleNodeValue;
- @DocsEditable @DomName('XPathResult.snapshotLength')
+ @DomName('XPathResult.snapshotLength')
+ @DocsEditable
final int snapshotLength;
- @DocsEditable @DomName('XPathResult.stringValue')
+ @DomName('XPathResult.stringValue')
+ @DocsEditable
final String stringValue;
- @DocsEditable @DomName('XPathResult.iterateNext')
+ @DomName('XPathResult.iterateNext')
+ @DocsEditable
Node iterateNext() native;
- @DocsEditable @DomName('XPathResult.snapshotItem')
+ @DomName('XPathResult.snapshotItem')
+ @DocsEditable
Node snapshotItem(int index) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -24135,7 +27000,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('XMLSerializer')
class XmlSerializer native "*XMLSerializer" {
@@ -24144,7 +27008,8 @@
factory XmlSerializer() => XmlSerializer._create();
static XmlSerializer _create() => JS('XmlSerializer', 'new XMLSerializer()');
- @DocsEditable @DomName('XMLSerializer.serializeToString')
+ @DomName('XMLSerializer.serializeToString')
+ @DocsEditable
String serializeToString(Node node) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -24152,7 +27017,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('XSLTProcessor')
class XsltProcessor native "*XSLTProcessor" {
@@ -24161,28 +27025,36 @@
factory XsltProcessor() => XsltProcessor._create();
static XsltProcessor _create() => JS('XsltProcessor', 'new XSLTProcessor()');
- @DocsEditable @DomName('XSLTProcessor.clearParameters')
+ @DomName('XSLTProcessor.clearParameters')
+ @DocsEditable
void clearParameters() native;
- @DocsEditable @DomName('XSLTProcessor.getParameter')
+ @DomName('XSLTProcessor.getParameter')
+ @DocsEditable
String getParameter(String namespaceURI, String localName) native;
- @DocsEditable @DomName('XSLTProcessor.importStylesheet')
+ @DomName('XSLTProcessor.importStylesheet')
+ @DocsEditable
void importStylesheet(Node stylesheet) native;
- @DocsEditable @DomName('XSLTProcessor.removeParameter')
+ @DomName('XSLTProcessor.removeParameter')
+ @DocsEditable
void removeParameter(String namespaceURI, String localName) native;
- @DocsEditable @DomName('XSLTProcessor.reset')
+ @DomName('XSLTProcessor.reset')
+ @DocsEditable
void reset() native;
- @DocsEditable @DomName('XSLTProcessor.setParameter')
+ @DomName('XSLTProcessor.setParameter')
+ @DocsEditable
void setParameter(String namespaceURI, String localName, String value) native;
- @DocsEditable @DomName('XSLTProcessor.transformToDocument')
+ @DomName('XSLTProcessor.transformToDocument')
+ @DocsEditable
Document transformToDocument(Node source) native;
- @DocsEditable @DomName('XSLTProcessor.transformToFragment')
+ @DomName('XSLTProcessor.transformToFragment')
+ @DocsEditable
DocumentFragment transformToFragment(Node source, Document docVal) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -24190,7 +27062,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('HTMLAppletElement')
class _AppletElement extends Element native "*HTMLAppletElement" {
@@ -24200,7 +27071,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('HTMLBaseFontElement')
class _BaseFontElement extends Element native "*HTMLBaseFontElement" {
@@ -24210,12 +27080,12 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('ClientRectList')
class _ClientRectList implements JavaScriptIndexingBehavior, List<ClientRect> native "*ClientRectList" {
- @DocsEditable @DomName('ClientRectList.length')
+ @DomName('ClientRectList.length')
+ @DocsEditable
int get length => JS("int", "#.length", this);
ClientRect operator[](int index) => JS("ClientRect", "#[#]", this, index);
@@ -24243,11 +27113,13 @@
void forEach(void f(ClientRect element)) => IterableMixinWorkaround.forEach(this, f);
- String join([String separator]) => IterableMixinWorkaround.joinList(this, separator);
+ String join([String separator]) =>
+ IterableMixinWorkaround.joinList(this, separator);
List mappedBy(f(ClientRect element)) => IterableMixinWorkaround.mappedByList(this, f);
- Iterable<ClientRect> where(bool f(ClientRect element)) => IterableMixinWorkaround.where(this, f);
+ Iterable<ClientRect> where(bool f(ClientRect element)) =>
+ IterableMixinWorkaround.where(this, f);
bool every(bool f(ClientRect element)) => IterableMixinWorkaround.every(this, f);
@@ -24309,6 +27181,9 @@
throw new UnsupportedError("Cannot clear immutable List.");
}
+ List<ClientRect> get reversed =>
+ new ReversedListView<ClientRect>(this, 0, null);
+
void sort([int compare(ClientRect a, ClientRect b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -24337,9 +27212,11 @@
throw new StateError("More than one element");
}
- ClientRect min([int compare(ClientRect a, ClientRect b)]) => IterableMixinWorkaround.min(this, compare);
+ ClientRect min([int compare(ClientRect a, ClientRect b)]) =>
+ IterableMixinWorkaround.min(this, compare);
- ClientRect max([int compare(ClientRect a, ClientRect b)]) => IterableMixinWorkaround.max(this, compare);
+ ClientRect max([int compare(ClientRect a, ClientRect b)]) =>
+ IterableMixinWorkaround.max(this, compare);
ClientRect removeAt(int pos) {
throw new UnsupportedError("Cannot remove from immutable List.");
@@ -24386,7 +27263,8 @@
// -- end List<ClientRect> mixins.
- @DocsEditable @DomName('ClientRectList.item')
+ @DomName('ClientRectList.item')
+ @DocsEditable
ClientRect item(int index) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -24394,12 +27272,12 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('CSSRuleList')
class _CssRuleList implements JavaScriptIndexingBehavior, List<CssRule> native "*CSSRuleList" {
- @DocsEditable @DomName('CSSRuleList.length')
+ @DomName('CSSRuleList.length')
+ @DocsEditable
int get length => JS("int", "#.length", this);
CssRule operator[](int index) => JS("CssRule", "#[#]", this, index);
@@ -24427,11 +27305,13 @@
void forEach(void f(CssRule element)) => IterableMixinWorkaround.forEach(this, f);
- String join([String separator]) => IterableMixinWorkaround.joinList(this, separator);
+ String join([String separator]) =>
+ IterableMixinWorkaround.joinList(this, separator);
List mappedBy(f(CssRule element)) => IterableMixinWorkaround.mappedByList(this, f);
- Iterable<CssRule> where(bool f(CssRule element)) => IterableMixinWorkaround.where(this, f);
+ Iterable<CssRule> where(bool f(CssRule element)) =>
+ IterableMixinWorkaround.where(this, f);
bool every(bool f(CssRule element)) => IterableMixinWorkaround.every(this, f);
@@ -24493,6 +27373,9 @@
throw new UnsupportedError("Cannot clear immutable List.");
}
+ List<CssRule> get reversed =>
+ new ReversedListView<CssRule>(this, 0, null);
+
void sort([int compare(CssRule a, CssRule b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -24521,9 +27404,11 @@
throw new StateError("More than one element");
}
- CssRule min([int compare(CssRule a, CssRule b)]) => IterableMixinWorkaround.min(this, compare);
+ CssRule min([int compare(CssRule a, CssRule b)]) =>
+ IterableMixinWorkaround.min(this, compare);
- CssRule max([int compare(CssRule a, CssRule b)]) => IterableMixinWorkaround.max(this, compare);
+ CssRule max([int compare(CssRule a, CssRule b)]) =>
+ IterableMixinWorkaround.max(this, compare);
CssRule removeAt(int pos) {
throw new UnsupportedError("Cannot remove from immutable List.");
@@ -24570,7 +27455,8 @@
// -- end List<CssRule> mixins.
- @DocsEditable @DomName('CSSRuleList.item')
+ @DomName('CSSRuleList.item')
+ @DocsEditable
CssRule item(int index) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -24578,12 +27464,12 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('CSSValueList')
class _CssValueList extends CssValue implements List<CssValue>, JavaScriptIndexingBehavior native "*CSSValueList" {
- @DocsEditable @DomName('CSSValueList.length')
+ @DomName('CSSValueList.length')
+ @DocsEditable
int get length => JS("int", "#.length", this);
CssValue operator[](int index) => JS("CssValue", "#[#]", this, index);
@@ -24611,11 +27497,13 @@
void forEach(void f(CssValue element)) => IterableMixinWorkaround.forEach(this, f);
- String join([String separator]) => IterableMixinWorkaround.joinList(this, separator);
+ String join([String separator]) =>
+ IterableMixinWorkaround.joinList(this, separator);
List mappedBy(f(CssValue element)) => IterableMixinWorkaround.mappedByList(this, f);
- Iterable<CssValue> where(bool f(CssValue element)) => IterableMixinWorkaround.where(this, f);
+ Iterable<CssValue> where(bool f(CssValue element)) =>
+ IterableMixinWorkaround.where(this, f);
bool every(bool f(CssValue element)) => IterableMixinWorkaround.every(this, f);
@@ -24677,6 +27565,9 @@
throw new UnsupportedError("Cannot clear immutable List.");
}
+ List<CssValue> get reversed =>
+ new ReversedListView<CssValue>(this, 0, null);
+
void sort([int compare(CssValue a, CssValue b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -24705,9 +27596,11 @@
throw new StateError("More than one element");
}
- CssValue min([int compare(CssValue a, CssValue b)]) => IterableMixinWorkaround.min(this, compare);
+ CssValue min([int compare(CssValue a, CssValue b)]) =>
+ IterableMixinWorkaround.min(this, compare);
- CssValue max([int compare(CssValue a, CssValue b)]) => IterableMixinWorkaround.max(this, compare);
+ CssValue max([int compare(CssValue a, CssValue b)]) =>
+ IterableMixinWorkaround.max(this, compare);
CssValue removeAt(int pos) {
throw new UnsupportedError("Cannot remove from immutable List.");
@@ -24754,7 +27647,8 @@
// -- end List<CssValue> mixins.
- @DocsEditable @DomName('CSSValueList.item')
+ @DomName('CSSValueList.item')
+ @DocsEditable
CssValue item(int index) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -24762,7 +27656,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('HTMLDirectoryElement')
class _DirectoryElement extends Element native "*HTMLDirectoryElement" {
@@ -24772,12 +27665,12 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('EntryArray')
class _EntryArray implements JavaScriptIndexingBehavior, List<Entry> native "*EntryArray" {
- @DocsEditable @DomName('EntryArray.length')
+ @DomName('EntryArray.length')
+ @DocsEditable
int get length => JS("int", "#.length", this);
Entry operator[](int index) => JS("Entry", "#[#]", this, index);
@@ -24805,11 +27698,13 @@
void forEach(void f(Entry element)) => IterableMixinWorkaround.forEach(this, f);
- String join([String separator]) => IterableMixinWorkaround.joinList(this, separator);
+ String join([String separator]) =>
+ IterableMixinWorkaround.joinList(this, separator);
List mappedBy(f(Entry element)) => IterableMixinWorkaround.mappedByList(this, f);
- Iterable<Entry> where(bool f(Entry element)) => IterableMixinWorkaround.where(this, f);
+ Iterable<Entry> where(bool f(Entry element)) =>
+ IterableMixinWorkaround.where(this, f);
bool every(bool f(Entry element)) => IterableMixinWorkaround.every(this, f);
@@ -24871,6 +27766,9 @@
throw new UnsupportedError("Cannot clear immutable List.");
}
+ List<Entry> get reversed =>
+ new ReversedListView<Entry>(this, 0, null);
+
void sort([int compare(Entry a, Entry b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -24899,9 +27797,11 @@
throw new StateError("More than one element");
}
- Entry min([int compare(Entry a, Entry b)]) => IterableMixinWorkaround.min(this, compare);
+ Entry min([int compare(Entry a, Entry b)]) =>
+ IterableMixinWorkaround.min(this, compare);
- Entry max([int compare(Entry a, Entry b)]) => IterableMixinWorkaround.max(this, compare);
+ Entry max([int compare(Entry a, Entry b)]) =>
+ IterableMixinWorkaround.max(this, compare);
Entry removeAt(int pos) {
throw new UnsupportedError("Cannot remove from immutable List.");
@@ -24948,7 +27848,8 @@
// -- end List<Entry> mixins.
- @DocsEditable @DomName('EntryArray.item')
+ @DomName('EntryArray.item')
+ @DocsEditable
Entry item(int index) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -24956,12 +27857,12 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('EntryArraySync')
class _EntryArraySync implements JavaScriptIndexingBehavior, List<EntrySync> native "*EntryArraySync" {
- @DocsEditable @DomName('EntryArraySync.length')
+ @DomName('EntryArraySync.length')
+ @DocsEditable
int get length => JS("int", "#.length", this);
EntrySync operator[](int index) => JS("EntrySync", "#[#]", this, index);
@@ -24989,11 +27890,13 @@
void forEach(void f(EntrySync element)) => IterableMixinWorkaround.forEach(this, f);
- String join([String separator]) => IterableMixinWorkaround.joinList(this, separator);
+ String join([String separator]) =>
+ IterableMixinWorkaround.joinList(this, separator);
List mappedBy(f(EntrySync element)) => IterableMixinWorkaround.mappedByList(this, f);
- Iterable<EntrySync> where(bool f(EntrySync element)) => IterableMixinWorkaround.where(this, f);
+ Iterable<EntrySync> where(bool f(EntrySync element)) =>
+ IterableMixinWorkaround.where(this, f);
bool every(bool f(EntrySync element)) => IterableMixinWorkaround.every(this, f);
@@ -25055,6 +27958,9 @@
throw new UnsupportedError("Cannot clear immutable List.");
}
+ List<EntrySync> get reversed =>
+ new ReversedListView<EntrySync>(this, 0, null);
+
void sort([int compare(EntrySync a, EntrySync b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -25083,9 +27989,11 @@
throw new StateError("More than one element");
}
- EntrySync min([int compare(EntrySync a, EntrySync b)]) => IterableMixinWorkaround.min(this, compare);
+ EntrySync min([int compare(EntrySync a, EntrySync b)]) =>
+ IterableMixinWorkaround.min(this, compare);
- EntrySync max([int compare(EntrySync a, EntrySync b)]) => IterableMixinWorkaround.max(this, compare);
+ EntrySync max([int compare(EntrySync a, EntrySync b)]) =>
+ IterableMixinWorkaround.max(this, compare);
EntrySync removeAt(int pos) {
throw new UnsupportedError("Cannot remove from immutable List.");
@@ -25132,7 +28040,8 @@
// -- end List<EntrySync> mixins.
- @DocsEditable @DomName('EntryArraySync.item')
+ @DomName('EntryArraySync.item')
+ @DocsEditable
EntrySync item(int index) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -25140,7 +28049,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('HTMLFontElement')
class _FontElement extends Element native "*HTMLFontElement" {
@@ -25150,7 +28058,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('HTMLFrameElement')
class _FrameElement extends Element native "*HTMLFrameElement" {
@@ -25160,18 +28067,19 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('HTMLFrameSetElement')
class _FrameSetElement extends Element native "*HTMLFrameSetElement" {
@DocsEditable
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
+ @deprecated
_FrameSetElementEvents get on =>
new _FrameSetElementEvents(this);
}
@DocsEditable
+@deprecated
class _FrameSetElementEvents extends ElementEvents {
@DocsEditable
_FrameSetElementEvents(EventTarget _ptr) : super(_ptr);
@@ -25220,12 +28128,12 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('GamepadList')
class _GamepadList implements JavaScriptIndexingBehavior, List<Gamepad> native "*GamepadList" {
- @DocsEditable @DomName('GamepadList.length')
+ @DomName('GamepadList.length')
+ @DocsEditable
int get length => JS("int", "#.length", this);
Gamepad operator[](int index) => JS("Gamepad", "#[#]", this, index);
@@ -25253,11 +28161,13 @@
void forEach(void f(Gamepad element)) => IterableMixinWorkaround.forEach(this, f);
- String join([String separator]) => IterableMixinWorkaround.joinList(this, separator);
+ String join([String separator]) =>
+ IterableMixinWorkaround.joinList(this, separator);
List mappedBy(f(Gamepad element)) => IterableMixinWorkaround.mappedByList(this, f);
- Iterable<Gamepad> where(bool f(Gamepad element)) => IterableMixinWorkaround.where(this, f);
+ Iterable<Gamepad> where(bool f(Gamepad element)) =>
+ IterableMixinWorkaround.where(this, f);
bool every(bool f(Gamepad element)) => IterableMixinWorkaround.every(this, f);
@@ -25319,6 +28229,9 @@
throw new UnsupportedError("Cannot clear immutable List.");
}
+ List<Gamepad> get reversed =>
+ new ReversedListView<Gamepad>(this, 0, null);
+
void sort([int compare(Gamepad a, Gamepad b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -25347,9 +28260,11 @@
throw new StateError("More than one element");
}
- Gamepad min([int compare(Gamepad a, Gamepad b)]) => IterableMixinWorkaround.min(this, compare);
+ Gamepad min([int compare(Gamepad a, Gamepad b)]) =>
+ IterableMixinWorkaround.min(this, compare);
- Gamepad max([int compare(Gamepad a, Gamepad b)]) => IterableMixinWorkaround.max(this, compare);
+ Gamepad max([int compare(Gamepad a, Gamepad b)]) =>
+ IterableMixinWorkaround.max(this, compare);
Gamepad removeAt(int pos) {
throw new UnsupportedError("Cannot remove from immutable List.");
@@ -25396,7 +28311,8 @@
// -- end List<Gamepad> mixins.
- @DocsEditable @DomName('GamepadList.item')
+ @DomName('GamepadList.item')
+ @DocsEditable
Gamepad item(int index) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -25404,7 +28320,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('HTMLMarqueeElement')
class _MarqueeElement extends Element native "*HTMLMarqueeElement" {
@@ -25414,12 +28329,12 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('MediaStreamList')
class _MediaStreamList implements JavaScriptIndexingBehavior, List<MediaStream> native "*MediaStreamList" {
- @DocsEditable @DomName('MediaStreamList.length')
+ @DomName('MediaStreamList.length')
+ @DocsEditable
int get length => JS("int", "#.length", this);
MediaStream operator[](int index) => JS("MediaStream", "#[#]", this, index);
@@ -25447,11 +28362,13 @@
void forEach(void f(MediaStream element)) => IterableMixinWorkaround.forEach(this, f);
- String join([String separator]) => IterableMixinWorkaround.joinList(this, separator);
+ String join([String separator]) =>
+ IterableMixinWorkaround.joinList(this, separator);
List mappedBy(f(MediaStream element)) => IterableMixinWorkaround.mappedByList(this, f);
- Iterable<MediaStream> where(bool f(MediaStream element)) => IterableMixinWorkaround.where(this, f);
+ Iterable<MediaStream> where(bool f(MediaStream element)) =>
+ IterableMixinWorkaround.where(this, f);
bool every(bool f(MediaStream element)) => IterableMixinWorkaround.every(this, f);
@@ -25513,6 +28430,9 @@
throw new UnsupportedError("Cannot clear immutable List.");
}
+ List<MediaStream> get reversed =>
+ new ReversedListView<MediaStream>(this, 0, null);
+
void sort([int compare(MediaStream a, MediaStream b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -25541,9 +28461,11 @@
throw new StateError("More than one element");
}
- MediaStream min([int compare(MediaStream a, MediaStream b)]) => IterableMixinWorkaround.min(this, compare);
+ MediaStream min([int compare(MediaStream a, MediaStream b)]) =>
+ IterableMixinWorkaround.min(this, compare);
- MediaStream max([int compare(MediaStream a, MediaStream b)]) => IterableMixinWorkaround.max(this, compare);
+ MediaStream max([int compare(MediaStream a, MediaStream b)]) =>
+ IterableMixinWorkaround.max(this, compare);
MediaStream removeAt(int pos) {
throw new UnsupportedError("Cannot remove from immutable List.");
@@ -25590,7 +28512,8 @@
// -- end List<MediaStream> mixins.
- @DocsEditable @DomName('MediaStreamList.item')
+ @DomName('MediaStreamList.item')
+ @DocsEditable
MediaStream item(int index) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -25598,12 +28521,12 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SpeechInputResultList')
class _SpeechInputResultList implements JavaScriptIndexingBehavior, List<SpeechInputResult> native "*SpeechInputResultList" {
- @DocsEditable @DomName('SpeechInputResultList.length')
+ @DomName('SpeechInputResultList.length')
+ @DocsEditable
int get length => JS("int", "#.length", this);
SpeechInputResult operator[](int index) => JS("SpeechInputResult", "#[#]", this, index);
@@ -25631,11 +28554,13 @@
void forEach(void f(SpeechInputResult element)) => IterableMixinWorkaround.forEach(this, f);
- String join([String separator]) => IterableMixinWorkaround.joinList(this, separator);
+ String join([String separator]) =>
+ IterableMixinWorkaround.joinList(this, separator);
List mappedBy(f(SpeechInputResult element)) => IterableMixinWorkaround.mappedByList(this, f);
- Iterable<SpeechInputResult> where(bool f(SpeechInputResult element)) => IterableMixinWorkaround.where(this, f);
+ Iterable<SpeechInputResult> where(bool f(SpeechInputResult element)) =>
+ IterableMixinWorkaround.where(this, f);
bool every(bool f(SpeechInputResult element)) => IterableMixinWorkaround.every(this, f);
@@ -25697,6 +28622,9 @@
throw new UnsupportedError("Cannot clear immutable List.");
}
+ List<SpeechInputResult> get reversed =>
+ new ReversedListView<SpeechInputResult>(this, 0, null);
+
void sort([int compare(SpeechInputResult a, SpeechInputResult b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -25725,9 +28653,11 @@
throw new StateError("More than one element");
}
- SpeechInputResult min([int compare(SpeechInputResult a, SpeechInputResult b)]) => IterableMixinWorkaround.min(this, compare);
+ SpeechInputResult min([int compare(SpeechInputResult a, SpeechInputResult b)]) =>
+ IterableMixinWorkaround.min(this, compare);
- SpeechInputResult max([int compare(SpeechInputResult a, SpeechInputResult b)]) => IterableMixinWorkaround.max(this, compare);
+ SpeechInputResult max([int compare(SpeechInputResult a, SpeechInputResult b)]) =>
+ IterableMixinWorkaround.max(this, compare);
SpeechInputResult removeAt(int pos) {
throw new UnsupportedError("Cannot remove from immutable List.");
@@ -25774,7 +28704,8 @@
// -- end List<SpeechInputResult> mixins.
- @DocsEditable @DomName('SpeechInputResultList.item')
+ @DomName('SpeechInputResultList.item')
+ @DocsEditable
SpeechInputResult item(int index) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -25782,12 +28713,12 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SpeechRecognitionResultList')
class _SpeechRecognitionResultList implements JavaScriptIndexingBehavior, List<SpeechRecognitionResult> native "*SpeechRecognitionResultList" {
- @DocsEditable @DomName('SpeechRecognitionResultList.length')
+ @DomName('SpeechRecognitionResultList.length')
+ @DocsEditable
int get length => JS("int", "#.length", this);
SpeechRecognitionResult operator[](int index) => JS("SpeechRecognitionResult", "#[#]", this, index);
@@ -25815,11 +28746,13 @@
void forEach(void f(SpeechRecognitionResult element)) => IterableMixinWorkaround.forEach(this, f);
- String join([String separator]) => IterableMixinWorkaround.joinList(this, separator);
+ String join([String separator]) =>
+ IterableMixinWorkaround.joinList(this, separator);
List mappedBy(f(SpeechRecognitionResult element)) => IterableMixinWorkaround.mappedByList(this, f);
- Iterable<SpeechRecognitionResult> where(bool f(SpeechRecognitionResult element)) => IterableMixinWorkaround.where(this, f);
+ Iterable<SpeechRecognitionResult> where(bool f(SpeechRecognitionResult element)) =>
+ IterableMixinWorkaround.where(this, f);
bool every(bool f(SpeechRecognitionResult element)) => IterableMixinWorkaround.every(this, f);
@@ -25881,6 +28814,9 @@
throw new UnsupportedError("Cannot clear immutable List.");
}
+ List<SpeechRecognitionResult> get reversed =>
+ new ReversedListView<SpeechRecognitionResult>(this, 0, null);
+
void sort([int compare(SpeechRecognitionResult a, SpeechRecognitionResult b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -25909,9 +28845,11 @@
throw new StateError("More than one element");
}
- SpeechRecognitionResult min([int compare(SpeechRecognitionResult a, SpeechRecognitionResult b)]) => IterableMixinWorkaround.min(this, compare);
+ SpeechRecognitionResult min([int compare(SpeechRecognitionResult a, SpeechRecognitionResult b)]) =>
+ IterableMixinWorkaround.min(this, compare);
- SpeechRecognitionResult max([int compare(SpeechRecognitionResult a, SpeechRecognitionResult b)]) => IterableMixinWorkaround.max(this, compare);
+ SpeechRecognitionResult max([int compare(SpeechRecognitionResult a, SpeechRecognitionResult b)]) =>
+ IterableMixinWorkaround.max(this, compare);
SpeechRecognitionResult removeAt(int pos) {
throw new UnsupportedError("Cannot remove from immutable List.");
@@ -25958,7 +28896,8 @@
// -- end List<SpeechRecognitionResult> mixins.
- @DocsEditable @DomName('SpeechRecognitionResultList.item')
+ @DomName('SpeechRecognitionResultList.item')
+ @DocsEditable
SpeechRecognitionResult item(int index) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -25966,12 +28905,12 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('StyleSheetList')
class _StyleSheetList implements JavaScriptIndexingBehavior, List<StyleSheet> native "*StyleSheetList" {
- @DocsEditable @DomName('StyleSheetList.length')
+ @DomName('StyleSheetList.length')
+ @DocsEditable
int get length => JS("int", "#.length", this);
StyleSheet operator[](int index) => JS("StyleSheet", "#[#]", this, index);
@@ -25999,11 +28938,13 @@
void forEach(void f(StyleSheet element)) => IterableMixinWorkaround.forEach(this, f);
- String join([String separator]) => IterableMixinWorkaround.joinList(this, separator);
+ String join([String separator]) =>
+ IterableMixinWorkaround.joinList(this, separator);
List mappedBy(f(StyleSheet element)) => IterableMixinWorkaround.mappedByList(this, f);
- Iterable<StyleSheet> where(bool f(StyleSheet element)) => IterableMixinWorkaround.where(this, f);
+ Iterable<StyleSheet> where(bool f(StyleSheet element)) =>
+ IterableMixinWorkaround.where(this, f);
bool every(bool f(StyleSheet element)) => IterableMixinWorkaround.every(this, f);
@@ -26065,6 +29006,9 @@
throw new UnsupportedError("Cannot clear immutable List.");
}
+ List<StyleSheet> get reversed =>
+ new ReversedListView<StyleSheet>(this, 0, null);
+
void sort([int compare(StyleSheet a, StyleSheet b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -26093,9 +29037,11 @@
throw new StateError("More than one element");
}
- StyleSheet min([int compare(StyleSheet a, StyleSheet b)]) => IterableMixinWorkaround.min(this, compare);
+ StyleSheet min([int compare(StyleSheet a, StyleSheet b)]) =>
+ IterableMixinWorkaround.min(this, compare);
- StyleSheet max([int compare(StyleSheet a, StyleSheet b)]) => IterableMixinWorkaround.max(this, compare);
+ StyleSheet max([int compare(StyleSheet a, StyleSheet b)]) =>
+ IterableMixinWorkaround.max(this, compare);
StyleSheet removeAt(int pos) {
throw new UnsupportedError("Cannot remove from immutable List.");
@@ -26142,7 +29088,8 @@
// -- end List<StyleSheet> mixins.
- @DocsEditable @DomName('StyleSheetList.item')
+ @DomName('StyleSheetList.item')
+ @DocsEditable
StyleSheet item(int index) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -28326,8 +31273,9 @@
get _isolateId => ReceivePortSync._isolateId;
void _dispatchEvent(String receiver, var message) {
- var event = new CustomEvent(receiver, false, false, json.stringify(message));
- window.$dom_dispatchEvent(event);
+ var event = new CustomEvent(receiver, canBubble: false, cancelable:false,
+ detail: json.stringify(message));
+ window.dispatchEvent(event);
}
String _getPortSyncEventData(CustomEvent event) => event.detail;
@@ -28714,38 +31662,6 @@
// BSD-style license that can be found in the LICENSE file.
-class _CustomEventFactoryProvider {
- static CustomEvent createCustomEvent(String type, [bool canBubble = true,
- bool cancelable = true, Object detail = null]) {
- final CustomEvent e = document.$dom_createEvent("CustomEvent");
- e.$dom_initCustomEvent(type, canBubble, cancelable, detail);
- return e;
- }
-}
-
-class _EventFactoryProvider {
- static Event createEvent(String type, [bool canBubble = true,
- bool cancelable = true]) {
- final Event e = document.$dom_createEvent("Event");
- e.$dom_initEvent(type, canBubble, cancelable);
- return e;
- }
-}
-
-class _MouseEventFactoryProvider {
- static MouseEvent createMouseEvent(String type, Window view, int detail,
- int screenX, int screenY, int clientX, int clientY, int button,
- [bool canBubble = true, bool cancelable = true, bool ctrlKey = false,
- bool altKey = false, bool shiftKey = false, bool metaKey = false,
- EventTarget relatedTarget = null]) {
- final e = document.$dom_createEvent("MouseEvent");
- e.$dom_initMouseEvent(type, canBubble, cancelable, view, detail,
- screenX, screenY, clientX, clientY, ctrlKey, altKey, shiftKey, metaKey,
- button, relatedTarget);
- return e;
- }
-}
-
class _CssStyleDeclarationFactoryProvider {
static CssStyleDeclaration createCssStyleDeclaration_css(String css) {
final style = new Element.tag('div').style;
diff --git a/sdk/lib/html/dartium/html_dartium.dart b/sdk/lib/html/dartium/html_dartium.dart
index 82f4968..f44afd1 100644
--- a/sdk/lib/html/dartium/html_dartium.dart
+++ b/sdk/lib/html/dartium/html_dartium.dart
@@ -78,30 +78,36 @@
class AbstractWorker extends EventTarget {
AbstractWorker.internal() : super.internal();
+ @DomName('AbstractWorker.error')
+ @DocsEditable
static const EventStreamProvider<Event> errorEvent = const EventStreamProvider<Event>('error');
@DocsEditable
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
+ @deprecated
AbstractWorkerEvents get on =>
new AbstractWorkerEvents(this);
- @DocsEditable
@DomName('AbstractWorker.addEventListener')
+ @DocsEditable
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native "AbstractWorker_addEventListener_Callback";
- @DocsEditable
@DomName('AbstractWorker.dispatchEvent')
- bool $dom_dispatchEvent(Event evt) native "AbstractWorker_dispatchEvent_Callback";
-
@DocsEditable
+ bool dispatchEvent(Event evt) native "AbstractWorker_dispatchEvent_Callback";
+
@DomName('AbstractWorker.removeEventListener')
+ @DocsEditable
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native "AbstractWorker_removeEventListener_Callback";
+ @DomName('AbstractWorker.error')
+ @DocsEditable
Stream<Event> get onError => errorEvent.forTarget(this);
}
@DocsEditable
+@deprecated
class AbstractWorkerEvents extends Events {
@DocsEditable
AbstractWorkerEvents(EventTarget _ptr) : super(_ptr);
@@ -128,132 +134,132 @@
return e;
}
- @DocsEditable
@DomName('HTMLAnchorElement.download')
+ @DocsEditable
String get download native "HTMLAnchorElement_download_Getter";
- @DocsEditable
@DomName('HTMLAnchorElement.download')
+ @DocsEditable
void set download(String value) native "HTMLAnchorElement_download_Setter";
- @DocsEditable
@DomName('HTMLAnchorElement.hash')
+ @DocsEditable
String get hash native "HTMLAnchorElement_hash_Getter";
- @DocsEditable
@DomName('HTMLAnchorElement.hash')
+ @DocsEditable
void set hash(String value) native "HTMLAnchorElement_hash_Setter";
- @DocsEditable
@DomName('HTMLAnchorElement.host')
+ @DocsEditable
String get host native "HTMLAnchorElement_host_Getter";
- @DocsEditable
@DomName('HTMLAnchorElement.host')
+ @DocsEditable
void set host(String value) native "HTMLAnchorElement_host_Setter";
- @DocsEditable
@DomName('HTMLAnchorElement.hostname')
+ @DocsEditable
String get hostname native "HTMLAnchorElement_hostname_Getter";
- @DocsEditable
@DomName('HTMLAnchorElement.hostname')
+ @DocsEditable
void set hostname(String value) native "HTMLAnchorElement_hostname_Setter";
- @DocsEditable
@DomName('HTMLAnchorElement.href')
+ @DocsEditable
String get href native "HTMLAnchorElement_href_Getter";
- @DocsEditable
@DomName('HTMLAnchorElement.href')
+ @DocsEditable
void set href(String value) native "HTMLAnchorElement_href_Setter";
- @DocsEditable
@DomName('HTMLAnchorElement.hreflang')
+ @DocsEditable
String get hreflang native "HTMLAnchorElement_hreflang_Getter";
- @DocsEditable
@DomName('HTMLAnchorElement.hreflang')
+ @DocsEditable
void set hreflang(String value) native "HTMLAnchorElement_hreflang_Setter";
- @DocsEditable
@DomName('HTMLAnchorElement.name')
+ @DocsEditable
String get name native "HTMLAnchorElement_name_Getter";
- @DocsEditable
@DomName('HTMLAnchorElement.name')
+ @DocsEditable
void set name(String value) native "HTMLAnchorElement_name_Setter";
- @DocsEditable
@DomName('HTMLAnchorElement.origin')
+ @DocsEditable
String get origin native "HTMLAnchorElement_origin_Getter";
- @DocsEditable
@DomName('HTMLAnchorElement.pathname')
+ @DocsEditable
String get pathname native "HTMLAnchorElement_pathname_Getter";
- @DocsEditable
@DomName('HTMLAnchorElement.pathname')
+ @DocsEditable
void set pathname(String value) native "HTMLAnchorElement_pathname_Setter";
- @DocsEditable
@DomName('HTMLAnchorElement.ping')
+ @DocsEditable
String get ping native "HTMLAnchorElement_ping_Getter";
- @DocsEditable
@DomName('HTMLAnchorElement.ping')
+ @DocsEditable
void set ping(String value) native "HTMLAnchorElement_ping_Setter";
- @DocsEditable
@DomName('HTMLAnchorElement.port')
+ @DocsEditable
String get port native "HTMLAnchorElement_port_Getter";
- @DocsEditable
@DomName('HTMLAnchorElement.port')
+ @DocsEditable
void set port(String value) native "HTMLAnchorElement_port_Setter";
- @DocsEditable
@DomName('HTMLAnchorElement.protocol')
+ @DocsEditable
String get protocol native "HTMLAnchorElement_protocol_Getter";
- @DocsEditable
@DomName('HTMLAnchorElement.protocol')
+ @DocsEditable
void set protocol(String value) native "HTMLAnchorElement_protocol_Setter";
- @DocsEditable
@DomName('HTMLAnchorElement.rel')
+ @DocsEditable
String get rel native "HTMLAnchorElement_rel_Getter";
- @DocsEditable
@DomName('HTMLAnchorElement.rel')
+ @DocsEditable
void set rel(String value) native "HTMLAnchorElement_rel_Setter";
- @DocsEditable
@DomName('HTMLAnchorElement.search')
+ @DocsEditable
String get search native "HTMLAnchorElement_search_Getter";
- @DocsEditable
@DomName('HTMLAnchorElement.search')
+ @DocsEditable
void set search(String value) native "HTMLAnchorElement_search_Setter";
- @DocsEditable
@DomName('HTMLAnchorElement.target')
+ @DocsEditable
String get target native "HTMLAnchorElement_target_Getter";
- @DocsEditable
@DomName('HTMLAnchorElement.target')
+ @DocsEditable
void set target(String value) native "HTMLAnchorElement_target_Setter";
- @DocsEditable
@DomName('HTMLAnchorElement.type')
+ @DocsEditable
String get type native "HTMLAnchorElement_type_Getter";
- @DocsEditable
@DomName('HTMLAnchorElement.type')
+ @DocsEditable
void set type(String value) native "HTMLAnchorElement_type_Setter";
- @DocsEditable
@DomName('HTMLAnchorElement.toString')
+ @DocsEditable
String toString() native "HTMLAnchorElement_toString_Callback";
}
@@ -269,12 +275,12 @@
class AnimationEvent extends Event {
AnimationEvent.internal() : super.internal();
- @DocsEditable
@DomName('WebKitAnimationEvent.animationName')
+ @DocsEditable
String get animationName native "WebKitAnimationEvent_animationName_Getter";
- @DocsEditable
@DomName('WebKitAnimationEvent.elapsedTime')
+ @DocsEditable
num get elapsedTime native "WebKitAnimationEvent_elapsedTime_Getter";
}
@@ -295,20 +301,36 @@
class ApplicationCache extends EventTarget {
ApplicationCache.internal() : super.internal();
+ @DomName('DOMApplicationCache.cached')
+ @DocsEditable
static const EventStreamProvider<Event> cachedEvent = const EventStreamProvider<Event>('cached');
+ @DomName('DOMApplicationCache.checking')
+ @DocsEditable
static const EventStreamProvider<Event> checkingEvent = const EventStreamProvider<Event>('checking');
+ @DomName('DOMApplicationCache.downloading')
+ @DocsEditable
static const EventStreamProvider<Event> downloadingEvent = const EventStreamProvider<Event>('downloading');
+ @DomName('DOMApplicationCache.error')
+ @DocsEditable
static const EventStreamProvider<Event> errorEvent = const EventStreamProvider<Event>('error');
+ @DomName('DOMApplicationCache.noupdate')
+ @DocsEditable
static const EventStreamProvider<Event> noUpdateEvent = const EventStreamProvider<Event>('noupdate');
+ @DomName('DOMApplicationCache.obsolete')
+ @DocsEditable
static const EventStreamProvider<Event> obsoleteEvent = const EventStreamProvider<Event>('obsolete');
+ @DomName('DOMApplicationCache.progress')
+ @DocsEditable
static const EventStreamProvider<Event> progressEvent = const EventStreamProvider<Event>('progress');
+ @DomName('DOMApplicationCache.updateready')
+ @DocsEditable
static const EventStreamProvider<Event> updateReadyEvent = const EventStreamProvider<Event>('updateready');
/// Checks if this type is supported on the current platform.
@@ -316,6 +338,7 @@
@DocsEditable
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
+ @deprecated
ApplicationCacheEvents get on =>
new ApplicationCacheEvents(this);
@@ -331,53 +354,70 @@
static const int UPDATEREADY = 4;
- @DocsEditable
@DomName('DOMApplicationCache.status')
+ @DocsEditable
int get status native "DOMApplicationCache_status_Getter";
- @DocsEditable
@DomName('DOMApplicationCache.abort')
+ @DocsEditable
void abort() native "DOMApplicationCache_abort_Callback";
- @DocsEditable
@DomName('DOMApplicationCache.addEventListener')
+ @DocsEditable
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native "DOMApplicationCache_addEventListener_Callback";
- @DocsEditable
@DomName('DOMApplicationCache.dispatchEvent')
- bool $dom_dispatchEvent(Event evt) native "DOMApplicationCache_dispatchEvent_Callback";
-
@DocsEditable
+ bool dispatchEvent(Event evt) native "DOMApplicationCache_dispatchEvent_Callback";
+
@DomName('DOMApplicationCache.removeEventListener')
+ @DocsEditable
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native "DOMApplicationCache_removeEventListener_Callback";
- @DocsEditable
@DomName('DOMApplicationCache.swapCache')
+ @DocsEditable
void swapCache() native "DOMApplicationCache_swapCache_Callback";
- @DocsEditable
@DomName('DOMApplicationCache.update')
+ @DocsEditable
void update() native "DOMApplicationCache_update_Callback";
+ @DomName('DOMApplicationCache.cached')
+ @DocsEditable
Stream<Event> get onCached => cachedEvent.forTarget(this);
+ @DomName('DOMApplicationCache.checking')
+ @DocsEditable
Stream<Event> get onChecking => checkingEvent.forTarget(this);
+ @DomName('DOMApplicationCache.downloading')
+ @DocsEditable
Stream<Event> get onDownloading => downloadingEvent.forTarget(this);
+ @DomName('DOMApplicationCache.error')
+ @DocsEditable
Stream<Event> get onError => errorEvent.forTarget(this);
+ @DomName('DOMApplicationCache.noupdate')
+ @DocsEditable
Stream<Event> get onNoUpdate => noUpdateEvent.forTarget(this);
+ @DomName('DOMApplicationCache.obsolete')
+ @DocsEditable
Stream<Event> get onObsolete => obsoleteEvent.forTarget(this);
+ @DomName('DOMApplicationCache.progress')
+ @DocsEditable
Stream<Event> get onProgress => progressEvent.forTarget(this);
+ @DomName('DOMApplicationCache.updateready')
+ @DocsEditable
Stream<Event> get onUpdateReady => updateReadyEvent.forTarget(this);
}
@DocsEditable
+@deprecated
class ApplicationCacheEvents extends Events {
@DocsEditable
ApplicationCacheEvents(EventTarget _ptr) : super(_ptr);
@@ -421,80 +461,80 @@
@DocsEditable
factory AreaElement() => document.$dom_createElement("area");
- @DocsEditable
@DomName('HTMLAreaElement.alt')
+ @DocsEditable
String get alt native "HTMLAreaElement_alt_Getter";
- @DocsEditable
@DomName('HTMLAreaElement.alt')
+ @DocsEditable
void set alt(String value) native "HTMLAreaElement_alt_Setter";
- @DocsEditable
@DomName('HTMLAreaElement.coords')
+ @DocsEditable
String get coords native "HTMLAreaElement_coords_Getter";
- @DocsEditable
@DomName('HTMLAreaElement.coords')
+ @DocsEditable
void set coords(String value) native "HTMLAreaElement_coords_Setter";
- @DocsEditable
@DomName('HTMLAreaElement.hash')
+ @DocsEditable
String get hash native "HTMLAreaElement_hash_Getter";
- @DocsEditable
@DomName('HTMLAreaElement.host')
+ @DocsEditable
String get host native "HTMLAreaElement_host_Getter";
- @DocsEditable
@DomName('HTMLAreaElement.hostname')
+ @DocsEditable
String get hostname native "HTMLAreaElement_hostname_Getter";
- @DocsEditable
@DomName('HTMLAreaElement.href')
+ @DocsEditable
String get href native "HTMLAreaElement_href_Getter";
- @DocsEditable
@DomName('HTMLAreaElement.href')
+ @DocsEditable
void set href(String value) native "HTMLAreaElement_href_Setter";
- @DocsEditable
@DomName('HTMLAreaElement.pathname')
+ @DocsEditable
String get pathname native "HTMLAreaElement_pathname_Getter";
- @DocsEditable
@DomName('HTMLAreaElement.ping')
+ @DocsEditable
String get ping native "HTMLAreaElement_ping_Getter";
- @DocsEditable
@DomName('HTMLAreaElement.ping')
+ @DocsEditable
void set ping(String value) native "HTMLAreaElement_ping_Setter";
- @DocsEditable
@DomName('HTMLAreaElement.port')
+ @DocsEditable
String get port native "HTMLAreaElement_port_Getter";
- @DocsEditable
@DomName('HTMLAreaElement.protocol')
+ @DocsEditable
String get protocol native "HTMLAreaElement_protocol_Getter";
- @DocsEditable
@DomName('HTMLAreaElement.search')
+ @DocsEditable
String get search native "HTMLAreaElement_search_Getter";
- @DocsEditable
@DomName('HTMLAreaElement.shape')
+ @DocsEditable
String get shape native "HTMLAreaElement_shape_Getter";
- @DocsEditable
@DomName('HTMLAreaElement.shape')
+ @DocsEditable
void set shape(String value) native "HTMLAreaElement_shape_Setter";
- @DocsEditable
@DomName('HTMLAreaElement.target')
+ @DocsEditable
String get target native "HTMLAreaElement_target_Getter";
- @DocsEditable
@DomName('HTMLAreaElement.target')
+ @DocsEditable
void set target(String value) native "HTMLAreaElement_target_Setter";
}
@@ -521,8 +561,8 @@
/// Checks if this type is supported on the current platform.
static bool get supported => true;
- @DocsEditable
@DomName('ArrayBuffer.byteLength')
+ @DocsEditable
int get byteLength native "ArrayBuffer_byteLength_Getter";
ArrayBuffer slice(int begin, [int end]) {
@@ -532,13 +572,13 @@
return _slice_2(begin);
}
+ @DomName('ArrayBuffer._slice_1')
@DocsEditable
- @DomName('ArrayBuffer.slice_1')
- ArrayBuffer _slice_1(begin, end) native "ArrayBuffer_slice_1_Callback";
+ ArrayBuffer _slice_1(begin, end) native "ArrayBuffer__slice_1_Callback";
+ @DomName('ArrayBuffer._slice_2')
@DocsEditable
- @DomName('ArrayBuffer.slice_2')
- ArrayBuffer _slice_2(begin) native "ArrayBuffer_slice_2_Callback";
+ ArrayBuffer _slice_2(begin) native "ArrayBuffer__slice_2_Callback";
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -557,16 +597,16 @@
class ArrayBufferView extends NativeFieldWrapperClass1 {
ArrayBufferView.internal();
- @DocsEditable
@DomName('ArrayBufferView.buffer')
+ @DocsEditable
ArrayBuffer get buffer native "ArrayBufferView_buffer_Getter";
- @DocsEditable
@DomName('ArrayBufferView.byteLength')
+ @DocsEditable
int get byteLength native "ArrayBufferView_byteLength_Getter";
- @DocsEditable
@DomName('ArrayBufferView.byteOffset')
+ @DocsEditable
int get byteOffset native "ArrayBufferView_byteOffset_Getter";
}
@@ -633,8 +673,8 @@
class BarInfo extends NativeFieldWrapperClass1 {
BarInfo.internal();
- @DocsEditable
@DomName('BarInfo.visible')
+ @DocsEditable
bool get visible native "BarInfo_visible_Getter";
}
@@ -653,20 +693,20 @@
@DocsEditable
factory BaseElement() => document.$dom_createElement("base");
- @DocsEditable
@DomName('HTMLBaseElement.href')
+ @DocsEditable
String get href native "HTMLBaseElement_href_Getter";
- @DocsEditable
@DomName('HTMLBaseElement.href')
+ @DocsEditable
void set href(String value) native "HTMLBaseElement_href_Setter";
- @DocsEditable
@DomName('HTMLBaseElement.target')
+ @DocsEditable
String get target native "HTMLBaseElement_target_Getter";
- @DocsEditable
@DomName('HTMLBaseElement.target')
+ @DocsEditable
void set target(String value) native "HTMLBaseElement_target_Setter";
}
@@ -682,58 +722,76 @@
class BatteryManager extends EventTarget {
BatteryManager.internal() : super.internal();
+ @DomName('BatteryManager.chargingchange')
+ @DocsEditable
static const EventStreamProvider<Event> chargingChangeEvent = const EventStreamProvider<Event>('chargingchange');
+ @DomName('BatteryManager.chargingtimechange')
+ @DocsEditable
static const EventStreamProvider<Event> chargingTimeChangeEvent = const EventStreamProvider<Event>('chargingtimechange');
+ @DomName('BatteryManager.dischargingtimechange')
+ @DocsEditable
static const EventStreamProvider<Event> dischargingTimeChangeEvent = const EventStreamProvider<Event>('dischargingtimechange');
+ @DomName('BatteryManager.levelchange')
+ @DocsEditable
static const EventStreamProvider<Event> levelChangeEvent = const EventStreamProvider<Event>('levelchange');
@DocsEditable
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
+ @deprecated
BatteryManagerEvents get on =>
new BatteryManagerEvents(this);
- @DocsEditable
@DomName('BatteryManager.charging')
+ @DocsEditable
bool get charging native "BatteryManager_charging_Getter";
- @DocsEditable
@DomName('BatteryManager.chargingTime')
+ @DocsEditable
num get chargingTime native "BatteryManager_chargingTime_Getter";
- @DocsEditable
@DomName('BatteryManager.dischargingTime')
+ @DocsEditable
num get dischargingTime native "BatteryManager_dischargingTime_Getter";
- @DocsEditable
@DomName('BatteryManager.level')
+ @DocsEditable
num get level native "BatteryManager_level_Getter";
- @DocsEditable
@DomName('BatteryManager.addEventListener')
+ @DocsEditable
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native "BatteryManager_addEventListener_Callback";
- @DocsEditable
@DomName('BatteryManager.dispatchEvent')
- bool $dom_dispatchEvent(Event event) native "BatteryManager_dispatchEvent_Callback";
-
@DocsEditable
+ bool dispatchEvent(Event event) native "BatteryManager_dispatchEvent_Callback";
+
@DomName('BatteryManager.removeEventListener')
+ @DocsEditable
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native "BatteryManager_removeEventListener_Callback";
+ @DomName('BatteryManager.chargingchange')
+ @DocsEditable
Stream<Event> get onChargingChange => chargingChangeEvent.forTarget(this);
+ @DomName('BatteryManager.chargingtimechange')
+ @DocsEditable
Stream<Event> get onChargingTimeChange => chargingTimeChangeEvent.forTarget(this);
+ @DomName('BatteryManager.dischargingtimechange')
+ @DocsEditable
Stream<Event> get onDischargingTimeChange => dischargingTimeChangeEvent.forTarget(this);
+ @DomName('BatteryManager.levelchange')
+ @DocsEditable
Stream<Event> get onLevelChange => levelChangeEvent.forTarget(this);
}
@DocsEditable
+@deprecated
class BatteryManagerEvents extends Events {
@DocsEditable
BatteryManagerEvents(EventTarget _ptr) : super(_ptr);
@@ -762,8 +820,8 @@
class BeforeLoadEvent extends Event {
BeforeLoadEvent.internal() : super.internal();
- @DocsEditable
@DomName('BeforeLoadEvent.url')
+ @DocsEditable
String get url native "BeforeLoadEvent_url_Getter";
}
@@ -772,7 +830,6 @@
// BSD-style license that can be found in the LICENSE file.
-@DocsEditable
@DomName('Blob')
class Blob extends NativeFieldWrapperClass1 {
Blob.internal();
@@ -789,12 +846,12 @@
}
static Blob _create(List blobParts, [String type, String endings]) native "Blob_constructor_Callback";
- @DocsEditable
@DomName('Blob.size')
+ @DocsEditable
int get size native "Blob_size_Getter";
- @DocsEditable
@DomName('Blob.type')
+ @DocsEditable
String get type native "Blob_type_Getter";
Blob slice([int start, int end, String contentType]) {
@@ -810,21 +867,21 @@
return _slice_4();
}
+ @DomName('Blob._slice_1')
@DocsEditable
- @DomName('Blob.slice_1')
- Blob _slice_1(start, end, contentType) native "Blob_slice_1_Callback";
+ Blob _slice_1(start, end, contentType) native "Blob__slice_1_Callback";
+ @DomName('Blob._slice_2')
@DocsEditable
- @DomName('Blob.slice_2')
- Blob _slice_2(start, end) native "Blob_slice_2_Callback";
+ Blob _slice_2(start, end) native "Blob__slice_2_Callback";
+ @DomName('Blob._slice_3')
@DocsEditable
- @DomName('Blob.slice_3')
- Blob _slice_3(start) native "Blob_slice_3_Callback";
+ Blob _slice_3(start) native "Blob__slice_3_Callback";
+ @DomName('Blob._slice_4')
@DocsEditable
- @DomName('Blob.slice_4')
- Blob _slice_4() native "Blob_slice_4_Callback";
+ Blob _slice_4() native "Blob__slice_4_Callback";
}
@@ -840,30 +897,56 @@
class BodyElement extends _Element_Merged {
BodyElement.internal() : super.internal();
+ @DomName('HTMLBodyElement.beforeunload')
+ @DocsEditable
static const EventStreamProvider<Event> beforeUnloadEvent = const EventStreamProvider<Event>('beforeunload');
+ @DomName('HTMLBodyElement.blur')
+ @DocsEditable
static const EventStreamProvider<Event> blurEvent = const EventStreamProvider<Event>('blur');
+ @DomName('HTMLBodyElement.error')
+ @DocsEditable
static const EventStreamProvider<Event> errorEvent = const EventStreamProvider<Event>('error');
+ @DomName('HTMLBodyElement.focus')
+ @DocsEditable
static const EventStreamProvider<Event> focusEvent = const EventStreamProvider<Event>('focus');
- static const EventStreamProvider<HashChangeEvent> hashChangeEvent = const EventStreamProvider<HashChangeEvent>('hashchange');
+ @DomName('HTMLBodyElement.hashchange')
+ @DocsEditable
+ static const EventStreamProvider<Event> hashChangeEvent = const EventStreamProvider<Event>('hashchange');
+ @DomName('HTMLBodyElement.load')
+ @DocsEditable
static const EventStreamProvider<Event> loadEvent = const EventStreamProvider<Event>('load');
+ @DomName('HTMLBodyElement.message')
+ @DocsEditable
static const EventStreamProvider<MessageEvent> messageEvent = const EventStreamProvider<MessageEvent>('message');
+ @DomName('HTMLBodyElement.offline')
+ @DocsEditable
static const EventStreamProvider<Event> offlineEvent = const EventStreamProvider<Event>('offline');
+ @DomName('HTMLBodyElement.online')
+ @DocsEditable
static const EventStreamProvider<Event> onlineEvent = const EventStreamProvider<Event>('online');
+ @DomName('HTMLBodyElement.popstate')
+ @DocsEditable
static const EventStreamProvider<PopStateEvent> popStateEvent = const EventStreamProvider<PopStateEvent>('popstate');
+ @DomName('HTMLBodyElement.resize')
+ @DocsEditable
static const EventStreamProvider<Event> resizeEvent = const EventStreamProvider<Event>('resize');
+ @DomName('HTMLBodyElement.storage')
+ @DocsEditable
static const EventStreamProvider<StorageEvent> storageEvent = const EventStreamProvider<StorageEvent>('storage');
+ @DomName('HTMLBodyElement.unload')
+ @DocsEditable
static const EventStreamProvider<Event> unloadEvent = const EventStreamProvider<Event>('unload');
@DocsEditable
@@ -871,38 +954,66 @@
@DocsEditable
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
+ @deprecated
BodyElementEvents get on =>
new BodyElementEvents(this);
+ @DomName('HTMLBodyElement.beforeunload')
+ @DocsEditable
Stream<Event> get onBeforeUnload => beforeUnloadEvent.forTarget(this);
+ @DomName('HTMLBodyElement.blur')
+ @DocsEditable
Stream<Event> get onBlur => blurEvent.forTarget(this);
+ @DomName('HTMLBodyElement.error')
+ @DocsEditable
Stream<Event> get onError => errorEvent.forTarget(this);
+ @DomName('HTMLBodyElement.focus')
+ @DocsEditable
Stream<Event> get onFocus => focusEvent.forTarget(this);
- Stream<HashChangeEvent> get onHashChange => hashChangeEvent.forTarget(this);
+ @DomName('HTMLBodyElement.hashchange')
+ @DocsEditable
+ Stream<Event> get onHashChange => hashChangeEvent.forTarget(this);
+ @DomName('HTMLBodyElement.load')
+ @DocsEditable
Stream<Event> get onLoad => loadEvent.forTarget(this);
+ @DomName('HTMLBodyElement.message')
+ @DocsEditable
Stream<MessageEvent> get onMessage => messageEvent.forTarget(this);
+ @DomName('HTMLBodyElement.offline')
+ @DocsEditable
Stream<Event> get onOffline => offlineEvent.forTarget(this);
+ @DomName('HTMLBodyElement.online')
+ @DocsEditable
Stream<Event> get onOnline => onlineEvent.forTarget(this);
+ @DomName('HTMLBodyElement.popstate')
+ @DocsEditable
Stream<PopStateEvent> get onPopState => popStateEvent.forTarget(this);
+ @DomName('HTMLBodyElement.resize')
+ @DocsEditable
Stream<Event> get onResize => resizeEvent.forTarget(this);
+ @DomName('HTMLBodyElement.storage')
+ @DocsEditable
Stream<StorageEvent> get onStorage => storageEvent.forTarget(this);
+ @DomName('HTMLBodyElement.unload')
+ @DocsEditable
Stream<Event> get onUnload => unloadEvent.forTarget(this);
}
@DocsEditable
+@deprecated
class BodyElementEvents extends ElementEvents {
@DocsEditable
BodyElementEvents(EventTarget _ptr) : super(_ptr);
@@ -961,112 +1072,112 @@
@DocsEditable
factory ButtonElement() => document.$dom_createElement("button");
- @DocsEditable
@DomName('HTMLButtonElement.autofocus')
+ @DocsEditable
bool get autofocus native "HTMLButtonElement_autofocus_Getter";
- @DocsEditable
@DomName('HTMLButtonElement.autofocus')
+ @DocsEditable
void set autofocus(bool value) native "HTMLButtonElement_autofocus_Setter";
- @DocsEditable
@DomName('HTMLButtonElement.disabled')
+ @DocsEditable
bool get disabled native "HTMLButtonElement_disabled_Getter";
- @DocsEditable
@DomName('HTMLButtonElement.disabled')
+ @DocsEditable
void set disabled(bool value) native "HTMLButtonElement_disabled_Setter";
- @DocsEditable
@DomName('HTMLButtonElement.form')
+ @DocsEditable
FormElement get form native "HTMLButtonElement_form_Getter";
- @DocsEditable
@DomName('HTMLButtonElement.formAction')
+ @DocsEditable
String get formAction native "HTMLButtonElement_formAction_Getter";
- @DocsEditable
@DomName('HTMLButtonElement.formAction')
+ @DocsEditable
void set formAction(String value) native "HTMLButtonElement_formAction_Setter";
- @DocsEditable
@DomName('HTMLButtonElement.formEnctype')
+ @DocsEditable
String get formEnctype native "HTMLButtonElement_formEnctype_Getter";
- @DocsEditable
@DomName('HTMLButtonElement.formEnctype')
+ @DocsEditable
void set formEnctype(String value) native "HTMLButtonElement_formEnctype_Setter";
- @DocsEditable
@DomName('HTMLButtonElement.formMethod')
+ @DocsEditable
String get formMethod native "HTMLButtonElement_formMethod_Getter";
- @DocsEditable
@DomName('HTMLButtonElement.formMethod')
+ @DocsEditable
void set formMethod(String value) native "HTMLButtonElement_formMethod_Setter";
- @DocsEditable
@DomName('HTMLButtonElement.formNoValidate')
+ @DocsEditable
bool get formNoValidate native "HTMLButtonElement_formNoValidate_Getter";
- @DocsEditable
@DomName('HTMLButtonElement.formNoValidate')
+ @DocsEditable
void set formNoValidate(bool value) native "HTMLButtonElement_formNoValidate_Setter";
- @DocsEditable
@DomName('HTMLButtonElement.formTarget')
+ @DocsEditable
String get formTarget native "HTMLButtonElement_formTarget_Getter";
- @DocsEditable
@DomName('HTMLButtonElement.formTarget')
+ @DocsEditable
void set formTarget(String value) native "HTMLButtonElement_formTarget_Setter";
- @DocsEditable
@DomName('HTMLButtonElement.labels')
+ @DocsEditable
List<Node> get labels native "HTMLButtonElement_labels_Getter";
- @DocsEditable
@DomName('HTMLButtonElement.name')
+ @DocsEditable
String get name native "HTMLButtonElement_name_Getter";
- @DocsEditable
@DomName('HTMLButtonElement.name')
+ @DocsEditable
void set name(String value) native "HTMLButtonElement_name_Setter";
- @DocsEditable
@DomName('HTMLButtonElement.type')
+ @DocsEditable
String get type native "HTMLButtonElement_type_Getter";
- @DocsEditable
@DomName('HTMLButtonElement.type')
+ @DocsEditable
void set type(String value) native "HTMLButtonElement_type_Setter";
- @DocsEditable
@DomName('HTMLButtonElement.validationMessage')
+ @DocsEditable
String get validationMessage native "HTMLButtonElement_validationMessage_Getter";
- @DocsEditable
@DomName('HTMLButtonElement.validity')
+ @DocsEditable
ValidityState get validity native "HTMLButtonElement_validity_Getter";
- @DocsEditable
@DomName('HTMLButtonElement.value')
+ @DocsEditable
String get value native "HTMLButtonElement_value_Getter";
- @DocsEditable
@DomName('HTMLButtonElement.value')
+ @DocsEditable
void set value(String value) native "HTMLButtonElement_value_Setter";
- @DocsEditable
@DomName('HTMLButtonElement.willValidate')
+ @DocsEditable
bool get willValidate native "HTMLButtonElement_willValidate_Getter";
- @DocsEditable
@DomName('HTMLButtonElement.checkValidity')
+ @DocsEditable
bool checkValidity() native "HTMLButtonElement_checkValidity_Callback";
- @DocsEditable
@DomName('HTMLButtonElement.setCustomValidity')
+ @DocsEditable
void setCustomValidity(String error) native "HTMLButtonElement_setCustomValidity_Callback";
}
@@ -1088,7 +1199,6 @@
// BSD-style license that can be found in the LICENSE file.
-@DocsEditable
@DomName('HTMLCanvasElement')
class CanvasElement extends _Element_Merged {
CanvasElement.internal() : super.internal();
@@ -1101,28 +1211,28 @@
return e;
}
- @DocsEditable
@DomName('HTMLCanvasElement.height')
+ @DocsEditable
int get height native "HTMLCanvasElement_height_Getter";
- @DocsEditable
@DomName('HTMLCanvasElement.height')
+ @DocsEditable
void set height(int value) native "HTMLCanvasElement_height_Setter";
- @DocsEditable
@DomName('HTMLCanvasElement.width')
+ @DocsEditable
int get width native "HTMLCanvasElement_width_Getter";
- @DocsEditable
@DomName('HTMLCanvasElement.width')
+ @DocsEditable
void set width(int value) native "HTMLCanvasElement_width_Setter";
- @DocsEditable
@DomName('HTMLCanvasElement.getContext')
+ @DocsEditable
Object getContext(String contextId) native "HTMLCanvasElement_getContext_Callback";
- @DocsEditable
@DomName('HTMLCanvasElement.toDataURL')
+ @DocsEditable
String toDataUrl(String type, [num quality]) native "HTMLCanvasElement_toDataURL_Callback";
@@ -1140,8 +1250,8 @@
class CanvasGradient extends NativeFieldWrapperClass1 {
CanvasGradient.internal();
- @DocsEditable
@DomName('CanvasGradient.addColorStop')
+ @DocsEditable
void addColorStop(num offset, String color) native "CanvasGradient_addColorStop_Callback";
}
@@ -1170,8 +1280,8 @@
class CanvasRenderingContext extends NativeFieldWrapperClass1 {
CanvasRenderingContext.internal();
- @DocsEditable
@DomName('CanvasRenderingContext.canvas')
+ @DocsEditable
CanvasElement get canvas native "CanvasRenderingContext_canvas_Getter";
}
@@ -1180,193 +1290,192 @@
// BSD-style license that can be found in the LICENSE file.
-@DocsEditable
@DomName('CanvasRenderingContext2D')
class CanvasRenderingContext2D extends CanvasRenderingContext {
CanvasRenderingContext2D.internal() : super.internal();
- @DocsEditable
@DomName('CanvasRenderingContext2D.fillStyle')
+ @DocsEditable
dynamic get fillStyle native "CanvasRenderingContext2D_fillStyle_Getter";
- @DocsEditable
@DomName('CanvasRenderingContext2D.fillStyle')
+ @DocsEditable
void set fillStyle(dynamic value) native "CanvasRenderingContext2D_fillStyle_Setter";
- @DocsEditable
@DomName('CanvasRenderingContext2D.font')
+ @DocsEditable
String get font native "CanvasRenderingContext2D_font_Getter";
- @DocsEditable
@DomName('CanvasRenderingContext2D.font')
+ @DocsEditable
void set font(String value) native "CanvasRenderingContext2D_font_Setter";
- @DocsEditable
@DomName('CanvasRenderingContext2D.globalAlpha')
+ @DocsEditable
num get globalAlpha native "CanvasRenderingContext2D_globalAlpha_Getter";
- @DocsEditable
@DomName('CanvasRenderingContext2D.globalAlpha')
+ @DocsEditable
void set globalAlpha(num value) native "CanvasRenderingContext2D_globalAlpha_Setter";
- @DocsEditable
@DomName('CanvasRenderingContext2D.globalCompositeOperation')
+ @DocsEditable
String get globalCompositeOperation native "CanvasRenderingContext2D_globalCompositeOperation_Getter";
- @DocsEditable
@DomName('CanvasRenderingContext2D.globalCompositeOperation')
+ @DocsEditable
void set globalCompositeOperation(String value) native "CanvasRenderingContext2D_globalCompositeOperation_Setter";
- @DocsEditable
@DomName('CanvasRenderingContext2D.lineCap')
+ @DocsEditable
String get lineCap native "CanvasRenderingContext2D_lineCap_Getter";
- @DocsEditable
@DomName('CanvasRenderingContext2D.lineCap')
+ @DocsEditable
void set lineCap(String value) native "CanvasRenderingContext2D_lineCap_Setter";
- @DocsEditable
@DomName('CanvasRenderingContext2D.lineDashOffset')
+ @DocsEditable
num get lineDashOffset native "CanvasRenderingContext2D_lineDashOffset_Getter";
- @DocsEditable
@DomName('CanvasRenderingContext2D.lineDashOffset')
+ @DocsEditable
void set lineDashOffset(num value) native "CanvasRenderingContext2D_lineDashOffset_Setter";
- @DocsEditable
@DomName('CanvasRenderingContext2D.lineJoin')
+ @DocsEditable
String get lineJoin native "CanvasRenderingContext2D_lineJoin_Getter";
- @DocsEditable
@DomName('CanvasRenderingContext2D.lineJoin')
+ @DocsEditable
void set lineJoin(String value) native "CanvasRenderingContext2D_lineJoin_Setter";
- @DocsEditable
@DomName('CanvasRenderingContext2D.lineWidth')
+ @DocsEditable
num get lineWidth native "CanvasRenderingContext2D_lineWidth_Getter";
- @DocsEditable
@DomName('CanvasRenderingContext2D.lineWidth')
+ @DocsEditable
void set lineWidth(num value) native "CanvasRenderingContext2D_lineWidth_Setter";
- @DocsEditable
@DomName('CanvasRenderingContext2D.miterLimit')
+ @DocsEditable
num get miterLimit native "CanvasRenderingContext2D_miterLimit_Getter";
- @DocsEditable
@DomName('CanvasRenderingContext2D.miterLimit')
+ @DocsEditable
void set miterLimit(num value) native "CanvasRenderingContext2D_miterLimit_Setter";
- @DocsEditable
@DomName('CanvasRenderingContext2D.shadowBlur')
+ @DocsEditable
num get shadowBlur native "CanvasRenderingContext2D_shadowBlur_Getter";
- @DocsEditable
@DomName('CanvasRenderingContext2D.shadowBlur')
+ @DocsEditable
void set shadowBlur(num value) native "CanvasRenderingContext2D_shadowBlur_Setter";
- @DocsEditable
@DomName('CanvasRenderingContext2D.shadowColor')
+ @DocsEditable
String get shadowColor native "CanvasRenderingContext2D_shadowColor_Getter";
- @DocsEditable
@DomName('CanvasRenderingContext2D.shadowColor')
+ @DocsEditable
void set shadowColor(String value) native "CanvasRenderingContext2D_shadowColor_Setter";
- @DocsEditable
@DomName('CanvasRenderingContext2D.shadowOffsetX')
+ @DocsEditable
num get shadowOffsetX native "CanvasRenderingContext2D_shadowOffsetX_Getter";
- @DocsEditable
@DomName('CanvasRenderingContext2D.shadowOffsetX')
+ @DocsEditable
void set shadowOffsetX(num value) native "CanvasRenderingContext2D_shadowOffsetX_Setter";
- @DocsEditable
@DomName('CanvasRenderingContext2D.shadowOffsetY')
+ @DocsEditable
num get shadowOffsetY native "CanvasRenderingContext2D_shadowOffsetY_Getter";
- @DocsEditable
@DomName('CanvasRenderingContext2D.shadowOffsetY')
+ @DocsEditable
void set shadowOffsetY(num value) native "CanvasRenderingContext2D_shadowOffsetY_Setter";
- @DocsEditable
@DomName('CanvasRenderingContext2D.strokeStyle')
+ @DocsEditable
dynamic get strokeStyle native "CanvasRenderingContext2D_strokeStyle_Getter";
- @DocsEditable
@DomName('CanvasRenderingContext2D.strokeStyle')
+ @DocsEditable
void set strokeStyle(dynamic value) native "CanvasRenderingContext2D_strokeStyle_Setter";
- @DocsEditable
@DomName('CanvasRenderingContext2D.textAlign')
+ @DocsEditable
String get textAlign native "CanvasRenderingContext2D_textAlign_Getter";
- @DocsEditable
@DomName('CanvasRenderingContext2D.textAlign')
+ @DocsEditable
void set textAlign(String value) native "CanvasRenderingContext2D_textAlign_Setter";
- @DocsEditable
@DomName('CanvasRenderingContext2D.textBaseline')
+ @DocsEditable
String get textBaseline native "CanvasRenderingContext2D_textBaseline_Getter";
- @DocsEditable
@DomName('CanvasRenderingContext2D.textBaseline')
+ @DocsEditable
void set textBaseline(String value) native "CanvasRenderingContext2D_textBaseline_Setter";
- @DocsEditable
@DomName('CanvasRenderingContext2D.webkitBackingStorePixelRatio')
+ @DocsEditable
num get webkitBackingStorePixelRatio native "CanvasRenderingContext2D_webkitBackingStorePixelRatio_Getter";
- @DocsEditable
@DomName('CanvasRenderingContext2D.webkitImageSmoothingEnabled')
+ @DocsEditable
bool get webkitImageSmoothingEnabled native "CanvasRenderingContext2D_webkitImageSmoothingEnabled_Getter";
- @DocsEditable
@DomName('CanvasRenderingContext2D.webkitImageSmoothingEnabled')
+ @DocsEditable
void set webkitImageSmoothingEnabled(bool value) native "CanvasRenderingContext2D_webkitImageSmoothingEnabled_Setter";
- @DocsEditable
@DomName('CanvasRenderingContext2D.webkitLineDash')
+ @DocsEditable
List get webkitLineDash native "CanvasRenderingContext2D_webkitLineDash_Getter";
- @DocsEditable
@DomName('CanvasRenderingContext2D.webkitLineDash')
+ @DocsEditable
void set webkitLineDash(List value) native "CanvasRenderingContext2D_webkitLineDash_Setter";
- @DocsEditable
@DomName('CanvasRenderingContext2D.webkitLineDashOffset')
+ @DocsEditable
num get webkitLineDashOffset native "CanvasRenderingContext2D_webkitLineDashOffset_Getter";
- @DocsEditable
@DomName('CanvasRenderingContext2D.webkitLineDashOffset')
+ @DocsEditable
void set webkitLineDashOffset(num value) native "CanvasRenderingContext2D_webkitLineDashOffset_Setter";
- @DocsEditable
@DomName('CanvasRenderingContext2D.arc')
+ @DocsEditable
void arc(num x, num y, num radius, num startAngle, num endAngle, bool anticlockwise) native "CanvasRenderingContext2D_arc_Callback";
- @DocsEditable
@DomName('CanvasRenderingContext2D.arcTo')
+ @DocsEditable
void arcTo(num x1, num y1, num x2, num y2, num radius) native "CanvasRenderingContext2D_arcTo_Callback";
- @DocsEditable
@DomName('CanvasRenderingContext2D.beginPath')
+ @DocsEditable
void beginPath() native "CanvasRenderingContext2D_beginPath_Callback";
- @DocsEditable
@DomName('CanvasRenderingContext2D.bezierCurveTo')
+ @DocsEditable
void bezierCurveTo(num cp1x, num cp1y, num cp2x, num cp2y, num x, num y) native "CanvasRenderingContext2D_bezierCurveTo_Callback";
- @DocsEditable
@DomName('CanvasRenderingContext2D.clearRect')
+ @DocsEditable
void clearRect(num x, num y, num width, num height) native "CanvasRenderingContext2D_clearRect_Callback";
- @DocsEditable
@DomName('CanvasRenderingContext2D.clip')
+ @DocsEditable
void clip() native "CanvasRenderingContext2D_clip_Callback";
- @DocsEditable
@DomName('CanvasRenderingContext2D.closePath')
+ @DocsEditable
void closePath() native "CanvasRenderingContext2D_closePath_Callback";
ImageData createImageData(imagedata_OR_sw, [num sh]) {
@@ -1379,16 +1488,16 @@
throw new ArgumentError("Incorrect number or type of arguments");
}
+ @DomName('CanvasRenderingContext2D._createImageData_1')
@DocsEditable
- @DomName('CanvasRenderingContext2D.createImageData_1')
- ImageData _createImageData_1(imagedata_OR_sw) native "CanvasRenderingContext2D_createImageData_1_Callback";
+ ImageData _createImageData_1(imagedata_OR_sw) native "CanvasRenderingContext2D__createImageData_1_Callback";
+ @DomName('CanvasRenderingContext2D._createImageData_2')
@DocsEditable
- @DomName('CanvasRenderingContext2D.createImageData_2')
- ImageData _createImageData_2(imagedata_OR_sw, sh) native "CanvasRenderingContext2D_createImageData_2_Callback";
+ ImageData _createImageData_2(imagedata_OR_sw, sh) native "CanvasRenderingContext2D__createImageData_2_Callback";
- @DocsEditable
@DomName('CanvasRenderingContext2D.createLinearGradient')
+ @DocsEditable
CanvasGradient createLinearGradient(num x0, num y0, num x1, num y1) native "CanvasRenderingContext2D_createLinearGradient_Callback";
CanvasPattern createPattern(canvas_OR_image, String repetitionType) {
@@ -1401,16 +1510,16 @@
throw new ArgumentError("Incorrect number or type of arguments");
}
+ @DomName('CanvasRenderingContext2D._createPattern_1')
@DocsEditable
- @DomName('CanvasRenderingContext2D.createPattern_1')
- CanvasPattern _createPattern_1(canvas_OR_image, repetitionType) native "CanvasRenderingContext2D_createPattern_1_Callback";
+ CanvasPattern _createPattern_1(canvas_OR_image, repetitionType) native "CanvasRenderingContext2D__createPattern_1_Callback";
+ @DomName('CanvasRenderingContext2D._createPattern_2')
@DocsEditable
- @DomName('CanvasRenderingContext2D.createPattern_2')
- CanvasPattern _createPattern_2(canvas_OR_image, repetitionType) native "CanvasRenderingContext2D_createPattern_2_Callback";
+ CanvasPattern _createPattern_2(canvas_OR_image, repetitionType) native "CanvasRenderingContext2D__createPattern_2_Callback";
- @DocsEditable
@DomName('CanvasRenderingContext2D.createRadialGradient')
+ @DocsEditable
CanvasGradient createRadialGradient(num x0, num y0, num r0, num x1, num y1, num r1) native "CanvasRenderingContext2D_createRadialGradient_Callback";
void drawImage(canvas_OR_image_OR_video, num sx_OR_x, num sy_OR_y, [num sw_OR_width, num height_OR_sh, num dx, num dy, num dw, num dh]) {
@@ -1453,48 +1562,48 @@
throw new ArgumentError("Incorrect number or type of arguments");
}
+ @DomName('CanvasRenderingContext2D._drawImage_1')
@DocsEditable
- @DomName('CanvasRenderingContext2D.drawImage_1')
- void _drawImage_1(canvas_OR_image_OR_video, sx_OR_x, sy_OR_y) native "CanvasRenderingContext2D_drawImage_1_Callback";
+ void _drawImage_1(canvas_OR_image_OR_video, sx_OR_x, sy_OR_y) native "CanvasRenderingContext2D__drawImage_1_Callback";
+ @DomName('CanvasRenderingContext2D._drawImage_2')
@DocsEditable
- @DomName('CanvasRenderingContext2D.drawImage_2')
- void _drawImage_2(canvas_OR_image_OR_video, sx_OR_x, sy_OR_y, sw_OR_width, height_OR_sh) native "CanvasRenderingContext2D_drawImage_2_Callback";
+ void _drawImage_2(canvas_OR_image_OR_video, sx_OR_x, sy_OR_y, sw_OR_width, height_OR_sh) native "CanvasRenderingContext2D__drawImage_2_Callback";
+ @DomName('CanvasRenderingContext2D._drawImage_3')
@DocsEditable
- @DomName('CanvasRenderingContext2D.drawImage_3')
- void _drawImage_3(canvas_OR_image_OR_video, sx_OR_x, sy_OR_y, sw_OR_width, height_OR_sh, dx, dy, dw, dh) native "CanvasRenderingContext2D_drawImage_3_Callback";
+ void _drawImage_3(canvas_OR_image_OR_video, sx_OR_x, sy_OR_y, sw_OR_width, height_OR_sh, dx, dy, dw, dh) native "CanvasRenderingContext2D__drawImage_3_Callback";
+ @DomName('CanvasRenderingContext2D._drawImage_4')
@DocsEditable
- @DomName('CanvasRenderingContext2D.drawImage_4')
- void _drawImage_4(canvas_OR_image_OR_video, sx_OR_x, sy_OR_y) native "CanvasRenderingContext2D_drawImage_4_Callback";
+ void _drawImage_4(canvas_OR_image_OR_video, sx_OR_x, sy_OR_y) native "CanvasRenderingContext2D__drawImage_4_Callback";
+ @DomName('CanvasRenderingContext2D._drawImage_5')
@DocsEditable
- @DomName('CanvasRenderingContext2D.drawImage_5')
- void _drawImage_5(canvas_OR_image_OR_video, sx_OR_x, sy_OR_y, sw_OR_width, height_OR_sh) native "CanvasRenderingContext2D_drawImage_5_Callback";
+ void _drawImage_5(canvas_OR_image_OR_video, sx_OR_x, sy_OR_y, sw_OR_width, height_OR_sh) native "CanvasRenderingContext2D__drawImage_5_Callback";
+ @DomName('CanvasRenderingContext2D._drawImage_6')
@DocsEditable
- @DomName('CanvasRenderingContext2D.drawImage_6')
- void _drawImage_6(canvas_OR_image_OR_video, sx_OR_x, sy_OR_y, sw_OR_width, height_OR_sh, dx, dy, dw, dh) native "CanvasRenderingContext2D_drawImage_6_Callback";
+ void _drawImage_6(canvas_OR_image_OR_video, sx_OR_x, sy_OR_y, sw_OR_width, height_OR_sh, dx, dy, dw, dh) native "CanvasRenderingContext2D__drawImage_6_Callback";
+ @DomName('CanvasRenderingContext2D._drawImage_7')
@DocsEditable
- @DomName('CanvasRenderingContext2D.drawImage_7')
- void _drawImage_7(canvas_OR_image_OR_video, sx_OR_x, sy_OR_y) native "CanvasRenderingContext2D_drawImage_7_Callback";
+ void _drawImage_7(canvas_OR_image_OR_video, sx_OR_x, sy_OR_y) native "CanvasRenderingContext2D__drawImage_7_Callback";
+ @DomName('CanvasRenderingContext2D._drawImage_8')
@DocsEditable
- @DomName('CanvasRenderingContext2D.drawImage_8')
- void _drawImage_8(canvas_OR_image_OR_video, sx_OR_x, sy_OR_y, sw_OR_width, height_OR_sh) native "CanvasRenderingContext2D_drawImage_8_Callback";
+ void _drawImage_8(canvas_OR_image_OR_video, sx_OR_x, sy_OR_y, sw_OR_width, height_OR_sh) native "CanvasRenderingContext2D__drawImage_8_Callback";
+ @DomName('CanvasRenderingContext2D._drawImage_9')
@DocsEditable
- @DomName('CanvasRenderingContext2D.drawImage_9')
- void _drawImage_9(canvas_OR_image_OR_video, sx_OR_x, sy_OR_y, sw_OR_width, height_OR_sh, dx, dy, dw, dh) native "CanvasRenderingContext2D_drawImage_9_Callback";
+ void _drawImage_9(canvas_OR_image_OR_video, sx_OR_x, sy_OR_y, sw_OR_width, height_OR_sh, dx, dy, dw, dh) native "CanvasRenderingContext2D__drawImage_9_Callback";
- @DocsEditable
@DomName('CanvasRenderingContext2D.fill')
+ @DocsEditable
void fill() native "CanvasRenderingContext2D_fill_Callback";
- @DocsEditable
@DomName('CanvasRenderingContext2D.fillRect')
+ @DocsEditable
void fillRect(num x, num y, num width, num height) native "CanvasRenderingContext2D_fillRect_Callback";
void fillText(String text, num x, num y, [num maxWidth]) {
@@ -1503,38 +1612,39 @@
return;
}
_fillText_2(text, x, y);
+ return;
}
+ @DomName('CanvasRenderingContext2D._fillText_1')
@DocsEditable
- @DomName('CanvasRenderingContext2D.fillText_1')
- void _fillText_1(text, x, y, maxWidth) native "CanvasRenderingContext2D_fillText_1_Callback";
+ void _fillText_1(text, x, y, maxWidth) native "CanvasRenderingContext2D__fillText_1_Callback";
+ @DomName('CanvasRenderingContext2D._fillText_2')
@DocsEditable
- @DomName('CanvasRenderingContext2D.fillText_2')
- void _fillText_2(text, x, y) native "CanvasRenderingContext2D_fillText_2_Callback";
+ void _fillText_2(text, x, y) native "CanvasRenderingContext2D__fillText_2_Callback";
- @DocsEditable
@DomName('CanvasRenderingContext2D.getImageData')
+ @DocsEditable
ImageData getImageData(num sx, num sy, num sw, num sh) native "CanvasRenderingContext2D_getImageData_Callback";
- @DocsEditable
@DomName('CanvasRenderingContext2D.getLineDash')
+ @DocsEditable
List<num> getLineDash() native "CanvasRenderingContext2D_getLineDash_Callback";
- @DocsEditable
@DomName('CanvasRenderingContext2D.isPointInPath')
+ @DocsEditable
bool isPointInPath(num x, num y) native "CanvasRenderingContext2D_isPointInPath_Callback";
- @DocsEditable
@DomName('CanvasRenderingContext2D.lineTo')
+ @DocsEditable
void lineTo(num x, num y) native "CanvasRenderingContext2D_lineTo_Callback";
- @DocsEditable
@DomName('CanvasRenderingContext2D.measureText')
+ @DocsEditable
TextMetrics measureText(String text) native "CanvasRenderingContext2D_measureText_Callback";
- @DocsEditable
@DomName('CanvasRenderingContext2D.moveTo')
+ @DocsEditable
void moveTo(num x, num y) native "CanvasRenderingContext2D_moveTo_Callback";
void putImageData(ImageData imagedata, num dx, num dy, [num dirtyX, num dirtyY, num dirtyWidth, num dirtyHeight]) {
@@ -1549,48 +1659,48 @@
throw new ArgumentError("Incorrect number or type of arguments");
}
+ @DomName('CanvasRenderingContext2D._putImageData_1')
@DocsEditable
- @DomName('CanvasRenderingContext2D.putImageData_1')
- void _putImageData_1(imagedata, dx, dy) native "CanvasRenderingContext2D_putImageData_1_Callback";
+ void _putImageData_1(imagedata, dx, dy) native "CanvasRenderingContext2D__putImageData_1_Callback";
+ @DomName('CanvasRenderingContext2D._putImageData_2')
@DocsEditable
- @DomName('CanvasRenderingContext2D.putImageData_2')
- void _putImageData_2(imagedata, dx, dy, dirtyX, dirtyY, dirtyWidth, dirtyHeight) native "CanvasRenderingContext2D_putImageData_2_Callback";
+ void _putImageData_2(imagedata, dx, dy, dirtyX, dirtyY, dirtyWidth, dirtyHeight) native "CanvasRenderingContext2D__putImageData_2_Callback";
- @DocsEditable
@DomName('CanvasRenderingContext2D.quadraticCurveTo')
+ @DocsEditable
void quadraticCurveTo(num cpx, num cpy, num x, num y) native "CanvasRenderingContext2D_quadraticCurveTo_Callback";
- @DocsEditable
@DomName('CanvasRenderingContext2D.rect')
+ @DocsEditable
void rect(num x, num y, num width, num height) native "CanvasRenderingContext2D_rect_Callback";
- @DocsEditable
@DomName('CanvasRenderingContext2D.restore')
+ @DocsEditable
void restore() native "CanvasRenderingContext2D_restore_Callback";
- @DocsEditable
@DomName('CanvasRenderingContext2D.rotate')
+ @DocsEditable
void rotate(num angle) native "CanvasRenderingContext2D_rotate_Callback";
- @DocsEditable
@DomName('CanvasRenderingContext2D.save')
+ @DocsEditable
void save() native "CanvasRenderingContext2D_save_Callback";
- @DocsEditable
@DomName('CanvasRenderingContext2D.scale')
+ @DocsEditable
void scale(num sx, num sy) native "CanvasRenderingContext2D_scale_Callback";
- @DocsEditable
@DomName('CanvasRenderingContext2D.setLineDash')
+ @DocsEditable
void setLineDash(List<num> dash) native "CanvasRenderingContext2D_setLineDash_Callback";
- @DocsEditable
@DomName('CanvasRenderingContext2D.setTransform')
+ @DocsEditable
void setTransform(num m11, num m12, num m21, num m22, num dx, num dy) native "CanvasRenderingContext2D_setTransform_Callback";
- @DocsEditable
@DomName('CanvasRenderingContext2D.stroke')
+ @DocsEditable
void stroke() native "CanvasRenderingContext2D_stroke_Callback";
void strokeRect(num x, num y, num width, num height, [num lineWidth]) {
@@ -1599,15 +1709,16 @@
return;
}
_strokeRect_2(x, y, width, height);
+ return;
}
+ @DomName('CanvasRenderingContext2D._strokeRect_1')
@DocsEditable
- @DomName('CanvasRenderingContext2D.strokeRect_1')
- void _strokeRect_1(x, y, width, height, lineWidth) native "CanvasRenderingContext2D_strokeRect_1_Callback";
+ void _strokeRect_1(x, y, width, height, lineWidth) native "CanvasRenderingContext2D__strokeRect_1_Callback";
+ @DomName('CanvasRenderingContext2D._strokeRect_2')
@DocsEditable
- @DomName('CanvasRenderingContext2D.strokeRect_2')
- void _strokeRect_2(x, y, width, height) native "CanvasRenderingContext2D_strokeRect_2_Callback";
+ void _strokeRect_2(x, y, width, height) native "CanvasRenderingContext2D__strokeRect_2_Callback";
void strokeText(String text, num x, num y, [num maxWidth]) {
if (?maxWidth) {
@@ -1615,26 +1726,27 @@
return;
}
_strokeText_2(text, x, y);
+ return;
}
+ @DomName('CanvasRenderingContext2D._strokeText_1')
@DocsEditable
- @DomName('CanvasRenderingContext2D.strokeText_1')
- void _strokeText_1(text, x, y, maxWidth) native "CanvasRenderingContext2D_strokeText_1_Callback";
+ void _strokeText_1(text, x, y, maxWidth) native "CanvasRenderingContext2D__strokeText_1_Callback";
+ @DomName('CanvasRenderingContext2D._strokeText_2')
@DocsEditable
- @DomName('CanvasRenderingContext2D.strokeText_2')
- void _strokeText_2(text, x, y) native "CanvasRenderingContext2D_strokeText_2_Callback";
+ void _strokeText_2(text, x, y) native "CanvasRenderingContext2D__strokeText_2_Callback";
- @DocsEditable
@DomName('CanvasRenderingContext2D.transform')
+ @DocsEditable
void transform(num m11, num m12, num m21, num m22, num dx, num dy) native "CanvasRenderingContext2D_transform_Callback";
- @DocsEditable
@DomName('CanvasRenderingContext2D.translate')
+ @DocsEditable
void translate(num tx, num ty) native "CanvasRenderingContext2D_translate_Callback";
- @DocsEditable
@DomName('CanvasRenderingContext2D.webkitGetImageDataHD')
+ @DocsEditable
ImageData webkitGetImageDataHD(num sx, num sy, num sw, num sh) native "CanvasRenderingContext2D_webkitGetImageDataHD_Callback";
void webkitPutImageDataHD(ImageData imagedata, num dx, num dy, [num dirtyX, num dirtyY, num dirtyWidth, num dirtyHeight]) {
@@ -1649,13 +1761,13 @@
throw new ArgumentError("Incorrect number or type of arguments");
}
+ @DomName('CanvasRenderingContext2D._webkitPutImageDataHD_1')
@DocsEditable
- @DomName('CanvasRenderingContext2D.webkitPutImageDataHD_1')
- void _webkitPutImageDataHD_1(imagedata, dx, dy) native "CanvasRenderingContext2D_webkitPutImageDataHD_1_Callback";
+ void _webkitPutImageDataHD_1(imagedata, dx, dy) native "CanvasRenderingContext2D__webkitPutImageDataHD_1_Callback";
+ @DomName('CanvasRenderingContext2D._webkitPutImageDataHD_2')
@DocsEditable
- @DomName('CanvasRenderingContext2D.webkitPutImageDataHD_2')
- void _webkitPutImageDataHD_2(imagedata, dx, dy, dirtyX, dirtyY, dirtyWidth, dirtyHeight) native "CanvasRenderingContext2D_webkitPutImageDataHD_2_Callback";
+ void _webkitPutImageDataHD_2(imagedata, dx, dy, dirtyX, dirtyY, dirtyWidth, dirtyHeight) native "CanvasRenderingContext2D__webkitPutImageDataHD_2_Callback";
/**
@@ -1706,40 +1818,40 @@
class CharacterData extends Node {
CharacterData.internal() : super.internal();
- @DocsEditable
@DomName('CharacterData.data')
+ @DocsEditable
String get data native "CharacterData_data_Getter";
- @DocsEditable
@DomName('CharacterData.data')
+ @DocsEditable
void set data(String value) native "CharacterData_data_Setter";
- @DocsEditable
@DomName('CharacterData.length')
+ @DocsEditable
int get length native "CharacterData_length_Getter";
- @DocsEditable
@DomName('CharacterData.appendData')
+ @DocsEditable
void appendData(String data) native "CharacterData_appendData_Callback";
- @DocsEditable
@DomName('CharacterData.deleteData')
+ @DocsEditable
void deleteData(int offset, int length) native "CharacterData_deleteData_Callback";
- @DocsEditable
@DomName('CharacterData.insertData')
+ @DocsEditable
void insertData(int offset, String data) native "CharacterData_insertData_Callback";
- @DocsEditable
@DomName('CharacterData.remove')
+ @DocsEditable
void remove() native "CharacterData_remove_Callback";
- @DocsEditable
@DomName('CharacterData.replaceData')
+ @DocsEditable
void replaceData(int offset, int length, String data) native "CharacterData_replaceData_Callback";
- @DocsEditable
@DomName('CharacterData.substringData')
+ @DocsEditable
String substringData(int offset, int length) native "CharacterData_substringData_Callback";
}
@@ -1755,28 +1867,28 @@
class ClientRect extends NativeFieldWrapperClass1 {
ClientRect.internal();
- @DocsEditable
@DomName('ClientRect.bottom')
+ @DocsEditable
num get bottom native "ClientRect_bottom_Getter";
- @DocsEditable
@DomName('ClientRect.height')
+ @DocsEditable
num get height native "ClientRect_height_Getter";
- @DocsEditable
@DomName('ClientRect.left')
+ @DocsEditable
num get left native "ClientRect_left_Getter";
- @DocsEditable
@DomName('ClientRect.right')
+ @DocsEditable
num get right native "ClientRect_right_Getter";
- @DocsEditable
@DomName('ClientRect.top')
+ @DocsEditable
num get top native "ClientRect_top_Getter";
- @DocsEditable
@DomName('ClientRect.width')
+ @DocsEditable
num get width native "ClientRect_width_Getter";
}
@@ -1792,48 +1904,48 @@
class Clipboard extends NativeFieldWrapperClass1 {
Clipboard.internal();
- @DocsEditable
@DomName('Clipboard.dropEffect')
+ @DocsEditable
String get dropEffect native "Clipboard_dropEffect_Getter";
- @DocsEditable
@DomName('Clipboard.dropEffect')
+ @DocsEditable
void set dropEffect(String value) native "Clipboard_dropEffect_Setter";
- @DocsEditable
@DomName('Clipboard.effectAllowed')
+ @DocsEditable
String get effectAllowed native "Clipboard_effectAllowed_Getter";
- @DocsEditable
@DomName('Clipboard.effectAllowed')
+ @DocsEditable
void set effectAllowed(String value) native "Clipboard_effectAllowed_Setter";
- @DocsEditable
@DomName('Clipboard.files')
+ @DocsEditable
List<File> get files native "Clipboard_files_Getter";
- @DocsEditable
@DomName('Clipboard.items')
+ @DocsEditable
DataTransferItemList get items native "Clipboard_items_Getter";
- @DocsEditable
@DomName('Clipboard.types')
+ @DocsEditable
List get types native "Clipboard_types_Getter";
- @DocsEditable
@DomName('Clipboard.clearData')
+ @DocsEditable
void clearData([String type]) native "Clipboard_clearData_Callback";
- @DocsEditable
@DomName('Clipboard.getData')
+ @DocsEditable
String getData(String type) native "Clipboard_getData_Callback";
- @DocsEditable
@DomName('Clipboard.setData')
+ @DocsEditable
bool setData(String type, String data) native "Clipboard_setData_Callback";
- @DocsEditable
@DomName('Clipboard.setDragImage')
+ @DocsEditable
void setDragImage(ImageElement image, int x, int y) native "Clipboard_setDragImage_Callback";
}
@@ -1849,16 +1961,16 @@
class CloseEvent extends Event {
CloseEvent.internal() : super.internal();
- @DocsEditable
@DomName('CloseEvent.code')
+ @DocsEditable
int get code native "CloseEvent_code_Getter";
- @DocsEditable
@DomName('CloseEvent.reason')
+ @DocsEditable
String get reason native "CloseEvent_reason_Getter";
- @DocsEditable
@DomName('CloseEvent.wasClean')
+ @DocsEditable
bool get wasClean native "CloseEvent_wasClean_Getter";
}
@@ -1875,25 +1987,34 @@
Comment.internal() : super.internal();
}
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// WARNING: Do not edit - generated code.
-@DocsEditable
@DomName('CompositionEvent')
class CompositionEvent extends UIEvent {
+ factory CompositionEvent(String type,
+ {bool canBubble: false, bool cancelable: false, Window view,
+ String data}) {
+ if (view == null) {
+ view = window;
+ }
+ var e = document.$dom_createEvent("CompositionEvent");
+ e.$dom_initCompositionEvent(type, canBubble, cancelable, view, data);
+ return e;
+ }
CompositionEvent.internal() : super.internal();
- @DocsEditable
@DomName('CompositionEvent.data')
+ @DocsEditable
String get data native "CompositionEvent_data_Getter";
- @DocsEditable
@DomName('CompositionEvent.initCompositionEvent')
- void initCompositionEvent(String typeArg, bool canBubbleArg, bool cancelableArg, Window viewArg, String dataArg) native "CompositionEvent_initCompositionEvent_Callback";
+ @DocsEditable
+ void $dom_initCompositionEvent(String typeArg, bool canBubbleArg, bool cancelableArg, Window viewArg, String dataArg) native "CompositionEvent_initCompositionEvent_Callback";
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -1908,92 +2029,92 @@
class Console extends NativeFieldWrapperClass1 {
Console.internal();
- @DocsEditable
@DomName('Console.memory')
+ @DocsEditable
MemoryInfo get memory native "Console_memory_Getter";
- @DocsEditable
@DomName('Console.profiles')
+ @DocsEditable
List<ScriptProfile> get profiles native "Console_profiles_Getter";
- @DocsEditable
@DomName('Console.assertCondition')
+ @DocsEditable
void assertCondition(bool condition, Object arg) native "Console_assertCondition_Callback";
- @DocsEditable
@DomName('Console.clear')
+ @DocsEditable
void clear(Object arg) native "Console_clear_Callback";
- @DocsEditable
@DomName('Console.count')
+ @DocsEditable
void count(Object arg) native "Console_count_Callback";
- @DocsEditable
@DomName('Console.debug')
+ @DocsEditable
void debug(Object arg) native "Console_debug_Callback";
- @DocsEditable
@DomName('Console.dir')
+ @DocsEditable
void dir(Object arg) native "Console_dir_Callback";
- @DocsEditable
@DomName('Console.dirxml')
+ @DocsEditable
void dirxml(Object arg) native "Console_dirxml_Callback";
- @DocsEditable
@DomName('Console.error')
+ @DocsEditable
void error(Object arg) native "Console_error_Callback";
- @DocsEditable
@DomName('Console.group')
+ @DocsEditable
void group(Object arg) native "Console_group_Callback";
- @DocsEditable
@DomName('Console.groupCollapsed')
+ @DocsEditable
void groupCollapsed(Object arg) native "Console_groupCollapsed_Callback";
- @DocsEditable
@DomName('Console.groupEnd')
+ @DocsEditable
void groupEnd() native "Console_groupEnd_Callback";
- @DocsEditable
@DomName('Console.info')
+ @DocsEditable
void info(Object arg) native "Console_info_Callback";
- @DocsEditable
@DomName('Console.log')
+ @DocsEditable
void log(Object arg) native "Console_log_Callback";
- @DocsEditable
@DomName('Console.markTimeline')
+ @DocsEditable
void markTimeline() native "Console_markTimeline_Callback";
- @DocsEditable
@DomName('Console.profile')
+ @DocsEditable
void profile(String title) native "Console_profile_Callback";
- @DocsEditable
@DomName('Console.profileEnd')
+ @DocsEditable
void profileEnd(String title) native "Console_profileEnd_Callback";
- @DocsEditable
@DomName('Console.time')
+ @DocsEditable
void time(String title) native "Console_time_Callback";
- @DocsEditable
@DomName('Console.timeEnd')
+ @DocsEditable
void timeEnd(String title) native "Console_timeEnd_Callback";
- @DocsEditable
@DomName('Console.timeStamp')
+ @DocsEditable
void timeStamp() native "Console_timeStamp_Callback";
- @DocsEditable
@DomName('Console.trace')
+ @DocsEditable
void trace(Object arg) native "Console_trace_Callback";
- @DocsEditable
@DomName('Console.warn')
+ @DocsEditable
void warn(Object arg) native "Console_warn_Callback";
}
@@ -2007,7 +2128,7 @@
@DocsEditable
@DomName('HTMLContentElement')
@SupportedBrowser(SupportedBrowser.CHROME, '25')
-@Experimental()
+@Experimental
class ContentElement extends _Element_Merged {
ContentElement.internal() : super.internal();
@@ -2017,24 +2138,24 @@
/// Checks if this type is supported on the current platform.
static bool get supported => true;
- @DocsEditable
@DomName('HTMLContentElement.resetStyleInheritance')
+ @DocsEditable
bool get resetStyleInheritance native "HTMLContentElement_resetStyleInheritance_Getter";
- @DocsEditable
@DomName('HTMLContentElement.resetStyleInheritance')
+ @DocsEditable
void set resetStyleInheritance(bool value) native "HTMLContentElement_resetStyleInheritance_Setter";
- @DocsEditable
@DomName('HTMLContentElement.select')
+ @DocsEditable
String get select native "HTMLContentElement_select_Getter";
- @DocsEditable
@DomName('HTMLContentElement.select')
+ @DocsEditable
void set select(String value) native "HTMLContentElement_select_Setter";
- @DocsEditable
@DomName('HTMLContentElement.getDistributedNodes')
+ @DocsEditable
List<Node> getDistributedNodes() native "HTMLContentElement_getDistributedNodes_Callback";
}
@@ -2050,32 +2171,32 @@
class Coordinates extends NativeFieldWrapperClass1 {
Coordinates.internal();
- @DocsEditable
@DomName('Coordinates.accuracy')
+ @DocsEditable
num get accuracy native "Coordinates_accuracy_Getter";
- @DocsEditable
@DomName('Coordinates.altitude')
+ @DocsEditable
num get altitude native "Coordinates_altitude_Getter";
- @DocsEditable
@DomName('Coordinates.altitudeAccuracy')
+ @DocsEditable
num get altitudeAccuracy native "Coordinates_altitudeAccuracy_Getter";
- @DocsEditable
@DomName('Coordinates.heading')
+ @DocsEditable
num get heading native "Coordinates_heading_Getter";
- @DocsEditable
@DomName('Coordinates.latitude')
+ @DocsEditable
num get latitude native "Coordinates_latitude_Getter";
- @DocsEditable
@DomName('Coordinates.longitude')
+ @DocsEditable
num get longitude native "Coordinates_longitude_Getter";
- @DocsEditable
@DomName('Coordinates.speed')
+ @DocsEditable
num get speed native "Coordinates_speed_Getter";
}
@@ -2091,16 +2212,16 @@
class Counter extends NativeFieldWrapperClass1 {
Counter.internal();
- @DocsEditable
@DomName('Counter.identifier')
+ @DocsEditable
String get identifier native "Counter_identifier_Getter";
- @DocsEditable
@DomName('Counter.listStyle')
+ @DocsEditable
String get listStyle native "Counter_listStyle_Getter";
- @DocsEditable
@DomName('Counter.separator')
+ @DocsEditable
String get separator native "Counter_separator_Getter";
}
@@ -2116,8 +2237,8 @@
class Crypto extends NativeFieldWrapperClass1 {
Crypto.internal();
- @DocsEditable
@DomName('Crypto.getRandomValues')
+ @DocsEditable
ArrayBufferView getRandomValues(ArrayBufferView array) native "Crypto_getRandomValues_Callback";
}
@@ -2133,12 +2254,12 @@
class CssCharsetRule extends CssRule {
CssCharsetRule.internal() : super.internal();
- @DocsEditable
@DomName('CSSCharsetRule.encoding')
+ @DocsEditable
String get encoding native "CSSCharsetRule_encoding_Getter";
- @DocsEditable
@DomName('CSSCharsetRule.encoding')
+ @DocsEditable
void set encoding(String value) native "CSSCharsetRule_encoding_Setter";
}
@@ -2154,8 +2275,8 @@
class CssFontFaceRule extends CssRule {
CssFontFaceRule.internal() : super.internal();
- @DocsEditable
@DomName('CSSFontFaceRule.style')
+ @DocsEditable
CssStyleDeclaration get style native "CSSFontFaceRule_style_Getter";
}
@@ -2171,16 +2292,16 @@
class CssImportRule extends CssRule {
CssImportRule.internal() : super.internal();
- @DocsEditable
@DomName('CSSImportRule.href')
+ @DocsEditable
String get href native "CSSImportRule_href_Getter";
- @DocsEditable
@DomName('CSSImportRule.media')
+ @DocsEditable
MediaList get media native "CSSImportRule_media_Getter";
- @DocsEditable
@DomName('CSSImportRule.styleSheet')
+ @DocsEditable
CssStyleSheet get styleSheet native "CSSImportRule_styleSheet_Getter";
}
@@ -2196,16 +2317,16 @@
class CssKeyframeRule extends CssRule {
CssKeyframeRule.internal() : super.internal();
- @DocsEditable
@DomName('WebKitCSSKeyframeRule.keyText')
+ @DocsEditable
String get keyText native "WebKitCSSKeyframeRule_keyText_Getter";
- @DocsEditable
@DomName('WebKitCSSKeyframeRule.keyText')
+ @DocsEditable
void set keyText(String value) native "WebKitCSSKeyframeRule_keyText_Setter";
- @DocsEditable
@DomName('WebKitCSSKeyframeRule.style')
+ @DocsEditable
CssStyleDeclaration get style native "WebKitCSSKeyframeRule_style_Getter";
}
@@ -2221,28 +2342,28 @@
class CssKeyframesRule extends CssRule {
CssKeyframesRule.internal() : super.internal();
- @DocsEditable
@DomName('WebKitCSSKeyframesRule.cssRules')
+ @DocsEditable
List<CssRule> get cssRules native "WebKitCSSKeyframesRule_cssRules_Getter";
- @DocsEditable
@DomName('WebKitCSSKeyframesRule.name')
+ @DocsEditable
String get name native "WebKitCSSKeyframesRule_name_Getter";
- @DocsEditable
@DomName('WebKitCSSKeyframesRule.name')
+ @DocsEditable
void set name(String value) native "WebKitCSSKeyframesRule_name_Setter";
- @DocsEditable
@DomName('WebKitCSSKeyframesRule.deleteRule')
+ @DocsEditable
void deleteRule(String key) native "WebKitCSSKeyframesRule_deleteRule_Callback";
- @DocsEditable
@DomName('WebKitCSSKeyframesRule.findRule')
+ @DocsEditable
CssKeyframeRule findRule(String key) native "WebKitCSSKeyframesRule_findRule_Callback";
- @DocsEditable
@DomName('WebKitCSSKeyframesRule.insertRule')
+ @DocsEditable
void insertRule(String rule) native "WebKitCSSKeyframesRule_insertRule_Callback";
}
@@ -2267,220 +2388,220 @@
}
static CssMatrix _create([String cssValue]) native "WebKitCSSMatrix_constructor_Callback";
- @DocsEditable
@DomName('WebKitCSSMatrix.a')
+ @DocsEditable
num get a native "WebKitCSSMatrix_a_Getter";
- @DocsEditable
@DomName('WebKitCSSMatrix.a')
+ @DocsEditable
void set a(num value) native "WebKitCSSMatrix_a_Setter";
- @DocsEditable
@DomName('WebKitCSSMatrix.b')
+ @DocsEditable
num get b native "WebKitCSSMatrix_b_Getter";
- @DocsEditable
@DomName('WebKitCSSMatrix.b')
+ @DocsEditable
void set b(num value) native "WebKitCSSMatrix_b_Setter";
- @DocsEditable
@DomName('WebKitCSSMatrix.c')
+ @DocsEditable
num get c native "WebKitCSSMatrix_c_Getter";
- @DocsEditable
@DomName('WebKitCSSMatrix.c')
+ @DocsEditable
void set c(num value) native "WebKitCSSMatrix_c_Setter";
- @DocsEditable
@DomName('WebKitCSSMatrix.d')
+ @DocsEditable
num get d native "WebKitCSSMatrix_d_Getter";
- @DocsEditable
@DomName('WebKitCSSMatrix.d')
+ @DocsEditable
void set d(num value) native "WebKitCSSMatrix_d_Setter";
- @DocsEditable
@DomName('WebKitCSSMatrix.e')
+ @DocsEditable
num get e native "WebKitCSSMatrix_e_Getter";
- @DocsEditable
@DomName('WebKitCSSMatrix.e')
+ @DocsEditable
void set e(num value) native "WebKitCSSMatrix_e_Setter";
- @DocsEditable
@DomName('WebKitCSSMatrix.f')
+ @DocsEditable
num get f native "WebKitCSSMatrix_f_Getter";
- @DocsEditable
@DomName('WebKitCSSMatrix.f')
+ @DocsEditable
void set f(num value) native "WebKitCSSMatrix_f_Setter";
- @DocsEditable
@DomName('WebKitCSSMatrix.m11')
+ @DocsEditable
num get m11 native "WebKitCSSMatrix_m11_Getter";
- @DocsEditable
@DomName('WebKitCSSMatrix.m11')
+ @DocsEditable
void set m11(num value) native "WebKitCSSMatrix_m11_Setter";
- @DocsEditable
@DomName('WebKitCSSMatrix.m12')
+ @DocsEditable
num get m12 native "WebKitCSSMatrix_m12_Getter";
- @DocsEditable
@DomName('WebKitCSSMatrix.m12')
+ @DocsEditable
void set m12(num value) native "WebKitCSSMatrix_m12_Setter";
- @DocsEditable
@DomName('WebKitCSSMatrix.m13')
+ @DocsEditable
num get m13 native "WebKitCSSMatrix_m13_Getter";
- @DocsEditable
@DomName('WebKitCSSMatrix.m13')
+ @DocsEditable
void set m13(num value) native "WebKitCSSMatrix_m13_Setter";
- @DocsEditable
@DomName('WebKitCSSMatrix.m14')
+ @DocsEditable
num get m14 native "WebKitCSSMatrix_m14_Getter";
- @DocsEditable
@DomName('WebKitCSSMatrix.m14')
+ @DocsEditable
void set m14(num value) native "WebKitCSSMatrix_m14_Setter";
- @DocsEditable
@DomName('WebKitCSSMatrix.m21')
+ @DocsEditable
num get m21 native "WebKitCSSMatrix_m21_Getter";
- @DocsEditable
@DomName('WebKitCSSMatrix.m21')
+ @DocsEditable
void set m21(num value) native "WebKitCSSMatrix_m21_Setter";
- @DocsEditable
@DomName('WebKitCSSMatrix.m22')
+ @DocsEditable
num get m22 native "WebKitCSSMatrix_m22_Getter";
- @DocsEditable
@DomName('WebKitCSSMatrix.m22')
+ @DocsEditable
void set m22(num value) native "WebKitCSSMatrix_m22_Setter";
- @DocsEditable
@DomName('WebKitCSSMatrix.m23')
+ @DocsEditable
num get m23 native "WebKitCSSMatrix_m23_Getter";
- @DocsEditable
@DomName('WebKitCSSMatrix.m23')
+ @DocsEditable
void set m23(num value) native "WebKitCSSMatrix_m23_Setter";
- @DocsEditable
@DomName('WebKitCSSMatrix.m24')
+ @DocsEditable
num get m24 native "WebKitCSSMatrix_m24_Getter";
- @DocsEditable
@DomName('WebKitCSSMatrix.m24')
+ @DocsEditable
void set m24(num value) native "WebKitCSSMatrix_m24_Setter";
- @DocsEditable
@DomName('WebKitCSSMatrix.m31')
+ @DocsEditable
num get m31 native "WebKitCSSMatrix_m31_Getter";
- @DocsEditable
@DomName('WebKitCSSMatrix.m31')
+ @DocsEditable
void set m31(num value) native "WebKitCSSMatrix_m31_Setter";
- @DocsEditable
@DomName('WebKitCSSMatrix.m32')
+ @DocsEditable
num get m32 native "WebKitCSSMatrix_m32_Getter";
- @DocsEditable
@DomName('WebKitCSSMatrix.m32')
+ @DocsEditable
void set m32(num value) native "WebKitCSSMatrix_m32_Setter";
- @DocsEditable
@DomName('WebKitCSSMatrix.m33')
+ @DocsEditable
num get m33 native "WebKitCSSMatrix_m33_Getter";
- @DocsEditable
@DomName('WebKitCSSMatrix.m33')
+ @DocsEditable
void set m33(num value) native "WebKitCSSMatrix_m33_Setter";
- @DocsEditable
@DomName('WebKitCSSMatrix.m34')
+ @DocsEditable
num get m34 native "WebKitCSSMatrix_m34_Getter";
- @DocsEditable
@DomName('WebKitCSSMatrix.m34')
+ @DocsEditable
void set m34(num value) native "WebKitCSSMatrix_m34_Setter";
- @DocsEditable
@DomName('WebKitCSSMatrix.m41')
+ @DocsEditable
num get m41 native "WebKitCSSMatrix_m41_Getter";
- @DocsEditable
@DomName('WebKitCSSMatrix.m41')
+ @DocsEditable
void set m41(num value) native "WebKitCSSMatrix_m41_Setter";
- @DocsEditable
@DomName('WebKitCSSMatrix.m42')
+ @DocsEditable
num get m42 native "WebKitCSSMatrix_m42_Getter";
- @DocsEditable
@DomName('WebKitCSSMatrix.m42')
+ @DocsEditable
void set m42(num value) native "WebKitCSSMatrix_m42_Setter";
- @DocsEditable
@DomName('WebKitCSSMatrix.m43')
+ @DocsEditable
num get m43 native "WebKitCSSMatrix_m43_Getter";
- @DocsEditable
@DomName('WebKitCSSMatrix.m43')
+ @DocsEditable
void set m43(num value) native "WebKitCSSMatrix_m43_Setter";
- @DocsEditable
@DomName('WebKitCSSMatrix.m44')
+ @DocsEditable
num get m44 native "WebKitCSSMatrix_m44_Getter";
- @DocsEditable
@DomName('WebKitCSSMatrix.m44')
+ @DocsEditable
void set m44(num value) native "WebKitCSSMatrix_m44_Setter";
- @DocsEditable
@DomName('WebKitCSSMatrix.inverse')
+ @DocsEditable
CssMatrix inverse() native "WebKitCSSMatrix_inverse_Callback";
- @DocsEditable
@DomName('WebKitCSSMatrix.multiply')
+ @DocsEditable
CssMatrix multiply(CssMatrix secondMatrix) native "WebKitCSSMatrix_multiply_Callback";
- @DocsEditable
@DomName('WebKitCSSMatrix.rotate')
+ @DocsEditable
CssMatrix rotate(num rotX, num rotY, num rotZ) native "WebKitCSSMatrix_rotate_Callback";
- @DocsEditable
@DomName('WebKitCSSMatrix.rotateAxisAngle')
+ @DocsEditable
CssMatrix rotateAxisAngle(num x, num y, num z, num angle) native "WebKitCSSMatrix_rotateAxisAngle_Callback";
- @DocsEditable
@DomName('WebKitCSSMatrix.scale')
+ @DocsEditable
CssMatrix scale(num scaleX, num scaleY, num scaleZ) native "WebKitCSSMatrix_scale_Callback";
- @DocsEditable
@DomName('WebKitCSSMatrix.setMatrixValue')
+ @DocsEditable
void setMatrixValue(String string) native "WebKitCSSMatrix_setMatrixValue_Callback";
- @DocsEditable
@DomName('WebKitCSSMatrix.skewX')
+ @DocsEditable
CssMatrix skewX(num angle) native "WebKitCSSMatrix_skewX_Callback";
- @DocsEditable
@DomName('WebKitCSSMatrix.skewY')
+ @DocsEditable
CssMatrix skewY(num angle) native "WebKitCSSMatrix_skewY_Callback";
- @DocsEditable
@DomName('WebKitCSSMatrix.toString')
+ @DocsEditable
String toString() native "WebKitCSSMatrix_toString_Callback";
- @DocsEditable
@DomName('WebKitCSSMatrix.translate')
+ @DocsEditable
CssMatrix translate(num x, num y, num z) native "WebKitCSSMatrix_translate_Callback";
}
@@ -2496,20 +2617,20 @@
class CssMediaRule extends CssRule {
CssMediaRule.internal() : super.internal();
- @DocsEditable
@DomName('CSSMediaRule.cssRules')
+ @DocsEditable
List<CssRule> get cssRules native "CSSMediaRule_cssRules_Getter";
- @DocsEditable
@DomName('CSSMediaRule.media')
+ @DocsEditable
MediaList get media native "CSSMediaRule_media_Getter";
- @DocsEditable
@DomName('CSSMediaRule.deleteRule')
+ @DocsEditable
void deleteRule(int index) native "CSSMediaRule_deleteRule_Callback";
- @DocsEditable
@DomName('CSSMediaRule.insertRule')
+ @DocsEditable
int insertRule(String rule, int index) native "CSSMediaRule_insertRule_Callback";
}
@@ -2525,16 +2646,16 @@
class CssPageRule extends CssRule {
CssPageRule.internal() : super.internal();
- @DocsEditable
@DomName('CSSPageRule.selectorText')
+ @DocsEditable
String get selectorText native "CSSPageRule_selectorText_Getter";
- @DocsEditable
@DomName('CSSPageRule.selectorText')
+ @DocsEditable
void set selectorText(String value) native "CSSPageRule_selectorText_Setter";
- @DocsEditable
@DomName('CSSPageRule.style')
+ @DocsEditable
CssStyleDeclaration get style native "CSSPageRule_style_Getter";
}
@@ -2608,36 +2729,36 @@
static const int CSS_VW = 26;
- @DocsEditable
@DomName('CSSPrimitiveValue.primitiveType')
+ @DocsEditable
int get primitiveType native "CSSPrimitiveValue_primitiveType_Getter";
- @DocsEditable
@DomName('CSSPrimitiveValue.getCounterValue')
+ @DocsEditable
Counter getCounterValue() native "CSSPrimitiveValue_getCounterValue_Callback";
- @DocsEditable
@DomName('CSSPrimitiveValue.getFloatValue')
+ @DocsEditable
num getFloatValue(int unitType) native "CSSPrimitiveValue_getFloatValue_Callback";
- @DocsEditable
@DomName('CSSPrimitiveValue.getRGBColorValue')
+ @DocsEditable
RgbColor getRgbColorValue() native "CSSPrimitiveValue_getRGBColorValue_Callback";
- @DocsEditable
@DomName('CSSPrimitiveValue.getRectValue')
+ @DocsEditable
Rect getRectValue() native "CSSPrimitiveValue_getRectValue_Callback";
- @DocsEditable
@DomName('CSSPrimitiveValue.getStringValue')
+ @DocsEditable
String getStringValue() native "CSSPrimitiveValue_getStringValue_Callback";
- @DocsEditable
@DomName('CSSPrimitiveValue.setFloatValue')
+ @DocsEditable
void setFloatValue(int unitType, num floatValue) native "CSSPrimitiveValue_setFloatValue_Callback";
- @DocsEditable
@DomName('CSSPrimitiveValue.setStringValue')
+ @DocsEditable
void setStringValue(int stringType, String stringValue) native "CSSPrimitiveValue_setStringValue_Callback";
}
@@ -2671,24 +2792,24 @@
static const int WEBKIT_KEYFRAME_RULE = 8;
- @DocsEditable
@DomName('CSSRule.cssText')
+ @DocsEditable
String get cssText native "CSSRule_cssText_Getter";
- @DocsEditable
@DomName('CSSRule.cssText')
+ @DocsEditable
void set cssText(String value) native "CSSRule_cssText_Setter";
- @DocsEditable
@DomName('CSSRule.parentRule')
+ @DocsEditable
CssRule get parentRule native "CSSRule_parentRule_Getter";
- @DocsEditable
@DomName('CSSRule.parentStyleSheet')
+ @DocsEditable
CssStyleSheet get parentStyleSheet native "CSSRule_parentStyleSheet_Getter";
- @DocsEditable
@DomName('CSSRule.type')
+ @DocsEditable
int get type native "CSSRule_type_Getter";
}
@@ -2714,7 +2835,6 @@
return _cachedBrowserPrefix;
}
-@DocsEditable
@DomName('CSSStyleDeclaration')
class CssStyleDeclaration extends NativeFieldWrapperClass1 {
factory CssStyleDeclaration() => _CssStyleDeclarationFactoryProvider.createCssStyleDeclaration();
@@ -2723,52 +2843,52 @@
CssStyleDeclaration.internal();
- @DocsEditable
@DomName('CSSStyleDeclaration.cssText')
+ @DocsEditable
String get cssText native "CSSStyleDeclaration_cssText_Getter";
- @DocsEditable
@DomName('CSSStyleDeclaration.cssText')
+ @DocsEditable
void set cssText(String value) native "CSSStyleDeclaration_cssText_Setter";
- @DocsEditable
@DomName('CSSStyleDeclaration.length')
+ @DocsEditable
int get length native "CSSStyleDeclaration_length_Getter";
- @DocsEditable
@DomName('CSSStyleDeclaration.parentRule')
+ @DocsEditable
CssRule get parentRule native "CSSStyleDeclaration_parentRule_Getter";
- @DocsEditable
@DomName('CSSStyleDeclaration.getPropertyCSSValue')
+ @DocsEditable
CssValue getPropertyCssValue(String propertyName) native "CSSStyleDeclaration_getPropertyCSSValue_Callback";
- @DocsEditable
@DomName('CSSStyleDeclaration.getPropertyPriority')
+ @DocsEditable
String getPropertyPriority(String propertyName) native "CSSStyleDeclaration_getPropertyPriority_Callback";
- @DocsEditable
@DomName('CSSStyleDeclaration.getPropertyShorthand')
+ @DocsEditable
String getPropertyShorthand(String propertyName) native "CSSStyleDeclaration_getPropertyShorthand_Callback";
- @DocsEditable
@DomName('CSSStyleDeclaration._getPropertyValue')
+ @DocsEditable
String _getPropertyValue(String propertyName) native "CSSStyleDeclaration__getPropertyValue_Callback";
- @DocsEditable
@DomName('CSSStyleDeclaration.isPropertyImplicit')
+ @DocsEditable
bool isPropertyImplicit(String propertyName) native "CSSStyleDeclaration_isPropertyImplicit_Callback";
- @DocsEditable
@DomName('CSSStyleDeclaration.item')
+ @DocsEditable
String item(int index) native "CSSStyleDeclaration_item_Callback";
- @DocsEditable
@DomName('CSSStyleDeclaration.removeProperty')
+ @DocsEditable
String removeProperty(String propertyName) native "CSSStyleDeclaration_removeProperty_Callback";
- @DocsEditable
@DomName('CSSStyleDeclaration.setProperty')
+ @DocsEditable
void setProperty(String propertyName, String value, [String priority]) native "CSSStyleDeclaration_setProperty_Callback";
@@ -5941,16 +6061,16 @@
class CssStyleRule extends CssRule {
CssStyleRule.internal() : super.internal();
- @DocsEditable
@DomName('CSSStyleRule.selectorText')
+ @DocsEditable
String get selectorText native "CSSStyleRule_selectorText_Getter";
- @DocsEditable
@DomName('CSSStyleRule.selectorText')
+ @DocsEditable
void set selectorText(String value) native "CSSStyleRule_selectorText_Setter";
- @DocsEditable
@DomName('CSSStyleRule.style')
+ @DocsEditable
CssStyleDeclaration get style native "CSSStyleRule_style_Getter";
}
@@ -5966,16 +6086,16 @@
class CssStyleSheet extends StyleSheet {
CssStyleSheet.internal() : super.internal();
- @DocsEditable
@DomName('CSSStyleSheet.cssRules')
+ @DocsEditable
List<CssRule> get cssRules native "CSSStyleSheet_cssRules_Getter";
- @DocsEditable
@DomName('CSSStyleSheet.ownerRule')
+ @DocsEditable
CssRule get ownerRule native "CSSStyleSheet_ownerRule_Getter";
- @DocsEditable
@DomName('CSSStyleSheet.rules')
+ @DocsEditable
List<CssRule> get rules native "CSSStyleSheet_rules_Getter";
int addRule(String selector, String style, [int index]) {
@@ -5985,24 +6105,24 @@
return _addRule_2(selector, style);
}
+ @DomName('CSSStyleSheet._addRule_1')
@DocsEditable
- @DomName('CSSStyleSheet.addRule_1')
- int _addRule_1(selector, style, index) native "CSSStyleSheet_addRule_1_Callback";
+ int _addRule_1(selector, style, index) native "CSSStyleSheet__addRule_1_Callback";
+ @DomName('CSSStyleSheet._addRule_2')
@DocsEditable
- @DomName('CSSStyleSheet.addRule_2')
- int _addRule_2(selector, style) native "CSSStyleSheet_addRule_2_Callback";
+ int _addRule_2(selector, style) native "CSSStyleSheet__addRule_2_Callback";
- @DocsEditable
@DomName('CSSStyleSheet.deleteRule')
+ @DocsEditable
void deleteRule(int index) native "CSSStyleSheet_deleteRule_Callback";
- @DocsEditable
@DomName('CSSStyleSheet.insertRule')
+ @DocsEditable
int insertRule(String rule, int index) native "CSSStyleSheet_insertRule_Callback";
- @DocsEditable
@DomName('CSSStyleSheet.removeRule')
+ @DocsEditable
void removeRule(int index) native "CSSStyleSheet_removeRule_Callback";
}
@@ -6060,8 +6180,8 @@
static const int CSS_TRANSLATEZ = 12;
- @DocsEditable
@DomName('WebKitCSSTransformValue.operationType')
+ @DocsEditable
int get operationType native "WebKitCSSTransformValue_operationType_Getter";
}
@@ -6098,16 +6218,16 @@
static const int CSS_VALUE_LIST = 2;
- @DocsEditable
@DomName('CSSValue.cssText')
+ @DocsEditable
String get cssText native "CSSValue_cssText_Getter";
- @DocsEditable
@DomName('CSSValue.cssText')
+ @DocsEditable
void set cssText(String value) native "CSSValue_cssText_Setter";
- @DocsEditable
@DomName('CSSValue.cssValueType')
+ @DocsEditable
int get cssValueType native "CSSValue_cssValueType_Getter";
}
@@ -6118,20 +6238,24 @@
// WARNING: Do not edit - generated code.
-@DocsEditable
@DomName('CustomEvent')
class CustomEvent extends Event {
- factory CustomEvent(String type, [bool canBubble = true, bool cancelable = true,
- Object detail]) => _CustomEventFactoryProvider.createCustomEvent(
- type, canBubble, cancelable, detail);
+ factory CustomEvent(String type,
+ {bool canBubble: true, bool cancelable: true, Object detail}) {
+
+ final CustomEvent e = document.$dom_createEvent("CustomEvent");
+ e.$dom_initCustomEvent(type, canBubble, cancelable, detail);
+
+ return e;
+ }
CustomEvent.internal() : super.internal();
- @DocsEditable
@DomName('CustomEvent.detail')
+ @DocsEditable
Object get detail native "CustomEvent_detail_Getter";
- @DocsEditable
@DomName('CustomEvent.initCustomEvent')
+ @DocsEditable
void $dom_initCustomEvent(String typeArg, bool canBubbleArg, bool cancelableArg, Object detailArg) native "CustomEvent_initCustomEvent_Callback";
}
@@ -6173,8 +6297,8 @@
/// Checks if this type is supported on the current platform.
static bool get supported => true;
- @DocsEditable
@DomName('HTMLDataListElement.options')
+ @DocsEditable
HtmlCollection get options native "HTMLDataListElement_options_Getter";
}
@@ -6190,24 +6314,24 @@
class DataTransferItem extends NativeFieldWrapperClass1 {
DataTransferItem.internal();
- @DocsEditable
@DomName('DataTransferItem.kind')
+ @DocsEditable
String get kind native "DataTransferItem_kind_Getter";
- @DocsEditable
@DomName('DataTransferItem.type')
+ @DocsEditable
String get type native "DataTransferItem_type_Getter";
- @DocsEditable
@DomName('DataTransferItem.getAsFile')
+ @DocsEditable
Blob getAsFile() native "DataTransferItem_getAsFile_Callback";
- @DocsEditable
@DomName('DataTransferItem.getAsString')
+ @DocsEditable
void getAsString([StringCallback callback]) native "DataTransferItem_getAsString_Callback";
- @DocsEditable
@DomName('DataTransferItem.webkitGetAsEntry')
+ @DocsEditable
Entry webkitGetAsEntry() native "DataTransferItem_webkitGetAsEntry_Callback";
}
@@ -6223,8 +6347,8 @@
class DataTransferItemList extends NativeFieldWrapperClass1 {
DataTransferItemList.internal();
- @DocsEditable
@DomName('DataTransferItemList.length')
+ @DocsEditable
int get length native "DataTransferItemList_length_Getter";
void add(data_OR_file, [String type]) {
@@ -6239,20 +6363,20 @@
throw new ArgumentError("Incorrect number or type of arguments");
}
+ @DomName('DataTransferItemList._add_1')
@DocsEditable
- @DomName('DataTransferItemList.add_1')
- void _add_1(data_OR_file) native "DataTransferItemList_add_1_Callback";
+ void _add_1(data_OR_file) native "DataTransferItemList__add_1_Callback";
+ @DomName('DataTransferItemList._add_2')
@DocsEditable
- @DomName('DataTransferItemList.add_2')
- void _add_2(data_OR_file, type) native "DataTransferItemList_add_2_Callback";
+ void _add_2(data_OR_file, type) native "DataTransferItemList__add_2_Callback";
- @DocsEditable
@DomName('DataTransferItemList.clear')
+ @DocsEditable
void clear() native "DataTransferItemList_clear_Callback";
- @DocsEditable
@DomName('DataTransferItemList.item')
+ @DocsEditable
DataTransferItem item(int index) native "DataTransferItemList_item_Callback";
}
@@ -6287,13 +6411,13 @@
return _getFloat32_2(byteOffset);
}
+ @DomName('DataView._getFloat32_1')
@DocsEditable
- @DomName('DataView.getFloat32_1')
- num _getFloat32_1(byteOffset, littleEndian) native "DataView_getFloat32_1_Callback";
+ num _getFloat32_1(byteOffset, littleEndian) native "DataView__getFloat32_1_Callback";
+ @DomName('DataView._getFloat32_2')
@DocsEditable
- @DomName('DataView.getFloat32_2')
- num _getFloat32_2(byteOffset) native "DataView_getFloat32_2_Callback";
+ num _getFloat32_2(byteOffset) native "DataView__getFloat32_2_Callback";
num getFloat64(int byteOffset, {bool littleEndian}) {
if (?littleEndian) {
@@ -6302,13 +6426,13 @@
return _getFloat64_2(byteOffset);
}
+ @DomName('DataView._getFloat64_1')
@DocsEditable
- @DomName('DataView.getFloat64_1')
- num _getFloat64_1(byteOffset, littleEndian) native "DataView_getFloat64_1_Callback";
+ num _getFloat64_1(byteOffset, littleEndian) native "DataView__getFloat64_1_Callback";
+ @DomName('DataView._getFloat64_2')
@DocsEditable
- @DomName('DataView.getFloat64_2')
- num _getFloat64_2(byteOffset) native "DataView_getFloat64_2_Callback";
+ num _getFloat64_2(byteOffset) native "DataView__getFloat64_2_Callback";
int getInt16(int byteOffset, {bool littleEndian}) {
if (?littleEndian) {
@@ -6317,13 +6441,13 @@
return _getInt16_2(byteOffset);
}
+ @DomName('DataView._getInt16_1')
@DocsEditable
- @DomName('DataView.getInt16_1')
- int _getInt16_1(byteOffset, littleEndian) native "DataView_getInt16_1_Callback";
+ int _getInt16_1(byteOffset, littleEndian) native "DataView__getInt16_1_Callback";
+ @DomName('DataView._getInt16_2')
@DocsEditable
- @DomName('DataView.getInt16_2')
- int _getInt16_2(byteOffset) native "DataView_getInt16_2_Callback";
+ int _getInt16_2(byteOffset) native "DataView__getInt16_2_Callback";
int getInt32(int byteOffset, {bool littleEndian}) {
if (?littleEndian) {
@@ -6332,16 +6456,16 @@
return _getInt32_2(byteOffset);
}
+ @DomName('DataView._getInt32_1')
@DocsEditable
- @DomName('DataView.getInt32_1')
- int _getInt32_1(byteOffset, littleEndian) native "DataView_getInt32_1_Callback";
+ int _getInt32_1(byteOffset, littleEndian) native "DataView__getInt32_1_Callback";
+ @DomName('DataView._getInt32_2')
@DocsEditable
- @DomName('DataView.getInt32_2')
- int _getInt32_2(byteOffset) native "DataView_getInt32_2_Callback";
+ int _getInt32_2(byteOffset) native "DataView__getInt32_2_Callback";
- @DocsEditable
@DomName('DataView.getInt8')
+ @DocsEditable
int getInt8(int byteOffset) native "DataView_getInt8_Callback";
int getUint16(int byteOffset, {bool littleEndian}) {
@@ -6351,13 +6475,13 @@
return _getUint16_2(byteOffset);
}
+ @DomName('DataView._getUint16_1')
@DocsEditable
- @DomName('DataView.getUint16_1')
- int _getUint16_1(byteOffset, littleEndian) native "DataView_getUint16_1_Callback";
+ int _getUint16_1(byteOffset, littleEndian) native "DataView__getUint16_1_Callback";
+ @DomName('DataView._getUint16_2')
@DocsEditable
- @DomName('DataView.getUint16_2')
- int _getUint16_2(byteOffset) native "DataView_getUint16_2_Callback";
+ int _getUint16_2(byteOffset) native "DataView__getUint16_2_Callback";
int getUint32(int byteOffset, {bool littleEndian}) {
if (?littleEndian) {
@@ -6366,16 +6490,16 @@
return _getUint32_2(byteOffset);
}
+ @DomName('DataView._getUint32_1')
@DocsEditable
- @DomName('DataView.getUint32_1')
- int _getUint32_1(byteOffset, littleEndian) native "DataView_getUint32_1_Callback";
+ int _getUint32_1(byteOffset, littleEndian) native "DataView__getUint32_1_Callback";
+ @DomName('DataView._getUint32_2')
@DocsEditable
- @DomName('DataView.getUint32_2')
- int _getUint32_2(byteOffset) native "DataView_getUint32_2_Callback";
+ int _getUint32_2(byteOffset) native "DataView__getUint32_2_Callback";
- @DocsEditable
@DomName('DataView.getUint8')
+ @DocsEditable
int getUint8(int byteOffset) native "DataView_getUint8_Callback";
void setFloat32(int byteOffset, num value, {bool littleEndian}) {
@@ -6384,15 +6508,16 @@
return;
}
_setFloat32_2(byteOffset, value);
+ return;
}
+ @DomName('DataView._setFloat32_1')
@DocsEditable
- @DomName('DataView.setFloat32_1')
- void _setFloat32_1(byteOffset, value, littleEndian) native "DataView_setFloat32_1_Callback";
+ void _setFloat32_1(byteOffset, value, littleEndian) native "DataView__setFloat32_1_Callback";
+ @DomName('DataView._setFloat32_2')
@DocsEditable
- @DomName('DataView.setFloat32_2')
- void _setFloat32_2(byteOffset, value) native "DataView_setFloat32_2_Callback";
+ void _setFloat32_2(byteOffset, value) native "DataView__setFloat32_2_Callback";
void setFloat64(int byteOffset, num value, {bool littleEndian}) {
if (?littleEndian) {
@@ -6400,15 +6525,16 @@
return;
}
_setFloat64_2(byteOffset, value);
+ return;
}
+ @DomName('DataView._setFloat64_1')
@DocsEditable
- @DomName('DataView.setFloat64_1')
- void _setFloat64_1(byteOffset, value, littleEndian) native "DataView_setFloat64_1_Callback";
+ void _setFloat64_1(byteOffset, value, littleEndian) native "DataView__setFloat64_1_Callback";
+ @DomName('DataView._setFloat64_2')
@DocsEditable
- @DomName('DataView.setFloat64_2')
- void _setFloat64_2(byteOffset, value) native "DataView_setFloat64_2_Callback";
+ void _setFloat64_2(byteOffset, value) native "DataView__setFloat64_2_Callback";
void setInt16(int byteOffset, int value, {bool littleEndian}) {
if (?littleEndian) {
@@ -6416,15 +6542,16 @@
return;
}
_setInt16_2(byteOffset, value);
+ return;
}
+ @DomName('DataView._setInt16_1')
@DocsEditable
- @DomName('DataView.setInt16_1')
- void _setInt16_1(byteOffset, value, littleEndian) native "DataView_setInt16_1_Callback";
+ void _setInt16_1(byteOffset, value, littleEndian) native "DataView__setInt16_1_Callback";
+ @DomName('DataView._setInt16_2')
@DocsEditable
- @DomName('DataView.setInt16_2')
- void _setInt16_2(byteOffset, value) native "DataView_setInt16_2_Callback";
+ void _setInt16_2(byteOffset, value) native "DataView__setInt16_2_Callback";
void setInt32(int byteOffset, int value, {bool littleEndian}) {
if (?littleEndian) {
@@ -6432,18 +6559,19 @@
return;
}
_setInt32_2(byteOffset, value);
+ return;
}
+ @DomName('DataView._setInt32_1')
@DocsEditable
- @DomName('DataView.setInt32_1')
- void _setInt32_1(byteOffset, value, littleEndian) native "DataView_setInt32_1_Callback";
+ void _setInt32_1(byteOffset, value, littleEndian) native "DataView__setInt32_1_Callback";
+ @DomName('DataView._setInt32_2')
@DocsEditable
- @DomName('DataView.setInt32_2')
- void _setInt32_2(byteOffset, value) native "DataView_setInt32_2_Callback";
+ void _setInt32_2(byteOffset, value) native "DataView__setInt32_2_Callback";
- @DocsEditable
@DomName('DataView.setInt8')
+ @DocsEditable
void setInt8(int byteOffset, int value) native "DataView_setInt8_Callback";
void setUint16(int byteOffset, int value, {bool littleEndian}) {
@@ -6452,15 +6580,16 @@
return;
}
_setUint16_2(byteOffset, value);
+ return;
}
+ @DomName('DataView._setUint16_1')
@DocsEditable
- @DomName('DataView.setUint16_1')
- void _setUint16_1(byteOffset, value, littleEndian) native "DataView_setUint16_1_Callback";
+ void _setUint16_1(byteOffset, value, littleEndian) native "DataView__setUint16_1_Callback";
+ @DomName('DataView._setUint16_2')
@DocsEditable
- @DomName('DataView.setUint16_2')
- void _setUint16_2(byteOffset, value) native "DataView_setUint16_2_Callback";
+ void _setUint16_2(byteOffset, value) native "DataView__setUint16_2_Callback";
void setUint32(int byteOffset, int value, {bool littleEndian}) {
if (?littleEndian) {
@@ -6468,18 +6597,19 @@
return;
}
_setUint32_2(byteOffset, value);
+ return;
}
+ @DomName('DataView._setUint32_1')
@DocsEditable
- @DomName('DataView.setUint32_1')
- void _setUint32_1(byteOffset, value, littleEndian) native "DataView_setUint32_1_Callback";
+ void _setUint32_1(byteOffset, value, littleEndian) native "DataView__setUint32_1_Callback";
+ @DomName('DataView._setUint32_2')
@DocsEditable
- @DomName('DataView.setUint32_2')
- void _setUint32_2(byteOffset, value) native "DataView_setUint32_2_Callback";
+ void _setUint32_2(byteOffset, value) native "DataView__setUint32_2_Callback";
- @DocsEditable
@DomName('DataView.setUint8')
+ @DocsEditable
void setUint8(int byteOffset, int value) native "DataView_setUint8_Callback";
}
@@ -6495,20 +6625,20 @@
class Database extends NativeFieldWrapperClass1 {
Database.internal();
- @DocsEditable
@DomName('Database.version')
+ @DocsEditable
String get version native "Database_version_Getter";
- @DocsEditable
@DomName('Database.changeVersion')
+ @DocsEditable
void changeVersion(String oldVersion, String newVersion, [SqlTransactionCallback callback, SqlTransactionErrorCallback errorCallback, VoidCallback successCallback]) native "Database_changeVersion_Callback";
- @DocsEditable
@DomName('Database.readTransaction')
+ @DocsEditable
void readTransaction(SqlTransactionCallback callback, [SqlTransactionErrorCallback errorCallback, VoidCallback successCallback]) native "Database_readTransaction_Callback";
- @DocsEditable
@DomName('Database.transaction')
+ @DocsEditable
void transaction(SqlTransactionCallback callback, [SqlTransactionErrorCallback errorCallback, VoidCallback successCallback]) native "Database_transaction_Callback";
}
@@ -6532,24 +6662,24 @@
class DatabaseSync extends NativeFieldWrapperClass1 {
DatabaseSync.internal();
- @DocsEditable
@DomName('DatabaseSync.lastErrorMessage')
+ @DocsEditable
String get lastErrorMessage native "DatabaseSync_lastErrorMessage_Getter";
- @DocsEditable
@DomName('DatabaseSync.version')
+ @DocsEditable
String get version native "DatabaseSync_version_Getter";
- @DocsEditable
@DomName('DatabaseSync.changeVersion')
+ @DocsEditable
void changeVersion(String oldVersion, String newVersion, [SqlTransactionSyncCallback callback]) native "DatabaseSync_changeVersion_Callback";
- @DocsEditable
@DomName('DatabaseSync.readTransaction')
+ @DocsEditable
void readTransaction(SqlTransactionSyncCallback callback) native "DatabaseSync_readTransaction_Callback";
- @DocsEditable
@DomName('DatabaseSync.transaction')
+ @DocsEditable
void transaction(SqlTransactionSyncCallback callback) native "DatabaseSync_transaction_Callback";
}
@@ -6565,22 +6695,28 @@
class DedicatedWorkerContext extends WorkerContext {
DedicatedWorkerContext.internal() : super.internal();
+ @DomName('DedicatedWorkerContext.message')
+ @DocsEditable
static const EventStreamProvider<MessageEvent> messageEvent = const EventStreamProvider<MessageEvent>('message');
@DocsEditable
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
+ @deprecated
DedicatedWorkerContextEvents get on =>
new DedicatedWorkerContextEvents(this);
- @DocsEditable
@DomName('DedicatedWorkerContext.postMessage')
+ @DocsEditable
void postMessage(Object message, [List messagePorts]) native "DedicatedWorkerContext_postMessage_Callback";
+ @DomName('DedicatedWorkerContext.message')
+ @DocsEditable
Stream<MessageEvent> get onMessage => messageEvent.forTarget(this);
}
@DocsEditable
+@deprecated
class DedicatedWorkerContextEvents extends WorkerContextEvents {
@DocsEditable
DedicatedWorkerContextEvents(EventTarget _ptr) : super(_ptr);
@@ -6599,7 +6735,7 @@
@DomName('HTMLDetailsElement')
@SupportedBrowser(SupportedBrowser.CHROME)
@SupportedBrowser(SupportedBrowser.SAFARI)
-@Experimental()
+@Experimental
class DetailsElement extends _Element_Merged {
DetailsElement.internal() : super.internal();
@@ -6609,12 +6745,12 @@
/// Checks if this type is supported on the current platform.
static bool get supported => true;
- @DocsEditable
@DomName('HTMLDetailsElement.open')
+ @DocsEditable
bool get open native "HTMLDetailsElement_open_Getter";
- @DocsEditable
@DomName('HTMLDetailsElement.open')
+ @DocsEditable
void set open(bool value) native "HTMLDetailsElement_open_Setter";
}
@@ -6630,42 +6766,49 @@
class DeviceMotionEvent extends Event {
DeviceMotionEvent.internal() : super.internal();
- @DocsEditable
@DomName('DeviceMotionEvent.interval')
+ @DocsEditable
num get interval native "DeviceMotionEvent_interval_Getter";
}
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// WARNING: Do not edit - generated code.
-
-@DocsEditable
@DomName('DeviceOrientationEvent')
+
class DeviceOrientationEvent extends Event {
+ factory DeviceOrientationEvent(String type,
+ {bool canBubble: true, bool cancelable: true, num alpha: 0, num beta: 0,
+ num gamma: 0, bool absolute: false}) {
+ var e = document.$dom_createEvent("DeviceOrientationEvent");
+ e.$dom_initDeviceOrientationEvent(type, canBubble, cancelable, alpha, beta,
+ gamma, absolute);
+ return e;
+ }
DeviceOrientationEvent.internal() : super.internal();
- @DocsEditable
@DomName('DeviceOrientationEvent.absolute')
+ @DocsEditable
bool get absolute native "DeviceOrientationEvent_absolute_Getter";
- @DocsEditable
@DomName('DeviceOrientationEvent.alpha')
+ @DocsEditable
num get alpha native "DeviceOrientationEvent_alpha_Getter";
- @DocsEditable
@DomName('DeviceOrientationEvent.beta')
+ @DocsEditable
num get beta native "DeviceOrientationEvent_beta_Getter";
- @DocsEditable
@DomName('DeviceOrientationEvent.gamma')
+ @DocsEditable
num get gamma native "DeviceOrientationEvent_gamma_Getter";
- @DocsEditable
@DomName('DeviceOrientationEvent.initDeviceOrientationEvent')
- void initDeviceOrientationEvent(String type, bool bubbles, bool cancelable, num alpha, num beta, num gamma, bool absolute) native "DeviceOrientationEvent_initDeviceOrientationEvent_Callback";
+ @DocsEditable
+ void $dom_initDeviceOrientationEvent(String type, bool bubbles, bool cancelable, num alpha, num beta, num gamma, bool absolute) native "DeviceOrientationEvent_initDeviceOrientationEvent_Callback";
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -6680,20 +6823,20 @@
class DirectoryEntry extends Entry {
DirectoryEntry.internal() : super.internal();
- @DocsEditable
@DomName('DirectoryEntry.createReader')
+ @DocsEditable
DirectoryReader createReader() native "DirectoryEntry_createReader_Callback";
- @DocsEditable
@DomName('DirectoryEntry.getDirectory')
+ @DocsEditable
void getDirectory(String path, {Map options, EntryCallback successCallback, ErrorCallback errorCallback}) native "DirectoryEntry_getDirectory_Callback";
- @DocsEditable
@DomName('DirectoryEntry.getFile')
+ @DocsEditable
void getFile(String path, {Map options, EntryCallback successCallback, ErrorCallback errorCallback}) native "DirectoryEntry_getFile_Callback";
- @DocsEditable
@DomName('DirectoryEntry.removeRecursively')
+ @DocsEditable
void removeRecursively(VoidCallback successCallback, [ErrorCallback errorCallback]) native "DirectoryEntry_removeRecursively_Callback";
}
@@ -6709,20 +6852,20 @@
class DirectoryEntrySync extends EntrySync {
DirectoryEntrySync.internal() : super.internal();
- @DocsEditable
@DomName('DirectoryEntrySync.createReader')
+ @DocsEditable
DirectoryReaderSync createReader() native "DirectoryEntrySync_createReader_Callback";
- @DocsEditable
@DomName('DirectoryEntrySync.getDirectory')
+ @DocsEditable
DirectoryEntrySync getDirectory(String path, Map flags) native "DirectoryEntrySync_getDirectory_Callback";
- @DocsEditable
@DomName('DirectoryEntrySync.getFile')
+ @DocsEditable
FileEntrySync getFile(String path, Map flags) native "DirectoryEntrySync_getFile_Callback";
- @DocsEditable
@DomName('DirectoryEntrySync.removeRecursively')
+ @DocsEditable
void removeRecursively() native "DirectoryEntrySync_removeRecursively_Callback";
}
@@ -6738,8 +6881,8 @@
class DirectoryReader extends NativeFieldWrapperClass1 {
DirectoryReader.internal();
- @DocsEditable
@DomName('DirectoryReader.readEntries')
+ @DocsEditable
void readEntries(EntriesCallback successCallback, [ErrorCallback errorCallback]) native "DirectoryReader_readEntries_Callback";
}
@@ -6755,8 +6898,8 @@
class DirectoryReaderSync extends NativeFieldWrapperClass1 {
DirectoryReaderSync.internal();
- @DocsEditable
@DomName('DirectoryReaderSync.readEntries')
+ @DocsEditable
List<EntrySync> readEntries() native "DirectoryReaderSync_readEntries_Callback";
}
@@ -6781,8 +6924,6 @@
// BSD-style license that can be found in the LICENSE file.
-@DocsEditable
-@DomName('Document')
/**
* The base class for all documents.
*
@@ -6792,332 +6933,440 @@
* If you aren't comfortable with DOM concepts, see the Dart tutorial
* [Target 2: Connect Dart & HTML](http://www.dartlang.org/docs/tutorials/connect-dart-html/).
*/
+@DomName('Document')
class Document extends Node
{
Document.internal() : super.internal();
+ @DomName('Document.readystatechange')
+ @DocsEditable
static const EventStreamProvider<Event> readyStateChangeEvent = const EventStreamProvider<Event>('readystatechange');
+ @DomName('Document.selectionchange')
+ @DocsEditable
static const EventStreamProvider<Event> selectionChangeEvent = const EventStreamProvider<Event>('selectionchange');
+ @DomName('Document.webkitpointerlockchange')
+ @DocsEditable
static const EventStreamProvider<Event> pointerLockChangeEvent = const EventStreamProvider<Event>('webkitpointerlockchange');
+ @DomName('Document.webkitpointerlockerror')
+ @DocsEditable
static const EventStreamProvider<Event> pointerLockErrorEvent = const EventStreamProvider<Event>('webkitpointerlockerror');
@DocsEditable
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
+ @deprecated
DocumentEvents get on =>
new DocumentEvents(this);
- @DocsEditable
@DomName('Document.body')
+ @DocsEditable
Element get $dom_body native "Document_body_Getter";
- @DocsEditable
@DomName('Document.body')
+ @DocsEditable
void set $dom_body(Element value) native "Document_body_Setter";
- @DocsEditable
@DomName('Document.charset')
+ @DocsEditable
String get charset native "Document_charset_Getter";
- @DocsEditable
@DomName('Document.charset')
+ @DocsEditable
void set charset(String value) native "Document_charset_Setter";
- @DocsEditable
@DomName('Document.cookie')
+ @DocsEditable
String get cookie native "Document_cookie_Getter";
- @DocsEditable
@DomName('Document.cookie')
+ @DocsEditable
void set cookie(String value) native "Document_cookie_Setter";
- @DocsEditable
@DomName('Document.defaultView')
+ @DocsEditable
WindowBase get window native "Document_defaultView_Getter";
- @DocsEditable
@DomName('Document.documentElement')
+ @DocsEditable
Element get documentElement native "Document_documentElement_Getter";
- @DocsEditable
@DomName('Document.domain')
+ @DocsEditable
String get domain native "Document_domain_Getter";
- @DocsEditable
@DomName('Document.head')
+ @DocsEditable
HeadElement get $dom_head native "Document_head_Getter";
- @DocsEditable
@DomName('Document.implementation')
+ @DocsEditable
DomImplementation get implementation native "Document_implementation_Getter";
- @DocsEditable
@DomName('Document.lastModified')
+ @DocsEditable
String get $dom_lastModified native "Document_lastModified_Getter";
- @DocsEditable
@DomName('Document.preferredStylesheetSet')
+ @DocsEditable
String get $dom_preferredStylesheetSet native "Document_preferredStylesheetSet_Getter";
- @DocsEditable
@DomName('Document.readyState')
+ @DocsEditable
String get readyState native "Document_readyState_Getter";
- @DocsEditable
@DomName('Document.referrer')
+ @DocsEditable
String get $dom_referrer native "Document_referrer_Getter";
- @DocsEditable
@DomName('Document.selectedStylesheetSet')
+ @DocsEditable
String get $dom_selectedStylesheetSet native "Document_selectedStylesheetSet_Getter";
- @DocsEditable
@DomName('Document.selectedStylesheetSet')
+ @DocsEditable
void set $dom_selectedStylesheetSet(String value) native "Document_selectedStylesheetSet_Setter";
- @DocsEditable
@DomName('Document.styleSheets')
+ @DocsEditable
List<StyleSheet> get $dom_styleSheets native "Document_styleSheets_Getter";
- @DocsEditable
@DomName('Document.title')
+ @DocsEditable
String get $dom_title native "Document_title_Getter";
- @DocsEditable
@DomName('Document.title')
+ @DocsEditable
void set $dom_title(String value) native "Document_title_Setter";
- @DocsEditable
@DomName('Document.webkitFullscreenElement')
+ @DocsEditable
Element get $dom_webkitFullscreenElement native "Document_webkitFullscreenElement_Getter";
- @DocsEditable
@DomName('Document.webkitFullscreenEnabled')
+ @DocsEditable
bool get $dom_webkitFullscreenEnabled native "Document_webkitFullscreenEnabled_Getter";
- @DocsEditable
@DomName('Document.webkitHidden')
+ @DocsEditable
bool get $dom_webkitHidden native "Document_webkitHidden_Getter";
- @DocsEditable
@DomName('Document.webkitIsFullScreen')
+ @DocsEditable
bool get $dom_webkitIsFullScreen native "Document_webkitIsFullScreen_Getter";
- @DocsEditable
@DomName('Document.webkitPointerLockElement')
+ @DocsEditable
Element get $dom_webkitPointerLockElement native "Document_webkitPointerLockElement_Getter";
- @DocsEditable
@DomName('Document.webkitVisibilityState')
+ @DocsEditable
String get $dom_webkitVisibilityState native "Document_webkitVisibilityState_Getter";
- @DocsEditable
@DomName('Document.caretRangeFromPoint')
+ @DocsEditable
Range $dom_caretRangeFromPoint(int x, int y) native "Document_caretRangeFromPoint_Callback";
- @DocsEditable
@DomName('Document.createCDATASection')
+ @DocsEditable
CDataSection createCDataSection(String data) native "Document_createCDATASection_Callback";
- @DocsEditable
@DomName('Document.createDocumentFragment')
+ @DocsEditable
DocumentFragment createDocumentFragment() native "Document_createDocumentFragment_Callback";
- @DocsEditable
@DomName('Document.createElement')
+ @DocsEditable
Element $dom_createElement(String tagName) native "Document_createElement_Callback";
- @DocsEditable
@DomName('Document.createElementNS')
+ @DocsEditable
Element $dom_createElementNS(String namespaceURI, String qualifiedName) native "Document_createElementNS_Callback";
- @DocsEditable
@DomName('Document.createEvent')
+ @DocsEditable
Event $dom_createEvent(String eventType) native "Document_createEvent_Callback";
- @DocsEditable
@DomName('Document.createRange')
+ @DocsEditable
Range $dom_createRange() native "Document_createRange_Callback";
- @DocsEditable
@DomName('Document.createTextNode')
+ @DocsEditable
Text $dom_createTextNode(String data) native "Document_createTextNode_Callback";
- @DocsEditable
@DomName('Document.createTouch')
+ @DocsEditable
Touch $dom_createTouch(Window window, EventTarget target, int identifier, int pageX, int pageY, int screenX, int screenY, int webkitRadiusX, int webkitRadiusY, num webkitRotationAngle, num webkitForce) native "Document_createTouch_Callback";
- @DocsEditable
@DomName('Document.createTouchList')
+ @DocsEditable
TouchList $dom_createTouchList() native "Document_createTouchList_Callback";
- @DocsEditable
@DomName('Document.elementFromPoint')
+ @DocsEditable
Element $dom_elementFromPoint(int x, int y) native "Document_elementFromPoint_Callback";
- @DocsEditable
@DomName('Document.execCommand')
+ @DocsEditable
bool execCommand(String command, bool userInterface, String value) native "Document_execCommand_Callback";
- @DocsEditable
@DomName('Document.getCSSCanvasContext')
+ @DocsEditable
CanvasRenderingContext $dom_getCssCanvasContext(String contextId, String name, int width, int height) native "Document_getCSSCanvasContext_Callback";
- @DocsEditable
@DomName('Document.getElementById')
+ @DocsEditable
Element $dom_getElementById(String elementId) native "Document_getElementById_Callback";
- @DocsEditable
@DomName('Document.getElementsByClassName')
+ @DocsEditable
List<Node> $dom_getElementsByClassName(String tagname) native "Document_getElementsByClassName_Callback";
- @DocsEditable
@DomName('Document.getElementsByName')
+ @DocsEditable
List<Node> $dom_getElementsByName(String elementName) native "Document_getElementsByName_Callback";
- @DocsEditable
@DomName('Document.getElementsByTagName')
+ @DocsEditable
List<Node> $dom_getElementsByTagName(String tagname) native "Document_getElementsByTagName_Callback";
- @DocsEditable
@DomName('Document.queryCommandEnabled')
+ @DocsEditable
bool queryCommandEnabled(String command) native "Document_queryCommandEnabled_Callback";
- @DocsEditable
@DomName('Document.queryCommandIndeterm')
+ @DocsEditable
bool queryCommandIndeterm(String command) native "Document_queryCommandIndeterm_Callback";
- @DocsEditable
@DomName('Document.queryCommandState')
+ @DocsEditable
bool queryCommandState(String command) native "Document_queryCommandState_Callback";
- @DocsEditable
@DomName('Document.queryCommandSupported')
+ @DocsEditable
bool queryCommandSupported(String command) native "Document_queryCommandSupported_Callback";
- @DocsEditable
@DomName('Document.queryCommandValue')
+ @DocsEditable
String queryCommandValue(String command) native "Document_queryCommandValue_Callback";
- @DocsEditable
@DomName('Document.querySelector')
+ @DocsEditable
Element $dom_querySelector(String selectors) native "Document_querySelector_Callback";
- @DocsEditable
@DomName('Document.querySelectorAll')
+ @DocsEditable
List<Node> $dom_querySelectorAll(String selectors) native "Document_querySelectorAll_Callback";
- @DocsEditable
@DomName('Document.webkitCancelFullScreen')
+ @DocsEditable
void $dom_webkitCancelFullScreen() native "Document_webkitCancelFullScreen_Callback";
- @DocsEditable
@DomName('Document.webkitExitFullscreen')
+ @DocsEditable
void $dom_webkitExitFullscreen() native "Document_webkitExitFullscreen_Callback";
- @DocsEditable
@DomName('Document.webkitExitPointerLock')
+ @DocsEditable
void $dom_webkitExitPointerLock() native "Document_webkitExitPointerLock_Callback";
+ @DomName('Document.abort')
+ @DocsEditable
Stream<Event> get onAbort => Element.abortEvent.forTarget(this);
+ @DomName('Document.beforecopy')
+ @DocsEditable
Stream<Event> get onBeforeCopy => Element.beforeCopyEvent.forTarget(this);
+ @DomName('Document.beforecut')
+ @DocsEditable
Stream<Event> get onBeforeCut => Element.beforeCutEvent.forTarget(this);
+ @DomName('Document.beforepaste')
+ @DocsEditable
Stream<Event> get onBeforePaste => Element.beforePasteEvent.forTarget(this);
+ @DomName('Document.blur')
+ @DocsEditable
Stream<Event> get onBlur => Element.blurEvent.forTarget(this);
+ @DomName('Document.change')
+ @DocsEditable
Stream<Event> get onChange => Element.changeEvent.forTarget(this);
+ @DomName('Document.click')
+ @DocsEditable
Stream<MouseEvent> get onClick => Element.clickEvent.forTarget(this);
+ @DomName('Document.contextmenu')
+ @DocsEditable
Stream<MouseEvent> get onContextMenu => Element.contextMenuEvent.forTarget(this);
+ @DomName('Document.copy')
+ @DocsEditable
Stream<Event> get onCopy => Element.copyEvent.forTarget(this);
+ @DomName('Document.cut')
+ @DocsEditable
Stream<Event> get onCut => Element.cutEvent.forTarget(this);
+ @DomName('Document.dblclick')
+ @DocsEditable
Stream<Event> get onDoubleClick => Element.doubleClickEvent.forTarget(this);
+ @DomName('Document.drag')
+ @DocsEditable
Stream<MouseEvent> get onDrag => Element.dragEvent.forTarget(this);
+ @DomName('Document.dragend')
+ @DocsEditable
Stream<MouseEvent> get onDragEnd => Element.dragEndEvent.forTarget(this);
+ @DomName('Document.dragenter')
+ @DocsEditable
Stream<MouseEvent> get onDragEnter => Element.dragEnterEvent.forTarget(this);
+ @DomName('Document.dragleave')
+ @DocsEditable
Stream<MouseEvent> get onDragLeave => Element.dragLeaveEvent.forTarget(this);
+ @DomName('Document.dragover')
+ @DocsEditable
Stream<MouseEvent> get onDragOver => Element.dragOverEvent.forTarget(this);
+ @DomName('Document.dragstart')
+ @DocsEditable
Stream<MouseEvent> get onDragStart => Element.dragStartEvent.forTarget(this);
+ @DomName('Document.drop')
+ @DocsEditable
Stream<MouseEvent> get onDrop => Element.dropEvent.forTarget(this);
+ @DomName('Document.error')
+ @DocsEditable
Stream<Event> get onError => Element.errorEvent.forTarget(this);
+ @DomName('Document.focus')
+ @DocsEditable
Stream<Event> get onFocus => Element.focusEvent.forTarget(this);
+ @DomName('Document.input')
+ @DocsEditable
Stream<Event> get onInput => Element.inputEvent.forTarget(this);
+ @DomName('Document.invalid')
+ @DocsEditable
Stream<Event> get onInvalid => Element.invalidEvent.forTarget(this);
+ @DomName('Document.keydown')
+ @DocsEditable
Stream<KeyboardEvent> get onKeyDown => Element.keyDownEvent.forTarget(this);
+ @DomName('Document.keypress')
+ @DocsEditable
Stream<KeyboardEvent> get onKeyPress => Element.keyPressEvent.forTarget(this);
+ @DomName('Document.keyup')
+ @DocsEditable
Stream<KeyboardEvent> get onKeyUp => Element.keyUpEvent.forTarget(this);
+ @DomName('Document.load')
+ @DocsEditable
Stream<Event> get onLoad => Element.loadEvent.forTarget(this);
+ @DomName('Document.mousedown')
+ @DocsEditable
Stream<MouseEvent> get onMouseDown => Element.mouseDownEvent.forTarget(this);
+ @DomName('Document.mousemove')
+ @DocsEditable
Stream<MouseEvent> get onMouseMove => Element.mouseMoveEvent.forTarget(this);
+ @DomName('Document.mouseout')
+ @DocsEditable
Stream<MouseEvent> get onMouseOut => Element.mouseOutEvent.forTarget(this);
+ @DomName('Document.mouseover')
+ @DocsEditable
Stream<MouseEvent> get onMouseOver => Element.mouseOverEvent.forTarget(this);
+ @DomName('Document.mouseup')
+ @DocsEditable
Stream<MouseEvent> get onMouseUp => Element.mouseUpEvent.forTarget(this);
+ @DomName('Document.mousewheel')
+ @DocsEditable
Stream<WheelEvent> get onMouseWheel => Element.mouseWheelEvent.forTarget(this);
+ @DomName('Document.paste')
+ @DocsEditable
Stream<Event> get onPaste => Element.pasteEvent.forTarget(this);
+ @DomName('Document.readystatechange')
+ @DocsEditable
Stream<Event> get onReadyStateChange => readyStateChangeEvent.forTarget(this);
+ @DomName('Document.reset')
+ @DocsEditable
Stream<Event> get onReset => Element.resetEvent.forTarget(this);
+ @DomName('Document.scroll')
+ @DocsEditable
Stream<Event> get onScroll => Element.scrollEvent.forTarget(this);
+ @DomName('Document.search')
+ @DocsEditable
Stream<Event> get onSearch => Element.searchEvent.forTarget(this);
+ @DomName('Document.select')
+ @DocsEditable
Stream<Event> get onSelect => Element.selectEvent.forTarget(this);
+ @DomName('Document.selectionchange')
+ @DocsEditable
Stream<Event> get onSelectionChange => selectionChangeEvent.forTarget(this);
+ @DomName('Document.selectstart')
+ @DocsEditable
Stream<Event> get onSelectStart => Element.selectStartEvent.forTarget(this);
+ @DomName('Document.submit')
+ @DocsEditable
Stream<Event> get onSubmit => Element.submitEvent.forTarget(this);
+ @DomName('Document.touchcancel')
+ @DocsEditable
Stream<TouchEvent> get onTouchCancel => Element.touchCancelEvent.forTarget(this);
+ @DomName('Document.touchend')
+ @DocsEditable
Stream<TouchEvent> get onTouchEnd => Element.touchEndEvent.forTarget(this);
+ @DomName('Document.touchmove')
+ @DocsEditable
Stream<TouchEvent> get onTouchMove => Element.touchMoveEvent.forTarget(this);
+ @DomName('Document.touchstart')
+ @DocsEditable
Stream<TouchEvent> get onTouchStart => Element.touchStartEvent.forTarget(this);
+ @DomName('Document.webkitfullscreenchange')
+ @DocsEditable
Stream<Event> get onFullscreenChange => Element.fullscreenChangeEvent.forTarget(this);
+ @DomName('Document.webkitfullscreenerror')
+ @DocsEditable
Stream<Event> get onFullscreenError => Element.fullscreenErrorEvent.forTarget(this);
+ @DomName('Document.webkitpointerlockchange')
+ @DocsEditable
Stream<Event> get onPointerLockChange => pointerLockChangeEvent.forTarget(this);
+ @DomName('Document.webkitpointerlockerror')
+ @DocsEditable
Stream<Event> get onPointerLockError => pointerLockErrorEvent.forTarget(this);
@@ -7184,6 +7433,7 @@
}
@DocsEditable
+@deprecated
class DocumentEvents extends ElementEvents {
@DocsEditable
DocumentEvents(EventTarget _ptr) : super(_ptr);
@@ -7205,22 +7455,6 @@
// BSD-style license that can be found in the LICENSE file.
-Future<CssStyleDeclaration> _emptyStyleFuture() {
- return _createMeasurementFuture(() => new Element.tag('div').style,
- new Completer<CssStyleDeclaration>());
-}
-
-class _FrozenCssClassSet extends CssClassSet {
- void writeClasses(Set s) {
- throw new UnsupportedError(
- 'frozen class set cannot be modified');
- }
- Set<String> readClasses() => new Set<String>();
-
- bool get frozen => true;
-}
-
-@DocsEditable
@DomName('DocumentFragment')
class DocumentFragment extends Node {
factory DocumentFragment() => _DocumentFragmentFactoryProvider.createDocumentFragment();
@@ -7268,8 +7502,6 @@
return e.innerHtml;
}
- String get outerHtml => innerHtml;
-
// TODO(nweiz): Do we want to support some variant of innerHtml for XML and/or
// SVG strings?
void set innerHtml(String value) {
@@ -7283,201 +7515,32 @@
this.nodes.addAll(nodes);
}
- Node _insertAdjacentNode(String where, Node node) {
- switch (where.toLowerCase()) {
- case "beforebegin": return null;
- case "afterend": return null;
- case "afterbegin":
- var first = this.nodes.length > 0 ? this.nodes[0] : null;
- this.insertBefore(node, first);
- return node;
- case "beforeend":
- this.nodes.add(node);
- return node;
- default:
- throw new ArgumentError("Invalid position ${where}");
- }
- }
-
- Element insertAdjacentElement(String where, Element element)
- => this._insertAdjacentNode(where, element);
-
- void insertAdjacentText(String where, String text) {
- this._insertAdjacentNode(where, new Text(text));
- }
-
- void insertAdjacentHtml(String where, String text) {
- this._insertAdjacentNode(where, new DocumentFragment.html(text));
- }
-
void append(Element element) {
this.children.add(element);
}
void appendText(String text) {
- this.insertAdjacentText('beforeend', text);
+ this.nodes.add(new Text(text));
}
void appendHtml(String text) {
- this.insertAdjacentHtml('beforeend', text);
- }
-
- // If we can come up with a semi-reasonable default value for an Element
- // getter, we'll use it. In general, these return the same values as an
- // element that has no parent.
- String get contentEditable => "false";
- bool get isContentEditable => false;
- bool get draggable => false;
- bool get hidden => false;
- bool get spellcheck => false;
- bool get translate => false;
- int get tabIndex => -1;
- String get id => "";
- String get title => "";
- String get tagName => "";
- String get webkitdropzone => "";
- String get webkitRegionOverflow => "";
- Element get $m_firstElementChild {
- if (children.length > 0) {
- return children[0];
- }
- return null;
- }
- Element get $m_lastElementChild => children.last;
- Element get nextElementSibling => null;
- Element get previousElementSibling => null;
- Element get offsetParent => null;
- Element get parent => null;
- Map<String, String> get attributes => const {};
- CssClassSet get classes => new _FrozenCssClassSet();
- Map<String, String> get dataAttributes => const {};
- CssStyleDeclaration get style => new Element.tag('div').style;
- Future<CssStyleDeclaration> get computedStyle =>
- _emptyStyleFuture();
- Future<CssStyleDeclaration> getComputedStyle(String pseudoElement) =>
- _emptyStyleFuture();
-
- // Imperative Element methods are made into no-ops, as they are on parentless
- // elements.
- void blur() {}
- void focus() {}
- void click() {}
- void scrollByLines(int lines) {}
- void scrollByPages(int pages) {}
- void scrollIntoView([bool centerIfNeeded]) {}
- void webkitRequestFullScreen(int flags) {}
- void webkitRequestFullscreen() {}
-
- // Setters throw errors rather than being no-ops because we aren't going to
- // retain the values that were set, and erroring out seems clearer.
- void set attributes(Map<String, String> value) {
- throw new UnsupportedError(
- "Attributes can't be set for document fragments.");
- }
-
- void set classes(Collection<String> value) {
- throw new UnsupportedError(
- "Classes can't be set for document fragments.");
- }
-
- void set dataAttributes(Map<String, String> value) {
- throw new UnsupportedError(
- "Data attributes can't be set for document fragments.");
- }
-
- void set contentEditable(String value) {
- throw new UnsupportedError(
- "Content editable can't be set for document fragments.");
- }
-
- String get dir {
- throw new UnsupportedError(
- "Document fragments don't support text direction.");
- }
-
- void set dir(String value) {
- throw new UnsupportedError(
- "Document fragments don't support text direction.");
- }
-
- void set draggable(bool value) {
- throw new UnsupportedError(
- "Draggable can't be set for document fragments.");
- }
-
- void set hidden(bool value) {
- throw new UnsupportedError(
- "Hidden can't be set for document fragments.");
- }
-
- void set id(String value) {
- throw new UnsupportedError(
- "ID can't be set for document fragments.");
- }
-
- String get lang {
- throw new UnsupportedError(
- "Document fragments don't support language.");
- }
-
- void set lang(String value) {
- throw new UnsupportedError(
- "Document fragments don't support language.");
- }
-
- void set scrollLeft(int value) {
- throw new UnsupportedError(
- "Document fragments don't support scrolling.");
- }
-
- void set scrollTop(int value) {
- throw new UnsupportedError(
- "Document fragments don't support scrolling.");
- }
-
- void set spellcheck(bool value) {
- throw new UnsupportedError(
- "Spellcheck can't be set for document fragments.");
- }
-
- void set translate(bool value) {
- throw new UnsupportedError(
- "Spellcheck can't be set for document fragments.");
- }
-
- void set tabIndex(int value) {
- throw new UnsupportedError(
- "Tab index can't be set for document fragments.");
- }
-
- void set title(String value) {
- throw new UnsupportedError(
- "Title can't be set for document fragments.");
- }
-
- void set webkitdropzone(String value) {
- throw new UnsupportedError(
- "WebKit drop zone can't be set for document fragments.");
- }
-
- void set webkitRegionOverflow(String value) {
- throw new UnsupportedError(
- "WebKit region overflow can't be set for document fragments.");
+ this.nodes.add(new DocumentFragment.html(text));
}
DocumentFragment.internal() : super.internal();
@DocsEditable
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
+ @deprecated
ElementEvents get on =>
new ElementEvents(this);
- @DocsEditable
@DomName('DocumentFragment.querySelector')
+ @DocsEditable
Element $dom_querySelector(String selectors) native "DocumentFragment_querySelector_Callback";
- @DocsEditable
@DomName('DocumentFragment.querySelectorAll')
+ @DocsEditable
List<Node> $dom_querySelectorAll(String selectors) native "DocumentFragment_querySelectorAll_Callback";
}
@@ -7506,8 +7569,8 @@
class DomError extends NativeFieldWrapperClass1 {
DomError.internal();
- @DocsEditable
@DomName('DOMError.name')
+ @DocsEditable
String get name native "DOMError_name_Getter";
}
@@ -7543,16 +7606,16 @@
DomException.internal();
- @DocsEditable
@DomName('DOMCoreException.message')
+ @DocsEditable
String get message native "DOMCoreException_message_Getter";
- @DocsEditable
@DomName('DOMCoreException.name')
+ @DocsEditable
String get name native "DOMCoreException_name_Getter";
- @DocsEditable
@DomName('DOMCoreException.toString')
+ @DocsEditable
String toString() native "DOMCoreException_toString_Callback";
}
@@ -7568,24 +7631,24 @@
class DomImplementation extends NativeFieldWrapperClass1 {
DomImplementation.internal();
- @DocsEditable
@DomName('DOMImplementation.createCSSStyleSheet')
+ @DocsEditable
CssStyleSheet createCssStyleSheet(String title, String media) native "DOMImplementation_createCSSStyleSheet_Callback";
- @DocsEditable
@DomName('DOMImplementation.createDocument')
+ @DocsEditable
Document createDocument(String namespaceURI, String qualifiedName, DocumentType doctype) native "DOMImplementation_createDocument_Callback";
- @DocsEditable
@DomName('DOMImplementation.createDocumentType')
+ @DocsEditable
DocumentType createDocumentType(String qualifiedName, String publicId, String systemId) native "DOMImplementation_createDocumentType_Callback";
- @DocsEditable
@DomName('DOMImplementation.createHTMLDocument')
+ @DocsEditable
HtmlDocument createHtmlDocument(String title) native "DOMImplementation_createHTMLDocument_Callback";
- @DocsEditable
@DomName('DOMImplementation.hasFeature')
+ @DocsEditable
bool hasFeature(String feature, String version) native "DOMImplementation_hasFeature_Callback";
}
@@ -7601,20 +7664,20 @@
class DomMimeType extends NativeFieldWrapperClass1 {
DomMimeType.internal();
- @DocsEditable
@DomName('DOMMimeType.description')
+ @DocsEditable
String get description native "DOMMimeType_description_Getter";
- @DocsEditable
@DomName('DOMMimeType.enabledPlugin')
+ @DocsEditable
DomPlugin get enabledPlugin native "DOMMimeType_enabledPlugin_Getter";
- @DocsEditable
@DomName('DOMMimeType.suffixes')
+ @DocsEditable
String get suffixes native "DOMMimeType_suffixes_Getter";
- @DocsEditable
@DomName('DOMMimeType.type')
+ @DocsEditable
String get type native "DOMMimeType_type_Getter";
}
@@ -7630,8 +7693,8 @@
class DomMimeTypeArray extends NativeFieldWrapperClass1 implements List<DomMimeType> {
DomMimeTypeArray.internal();
- @DocsEditable
@DomName('DOMMimeTypeArray.length')
+ @DocsEditable
int get length native "DOMMimeTypeArray_length_Getter";
DomMimeType operator[](int index) native "DOMMimeTypeArray_item_Callback";
@@ -7659,11 +7722,13 @@
void forEach(void f(DomMimeType element)) => IterableMixinWorkaround.forEach(this, f);
- String join([String separator]) => IterableMixinWorkaround.joinList(this, separator);
+ String join([String separator]) =>
+ IterableMixinWorkaround.joinList(this, separator);
List mappedBy(f(DomMimeType element)) => IterableMixinWorkaround.mappedByList(this, f);
- Iterable<DomMimeType> where(bool f(DomMimeType element)) => IterableMixinWorkaround.where(this, f);
+ Iterable<DomMimeType> where(bool f(DomMimeType element)) =>
+ IterableMixinWorkaround.where(this, f);
bool every(bool f(DomMimeType element)) => IterableMixinWorkaround.every(this, f);
@@ -7725,6 +7790,9 @@
throw new UnsupportedError("Cannot clear immutable List.");
}
+ List<DomMimeType> get reversed =>
+ new ReversedListView<DomMimeType>(this, 0, null);
+
void sort([int compare(DomMimeType a, DomMimeType b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -7753,9 +7821,11 @@
throw new StateError("More than one element");
}
- DomMimeType min([int compare(DomMimeType a, DomMimeType b)]) => IterableMixinWorkaround.min(this, compare);
+ DomMimeType min([int compare(DomMimeType a, DomMimeType b)]) =>
+ IterableMixinWorkaround.min(this, compare);
- DomMimeType max([int compare(DomMimeType a, DomMimeType b)]) => IterableMixinWorkaround.max(this, compare);
+ DomMimeType max([int compare(DomMimeType a, DomMimeType b)]) =>
+ IterableMixinWorkaround.max(this, compare);
DomMimeType removeAt(int pos) {
throw new UnsupportedError("Cannot remove from immutable List.");
@@ -7802,12 +7872,12 @@
// -- end List<DomMimeType> mixins.
- @DocsEditable
@DomName('DOMMimeTypeArray.item')
+ @DocsEditable
DomMimeType item(int index) native "DOMMimeTypeArray_item_Callback";
- @DocsEditable
@DomName('DOMMimeTypeArray.namedItem')
+ @DocsEditable
DomMimeType namedItem(String name) native "DOMMimeTypeArray_namedItem_Callback";
}
@@ -7827,8 +7897,8 @@
factory DomParser() => DomParser._create();
static DomParser _create() native "DOMParser_constructor_Callback";
- @DocsEditable
@DomName('DOMParser.parseFromString')
+ @DocsEditable
Document parseFromString(String str, String contentType) native "DOMParser_parseFromString_Callback";
}
@@ -7844,28 +7914,28 @@
class DomPlugin extends NativeFieldWrapperClass1 {
DomPlugin.internal();
- @DocsEditable
@DomName('DOMPlugin.description')
+ @DocsEditable
String get description native "DOMPlugin_description_Getter";
- @DocsEditable
@DomName('DOMPlugin.filename')
+ @DocsEditable
String get filename native "DOMPlugin_filename_Getter";
- @DocsEditable
@DomName('DOMPlugin.length')
+ @DocsEditable
int get length native "DOMPlugin_length_Getter";
- @DocsEditable
@DomName('DOMPlugin.name')
+ @DocsEditable
String get name native "DOMPlugin_name_Getter";
- @DocsEditable
@DomName('DOMPlugin.item')
+ @DocsEditable
DomMimeType item(int index) native "DOMPlugin_item_Callback";
- @DocsEditable
@DomName('DOMPlugin.namedItem')
+ @DocsEditable
DomMimeType namedItem(String name) native "DOMPlugin_namedItem_Callback";
}
@@ -7881,8 +7951,8 @@
class DomPluginArray extends NativeFieldWrapperClass1 implements List<DomPlugin> {
DomPluginArray.internal();
- @DocsEditable
@DomName('DOMPluginArray.length')
+ @DocsEditable
int get length native "DOMPluginArray_length_Getter";
DomPlugin operator[](int index) native "DOMPluginArray_item_Callback";
@@ -7910,11 +7980,13 @@
void forEach(void f(DomPlugin element)) => IterableMixinWorkaround.forEach(this, f);
- String join([String separator]) => IterableMixinWorkaround.joinList(this, separator);
+ String join([String separator]) =>
+ IterableMixinWorkaround.joinList(this, separator);
List mappedBy(f(DomPlugin element)) => IterableMixinWorkaround.mappedByList(this, f);
- Iterable<DomPlugin> where(bool f(DomPlugin element)) => IterableMixinWorkaround.where(this, f);
+ Iterable<DomPlugin> where(bool f(DomPlugin element)) =>
+ IterableMixinWorkaround.where(this, f);
bool every(bool f(DomPlugin element)) => IterableMixinWorkaround.every(this, f);
@@ -7976,6 +8048,9 @@
throw new UnsupportedError("Cannot clear immutable List.");
}
+ List<DomPlugin> get reversed =>
+ new ReversedListView<DomPlugin>(this, 0, null);
+
void sort([int compare(DomPlugin a, DomPlugin b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -8004,9 +8079,11 @@
throw new StateError("More than one element");
}
- DomPlugin min([int compare(DomPlugin a, DomPlugin b)]) => IterableMixinWorkaround.min(this, compare);
+ DomPlugin min([int compare(DomPlugin a, DomPlugin b)]) =>
+ IterableMixinWorkaround.min(this, compare);
- DomPlugin max([int compare(DomPlugin a, DomPlugin b)]) => IterableMixinWorkaround.max(this, compare);
+ DomPlugin max([int compare(DomPlugin a, DomPlugin b)]) =>
+ IterableMixinWorkaround.max(this, compare);
DomPlugin removeAt(int pos) {
throw new UnsupportedError("Cannot remove from immutable List.");
@@ -8053,16 +8130,16 @@
// -- end List<DomPlugin> mixins.
- @DocsEditable
@DomName('DOMPluginArray.item')
+ @DocsEditable
DomPlugin item(int index) native "DOMPluginArray_item_Callback";
- @DocsEditable
@DomName('DOMPluginArray.namedItem')
+ @DocsEditable
DomPlugin namedItem(String name) native "DOMPluginArray_namedItem_Callback";
- @DocsEditable
@DomName('DOMPluginArray.refresh')
+ @DocsEditable
void refresh(bool reload) native "DOMPluginArray_refresh_Callback";
}
@@ -8078,108 +8155,108 @@
class DomSelection extends NativeFieldWrapperClass1 {
DomSelection.internal();
- @DocsEditable
@DomName('DOMSelection.anchorNode')
+ @DocsEditable
Node get anchorNode native "DOMSelection_anchorNode_Getter";
- @DocsEditable
@DomName('DOMSelection.anchorOffset')
+ @DocsEditable
int get anchorOffset native "DOMSelection_anchorOffset_Getter";
- @DocsEditable
@DomName('DOMSelection.baseNode')
+ @DocsEditable
Node get baseNode native "DOMSelection_baseNode_Getter";
- @DocsEditable
@DomName('DOMSelection.baseOffset')
+ @DocsEditable
int get baseOffset native "DOMSelection_baseOffset_Getter";
- @DocsEditable
@DomName('DOMSelection.extentNode')
+ @DocsEditable
Node get extentNode native "DOMSelection_extentNode_Getter";
- @DocsEditable
@DomName('DOMSelection.extentOffset')
+ @DocsEditable
int get extentOffset native "DOMSelection_extentOffset_Getter";
- @DocsEditable
@DomName('DOMSelection.focusNode')
+ @DocsEditable
Node get focusNode native "DOMSelection_focusNode_Getter";
- @DocsEditable
@DomName('DOMSelection.focusOffset')
+ @DocsEditable
int get focusOffset native "DOMSelection_focusOffset_Getter";
- @DocsEditable
@DomName('DOMSelection.isCollapsed')
+ @DocsEditable
bool get isCollapsed native "DOMSelection_isCollapsed_Getter";
- @DocsEditable
@DomName('DOMSelection.rangeCount')
+ @DocsEditable
int get rangeCount native "DOMSelection_rangeCount_Getter";
- @DocsEditable
@DomName('DOMSelection.type')
+ @DocsEditable
String get type native "DOMSelection_type_Getter";
- @DocsEditable
@DomName('DOMSelection.addRange')
+ @DocsEditable
void addRange(Range range) native "DOMSelection_addRange_Callback";
- @DocsEditable
@DomName('DOMSelection.collapse')
+ @DocsEditable
void collapse(Node node, int index) native "DOMSelection_collapse_Callback";
- @DocsEditable
@DomName('DOMSelection.collapseToEnd')
+ @DocsEditable
void collapseToEnd() native "DOMSelection_collapseToEnd_Callback";
- @DocsEditable
@DomName('DOMSelection.collapseToStart')
+ @DocsEditable
void collapseToStart() native "DOMSelection_collapseToStart_Callback";
- @DocsEditable
@DomName('DOMSelection.containsNode')
+ @DocsEditable
bool containsNode(Node node, bool allowPartial) native "DOMSelection_containsNode_Callback";
- @DocsEditable
@DomName('DOMSelection.deleteFromDocument')
+ @DocsEditable
void deleteFromDocument() native "DOMSelection_deleteFromDocument_Callback";
- @DocsEditable
@DomName('DOMSelection.empty')
+ @DocsEditable
void empty() native "DOMSelection_empty_Callback";
- @DocsEditable
@DomName('DOMSelection.extend')
+ @DocsEditable
void extend(Node node, int offset) native "DOMSelection_extend_Callback";
- @DocsEditable
@DomName('DOMSelection.getRangeAt')
+ @DocsEditable
Range getRangeAt(int index) native "DOMSelection_getRangeAt_Callback";
- @DocsEditable
@DomName('DOMSelection.modify')
+ @DocsEditable
void modify(String alter, String direction, String granularity) native "DOMSelection_modify_Callback";
- @DocsEditable
@DomName('DOMSelection.removeAllRanges')
+ @DocsEditable
void removeAllRanges() native "DOMSelection_removeAllRanges_Callback";
- @DocsEditable
@DomName('DOMSelection.selectAllChildren')
+ @DocsEditable
void selectAllChildren(Node node) native "DOMSelection_selectAllChildren_Callback";
- @DocsEditable
@DomName('DOMSelection.setBaseAndExtent')
+ @DocsEditable
void setBaseAndExtent(Node baseNode, int baseOffset, Node extentNode, int extentOffset) native "DOMSelection_setBaseAndExtent_Callback";
- @DocsEditable
@DomName('DOMSelection.setPosition')
+ @DocsEditable
void setPosition(Node node, int offset) native "DOMSelection_setPosition_Callback";
- @DocsEditable
@DomName('DOMSelection.toString')
+ @DocsEditable
String toString() native "DOMSelection_toString_Callback";
}
@@ -8195,12 +8272,12 @@
class DomSettableTokenList extends DomTokenList {
DomSettableTokenList.internal() : super.internal();
- @DocsEditable
@DomName('DOMSettableTokenList.value')
+ @DocsEditable
String get value native "DOMSettableTokenList_value_Getter";
- @DocsEditable
@DomName('DOMSettableTokenList.value')
+ @DocsEditable
void set value(String value) native "DOMSettableTokenList_value_Setter";
}
@@ -8216,8 +8293,8 @@
class DomStringList extends NativeFieldWrapperClass1 implements List<String> {
DomStringList.internal();
- @DocsEditable
@DomName('DOMStringList.length')
+ @DocsEditable
int get length native "DOMStringList_length_Getter";
String operator[](int index) native "DOMStringList_item_Callback";
@@ -8245,11 +8322,13 @@
void forEach(void f(String element)) => IterableMixinWorkaround.forEach(this, f);
- String join([String separator]) => IterableMixinWorkaround.joinList(this, separator);
+ String join([String separator]) =>
+ IterableMixinWorkaround.joinList(this, separator);
List mappedBy(f(String element)) => IterableMixinWorkaround.mappedByList(this, f);
- Iterable<String> where(bool f(String element)) => IterableMixinWorkaround.where(this, f);
+ Iterable<String> where(bool f(String element)) =>
+ IterableMixinWorkaround.where(this, f);
bool every(bool f(String element)) => IterableMixinWorkaround.every(this, f);
@@ -8311,6 +8390,9 @@
throw new UnsupportedError("Cannot clear immutable List.");
}
+ List<String> get reversed =>
+ new ReversedListView<String>(this, 0, null);
+
void sort([int compare(String a, String b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -8339,9 +8421,11 @@
throw new StateError("More than one element");
}
- String min([int compare(String a, String b)]) => IterableMixinWorkaround.min(this, compare);
+ String min([int compare(String a, String b)]) =>
+ IterableMixinWorkaround.min(this, compare);
- String max([int compare(String a, String b)]) => IterableMixinWorkaround.max(this, compare);
+ String max([int compare(String a, String b)]) =>
+ IterableMixinWorkaround.max(this, compare);
String removeAt(int pos) {
throw new UnsupportedError("Cannot remove from immutable List.");
@@ -8388,12 +8472,12 @@
// -- end List<String> mixins.
- @DocsEditable
@DomName('DOMStringList.contains')
+ @DocsEditable
bool contains(String string) native "DOMStringList_contains_Callback";
- @DocsEditable
@DomName('DOMStringList.item')
+ @DocsEditable
String item(int index) native "DOMStringList_item_Callback";
}
@@ -8422,20 +8506,20 @@
class DomTokenList extends NativeFieldWrapperClass1 {
DomTokenList.internal();
- @DocsEditable
@DomName('DOMTokenList.length')
+ @DocsEditable
int get length native "DOMTokenList_length_Getter";
- @DocsEditable
@DomName('DOMTokenList.contains')
+ @DocsEditable
bool contains(String token) native "DOMTokenList_contains_Callback";
- @DocsEditable
@DomName('DOMTokenList.item')
+ @DocsEditable
String item(int index) native "DOMTokenList_item_Callback";
- @DocsEditable
@DomName('DOMTokenList.toString')
+ @DocsEditable
String toString() native "DOMTokenList_toString_Callback";
bool toggle(String token, [bool force]) {
@@ -8445,13 +8529,13 @@
return _toggle_2(token);
}
+ @DomName('DOMTokenList._toggle_1')
@DocsEditable
- @DomName('DOMTokenList.toggle_1')
- bool _toggle_1(token, force) native "DOMTokenList_toggle_1_Callback";
+ bool _toggle_1(token, force) native "DOMTokenList__toggle_1_Callback";
+ @DomName('DOMTokenList._toggle_2')
@DocsEditable
- @DomName('DOMTokenList.toggle_2')
- bool _toggle_2(token) native "DOMTokenList_toggle_2_Callback";
+ bool _toggle_2(token) native "DOMTokenList__toggle_2_Callback";
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -8592,6 +8676,9 @@
}
}
+ List<Element> get reversed =>
+ new ReversedListView<Element>(this, 0, null);
+
void sort([int compare(Element a, Element b)]) {
throw new UnsupportedError('TODO(jacobr): should we impl?');
}
@@ -8615,19 +8702,19 @@
}
void removeAll(Iterable elements) {
- Collections.removeAll(this, elements);
+ IterableMixinWorkaround.removeAll(this, elements);
}
void retainAll(Iterable elements) {
- Collections.retainAll(this, elements);
+ IterableMixinWorkaround.retainAll(this, elements);
}
void removeMatching(bool test(Element element)) {
- Collections.removeMatching(this, test);
+ IterableMixinWorkaround.removeMatching(this, test);
}
void retainMatching(bool test(Element element)) {
- Collections.retainMatching(this, test);
+ IterableMixinWorkaround.retainMatching(this, test);
}
void removeRange(int start, int rangeLength) {
@@ -8814,6 +8901,9 @@
throw new UnsupportedError('');
}
+ List<Element> get reversed =>
+ new ReversedListView<Element>(this, 0, null);
+
void sort([int compare(Element a, Element b)]) {
throw new UnsupportedError('');
}
@@ -8951,6 +9041,7 @@
/**
* An abstract class, which all HTML elements extend.
*/
+@DomName('Element')
abstract class Element extends Node implements ElementTraversal {
/**
@@ -9228,104 +9319,201 @@
Element.internal() : super.internal();
+ @DomName('Element.abort')
+ @DocsEditable
static const EventStreamProvider<Event> abortEvent = const EventStreamProvider<Event>('abort');
+ @DomName('Element.beforecopy')
+ @DocsEditable
static const EventStreamProvider<Event> beforeCopyEvent = const EventStreamProvider<Event>('beforecopy');
+ @DomName('Element.beforecut')
+ @DocsEditable
static const EventStreamProvider<Event> beforeCutEvent = const EventStreamProvider<Event>('beforecut');
+ @DomName('Element.beforepaste')
+ @DocsEditable
static const EventStreamProvider<Event> beforePasteEvent = const EventStreamProvider<Event>('beforepaste');
+ @DomName('Element.blur')
+ @DocsEditable
static const EventStreamProvider<Event> blurEvent = const EventStreamProvider<Event>('blur');
+ @DomName('Element.change')
+ @DocsEditable
static const EventStreamProvider<Event> changeEvent = const EventStreamProvider<Event>('change');
+ @DomName('Element.click')
+ @DocsEditable
static const EventStreamProvider<MouseEvent> clickEvent = const EventStreamProvider<MouseEvent>('click');
+ @DomName('Element.contextmenu')
+ @DocsEditable
static const EventStreamProvider<MouseEvent> contextMenuEvent = const EventStreamProvider<MouseEvent>('contextmenu');
+ @DomName('Element.copy')
+ @DocsEditable
static const EventStreamProvider<Event> copyEvent = const EventStreamProvider<Event>('copy');
+ @DomName('Element.cut')
+ @DocsEditable
static const EventStreamProvider<Event> cutEvent = const EventStreamProvider<Event>('cut');
+ @DomName('Element.dblclick')
+ @DocsEditable
static const EventStreamProvider<Event> doubleClickEvent = const EventStreamProvider<Event>('dblclick');
+ @DomName('Element.drag')
+ @DocsEditable
static const EventStreamProvider<MouseEvent> dragEvent = const EventStreamProvider<MouseEvent>('drag');
+ @DomName('Element.dragend')
+ @DocsEditable
static const EventStreamProvider<MouseEvent> dragEndEvent = const EventStreamProvider<MouseEvent>('dragend');
+ @DomName('Element.dragenter')
+ @DocsEditable
static const EventStreamProvider<MouseEvent> dragEnterEvent = const EventStreamProvider<MouseEvent>('dragenter');
+ @DomName('Element.dragleave')
+ @DocsEditable
static const EventStreamProvider<MouseEvent> dragLeaveEvent = const EventStreamProvider<MouseEvent>('dragleave');
+ @DomName('Element.dragover')
+ @DocsEditable
static const EventStreamProvider<MouseEvent> dragOverEvent = const EventStreamProvider<MouseEvent>('dragover');
+ @DomName('Element.dragstart')
+ @DocsEditable
static const EventStreamProvider<MouseEvent> dragStartEvent = const EventStreamProvider<MouseEvent>('dragstart');
+ @DomName('Element.drop')
+ @DocsEditable
static const EventStreamProvider<MouseEvent> dropEvent = const EventStreamProvider<MouseEvent>('drop');
+ @DomName('Element.error')
+ @DocsEditable
static const EventStreamProvider<Event> errorEvent = const EventStreamProvider<Event>('error');
+ @DomName('Element.focus')
+ @DocsEditable
static const EventStreamProvider<Event> focusEvent = const EventStreamProvider<Event>('focus');
+ @DomName('Element.input')
+ @DocsEditable
static const EventStreamProvider<Event> inputEvent = const EventStreamProvider<Event>('input');
+ @DomName('Element.invalid')
+ @DocsEditable
static const EventStreamProvider<Event> invalidEvent = const EventStreamProvider<Event>('invalid');
+ @DomName('Element.keydown')
+ @DocsEditable
static const EventStreamProvider<KeyboardEvent> keyDownEvent = const EventStreamProvider<KeyboardEvent>('keydown');
+ @DomName('Element.keypress')
+ @DocsEditable
static const EventStreamProvider<KeyboardEvent> keyPressEvent = const EventStreamProvider<KeyboardEvent>('keypress');
+ @DomName('Element.keyup')
+ @DocsEditable
static const EventStreamProvider<KeyboardEvent> keyUpEvent = const EventStreamProvider<KeyboardEvent>('keyup');
+ @DomName('Element.load')
+ @DocsEditable
static const EventStreamProvider<Event> loadEvent = const EventStreamProvider<Event>('load');
+ @DomName('Element.mousedown')
+ @DocsEditable
static const EventStreamProvider<MouseEvent> mouseDownEvent = const EventStreamProvider<MouseEvent>('mousedown');
+ @DomName('Element.mousemove')
+ @DocsEditable
static const EventStreamProvider<MouseEvent> mouseMoveEvent = const EventStreamProvider<MouseEvent>('mousemove');
+ @DomName('Element.mouseout')
+ @DocsEditable
static const EventStreamProvider<MouseEvent> mouseOutEvent = const EventStreamProvider<MouseEvent>('mouseout');
+ @DomName('Element.mouseover')
+ @DocsEditable
static const EventStreamProvider<MouseEvent> mouseOverEvent = const EventStreamProvider<MouseEvent>('mouseover');
+ @DomName('Element.mouseup')
+ @DocsEditable
static const EventStreamProvider<MouseEvent> mouseUpEvent = const EventStreamProvider<MouseEvent>('mouseup');
+ @DomName('Element.mousewheel')
+ @DocsEditable
static const EventStreamProvider<WheelEvent> mouseWheelEvent = const EventStreamProvider<WheelEvent>('mousewheel');
+ @DomName('Element.paste')
+ @DocsEditable
static const EventStreamProvider<Event> pasteEvent = const EventStreamProvider<Event>('paste');
+ @DomName('Element.reset')
+ @DocsEditable
static const EventStreamProvider<Event> resetEvent = const EventStreamProvider<Event>('reset');
+ @DomName('Element.scroll')
+ @DocsEditable
static const EventStreamProvider<Event> scrollEvent = const EventStreamProvider<Event>('scroll');
+ @DomName('Element.search')
+ @DocsEditable
static const EventStreamProvider<Event> searchEvent = const EventStreamProvider<Event>('search');
+ @DomName('Element.select')
+ @DocsEditable
static const EventStreamProvider<Event> selectEvent = const EventStreamProvider<Event>('select');
+ @DomName('Element.selectstart')
+ @DocsEditable
static const EventStreamProvider<Event> selectStartEvent = const EventStreamProvider<Event>('selectstart');
+ @DomName('Element.submit')
+ @DocsEditable
static const EventStreamProvider<Event> submitEvent = const EventStreamProvider<Event>('submit');
+ @DomName('Element.touchcancel')
+ @DocsEditable
static const EventStreamProvider<TouchEvent> touchCancelEvent = const EventStreamProvider<TouchEvent>('touchcancel');
+ @DomName('Element.touchend')
+ @DocsEditable
static const EventStreamProvider<TouchEvent> touchEndEvent = const EventStreamProvider<TouchEvent>('touchend');
+ @DomName('Element.touchenter')
+ @DocsEditable
static const EventStreamProvider<TouchEvent> touchEnterEvent = const EventStreamProvider<TouchEvent>('touchenter');
+ @DomName('Element.touchleave')
+ @DocsEditable
static const EventStreamProvider<TouchEvent> touchLeaveEvent = const EventStreamProvider<TouchEvent>('touchleave');
+ @DomName('Element.touchmove')
+ @DocsEditable
static const EventStreamProvider<TouchEvent> touchMoveEvent = const EventStreamProvider<TouchEvent>('touchmove');
+ @DomName('Element.touchstart')
+ @DocsEditable
static const EventStreamProvider<TouchEvent> touchStartEvent = const EventStreamProvider<TouchEvent>('touchstart');
+ @DomName('Element.webkitTransitionEnd')
+ @DocsEditable
static const EventStreamProvider<TransitionEvent> transitionEndEvent = const EventStreamProvider<TransitionEvent>('webkitTransitionEnd');
+ @DomName('Element.webkitfullscreenchange')
+ @DocsEditable
static const EventStreamProvider<Event> fullscreenChangeEvent = const EventStreamProvider<Event>('webkitfullscreenchange');
+ @DomName('Element.webkitfullscreenerror')
+ @DocsEditable
static const EventStreamProvider<Event> fullscreenErrorEvent = const EventStreamProvider<Event>('webkitfullscreenerror');
@DocsEditable
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
+ @deprecated
ElementEvents get on =>
new ElementEvents(this);
@@ -9369,184 +9557,184 @@
static const int ALLOW_KEYBOARD_INPUT = 1;
- @DocsEditable
@DomName('Element.childElementCount')
+ @DocsEditable
int get $dom_childElementCount native "Element_childElementCount_Getter";
- @DocsEditable
@DomName('Element.className')
+ @DocsEditable
String get $dom_className native "Element_className_Getter";
- @DocsEditable
@DomName('Element.className')
+ @DocsEditable
void set $dom_className(String value) native "Element_className_Setter";
- @DocsEditable
@DomName('Element.clientHeight')
+ @DocsEditable
int get clientHeight native "Element_clientHeight_Getter";
- @DocsEditable
@DomName('Element.clientLeft')
+ @DocsEditable
int get clientLeft native "Element_clientLeft_Getter";
- @DocsEditable
@DomName('Element.clientTop')
+ @DocsEditable
int get clientTop native "Element_clientTop_Getter";
- @DocsEditable
@DomName('Element.clientWidth')
+ @DocsEditable
int get clientWidth native "Element_clientWidth_Getter";
- @DocsEditable
@DomName('Element.dataset')
+ @DocsEditable
Map<String, String> get dataset native "Element_dataset_Getter";
- @DocsEditable
@DomName('Element.firstElementChild')
+ @DocsEditable
Element get $dom_firstElementChild native "Element_firstElementChild_Getter";
- @DocsEditable
@DomName('Element.lastElementChild')
+ @DocsEditable
Element get $dom_lastElementChild native "Element_lastElementChild_Getter";
- @DocsEditable
@DomName('Element.nextElementSibling')
+ @DocsEditable
Element get nextElementSibling native "Element_nextElementSibling_Getter";
- @DocsEditable
@DomName('Element.offsetHeight')
+ @DocsEditable
int get offsetHeight native "Element_offsetHeight_Getter";
- @DocsEditable
@DomName('Element.offsetLeft')
+ @DocsEditable
int get offsetLeft native "Element_offsetLeft_Getter";
- @DocsEditable
@DomName('Element.offsetParent')
+ @DocsEditable
Element get offsetParent native "Element_offsetParent_Getter";
- @DocsEditable
@DomName('Element.offsetTop')
+ @DocsEditable
int get offsetTop native "Element_offsetTop_Getter";
- @DocsEditable
@DomName('Element.offsetWidth')
+ @DocsEditable
int get offsetWidth native "Element_offsetWidth_Getter";
- @DocsEditable
@DomName('Element.previousElementSibling')
+ @DocsEditable
Element get previousElementSibling native "Element_previousElementSibling_Getter";
- @DocsEditable
@DomName('Element.scrollHeight')
+ @DocsEditable
int get scrollHeight native "Element_scrollHeight_Getter";
- @DocsEditable
@DomName('Element.scrollLeft')
+ @DocsEditable
int get scrollLeft native "Element_scrollLeft_Getter";
- @DocsEditable
@DomName('Element.scrollLeft')
+ @DocsEditable
void set scrollLeft(int value) native "Element_scrollLeft_Setter";
- @DocsEditable
@DomName('Element.scrollTop')
+ @DocsEditable
int get scrollTop native "Element_scrollTop_Getter";
- @DocsEditable
@DomName('Element.scrollTop')
+ @DocsEditable
void set scrollTop(int value) native "Element_scrollTop_Setter";
- @DocsEditable
@DomName('Element.scrollWidth')
+ @DocsEditable
int get scrollWidth native "Element_scrollWidth_Getter";
- @DocsEditable
@DomName('Element.style')
+ @DocsEditable
CssStyleDeclaration get style native "Element_style_Getter";
- @DocsEditable
@DomName('Element.tagName')
+ @DocsEditable
String get tagName native "Element_tagName_Getter";
- @DocsEditable
@DomName('Element.webkitPseudo')
+ @DocsEditable
String get webkitPseudo native "Element_webkitPseudo_Getter";
- @DocsEditable
@DomName('Element.webkitPseudo')
+ @DocsEditable
void set webkitPseudo(String value) native "Element_webkitPseudo_Setter";
- @DocsEditable
@DomName('Element.webkitShadowRoot')
+ @DocsEditable
ShadowRoot get webkitShadowRoot native "Element_webkitShadowRoot_Getter";
- @DocsEditable
@DomName('Element.blur')
+ @DocsEditable
void blur() native "Element_blur_Callback";
- @DocsEditable
@DomName('Element.focus')
+ @DocsEditable
void focus() native "Element_focus_Callback";
- @DocsEditable
@DomName('Element.getAttribute')
+ @DocsEditable
String $dom_getAttribute(String name) native "Element_getAttribute_Callback";
- @DocsEditable
@DomName('Element.getAttributeNS')
+ @DocsEditable
String $dom_getAttributeNS(String namespaceURI, String localName) native "Element_getAttributeNS_Callback";
- @DocsEditable
@DomName('Element.getBoundingClientRect')
+ @DocsEditable
ClientRect getBoundingClientRect() native "Element_getBoundingClientRect_Callback";
- @DocsEditable
@DomName('Element.getClientRects')
+ @DocsEditable
List<ClientRect> getClientRects() native "Element_getClientRects_Callback";
- @DocsEditable
@DomName('Element.getElementsByClassName')
+ @DocsEditable
List<Node> $dom_getElementsByClassName(String name) native "Element_getElementsByClassName_Callback";
- @DocsEditable
@DomName('Element.getElementsByTagName')
+ @DocsEditable
List<Node> $dom_getElementsByTagName(String name) native "Element_getElementsByTagName_Callback";
- @DocsEditable
@DomName('Element.hasAttribute')
+ @DocsEditable
bool $dom_hasAttribute(String name) native "Element_hasAttribute_Callback";
- @DocsEditable
@DomName('Element.hasAttributeNS')
+ @DocsEditable
bool $dom_hasAttributeNS(String namespaceURI, String localName) native "Element_hasAttributeNS_Callback";
- @DocsEditable
@DomName('Element.querySelector')
+ @DocsEditable
Element $dom_querySelector(String selectors) native "Element_querySelector_Callback";
- @DocsEditable
@DomName('Element.querySelectorAll')
+ @DocsEditable
List<Node> $dom_querySelectorAll(String selectors) native "Element_querySelectorAll_Callback";
- @DocsEditable
@DomName('Element.remove')
+ @DocsEditable
void remove() native "Element_remove_Callback";
- @DocsEditable
@DomName('Element.removeAttribute')
+ @DocsEditable
void $dom_removeAttribute(String name) native "Element_removeAttribute_Callback";
- @DocsEditable
@DomName('Element.removeAttributeNS')
+ @DocsEditable
void $dom_removeAttributeNS(String namespaceURI, String localName) native "Element_removeAttributeNS_Callback";
- @DocsEditable
@DomName('Element.scrollByLines')
+ @DocsEditable
void scrollByLines(int lines) native "Element_scrollByLines_Callback";
- @DocsEditable
@DomName('Element.scrollByPages')
+ @DocsEditable
void scrollByPages(int pages) native "Element_scrollByPages_Callback";
void scrollIntoView([bool centerIfNeeded]) {
@@ -9555,140 +9743,237 @@
return;
}
_scrollIntoViewIfNeeded_2();
+ return;
}
+ @DomName('Element._scrollIntoViewIfNeeded_1')
@DocsEditable
- @DomName('Element.scrollIntoViewIfNeeded_1')
- void _scrollIntoViewIfNeeded_1(centerIfNeeded) native "Element_scrollIntoViewIfNeeded_1_Callback";
+ void _scrollIntoViewIfNeeded_1(centerIfNeeded) native "Element__scrollIntoViewIfNeeded_1_Callback";
+ @DomName('Element._scrollIntoViewIfNeeded_2')
@DocsEditable
- @DomName('Element.scrollIntoViewIfNeeded_2')
- void _scrollIntoViewIfNeeded_2() native "Element_scrollIntoViewIfNeeded_2_Callback";
+ void _scrollIntoViewIfNeeded_2() native "Element__scrollIntoViewIfNeeded_2_Callback";
- @DocsEditable
@DomName('Element.setAttribute')
+ @DocsEditable
void $dom_setAttribute(String name, String value) native "Element_setAttribute_Callback";
- @DocsEditable
@DomName('Element.setAttributeNS')
+ @DocsEditable
void $dom_setAttributeNS(String namespaceURI, String qualifiedName, String value) native "Element_setAttributeNS_Callback";
- @DocsEditable
@DomName('Element.webkitCreateShadowRoot')
+ @DocsEditable
@SupportedBrowser(SupportedBrowser.CHROME, '25')
- @Experimental()
+ @Experimental
ShadowRoot createShadowRoot() native "Element_webkitCreateShadowRoot_Callback";
- @DocsEditable
@DomName('Element.webkitMatchesSelector')
+ @DocsEditable
bool matches(String selectors) native "Element_webkitMatchesSelector_Callback";
- @DocsEditable
@DomName('Element.webkitRequestFullScreen')
+ @DocsEditable
void webkitRequestFullScreen(int flags) native "Element_webkitRequestFullScreen_Callback";
- @DocsEditable
@DomName('Element.webkitRequestFullscreen')
+ @DocsEditable
void webkitRequestFullscreen() native "Element_webkitRequestFullscreen_Callback";
- @DocsEditable
@DomName('Element.webkitRequestPointerLock')
+ @DocsEditable
void webkitRequestPointerLock() native "Element_webkitRequestPointerLock_Callback";
+ @DomName('Element.abort')
+ @DocsEditable
Stream<Event> get onAbort => abortEvent.forTarget(this);
+ @DomName('Element.beforecopy')
+ @DocsEditable
Stream<Event> get onBeforeCopy => beforeCopyEvent.forTarget(this);
+ @DomName('Element.beforecut')
+ @DocsEditable
Stream<Event> get onBeforeCut => beforeCutEvent.forTarget(this);
+ @DomName('Element.beforepaste')
+ @DocsEditable
Stream<Event> get onBeforePaste => beforePasteEvent.forTarget(this);
+ @DomName('Element.blur')
+ @DocsEditable
Stream<Event> get onBlur => blurEvent.forTarget(this);
+ @DomName('Element.change')
+ @DocsEditable
Stream<Event> get onChange => changeEvent.forTarget(this);
+ @DomName('Element.click')
+ @DocsEditable
Stream<MouseEvent> get onClick => clickEvent.forTarget(this);
+ @DomName('Element.contextmenu')
+ @DocsEditable
Stream<MouseEvent> get onContextMenu => contextMenuEvent.forTarget(this);
+ @DomName('Element.copy')
+ @DocsEditable
Stream<Event> get onCopy => copyEvent.forTarget(this);
+ @DomName('Element.cut')
+ @DocsEditable
Stream<Event> get onCut => cutEvent.forTarget(this);
+ @DomName('Element.dblclick')
+ @DocsEditable
Stream<Event> get onDoubleClick => doubleClickEvent.forTarget(this);
+ @DomName('Element.drag')
+ @DocsEditable
Stream<MouseEvent> get onDrag => dragEvent.forTarget(this);
+ @DomName('Element.dragend')
+ @DocsEditable
Stream<MouseEvent> get onDragEnd => dragEndEvent.forTarget(this);
+ @DomName('Element.dragenter')
+ @DocsEditable
Stream<MouseEvent> get onDragEnter => dragEnterEvent.forTarget(this);
+ @DomName('Element.dragleave')
+ @DocsEditable
Stream<MouseEvent> get onDragLeave => dragLeaveEvent.forTarget(this);
+ @DomName('Element.dragover')
+ @DocsEditable
Stream<MouseEvent> get onDragOver => dragOverEvent.forTarget(this);
+ @DomName('Element.dragstart')
+ @DocsEditable
Stream<MouseEvent> get onDragStart => dragStartEvent.forTarget(this);
+ @DomName('Element.drop')
+ @DocsEditable
Stream<MouseEvent> get onDrop => dropEvent.forTarget(this);
+ @DomName('Element.error')
+ @DocsEditable
Stream<Event> get onError => errorEvent.forTarget(this);
+ @DomName('Element.focus')
+ @DocsEditable
Stream<Event> get onFocus => focusEvent.forTarget(this);
+ @DomName('Element.input')
+ @DocsEditable
Stream<Event> get onInput => inputEvent.forTarget(this);
+ @DomName('Element.invalid')
+ @DocsEditable
Stream<Event> get onInvalid => invalidEvent.forTarget(this);
+ @DomName('Element.keydown')
+ @DocsEditable
Stream<KeyboardEvent> get onKeyDown => keyDownEvent.forTarget(this);
+ @DomName('Element.keypress')
+ @DocsEditable
Stream<KeyboardEvent> get onKeyPress => keyPressEvent.forTarget(this);
+ @DomName('Element.keyup')
+ @DocsEditable
Stream<KeyboardEvent> get onKeyUp => keyUpEvent.forTarget(this);
+ @DomName('Element.load')
+ @DocsEditable
Stream<Event> get onLoad => loadEvent.forTarget(this);
+ @DomName('Element.mousedown')
+ @DocsEditable
Stream<MouseEvent> get onMouseDown => mouseDownEvent.forTarget(this);
+ @DomName('Element.mousemove')
+ @DocsEditable
Stream<MouseEvent> get onMouseMove => mouseMoveEvent.forTarget(this);
+ @DomName('Element.mouseout')
+ @DocsEditable
Stream<MouseEvent> get onMouseOut => mouseOutEvent.forTarget(this);
+ @DomName('Element.mouseover')
+ @DocsEditable
Stream<MouseEvent> get onMouseOver => mouseOverEvent.forTarget(this);
+ @DomName('Element.mouseup')
+ @DocsEditable
Stream<MouseEvent> get onMouseUp => mouseUpEvent.forTarget(this);
+ @DomName('Element.mousewheel')
+ @DocsEditable
Stream<WheelEvent> get onMouseWheel => mouseWheelEvent.forTarget(this);
+ @DomName('Element.paste')
+ @DocsEditable
Stream<Event> get onPaste => pasteEvent.forTarget(this);
+ @DomName('Element.reset')
+ @DocsEditable
Stream<Event> get onReset => resetEvent.forTarget(this);
+ @DomName('Element.scroll')
+ @DocsEditable
Stream<Event> get onScroll => scrollEvent.forTarget(this);
+ @DomName('Element.search')
+ @DocsEditable
Stream<Event> get onSearch => searchEvent.forTarget(this);
+ @DomName('Element.select')
+ @DocsEditable
Stream<Event> get onSelect => selectEvent.forTarget(this);
+ @DomName('Element.selectstart')
+ @DocsEditable
Stream<Event> get onSelectStart => selectStartEvent.forTarget(this);
+ @DomName('Element.submit')
+ @DocsEditable
Stream<Event> get onSubmit => submitEvent.forTarget(this);
+ @DomName('Element.touchcancel')
+ @DocsEditable
Stream<TouchEvent> get onTouchCancel => touchCancelEvent.forTarget(this);
+ @DomName('Element.touchend')
+ @DocsEditable
Stream<TouchEvent> get onTouchEnd => touchEndEvent.forTarget(this);
+ @DomName('Element.touchenter')
+ @DocsEditable
Stream<TouchEvent> get onTouchEnter => touchEnterEvent.forTarget(this);
+ @DomName('Element.touchleave')
+ @DocsEditable
Stream<TouchEvent> get onTouchLeave => touchLeaveEvent.forTarget(this);
+ @DomName('Element.touchmove')
+ @DocsEditable
Stream<TouchEvent> get onTouchMove => touchMoveEvent.forTarget(this);
+ @DomName('Element.touchstart')
+ @DocsEditable
Stream<TouchEvent> get onTouchStart => touchStartEvent.forTarget(this);
+ @DomName('Element.webkitTransitionEnd')
+ @DocsEditable
Stream<TransitionEvent> get onTransitionEnd => transitionEndEvent.forTarget(this);
+ @DomName('Element.webkitfullscreenchange')
+ @DocsEditable
Stream<Event> get onFullscreenChange => fullscreenChangeEvent.forTarget(this);
+ @DomName('Element.webkitfullscreenerror')
+ @DocsEditable
Stream<Event> get onFullscreenError => fullscreenErrorEvent.forTarget(this);
}
@@ -9825,6 +10110,7 @@
}
@DocsEditable
+@deprecated
class ElementEvents extends Events {
@DocsEditable
ElementEvents(EventTarget _ptr) : super(_ptr);
@@ -9985,24 +10271,24 @@
class ElementTraversal extends NativeFieldWrapperClass1 {
ElementTraversal.internal();
- @DocsEditable
@DomName('ElementTraversal.childElementCount')
+ @DocsEditable
int get $dom_childElementCount native "ElementTraversal_childElementCount_Getter";
- @DocsEditable
@DomName('ElementTraversal.firstElementChild')
+ @DocsEditable
Element get $dom_firstElementChild native "ElementTraversal_firstElementChild_Getter";
- @DocsEditable
@DomName('ElementTraversal.lastElementChild')
+ @DocsEditable
Element get $dom_lastElementChild native "ElementTraversal_lastElementChild_Getter";
- @DocsEditable
@DomName('ElementTraversal.nextElementSibling')
+ @DocsEditable
Element get nextElementSibling native "ElementTraversal_nextElementSibling_Getter";
- @DocsEditable
@DomName('ElementTraversal.previousElementSibling')
+ @DocsEditable
Element get previousElementSibling native "ElementTraversal_previousElementSibling_Getter";
}
@@ -10027,52 +10313,52 @@
/// Checks if this type is supported on the current platform.
static bool get supported => true;
- @DocsEditable
@DomName('HTMLEmbedElement.align')
+ @DocsEditable
String get align native "HTMLEmbedElement_align_Getter";
- @DocsEditable
@DomName('HTMLEmbedElement.align')
+ @DocsEditable
void set align(String value) native "HTMLEmbedElement_align_Setter";
- @DocsEditable
@DomName('HTMLEmbedElement.height')
+ @DocsEditable
String get height native "HTMLEmbedElement_height_Getter";
- @DocsEditable
@DomName('HTMLEmbedElement.height')
+ @DocsEditable
void set height(String value) native "HTMLEmbedElement_height_Setter";
- @DocsEditable
@DomName('HTMLEmbedElement.name')
+ @DocsEditable
String get name native "HTMLEmbedElement_name_Getter";
- @DocsEditable
@DomName('HTMLEmbedElement.name')
+ @DocsEditable
void set name(String value) native "HTMLEmbedElement_name_Setter";
- @DocsEditable
@DomName('HTMLEmbedElement.src')
+ @DocsEditable
String get src native "HTMLEmbedElement_src_Getter";
- @DocsEditable
@DomName('HTMLEmbedElement.src')
+ @DocsEditable
void set src(String value) native "HTMLEmbedElement_src_Setter";
- @DocsEditable
@DomName('HTMLEmbedElement.type')
+ @DocsEditable
String get type native "HTMLEmbedElement_type_Getter";
- @DocsEditable
@DomName('HTMLEmbedElement.type')
+ @DocsEditable
void set type(String value) native "HTMLEmbedElement_type_Setter";
- @DocsEditable
@DomName('HTMLEmbedElement.width')
+ @DocsEditable
String get width native "HTMLEmbedElement_width_Getter";
- @DocsEditable
@DomName('HTMLEmbedElement.width')
+ @DocsEditable
void set width(String value) native "HTMLEmbedElement_width_Setter";
}
@@ -10109,24 +10395,24 @@
class Entry extends NativeFieldWrapperClass1 {
Entry.internal();
- @DocsEditable
@DomName('Entry.filesystem')
+ @DocsEditable
FileSystem get filesystem native "Entry_filesystem_Getter";
- @DocsEditable
@DomName('Entry.fullPath')
+ @DocsEditable
String get fullPath native "Entry_fullPath_Getter";
- @DocsEditable
@DomName('Entry.isDirectory')
+ @DocsEditable
bool get isDirectory native "Entry_isDirectory_Getter";
- @DocsEditable
@DomName('Entry.isFile')
+ @DocsEditable
bool get isFile native "Entry_isFile_Getter";
- @DocsEditable
@DomName('Entry.name')
+ @DocsEditable
String get name native "Entry_name_Getter";
void copyTo(DirectoryEntry parent, [String name, EntryCallback successCallback, ErrorCallback errorCallback]) {
@@ -10135,22 +10421,23 @@
return;
}
_copyTo_2(parent);
+ return;
}
+ @DomName('Entry._copyTo_1')
@DocsEditable
- @DomName('Entry.copyTo_1')
- void _copyTo_1(parent, name, successCallback, errorCallback) native "Entry_copyTo_1_Callback";
+ void _copyTo_1(parent, name, successCallback, errorCallback) native "Entry__copyTo_1_Callback";
+ @DomName('Entry._copyTo_2')
@DocsEditable
- @DomName('Entry.copyTo_2')
- void _copyTo_2(parent) native "Entry_copyTo_2_Callback";
+ void _copyTo_2(parent) native "Entry__copyTo_2_Callback";
- @DocsEditable
@DomName('Entry.getMetadata')
+ @DocsEditable
void getMetadata(MetadataCallback successCallback, [ErrorCallback errorCallback]) native "Entry_getMetadata_Callback";
- @DocsEditable
@DomName('Entry.getParent')
+ @DocsEditable
void getParent([EntryCallback successCallback, ErrorCallback errorCallback]) native "Entry_getParent_Callback";
void moveTo(DirectoryEntry parent, [String name, EntryCallback successCallback, ErrorCallback errorCallback]) {
@@ -10159,22 +10446,23 @@
return;
}
_moveTo_2(parent);
+ return;
}
+ @DomName('Entry._moveTo_1')
@DocsEditable
- @DomName('Entry.moveTo_1')
- void _moveTo_1(parent, name, successCallback, errorCallback) native "Entry_moveTo_1_Callback";
+ void _moveTo_1(parent, name, successCallback, errorCallback) native "Entry__moveTo_1_Callback";
+ @DomName('Entry._moveTo_2')
@DocsEditable
- @DomName('Entry.moveTo_2')
- void _moveTo_2(parent) native "Entry_moveTo_2_Callback";
+ void _moveTo_2(parent) native "Entry__moveTo_2_Callback";
- @DocsEditable
@DomName('Entry.remove')
+ @DocsEditable
void remove(VoidCallback successCallback, [ErrorCallback errorCallback]) native "Entry_remove_Callback";
- @DocsEditable
@DomName('Entry.toURL')
+ @DocsEditable
String toUrl() native "Entry_toURL_Callback";
}
@@ -10198,48 +10486,48 @@
class EntrySync extends NativeFieldWrapperClass1 {
EntrySync.internal();
- @DocsEditable
@DomName('EntrySync.filesystem')
+ @DocsEditable
FileSystemSync get filesystem native "EntrySync_filesystem_Getter";
- @DocsEditable
@DomName('EntrySync.fullPath')
+ @DocsEditable
String get fullPath native "EntrySync_fullPath_Getter";
- @DocsEditable
@DomName('EntrySync.isDirectory')
+ @DocsEditable
bool get isDirectory native "EntrySync_isDirectory_Getter";
- @DocsEditable
@DomName('EntrySync.isFile')
+ @DocsEditable
bool get isFile native "EntrySync_isFile_Getter";
- @DocsEditable
@DomName('EntrySync.name')
+ @DocsEditable
String get name native "EntrySync_name_Getter";
- @DocsEditable
@DomName('EntrySync.copyTo')
+ @DocsEditable
EntrySync copyTo(DirectoryEntrySync parent, String name) native "EntrySync_copyTo_Callback";
- @DocsEditable
@DomName('EntrySync.getMetadata')
+ @DocsEditable
Metadata getMetadata() native "EntrySync_getMetadata_Callback";
- @DocsEditable
@DomName('EntrySync.getParent')
+ @DocsEditable
EntrySync getParent() native "EntrySync_getParent_Callback";
- @DocsEditable
@DomName('EntrySync.moveTo')
+ @DocsEditable
EntrySync moveTo(DirectoryEntrySync parent, String name) native "EntrySync_moveTo_Callback";
- @DocsEditable
@DomName('EntrySync.remove')
+ @DocsEditable
void remove() native "EntrySync_remove_Callback";
- @DocsEditable
@DomName('EntrySync.toURL')
+ @DocsEditable
String toUrl() native "EntrySync_toURL_Callback";
}
@@ -10263,16 +10551,16 @@
class ErrorEvent extends Event {
ErrorEvent.internal() : super.internal();
- @DocsEditable
@DomName('ErrorEvent.filename')
+ @DocsEditable
String get filename native "ErrorEvent_filename_Getter";
- @DocsEditable
@DomName('ErrorEvent.lineno')
+ @DocsEditable
int get lineno native "ErrorEvent_lineno_Getter";
- @DocsEditable
@DomName('ErrorEvent.message')
+ @DocsEditable
String get message native "ErrorEvent_message_Getter";
}
@@ -10283,7 +10571,6 @@
// WARNING: Do not edit - generated code.
-@DocsEditable
@DomName('Event')
class Event extends NativeFieldWrapperClass1 {
// In JS, canBubble and cancelable are technically required parameters to
@@ -10292,8 +10579,26 @@
//
// Contrary to JS, we default canBubble and cancelable to true, since that's
// what people want most of the time anyway.
- factory Event(String type, [bool canBubble = true, bool cancelable = true]) =>
- _EventFactoryProvider.createEvent(type, canBubble, cancelable);
+ factory Event(String type,
+ {bool canBubble: true, bool cancelable: true}) {
+ return new Event.eventType('Event', type, canBubble: canBubble,
+ cancelable: canBubble);
+ }
+
+ /**
+ * Creates a new Event object of the specified type.
+ *
+ * This is analogous to document.createEvent.
+ * Normally events should be created via their constructors, if available.
+ *
+ * var e = new Event.type('MouseEvent', 'mousedown', true, true);
+ */
+ factory Event.eventType(String type, String name, {bool canBubble: true,
+ bool cancelable: true}) {
+ final Event e = document.$dom_createEvent(type);
+ e.$dom_initEvent(name, canBubble, cancelable);
+ return e;
+ }
Event.internal();
static const int AT_TARGET = 2;
@@ -10336,74 +10641,86 @@
static const int SELECT = 16384;
- @DocsEditable
@DomName('Event.bubbles')
+ @DocsEditable
bool get bubbles native "Event_bubbles_Getter";
- @DocsEditable
@DomName('Event.cancelBubble')
+ @DocsEditable
bool get cancelBubble native "Event_cancelBubble_Getter";
- @DocsEditable
@DomName('Event.cancelBubble')
+ @DocsEditable
void set cancelBubble(bool value) native "Event_cancelBubble_Setter";
- @DocsEditable
@DomName('Event.cancelable')
+ @DocsEditable
bool get cancelable native "Event_cancelable_Getter";
- @DocsEditable
@DomName('Event.clipboardData')
+ @DocsEditable
Clipboard get clipboardData native "Event_clipboardData_Getter";
- @DocsEditable
@DomName('Event.currentTarget')
+ @DocsEditable
EventTarget get currentTarget native "Event_currentTarget_Getter";
- @DocsEditable
@DomName('Event.defaultPrevented')
+ @DocsEditable
bool get defaultPrevented native "Event_defaultPrevented_Getter";
- @DocsEditable
@DomName('Event.eventPhase')
+ @DocsEditable
int get eventPhase native "Event_eventPhase_Getter";
- @DocsEditable
@DomName('Event.returnValue')
+ @DocsEditable
bool get returnValue native "Event_returnValue_Getter";
- @DocsEditable
@DomName('Event.returnValue')
+ @DocsEditable
void set returnValue(bool value) native "Event_returnValue_Setter";
- @DocsEditable
@DomName('Event.target')
+ @DocsEditable
EventTarget get target native "Event_target_Getter";
- @DocsEditable
@DomName('Event.timeStamp')
+ @DocsEditable
int get timeStamp native "Event_timeStamp_Getter";
- @DocsEditable
@DomName('Event.type')
+ @DocsEditable
String get type native "Event_type_Getter";
- @DocsEditable
@DomName('Event.initEvent')
+ @DocsEditable
void $dom_initEvent(String eventTypeArg, bool canBubbleArg, bool cancelableArg) native "Event_initEvent_Callback";
- @DocsEditable
@DomName('Event.preventDefault')
+ @DocsEditable
void preventDefault() native "Event_preventDefault_Callback";
- @DocsEditable
@DomName('Event.stopImmediatePropagation')
+ @DocsEditable
void stopImmediatePropagation() native "Event_stopImmediatePropagation_Callback";
- @DocsEditable
@DomName('Event.stopPropagation')
+ @DocsEditable
void stopPropagation() native "Event_stopPropagation_Callback";
+
+ /**
+ * Checks to see if the event class is supported by the current platform.
+ */
+ static bool _isTypeSupported(String eventType) {
+ // Browsers throw for unsupported event names.
+ try {
+ var e = document.$dom_createEvent(eventType);
+ return e is Event;
+ } catch (_) { }
+ return false;
+ }
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
@@ -10421,20 +10738,20 @@
static const int UNSPECIFIED_EVENT_TYPE_ERR = 0;
- @DocsEditable
@DomName('EventException.code')
+ @DocsEditable
int get code native "EventException_code_Getter";
- @DocsEditable
@DomName('EventException.message')
+ @DocsEditable
String get message native "EventException_message_Getter";
- @DocsEditable
@DomName('EventException.name')
+ @DocsEditable
String get name native "EventException_name_Getter";
- @DocsEditable
@DomName('EventException.toString')
+ @DocsEditable
String toString() native "EventException_toString_Callback";
}
@@ -10450,10 +10767,16 @@
class EventSource extends EventTarget {
EventSource.internal() : super.internal();
+ @DomName('EventSource.error')
+ @DocsEditable
static const EventStreamProvider<Event> errorEvent = const EventStreamProvider<Event>('error');
+ @DomName('EventSource.message')
+ @DocsEditable
static const EventStreamProvider<MessageEvent> messageEvent = const EventStreamProvider<MessageEvent>('message');
+ @DomName('EventSource.open')
+ @DocsEditable
static const EventStreamProvider<Event> openEvent = const EventStreamProvider<Event>('open');
@DocsEditable
@@ -10467,6 +10790,7 @@
@DocsEditable
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
+ @deprecated
EventSourceEvents get on =>
new EventSourceEvents(this);
@@ -10476,43 +10800,50 @@
static const int OPEN = 1;
- @DocsEditable
@DomName('EventSource.readyState')
+ @DocsEditable
int get readyState native "EventSource_readyState_Getter";
- @DocsEditable
@DomName('EventSource.url')
+ @DocsEditable
String get url native "EventSource_url_Getter";
- @DocsEditable
@DomName('EventSource.withCredentials')
+ @DocsEditable
bool get withCredentials native "EventSource_withCredentials_Getter";
- @DocsEditable
@DomName('EventSource.addEventListener')
+ @DocsEditable
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native "EventSource_addEventListener_Callback";
- @DocsEditable
@DomName('EventSource.close')
+ @DocsEditable
void close() native "EventSource_close_Callback";
- @DocsEditable
@DomName('EventSource.dispatchEvent')
- bool $dom_dispatchEvent(Event evt) native "EventSource_dispatchEvent_Callback";
-
@DocsEditable
+ bool dispatchEvent(Event evt) native "EventSource_dispatchEvent_Callback";
+
@DomName('EventSource.removeEventListener')
+ @DocsEditable
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native "EventSource_removeEventListener_Callback";
+ @DomName('EventSource.error')
+ @DocsEditable
Stream<Event> get onError => errorEvent.forTarget(this);
+ @DomName('EventSource.message')
+ @DocsEditable
Stream<MessageEvent> get onMessage => messageEvent.forTarget(this);
+ @DomName('EventSource.open')
+ @DocsEditable
Stream<Event> get onOpen => openEvent.forTarget(this);
}
@DocsEditable
+@deprecated
class EventSourceEvents extends Events {
@DocsEditable
EventSourceEvents(EventTarget _ptr) : super(_ptr);
@@ -10537,7 +10868,7 @@
* Events can either be accessed by string name (using the indexed getter) or by
* getters exposed by subclasses. Use the getters exposed by subclasses when
* possible for better compile-time type checks.
- *
+ *
* Using an indexed getter:
* events['mouseover'].add((e) => print("Mouse over!"));
*
@@ -10580,7 +10911,7 @@
}
bool dispatch(Event evt) {
- return _ptr.$dom_dispatchEvent(evt);
+ return _ptr.dispatchEvent(evt);
}
void _add(EventListener listener, bool useCapture) {
@@ -10592,8 +10923,6 @@
}
}
-@DocsEditable
-@DomName('EventTarget')
/**
* Base class for all browser objects that support events.
*
@@ -10601,23 +10930,24 @@
* [$dom_addEventListener], [$dom_dispatchEvent], and
* [$dom_removeEventListener]) for compile-time type checks and a more concise
* API.
- */
+ */
+@DomName('EventTarget')
class EventTarget extends NativeFieldWrapperClass1 {
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
Events get on => new Events(this);
EventTarget.internal();
- @DocsEditable
@DomName('EventTarget.addEventListener')
+ @DocsEditable
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native "EventTarget_addEventListener_Callback";
- @DocsEditable
@DomName('EventTarget.dispatchEvent')
- bool $dom_dispatchEvent(Event event) native "EventTarget_dispatchEvent_Callback";
-
@DocsEditable
+ bool dispatchEvent(Event event) native "EventTarget_dispatchEvent_Callback";
+
@DomName('EventTarget.removeEventListener')
+ @DocsEditable
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native "EventTarget_removeEventListener_Callback";
}
@@ -10653,52 +10983,52 @@
@DocsEditable
factory FieldSetElement() => document.$dom_createElement("fieldset");
- @DocsEditable
@DomName('HTMLFieldSetElement.disabled')
+ @DocsEditable
bool get disabled native "HTMLFieldSetElement_disabled_Getter";
- @DocsEditable
@DomName('HTMLFieldSetElement.disabled')
+ @DocsEditable
void set disabled(bool value) native "HTMLFieldSetElement_disabled_Setter";
- @DocsEditable
@DomName('HTMLFieldSetElement.elements')
+ @DocsEditable
HtmlCollection get elements native "HTMLFieldSetElement_elements_Getter";
- @DocsEditable
@DomName('HTMLFieldSetElement.form')
+ @DocsEditable
FormElement get form native "HTMLFieldSetElement_form_Getter";
- @DocsEditable
@DomName('HTMLFieldSetElement.name')
+ @DocsEditable
String get name native "HTMLFieldSetElement_name_Getter";
- @DocsEditable
@DomName('HTMLFieldSetElement.name')
+ @DocsEditable
void set name(String value) native "HTMLFieldSetElement_name_Setter";
- @DocsEditable
@DomName('HTMLFieldSetElement.type')
+ @DocsEditable
String get type native "HTMLFieldSetElement_type_Getter";
- @DocsEditable
@DomName('HTMLFieldSetElement.validationMessage')
+ @DocsEditable
String get validationMessage native "HTMLFieldSetElement_validationMessage_Getter";
- @DocsEditable
@DomName('HTMLFieldSetElement.validity')
+ @DocsEditable
ValidityState get validity native "HTMLFieldSetElement_validity_Getter";
- @DocsEditable
@DomName('HTMLFieldSetElement.willValidate')
+ @DocsEditable
bool get willValidate native "HTMLFieldSetElement_willValidate_Getter";
- @DocsEditable
@DomName('HTMLFieldSetElement.checkValidity')
+ @DocsEditable
bool checkValidity() native "HTMLFieldSetElement_checkValidity_Callback";
- @DocsEditable
@DomName('HTMLFieldSetElement.setCustomValidity')
+ @DocsEditable
void setCustomValidity(String error) native "HTMLFieldSetElement_setCustomValidity_Callback";
}
@@ -10714,16 +11044,16 @@
class File extends Blob {
File.internal() : super.internal();
- @DocsEditable
@DomName('File.lastModifiedDate')
+ @DocsEditable
Date get lastModifiedDate native "File_lastModifiedDate_Getter";
- @DocsEditable
@DomName('File.name')
+ @DocsEditable
String get name native "File_name_Getter";
- @DocsEditable
@DomName('File.webkitRelativePath')
+ @DocsEditable
String get webkitRelativePath native "File_webkitRelativePath_Getter";
}
@@ -10747,12 +11077,12 @@
class FileEntry extends Entry {
FileEntry.internal() : super.internal();
- @DocsEditable
@DomName('FileEntry.createWriter')
+ @DocsEditable
void createWriter(FileWriterCallback successCallback, [ErrorCallback errorCallback]) native "FileEntry_createWriter_Callback";
- @DocsEditable
@DomName('FileEntry.file')
+ @DocsEditable
void file(FileCallback successCallback, [ErrorCallback errorCallback]) native "FileEntry_file_Callback";
}
@@ -10768,12 +11098,12 @@
class FileEntrySync extends EntrySync {
FileEntrySync.internal() : super.internal();
- @DocsEditable
@DomName('FileEntrySync.createWriter')
+ @DocsEditable
FileWriterSync createWriter() native "FileEntrySync_createWriter_Callback";
- @DocsEditable
@DomName('FileEntrySync.file')
+ @DocsEditable
File file() native "FileEntrySync_file_Callback";
}
@@ -10813,8 +11143,8 @@
static const int TYPE_MISMATCH_ERR = 11;
- @DocsEditable
@DomName('FileError.code')
+ @DocsEditable
int get code native "FileError_code_Getter";
}
@@ -10854,20 +11184,20 @@
static const int TYPE_MISMATCH_ERR = 11;
- @DocsEditable
@DomName('FileException.code')
+ @DocsEditable
int get code native "FileException_code_Getter";
- @DocsEditable
@DomName('FileException.message')
+ @DocsEditable
String get message native "FileException_message_Getter";
- @DocsEditable
@DomName('FileException.name')
+ @DocsEditable
String get name native "FileException_name_Getter";
- @DocsEditable
@DomName('FileException.toString')
+ @DocsEditable
String toString() native "FileException_toString_Callback";
}
@@ -10883,8 +11213,8 @@
class FileList extends NativeFieldWrapperClass1 implements List<File> {
FileList.internal();
- @DocsEditable
@DomName('FileList.length')
+ @DocsEditable
int get length native "FileList_length_Getter";
File operator[](int index) native "FileList_item_Callback";
@@ -10912,11 +11242,13 @@
void forEach(void f(File element)) => IterableMixinWorkaround.forEach(this, f);
- String join([String separator]) => IterableMixinWorkaround.joinList(this, separator);
+ String join([String separator]) =>
+ IterableMixinWorkaround.joinList(this, separator);
List mappedBy(f(File element)) => IterableMixinWorkaround.mappedByList(this, f);
- Iterable<File> where(bool f(File element)) => IterableMixinWorkaround.where(this, f);
+ Iterable<File> where(bool f(File element)) =>
+ IterableMixinWorkaround.where(this, f);
bool every(bool f(File element)) => IterableMixinWorkaround.every(this, f);
@@ -10978,6 +11310,9 @@
throw new UnsupportedError("Cannot clear immutable List.");
}
+ List<File> get reversed =>
+ new ReversedListView<File>(this, 0, null);
+
void sort([int compare(File a, File b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -11006,9 +11341,11 @@
throw new StateError("More than one element");
}
- File min([int compare(File a, File b)]) => IterableMixinWorkaround.min(this, compare);
+ File min([int compare(File a, File b)]) =>
+ IterableMixinWorkaround.min(this, compare);
- File max([int compare(File a, File b)]) => IterableMixinWorkaround.max(this, compare);
+ File max([int compare(File a, File b)]) =>
+ IterableMixinWorkaround.max(this, compare);
File removeAt(int pos) {
throw new UnsupportedError("Cannot remove from immutable List.");
@@ -11055,8 +11392,8 @@
// -- end List<File> mixins.
- @DocsEditable
@DomName('FileList.item')
+ @DocsEditable
File item(int index) native "FileList_item_Callback";
}
@@ -11072,16 +11409,28 @@
class FileReader extends EventTarget {
FileReader.internal() : super.internal();
+ @DomName('FileReader.abort')
+ @DocsEditable
static const EventStreamProvider<ProgressEvent> abortEvent = const EventStreamProvider<ProgressEvent>('abort');
+ @DomName('FileReader.error')
+ @DocsEditable
static const EventStreamProvider<Event> errorEvent = const EventStreamProvider<Event>('error');
+ @DomName('FileReader.load')
+ @DocsEditable
static const EventStreamProvider<ProgressEvent> loadEvent = const EventStreamProvider<ProgressEvent>('load');
+ @DomName('FileReader.loadend')
+ @DocsEditable
static const EventStreamProvider<ProgressEvent> loadEndEvent = const EventStreamProvider<ProgressEvent>('loadend');
+ @DomName('FileReader.loadstart')
+ @DocsEditable
static const EventStreamProvider<ProgressEvent> loadStartEvent = const EventStreamProvider<ProgressEvent>('loadstart');
+ @DomName('FileReader.progress')
+ @DocsEditable
static const EventStreamProvider<ProgressEvent> progressEvent = const EventStreamProvider<ProgressEvent>('progress');
@DocsEditable
@@ -11090,6 +11439,7 @@
@DocsEditable
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
+ @deprecated
FileReaderEvents get on =>
new FileReaderEvents(this);
@@ -11099,40 +11449,40 @@
static const int LOADING = 1;
- @DocsEditable
@DomName('FileReader.error')
+ @DocsEditable
FileError get error native "FileReader_error_Getter";
- @DocsEditable
@DomName('FileReader.readyState')
+ @DocsEditable
int get readyState native "FileReader_readyState_Getter";
- @DocsEditable
@DomName('FileReader.result')
+ @DocsEditable
Object get result native "FileReader_result_Getter";
- @DocsEditable
@DomName('FileReader.abort')
+ @DocsEditable
void abort() native "FileReader_abort_Callback";
- @DocsEditable
@DomName('FileReader.addEventListener')
+ @DocsEditable
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native "FileReader_addEventListener_Callback";
- @DocsEditable
@DomName('FileReader.dispatchEvent')
- bool $dom_dispatchEvent(Event evt) native "FileReader_dispatchEvent_Callback";
-
@DocsEditable
+ bool dispatchEvent(Event evt) native "FileReader_dispatchEvent_Callback";
+
@DomName('FileReader.readAsArrayBuffer')
+ @DocsEditable
void readAsArrayBuffer(Blob blob) native "FileReader_readAsArrayBuffer_Callback";
- @DocsEditable
@DomName('FileReader.readAsBinaryString')
+ @DocsEditable
void readAsBinaryString(Blob blob) native "FileReader_readAsBinaryString_Callback";
- @DocsEditable
@DomName('FileReader.readAsDataURL')
+ @DocsEditable
void readAsDataUrl(Blob blob) native "FileReader_readAsDataURL_Callback";
void readAsText(Blob blob, [String encoding]) {
@@ -11141,35 +11491,49 @@
return;
}
_readAsText_2(blob);
+ return;
}
+ @DomName('FileReader._readAsText_1')
@DocsEditable
- @DomName('FileReader.readAsText_1')
- void _readAsText_1(blob, encoding) native "FileReader_readAsText_1_Callback";
+ void _readAsText_1(blob, encoding) native "FileReader__readAsText_1_Callback";
+ @DomName('FileReader._readAsText_2')
@DocsEditable
- @DomName('FileReader.readAsText_2')
- void _readAsText_2(blob) native "FileReader_readAsText_2_Callback";
+ void _readAsText_2(blob) native "FileReader__readAsText_2_Callback";
- @DocsEditable
@DomName('FileReader.removeEventListener')
+ @DocsEditable
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native "FileReader_removeEventListener_Callback";
+ @DomName('FileReader.abort')
+ @DocsEditable
Stream<ProgressEvent> get onAbort => abortEvent.forTarget(this);
+ @DomName('FileReader.error')
+ @DocsEditable
Stream<Event> get onError => errorEvent.forTarget(this);
+ @DomName('FileReader.load')
+ @DocsEditable
Stream<ProgressEvent> get onLoad => loadEvent.forTarget(this);
+ @DomName('FileReader.loadend')
+ @DocsEditable
Stream<ProgressEvent> get onLoadEnd => loadEndEvent.forTarget(this);
+ @DomName('FileReader.loadstart')
+ @DocsEditable
Stream<ProgressEvent> get onLoadStart => loadStartEvent.forTarget(this);
+ @DomName('FileReader.progress')
+ @DocsEditable
Stream<ProgressEvent> get onProgress => progressEvent.forTarget(this);
}
@DocsEditable
+@deprecated
class FileReaderEvents extends Events {
@DocsEditable
FileReaderEvents(EventTarget _ptr) : super(_ptr);
@@ -11208,16 +11572,16 @@
factory FileReaderSync() => FileReaderSync._create();
static FileReaderSync _create() native "FileReaderSync_constructor_Callback";
- @DocsEditable
@DomName('FileReaderSync.readAsArrayBuffer')
+ @DocsEditable
ArrayBuffer readAsArrayBuffer(Blob blob) native "FileReaderSync_readAsArrayBuffer_Callback";
- @DocsEditable
@DomName('FileReaderSync.readAsBinaryString')
+ @DocsEditable
String readAsBinaryString(Blob blob) native "FileReaderSync_readAsBinaryString_Callback";
- @DocsEditable
@DomName('FileReaderSync.readAsDataURL')
+ @DocsEditable
String readAsDataUrl(Blob blob) native "FileReaderSync_readAsDataURL_Callback";
String readAsText(Blob blob, [String encoding]) {
@@ -11227,13 +11591,13 @@
return _readAsText_2(blob);
}
+ @DomName('FileReaderSync._readAsText_1')
@DocsEditable
- @DomName('FileReaderSync.readAsText_1')
- String _readAsText_1(blob, encoding) native "FileReaderSync_readAsText_1_Callback";
+ String _readAsText_1(blob, encoding) native "FileReaderSync__readAsText_1_Callback";
+ @DomName('FileReaderSync._readAsText_2')
@DocsEditable
- @DomName('FileReaderSync.readAsText_2')
- String _readAsText_2(blob) native "FileReaderSync_readAsText_2_Callback";
+ String _readAsText_2(blob) native "FileReaderSync__readAsText_2_Callback";
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -11251,12 +11615,12 @@
/// Checks if this type is supported on the current platform.
static bool get supported => true;
- @DocsEditable
@DomName('DOMFileSystem.name')
+ @DocsEditable
String get name native "DOMFileSystem_name_Getter";
- @DocsEditable
@DomName('DOMFileSystem.root')
+ @DocsEditable
DirectoryEntry get root native "DOMFileSystem_root_Getter";
}
@@ -11280,12 +11644,12 @@
class FileSystemSync extends NativeFieldWrapperClass1 {
FileSystemSync.internal();
- @DocsEditable
@DomName('DOMFileSystemSync.name')
+ @DocsEditable
String get name native "DOMFileSystemSync_name_Getter";
- @DocsEditable
@DomName('DOMFileSystemSync.root')
+ @DocsEditable
DirectoryEntrySync get root native "DOMFileSystemSync_root_Getter";
}
@@ -11301,20 +11665,33 @@
class FileWriter extends EventTarget {
FileWriter.internal() : super.internal();
+ @DomName('FileWriter.abort')
+ @DocsEditable
static const EventStreamProvider<ProgressEvent> abortEvent = const EventStreamProvider<ProgressEvent>('abort');
+ @DomName('FileWriter.error')
+ @DocsEditable
static const EventStreamProvider<Event> errorEvent = const EventStreamProvider<Event>('error');
+ @DomName('FileWriter.progress')
+ @DocsEditable
static const EventStreamProvider<ProgressEvent> progressEvent = const EventStreamProvider<ProgressEvent>('progress');
+ @DomName('FileWriter.write')
+ @DocsEditable
static const EventStreamProvider<ProgressEvent> writeEvent = const EventStreamProvider<ProgressEvent>('write');
+ @DomName('FileWriter.writeend')
+ @DocsEditable
static const EventStreamProvider<ProgressEvent> writeEndEvent = const EventStreamProvider<ProgressEvent>('writeend');
+ @DomName('FileWriter.writestart')
+ @DocsEditable
static const EventStreamProvider<ProgressEvent> writeStartEvent = const EventStreamProvider<ProgressEvent>('writestart');
@DocsEditable
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
+ @deprecated
FileWriterEvents get on =>
new FileWriterEvents(this);
@@ -11324,65 +11701,78 @@
static const int WRITING = 1;
- @DocsEditable
@DomName('FileWriter.error')
+ @DocsEditable
FileError get error native "FileWriter_error_Getter";
- @DocsEditable
@DomName('FileWriter.length')
+ @DocsEditable
int get length native "FileWriter_length_Getter";
- @DocsEditable
@DomName('FileWriter.position')
+ @DocsEditable
int get position native "FileWriter_position_Getter";
- @DocsEditable
@DomName('FileWriter.readyState')
+ @DocsEditable
int get readyState native "FileWriter_readyState_Getter";
- @DocsEditable
@DomName('FileWriter.abort')
+ @DocsEditable
void abort() native "FileWriter_abort_Callback";
- @DocsEditable
@DomName('FileWriter.addEventListener')
+ @DocsEditable
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native "FileWriter_addEventListener_Callback";
- @DocsEditable
@DomName('FileWriter.dispatchEvent')
- bool $dom_dispatchEvent(Event evt) native "FileWriter_dispatchEvent_Callback";
-
@DocsEditable
+ bool dispatchEvent(Event evt) native "FileWriter_dispatchEvent_Callback";
+
@DomName('FileWriter.removeEventListener')
+ @DocsEditable
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native "FileWriter_removeEventListener_Callback";
- @DocsEditable
@DomName('FileWriter.seek')
+ @DocsEditable
void seek(int position) native "FileWriter_seek_Callback";
- @DocsEditable
@DomName('FileWriter.truncate')
+ @DocsEditable
void truncate(int size) native "FileWriter_truncate_Callback";
- @DocsEditable
@DomName('FileWriter.write')
+ @DocsEditable
void write(Blob data) native "FileWriter_write_Callback";
+ @DomName('FileWriter.abort')
+ @DocsEditable
Stream<ProgressEvent> get onAbort => abortEvent.forTarget(this);
+ @DomName('FileWriter.error')
+ @DocsEditable
Stream<Event> get onError => errorEvent.forTarget(this);
+ @DomName('FileWriter.progress')
+ @DocsEditable
Stream<ProgressEvent> get onProgress => progressEvent.forTarget(this);
+ @DomName('FileWriter.write')
+ @DocsEditable
Stream<ProgressEvent> get onWrite => writeEvent.forTarget(this);
+ @DomName('FileWriter.writeend')
+ @DocsEditable
Stream<ProgressEvent> get onWriteEnd => writeEndEvent.forTarget(this);
+ @DomName('FileWriter.writestart')
+ @DocsEditable
Stream<ProgressEvent> get onWriteStart => writeStartEvent.forTarget(this);
}
@DocsEditable
+@deprecated
class FileWriterEvents extends Events {
@DocsEditable
FileWriterEvents(EventTarget _ptr) : super(_ptr);
@@ -11425,24 +11815,24 @@
class FileWriterSync extends NativeFieldWrapperClass1 {
FileWriterSync.internal();
- @DocsEditable
@DomName('FileWriterSync.length')
+ @DocsEditable
int get length native "FileWriterSync_length_Getter";
- @DocsEditable
@DomName('FileWriterSync.position')
+ @DocsEditable
int get position native "FileWriterSync_position_Getter";
- @DocsEditable
@DomName('FileWriterSync.seek')
+ @DocsEditable
void seek(int position) native "FileWriterSync_seek_Callback";
- @DocsEditable
@DomName('FileWriterSync.truncate')
+ @DocsEditable
void truncate(int size) native "FileWriterSync_truncate_Callback";
- @DocsEditable
@DomName('FileWriterSync.write')
+ @DocsEditable
void write(Blob data) native "FileWriterSync_write_Callback";
}
@@ -11469,16 +11859,16 @@
static const int BYTES_PER_ELEMENT = 4;
- @DocsEditable
@DomName('Float32Array.length')
+ @DocsEditable
int get length native "Float32Array_length_Getter";
- @DocsEditable
@DomName('Float32Array.numericIndexGetter')
+ @DocsEditable
num operator[](int index) native "Float32Array_numericIndexGetter_Callback";
- @DocsEditable
@DomName('Float32Array.numericIndexSetter')
+ @DocsEditable
void operator[]=(int index, num value) native "Float32Array_numericIndexSetter_Callback";
// -- start List<num> mixins.
// num is the element type.
@@ -11500,11 +11890,13 @@
void forEach(void f(num element)) => IterableMixinWorkaround.forEach(this, f);
- String join([String separator]) => IterableMixinWorkaround.joinList(this, separator);
+ String join([String separator]) =>
+ IterableMixinWorkaround.joinList(this, separator);
List mappedBy(f(num element)) => IterableMixinWorkaround.mappedByList(this, f);
- Iterable<num> where(bool f(num element)) => IterableMixinWorkaround.where(this, f);
+ Iterable<num> where(bool f(num element)) =>
+ IterableMixinWorkaround.where(this, f);
bool every(bool f(num element)) => IterableMixinWorkaround.every(this, f);
@@ -11566,6 +11958,9 @@
throw new UnsupportedError("Cannot clear immutable List.");
}
+ List<num> get reversed =>
+ new ReversedListView<num>(this, 0, null);
+
void sort([int compare(num a, num b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -11594,9 +11989,11 @@
throw new StateError("More than one element");
}
- num min([int compare(num a, num b)]) => IterableMixinWorkaround.min(this, compare);
+ num min([int compare(num a, num b)]) =>
+ IterableMixinWorkaround.min(this, compare);
- num max([int compare(num a, num b)]) => IterableMixinWorkaround.max(this, compare);
+ num max([int compare(num a, num b)]) =>
+ IterableMixinWorkaround.max(this, compare);
num removeAt(int pos) {
throw new UnsupportedError("Cannot remove from immutable List.");
@@ -11643,8 +12040,8 @@
// -- end List<num> mixins.
- @DocsEditable
@DomName('Float32Array.setElements')
+ @DocsEditable
void setElements(Object array, [int offset]) native "Float32Array_setElements_Callback";
Float32Array subarray(int start, [int end]) {
@@ -11654,13 +12051,13 @@
return _subarray_2(start);
}
+ @DomName('Float32Array._subarray_1')
@DocsEditable
- @DomName('Float32Array.subarray_1')
- Float32Array _subarray_1(start, end) native "Float32Array_subarray_1_Callback";
+ Float32Array _subarray_1(start, end) native "Float32Array__subarray_1_Callback";
+ @DomName('Float32Array._subarray_2')
@DocsEditable
- @DomName('Float32Array.subarray_2')
- Float32Array _subarray_2(start) native "Float32Array_subarray_2_Callback";
+ Float32Array _subarray_2(start) native "Float32Array__subarray_2_Callback";
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -11686,16 +12083,16 @@
static const int BYTES_PER_ELEMENT = 8;
- @DocsEditable
@DomName('Float64Array.length')
+ @DocsEditable
int get length native "Float64Array_length_Getter";
- @DocsEditable
@DomName('Float64Array.numericIndexGetter')
+ @DocsEditable
num operator[](int index) native "Float64Array_numericIndexGetter_Callback";
- @DocsEditable
@DomName('Float64Array.numericIndexSetter')
+ @DocsEditable
void operator[]=(int index, num value) native "Float64Array_numericIndexSetter_Callback";
// -- start List<num> mixins.
// num is the element type.
@@ -11717,11 +12114,13 @@
void forEach(void f(num element)) => IterableMixinWorkaround.forEach(this, f);
- String join([String separator]) => IterableMixinWorkaround.joinList(this, separator);
+ String join([String separator]) =>
+ IterableMixinWorkaround.joinList(this, separator);
List mappedBy(f(num element)) => IterableMixinWorkaround.mappedByList(this, f);
- Iterable<num> where(bool f(num element)) => IterableMixinWorkaround.where(this, f);
+ Iterable<num> where(bool f(num element)) =>
+ IterableMixinWorkaround.where(this, f);
bool every(bool f(num element)) => IterableMixinWorkaround.every(this, f);
@@ -11783,6 +12182,9 @@
throw new UnsupportedError("Cannot clear immutable List.");
}
+ List<num> get reversed =>
+ new ReversedListView<num>(this, 0, null);
+
void sort([int compare(num a, num b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -11811,9 +12213,11 @@
throw new StateError("More than one element");
}
- num min([int compare(num a, num b)]) => IterableMixinWorkaround.min(this, compare);
+ num min([int compare(num a, num b)]) =>
+ IterableMixinWorkaround.min(this, compare);
- num max([int compare(num a, num b)]) => IterableMixinWorkaround.max(this, compare);
+ num max([int compare(num a, num b)]) =>
+ IterableMixinWorkaround.max(this, compare);
num removeAt(int pos) {
throw new UnsupportedError("Cannot remove from immutable List.");
@@ -11860,8 +12264,8 @@
// -- end List<num> mixins.
- @DocsEditable
@DomName('Float64Array.setElements')
+ @DocsEditable
void setElements(Object array, [int offset]) native "Float64Array_setElements_Callback";
Float64Array subarray(int start, [int end]) {
@@ -11871,13 +12275,13 @@
return _subarray_2(start);
}
+ @DomName('Float64Array._subarray_1')
@DocsEditable
- @DomName('Float64Array.subarray_1')
- Float64Array _subarray_1(start, end) native "Float64Array_subarray_1_Callback";
+ Float64Array _subarray_1(start, end) native "Float64Array__subarray_1_Callback";
+ @DomName('Float64Array._subarray_2')
@DocsEditable
- @DomName('Float64Array.subarray_2')
- Float64Array _subarray_2(start) native "Float64Array_subarray_2_Callback";
+ Float64Array _subarray_2(start) native "Float64Array__subarray_2_Callback";
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -11901,8 +12305,8 @@
}
static FormData _create([FormElement form]) native "DOMFormData_constructor_Callback";
- @DocsEditable
@DomName('DOMFormData.append')
+ @DocsEditable
void append(String name, value, [String filename]) native "DOMFormData_append_Callback";
}
@@ -11921,92 +12325,92 @@
@DocsEditable
factory FormElement() => document.$dom_createElement("form");
- @DocsEditable
@DomName('HTMLFormElement.acceptCharset')
+ @DocsEditable
String get acceptCharset native "HTMLFormElement_acceptCharset_Getter";
- @DocsEditable
@DomName('HTMLFormElement.acceptCharset')
+ @DocsEditable
void set acceptCharset(String value) native "HTMLFormElement_acceptCharset_Setter";
- @DocsEditable
@DomName('HTMLFormElement.action')
+ @DocsEditable
String get action native "HTMLFormElement_action_Getter";
- @DocsEditable
@DomName('HTMLFormElement.action')
+ @DocsEditable
void set action(String value) native "HTMLFormElement_action_Setter";
- @DocsEditable
@DomName('HTMLFormElement.autocomplete')
+ @DocsEditable
String get autocomplete native "HTMLFormElement_autocomplete_Getter";
- @DocsEditable
@DomName('HTMLFormElement.autocomplete')
+ @DocsEditable
void set autocomplete(String value) native "HTMLFormElement_autocomplete_Setter";
- @DocsEditable
@DomName('HTMLFormElement.encoding')
+ @DocsEditable
String get encoding native "HTMLFormElement_encoding_Getter";
- @DocsEditable
@DomName('HTMLFormElement.encoding')
+ @DocsEditable
void set encoding(String value) native "HTMLFormElement_encoding_Setter";
- @DocsEditable
@DomName('HTMLFormElement.enctype')
+ @DocsEditable
String get enctype native "HTMLFormElement_enctype_Getter";
- @DocsEditable
@DomName('HTMLFormElement.enctype')
+ @DocsEditable
void set enctype(String value) native "HTMLFormElement_enctype_Setter";
- @DocsEditable
@DomName('HTMLFormElement.length')
+ @DocsEditable
int get length native "HTMLFormElement_length_Getter";
- @DocsEditable
@DomName('HTMLFormElement.method')
+ @DocsEditable
String get method native "HTMLFormElement_method_Getter";
- @DocsEditable
@DomName('HTMLFormElement.method')
+ @DocsEditable
void set method(String value) native "HTMLFormElement_method_Setter";
- @DocsEditable
@DomName('HTMLFormElement.name')
+ @DocsEditable
String get name native "HTMLFormElement_name_Getter";
- @DocsEditable
@DomName('HTMLFormElement.name')
+ @DocsEditable
void set name(String value) native "HTMLFormElement_name_Setter";
- @DocsEditable
@DomName('HTMLFormElement.noValidate')
+ @DocsEditable
bool get noValidate native "HTMLFormElement_noValidate_Getter";
- @DocsEditable
@DomName('HTMLFormElement.noValidate')
+ @DocsEditable
void set noValidate(bool value) native "HTMLFormElement_noValidate_Setter";
- @DocsEditable
@DomName('HTMLFormElement.target')
+ @DocsEditable
String get target native "HTMLFormElement_target_Getter";
- @DocsEditable
@DomName('HTMLFormElement.target')
+ @DocsEditable
void set target(String value) native "HTMLFormElement_target_Setter";
- @DocsEditable
@DomName('HTMLFormElement.checkValidity')
+ @DocsEditable
bool checkValidity() native "HTMLFormElement_checkValidity_Callback";
- @DocsEditable
@DomName('HTMLFormElement.reset')
+ @DocsEditable
void reset() native "HTMLFormElement_reset_Callback";
- @DocsEditable
@DomName('HTMLFormElement.submit')
+ @DocsEditable
void submit() native "HTMLFormElement_submit_Callback";
}
@@ -12022,24 +12426,24 @@
class Gamepad extends NativeFieldWrapperClass1 {
Gamepad.internal();
- @DocsEditable
@DomName('Gamepad.axes')
+ @DocsEditable
List<num> get axes native "Gamepad_axes_Getter";
- @DocsEditable
@DomName('Gamepad.buttons')
+ @DocsEditable
List<num> get buttons native "Gamepad_buttons_Getter";
- @DocsEditable
@DomName('Gamepad.id')
+ @DocsEditable
String get id native "Gamepad_id_Getter";
- @DocsEditable
@DomName('Gamepad.index')
+ @DocsEditable
int get index native "Gamepad_index_Getter";
- @DocsEditable
@DomName('Gamepad.timestamp')
+ @DocsEditable
int get timestamp native "Gamepad_timestamp_Getter";
}
@@ -12055,16 +12459,16 @@
class Geolocation extends NativeFieldWrapperClass1 {
Geolocation.internal();
- @DocsEditable
@DomName('Geolocation.clearWatch')
+ @DocsEditable
void clearWatch(int watchId) native "Geolocation_clearWatch_Callback";
- @DocsEditable
@DomName('Geolocation.getCurrentPosition')
+ @DocsEditable
void getCurrentPosition(PositionCallback successCallback, [PositionErrorCallback errorCallback, Object options]) native "Geolocation_getCurrentPosition_Callback";
- @DocsEditable
@DomName('Geolocation.watchPosition')
+ @DocsEditable
int watchPosition(PositionCallback successCallback, [PositionErrorCallback errorCallback, Object options]) native "Geolocation_watchPosition_Callback";
}
@@ -12080,12 +12484,12 @@
class Geoposition extends NativeFieldWrapperClass1 {
Geoposition.internal();
- @DocsEditable
@DomName('Geoposition.coords')
+ @DocsEditable
Coordinates get coords native "Geoposition_coords_Getter";
- @DocsEditable
@DomName('Geoposition.timestamp')
+ @DocsEditable
int get timestamp native "Geoposition_timestamp_Getter";
}
@@ -12105,29 +12509,41 @@
factory HRElement() => document.$dom_createElement("hr");
}
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// WARNING: Do not edit - generated code.
-
-@DocsEditable
@DomName('HashChangeEvent')
+@SupportedBrowser(SupportedBrowser.CHROME)
+@SupportedBrowser(SupportedBrowser.FIREFOX)
+@SupportedBrowser(SupportedBrowser.SAFARI)
+
class HashChangeEvent extends Event {
+ factory HashChangeEvent(String type,
+ {bool canBubble: true, bool cancelable: true, String oldUrl,
+ String newUrl}) {
+ var event = document.$dom_createEvent("HashChangeEvent");
+ event.$dom_initHashChangeEvent(type, canBubble, cancelable, oldUrl, newUrl);
+ return event;
+ }
HashChangeEvent.internal() : super.internal();
- @DocsEditable
+ /// Checks if this type is supported on the current platform.
+ static bool get supported => true;
+
@DomName('HashChangeEvent.newURL')
+ @DocsEditable
String get newUrl native "HashChangeEvent_newURL_Getter";
- @DocsEditable
@DomName('HashChangeEvent.oldURL')
+ @DocsEditable
String get oldUrl native "HashChangeEvent_oldURL_Getter";
- @DocsEditable
@DomName('HashChangeEvent.initHashChangeEvent')
- void initHashChangeEvent(String type, bool canBubble, bool cancelable, String oldURL, String newURL) native "HashChangeEvent_initHashChangeEvent_Callback";
+ @DocsEditable
+ void $dom_initHashChangeEvent(String type, bool canBubble, bool cancelable, String oldURL, String newURL) native "HashChangeEvent_initHashChangeEvent_Callback";
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -12182,8 +12598,6 @@
// BSD-style license that can be found in the LICENSE file.
-
-@DocsEditable
@DomName('History')
class History extends NativeFieldWrapperClass1 implements HistoryBase {
@@ -12199,36 +12613,36 @@
static bool get supportsState => true;
History.internal();
- @DocsEditable
@DomName('History.length')
+ @DocsEditable
int get length native "History_length_Getter";
- @DocsEditable
@DomName('History.state')
+ @DocsEditable
dynamic get state native "History_state_Getter";
- @DocsEditable
@DomName('History.back')
+ @DocsEditable
void back() native "History_back_Callback";
- @DocsEditable
@DomName('History.forward')
+ @DocsEditable
void forward() native "History_forward_Callback";
- @DocsEditable
@DomName('History.go')
+ @DocsEditable
void go(int distance) native "History_go_Callback";
- @DocsEditable
@DomName('History.pushState')
+ @DocsEditable
@SupportedBrowser(SupportedBrowser.CHROME)
@SupportedBrowser(SupportedBrowser.FIREFOX)
@SupportedBrowser(SupportedBrowser.IE, '10')
@SupportedBrowser(SupportedBrowser.SAFARI)
void pushState(Object data, String title, [String url]) native "History_pushState_Callback";
- @DocsEditable
@DomName('History.replaceState')
+ @DocsEditable
@SupportedBrowser(SupportedBrowser.CHROME)
@SupportedBrowser(SupportedBrowser.FIREFOX)
@SupportedBrowser(SupportedBrowser.IE, '10')
@@ -12247,8 +12661,8 @@
class HtmlAllCollection extends NativeFieldWrapperClass1 implements List<Node> {
HtmlAllCollection.internal();
- @DocsEditable
@DomName('HTMLAllCollection.length')
+ @DocsEditable
int get length native "HTMLAllCollection_length_Getter";
Node operator[](int index) native "HTMLAllCollection_item_Callback";
@@ -12276,11 +12690,13 @@
void forEach(void f(Node element)) => IterableMixinWorkaround.forEach(this, f);
- String join([String separator]) => IterableMixinWorkaround.joinList(this, separator);
+ String join([String separator]) =>
+ IterableMixinWorkaround.joinList(this, separator);
List mappedBy(f(Node element)) => IterableMixinWorkaround.mappedByList(this, f);
- Iterable<Node> where(bool f(Node element)) => IterableMixinWorkaround.where(this, f);
+ Iterable<Node> where(bool f(Node element)) =>
+ IterableMixinWorkaround.where(this, f);
bool every(bool f(Node element)) => IterableMixinWorkaround.every(this, f);
@@ -12342,6 +12758,9 @@
throw new UnsupportedError("Cannot clear immutable List.");
}
+ List<Node> get reversed =>
+ new ReversedListView<Node>(this, 0, null);
+
void sort([int compare(Node a, Node b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -12370,9 +12789,11 @@
throw new StateError("More than one element");
}
- Node min([int compare(Node a, Node b)]) => IterableMixinWorkaround.min(this, compare);
+ Node min([int compare(Node a, Node b)]) =>
+ IterableMixinWorkaround.min(this, compare);
- Node max([int compare(Node a, Node b)]) => IterableMixinWorkaround.max(this, compare);
+ Node max([int compare(Node a, Node b)]) =>
+ IterableMixinWorkaround.max(this, compare);
Node removeAt(int pos) {
throw new UnsupportedError("Cannot remove from immutable List.");
@@ -12419,16 +12840,16 @@
// -- end List<Node> mixins.
- @DocsEditable
@DomName('HTMLAllCollection.item')
+ @DocsEditable
Node item(int index) native "HTMLAllCollection_item_Callback";
- @DocsEditable
@DomName('HTMLAllCollection.namedItem')
+ @DocsEditable
Node namedItem(String name) native "HTMLAllCollection_namedItem_Callback";
- @DocsEditable
@DomName('HTMLAllCollection.tags')
+ @DocsEditable
List<Node> tags(String name) native "HTMLAllCollection_tags_Callback";
}
@@ -12444,8 +12865,8 @@
class HtmlCollection extends NativeFieldWrapperClass1 implements List<Node> {
HtmlCollection.internal();
- @DocsEditable
@DomName('HTMLCollection.length')
+ @DocsEditable
int get length native "HTMLCollection_length_Getter";
Node operator[](int index) native "HTMLCollection_item_Callback";
@@ -12473,11 +12894,13 @@
void forEach(void f(Node element)) => IterableMixinWorkaround.forEach(this, f);
- String join([String separator]) => IterableMixinWorkaround.joinList(this, separator);
+ String join([String separator]) =>
+ IterableMixinWorkaround.joinList(this, separator);
List mappedBy(f(Node element)) => IterableMixinWorkaround.mappedByList(this, f);
- Iterable<Node> where(bool f(Node element)) => IterableMixinWorkaround.where(this, f);
+ Iterable<Node> where(bool f(Node element)) =>
+ IterableMixinWorkaround.where(this, f);
bool every(bool f(Node element)) => IterableMixinWorkaround.every(this, f);
@@ -12539,6 +12962,9 @@
throw new UnsupportedError("Cannot clear immutable List.");
}
+ List<Node> get reversed =>
+ new ReversedListView<Node>(this, 0, null);
+
void sort([int compare(Node a, Node b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -12567,9 +12993,11 @@
throw new StateError("More than one element");
}
- Node min([int compare(Node a, Node b)]) => IterableMixinWorkaround.min(this, compare);
+ Node min([int compare(Node a, Node b)]) =>
+ IterableMixinWorkaround.min(this, compare);
- Node max([int compare(Node a, Node b)]) => IterableMixinWorkaround.max(this, compare);
+ Node max([int compare(Node a, Node b)]) =>
+ IterableMixinWorkaround.max(this, compare);
Node removeAt(int pos) {
throw new UnsupportedError("Cannot remove from immutable List.");
@@ -12616,12 +13044,12 @@
// -- end List<Node> mixins.
- @DocsEditable
@DomName('HTMLCollection.item')
+ @DocsEditable
Node item(int index) native "HTMLCollection_item_Callback";
- @DocsEditable
@DomName('HTMLCollection.namedItem')
+ @DocsEditable
Node namedItem(String name) native "HTMLCollection_namedItem_Callback";
}
@@ -12632,13 +13060,12 @@
// WARNING: Do not edit - generated code.
-@DocsEditable
@DomName('HTMLDocument')
class HtmlDocument extends Document {
HtmlDocument.internal() : super.internal();
- @DocsEditable
@DomName('HTMLDocument.activeElement')
+ @DocsEditable
Element get activeElement native "HTMLDocument_activeElement_Getter";
@DomName('Document.body')
@@ -12691,7 +13118,7 @@
*/
@SupportedBrowser(SupportedBrowser.CHROME)
@SupportedBrowser(SupportedBrowser.SAFARI)
- @Experimental()
+ @Experimental
@DomName('Document.getCSSCanvasContext')
CanvasRenderingContext getCssCanvasContext(String contextId, String name,
int width, int height) {
@@ -12789,8 +13216,8 @@
class HtmlFormControlsCollection extends HtmlCollection {
HtmlFormControlsCollection.internal() : super.internal();
- @DocsEditable
@DomName('HTMLFormControlsCollection.namedItem')
+ @DocsEditable
Node namedItem(String name) native "HTMLFormControlsCollection_namedItem_Callback";
}
@@ -12806,8 +13233,8 @@
class HtmlOptionsCollection extends HtmlCollection {
HtmlOptionsCollection.internal() : super.internal();
- @DocsEditable
@DomName('HTMLOptionsCollection.numericIndexSetter')
+ @DocsEditable
void operator[]=(int index, Node value) native "HTMLOptionsCollection_numericIndexSetter_Callback";
}
@@ -12818,23 +13245,23 @@
/**
* A utility for retrieving data from a URL.
- *
+ *
* HttpRequest can be used to obtain data from http, ftp, and file
- * protocols.
- *
+ * protocols.
+ *
* For example, suppose we're developing these API docs, and we
* wish to retrieve the HTML of the top-level page and print it out.
* The easiest way to do that would be:
- *
+ *
* var httpRequest = HttpRequest.get('http://api.dartlang.org',
* (request) => print(request.responseText));
- *
+ *
* **Important**: With the default behavior of this class, your
* code making the request should be served from the same origin (domain name,
* port, and application layer protocol) as the URL you are trying to access
- * with HttpRequest. However, there are ways to
+ * with HttpRequest. However, there are ways to
* [get around this restriction](http://www.dartlang.org/articles/json-web-service/#note-on-jsonp).
- *
+ *
* See also:
*
* * [Dart article on using HttpRequests](http://www.dartlang.org/articles/json-web-service/#getting-data)
@@ -12845,7 +13272,7 @@
class HttpRequest extends EventTarget {
/**
* Creates a URL get request for the specified `url`.
- *
+ *
* After completing the request, the object will call the user-provided
* [onComplete] callback.
*/
@@ -12857,8 +13284,8 @@
* Creates a URL GET request for the specified `url` with
* credentials such a cookie (already) set in the header or
* [authorization headers](http://tools.ietf.org/html/rfc1945#section-10.2).
- *
- * After completing the request, the object will call the user-provided
+ *
+ * After completing the request, the object will call the user-provided
* [onComplete] callback.
*
* A few other details to keep in mind when using credentials:
@@ -12867,7 +13294,7 @@
* * The `Access-Control-Allow-Origin` header of `url` cannot contain a wildcard (*).
* * The `Access-Control-Allow-Credentials` header of `url` must be set to true.
* * If `Access-Control-Expose-Headers` has not been set to true, only a subset of all the response headers will be returned when calling [getAllRequestHeaders].
- *
+ *
* See also: [authorization headers](http://en.wikipedia.org/wiki/Basic_access_authentication).
*/
factory HttpRequest.getWithCredentials(String url,
@@ -12876,18 +13303,32 @@
HttpRequest.internal() : super.internal();
+ @DomName('XMLHttpRequest.abort')
+ @DocsEditable
static const EventStreamProvider<ProgressEvent> abortEvent = const EventStreamProvider<ProgressEvent>('abort');
+ @DomName('XMLHttpRequest.error')
+ @DocsEditable
static const EventStreamProvider<ProgressEvent> errorEvent = const EventStreamProvider<ProgressEvent>('error');
+ @DomName('XMLHttpRequest.load')
+ @DocsEditable
static const EventStreamProvider<ProgressEvent> loadEvent = const EventStreamProvider<ProgressEvent>('load');
+ @DomName('XMLHttpRequest.loadend')
+ @DocsEditable
static const EventStreamProvider<ProgressEvent> loadEndEvent = const EventStreamProvider<ProgressEvent>('loadend');
+ @DomName('XMLHttpRequest.loadstart')
+ @DocsEditable
static const EventStreamProvider<ProgressEvent> loadStartEvent = const EventStreamProvider<ProgressEvent>('loadstart');
+ @DomName('XMLHttpRequest.progress')
+ @DocsEditable
static const EventStreamProvider<ProgressEvent> progressEvent = const EventStreamProvider<ProgressEvent>('progress');
+ @DomName('XMLHttpRequest.readystatechange')
+ @DocsEditable
static const EventStreamProvider<ProgressEvent> readyStateChangeEvent = const EventStreamProvider<ProgressEvent>('readystatechange');
@DocsEditable
@@ -12896,6 +13337,7 @@
@DocsEditable
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
+ @deprecated
HttpRequestEvents get on =>
new HttpRequestEvents(this);
@@ -12909,107 +13351,122 @@
static const int UNSENT = 0;
- @DocsEditable
@DomName('XMLHttpRequest.readyState')
+ @DocsEditable
int get readyState native "XMLHttpRequest_readyState_Getter";
- @DocsEditable
@DomName('XMLHttpRequest.response')
+ @DocsEditable
Object get response native "XMLHttpRequest_response_Getter";
- @DocsEditable
@DomName('XMLHttpRequest.responseText')
+ @DocsEditable
String get responseText native "XMLHttpRequest_responseText_Getter";
- @DocsEditable
@DomName('XMLHttpRequest.responseType')
+ @DocsEditable
String get responseType native "XMLHttpRequest_responseType_Getter";
- @DocsEditable
@DomName('XMLHttpRequest.responseType')
+ @DocsEditable
void set responseType(String value) native "XMLHttpRequest_responseType_Setter";
- @DocsEditable
@DomName('XMLHttpRequest.responseXML')
+ @DocsEditable
Document get responseXml native "XMLHttpRequest_responseXML_Getter";
- @DocsEditable
@DomName('XMLHttpRequest.status')
+ @DocsEditable
int get status native "XMLHttpRequest_status_Getter";
- @DocsEditable
@DomName('XMLHttpRequest.statusText')
+ @DocsEditable
String get statusText native "XMLHttpRequest_statusText_Getter";
- @DocsEditable
@DomName('XMLHttpRequest.upload')
+ @DocsEditable
HttpRequestUpload get upload native "XMLHttpRequest_upload_Getter";
- @DocsEditable
@DomName('XMLHttpRequest.withCredentials')
+ @DocsEditable
bool get withCredentials native "XMLHttpRequest_withCredentials_Getter";
- @DocsEditable
@DomName('XMLHttpRequest.withCredentials')
+ @DocsEditable
void set withCredentials(bool value) native "XMLHttpRequest_withCredentials_Setter";
- @DocsEditable
@DomName('XMLHttpRequest.abort')
+ @DocsEditable
void abort() native "XMLHttpRequest_abort_Callback";
- @DocsEditable
@DomName('XMLHttpRequest.addEventListener')
+ @DocsEditable
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native "XMLHttpRequest_addEventListener_Callback";
- @DocsEditable
@DomName('XMLHttpRequest.dispatchEvent')
- bool $dom_dispatchEvent(Event evt) native "XMLHttpRequest_dispatchEvent_Callback";
-
@DocsEditable
+ bool dispatchEvent(Event evt) native "XMLHttpRequest_dispatchEvent_Callback";
+
@DomName('XMLHttpRequest.getAllResponseHeaders')
+ @DocsEditable
String getAllResponseHeaders() native "XMLHttpRequest_getAllResponseHeaders_Callback";
- @DocsEditable
@DomName('XMLHttpRequest.getResponseHeader')
+ @DocsEditable
String getResponseHeader(String header) native "XMLHttpRequest_getResponseHeader_Callback";
- @DocsEditable
@DomName('XMLHttpRequest.open')
+ @DocsEditable
void open(String method, String url, [bool async, String user, String password]) native "XMLHttpRequest_open_Callback";
- @DocsEditable
@DomName('XMLHttpRequest.overrideMimeType')
+ @DocsEditable
void overrideMimeType(String override) native "XMLHttpRequest_overrideMimeType_Callback";
- @DocsEditable
@DomName('XMLHttpRequest.removeEventListener')
+ @DocsEditable
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native "XMLHttpRequest_removeEventListener_Callback";
- @DocsEditable
@DomName('XMLHttpRequest.send')
+ @DocsEditable
void send([data]) native "XMLHttpRequest_send_Callback";
- @DocsEditable
@DomName('XMLHttpRequest.setRequestHeader')
+ @DocsEditable
void setRequestHeader(String header, String value) native "XMLHttpRequest_setRequestHeader_Callback";
+ @DomName('XMLHttpRequest.abort')
+ @DocsEditable
Stream<ProgressEvent> get onAbort => abortEvent.forTarget(this);
+ @DomName('XMLHttpRequest.error')
+ @DocsEditable
Stream<ProgressEvent> get onError => errorEvent.forTarget(this);
+ @DomName('XMLHttpRequest.load')
+ @DocsEditable
Stream<ProgressEvent> get onLoad => loadEvent.forTarget(this);
+ @DomName('XMLHttpRequest.loadend')
+ @DocsEditable
Stream<ProgressEvent> get onLoadEnd => loadEndEvent.forTarget(this);
+ @DomName('XMLHttpRequest.loadstart')
+ @DocsEditable
Stream<ProgressEvent> get onLoadStart => loadStartEvent.forTarget(this);
+ @DomName('XMLHttpRequest.progress')
+ @DocsEditable
Stream<ProgressEvent> get onProgress => progressEvent.forTarget(this);
+ @DomName('XMLHttpRequest.readystatechange')
+ @DocsEditable
Stream<ProgressEvent> get onReadyStateChange => readyStateChangeEvent.forTarget(this);
}
@DocsEditable
+@deprecated
class HttpRequestEvents extends Events {
@DocsEditable
HttpRequestEvents(EventTarget _ptr) : super(_ptr);
@@ -13051,20 +13508,20 @@
static const int NETWORK_ERR = 101;
- @DocsEditable
@DomName('XMLHttpRequestException.code')
+ @DocsEditable
int get code native "XMLHttpRequestException_code_Getter";
- @DocsEditable
@DomName('XMLHttpRequestException.message')
+ @DocsEditable
String get message native "XMLHttpRequestException_message_Getter";
- @DocsEditable
@DomName('XMLHttpRequestException.name')
+ @DocsEditable
String get name native "XMLHttpRequestException_name_Getter";
- @DocsEditable
@DomName('XMLHttpRequestException.toString')
+ @DocsEditable
String toString() native "XMLHttpRequestException_toString_Callback";
}
@@ -13077,15 +13534,21 @@
@DocsEditable
@DomName('XMLHttpRequestProgressEvent')
+@SupportedBrowser(SupportedBrowser.CHROME)
+@SupportedBrowser(SupportedBrowser.SAFARI)
+@Experimental
class HttpRequestProgressEvent extends ProgressEvent {
HttpRequestProgressEvent.internal() : super.internal();
- @DocsEditable
+ /// Checks if this type is supported on the current platform.
+ static bool get supported => true;
+
@DomName('XMLHttpRequestProgressEvent.position')
+ @DocsEditable
int get position native "XMLHttpRequestProgressEvent_position_Getter";
- @DocsEditable
@DomName('XMLHttpRequestProgressEvent.totalSize')
+ @DocsEditable
int get totalSize native "XMLHttpRequestProgressEvent_totalSize_Getter";
}
@@ -13101,50 +13564,76 @@
class HttpRequestUpload extends EventTarget {
HttpRequestUpload.internal() : super.internal();
+ @DomName('XMLHttpRequestUpload.abort')
+ @DocsEditable
static const EventStreamProvider<ProgressEvent> abortEvent = const EventStreamProvider<ProgressEvent>('abort');
+ @DomName('XMLHttpRequestUpload.error')
+ @DocsEditable
static const EventStreamProvider<ProgressEvent> errorEvent = const EventStreamProvider<ProgressEvent>('error');
+ @DomName('XMLHttpRequestUpload.load')
+ @DocsEditable
static const EventStreamProvider<ProgressEvent> loadEvent = const EventStreamProvider<ProgressEvent>('load');
+ @DomName('XMLHttpRequestUpload.loadend')
+ @DocsEditable
static const EventStreamProvider<ProgressEvent> loadEndEvent = const EventStreamProvider<ProgressEvent>('loadend');
+ @DomName('XMLHttpRequestUpload.loadstart')
+ @DocsEditable
static const EventStreamProvider<ProgressEvent> loadStartEvent = const EventStreamProvider<ProgressEvent>('loadstart');
+ @DomName('XMLHttpRequestUpload.progress')
+ @DocsEditable
static const EventStreamProvider<ProgressEvent> progressEvent = const EventStreamProvider<ProgressEvent>('progress');
@DocsEditable
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
+ @deprecated
HttpRequestUploadEvents get on =>
new HttpRequestUploadEvents(this);
- @DocsEditable
@DomName('XMLHttpRequestUpload.addEventListener')
+ @DocsEditable
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native "XMLHttpRequestUpload_addEventListener_Callback";
- @DocsEditable
@DomName('XMLHttpRequestUpload.dispatchEvent')
- bool $dom_dispatchEvent(Event evt) native "XMLHttpRequestUpload_dispatchEvent_Callback";
-
@DocsEditable
+ bool dispatchEvent(Event evt) native "XMLHttpRequestUpload_dispatchEvent_Callback";
+
@DomName('XMLHttpRequestUpload.removeEventListener')
+ @DocsEditable
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native "XMLHttpRequestUpload_removeEventListener_Callback";
+ @DomName('XMLHttpRequestUpload.abort')
+ @DocsEditable
Stream<ProgressEvent> get onAbort => abortEvent.forTarget(this);
+ @DomName('XMLHttpRequestUpload.error')
+ @DocsEditable
Stream<ProgressEvent> get onError => errorEvent.forTarget(this);
+ @DomName('XMLHttpRequestUpload.load')
+ @DocsEditable
Stream<ProgressEvent> get onLoad => loadEvent.forTarget(this);
+ @DomName('XMLHttpRequestUpload.loadend')
+ @DocsEditable
Stream<ProgressEvent> get onLoadEnd => loadEndEvent.forTarget(this);
+ @DomName('XMLHttpRequestUpload.loadstart')
+ @DocsEditable
Stream<ProgressEvent> get onLoadStart => loadStartEvent.forTarget(this);
+ @DomName('XMLHttpRequestUpload.progress')
+ @DocsEditable
Stream<ProgressEvent> get onProgress => progressEvent.forTarget(this);
}
@DocsEditable
+@deprecated
class HttpRequestUploadEvents extends Events {
@DocsEditable
HttpRequestUploadEvents(EventTarget _ptr) : super(_ptr);
@@ -13182,81 +13671,87 @@
@DocsEditable
factory IFrameElement() => document.$dom_createElement("iframe");
- @DocsEditable
@DomName('HTMLIFrameElement.contentWindow')
+ @DocsEditable
WindowBase get contentWindow native "HTMLIFrameElement_contentWindow_Getter";
- @DocsEditable
@DomName('HTMLIFrameElement.height')
+ @DocsEditable
String get height native "HTMLIFrameElement_height_Getter";
- @DocsEditable
@DomName('HTMLIFrameElement.height')
+ @DocsEditable
void set height(String value) native "HTMLIFrameElement_height_Setter";
- @DocsEditable
@DomName('HTMLIFrameElement.name')
+ @DocsEditable
String get name native "HTMLIFrameElement_name_Getter";
- @DocsEditable
@DomName('HTMLIFrameElement.name')
+ @DocsEditable
void set name(String value) native "HTMLIFrameElement_name_Setter";
- @DocsEditable
@DomName('HTMLIFrameElement.sandbox')
+ @DocsEditable
String get sandbox native "HTMLIFrameElement_sandbox_Getter";
- @DocsEditable
@DomName('HTMLIFrameElement.sandbox')
+ @DocsEditable
void set sandbox(String value) native "HTMLIFrameElement_sandbox_Setter";
- @DocsEditable
@DomName('HTMLIFrameElement.src')
+ @DocsEditable
String get src native "HTMLIFrameElement_src_Getter";
- @DocsEditable
@DomName('HTMLIFrameElement.src')
+ @DocsEditable
void set src(String value) native "HTMLIFrameElement_src_Setter";
- @DocsEditable
@DomName('HTMLIFrameElement.srcdoc')
+ @DocsEditable
String get srcdoc native "HTMLIFrameElement_srcdoc_Getter";
- @DocsEditable
@DomName('HTMLIFrameElement.srcdoc')
+ @DocsEditable
void set srcdoc(String value) native "HTMLIFrameElement_srcdoc_Setter";
- @DocsEditable
@DomName('HTMLIFrameElement.width')
+ @DocsEditable
String get width native "HTMLIFrameElement_width_Getter";
- @DocsEditable
@DomName('HTMLIFrameElement.width')
+ @DocsEditable
void set width(String value) native "HTMLIFrameElement_width_Setter";
}
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// WARNING: Do not edit - generated code.
-
-
-@DocsEditable
@DomName('ImageData')
+
class ImageData extends NativeFieldWrapperClass1 {
+ List<int> __data;
+
+ List<int> get data {
+ if (__data == null) {
+ __data = _data;
+ }
+ return __data;
+ }
+
ImageData.internal();
- @DocsEditable
@DomName('ImageData.data')
- Uint8ClampedArray get data native "ImageData_data_Getter";
-
@DocsEditable
+ List<int> get _data native "ImageData_data_Getter";
+
@DomName('ImageData.height')
+ @DocsEditable
int get height native "ImageData_height_Getter";
- @DocsEditable
@DomName('ImageData.width')
+ @DocsEditable
int get width native "ImageData_width_Getter";
}
@@ -13281,96 +13776,96 @@
return e;
}
- @DocsEditable
@DomName('HTMLImageElement.alt')
+ @DocsEditable
String get alt native "HTMLImageElement_alt_Getter";
- @DocsEditable
@DomName('HTMLImageElement.alt')
+ @DocsEditable
void set alt(String value) native "HTMLImageElement_alt_Setter";
- @DocsEditable
@DomName('HTMLImageElement.border')
+ @DocsEditable
String get border native "HTMLImageElement_border_Getter";
- @DocsEditable
@DomName('HTMLImageElement.border')
+ @DocsEditable
void set border(String value) native "HTMLImageElement_border_Setter";
- @DocsEditable
@DomName('HTMLImageElement.complete')
+ @DocsEditable
bool get complete native "HTMLImageElement_complete_Getter";
- @DocsEditable
@DomName('HTMLImageElement.crossOrigin')
+ @DocsEditable
String get crossOrigin native "HTMLImageElement_crossOrigin_Getter";
- @DocsEditable
@DomName('HTMLImageElement.crossOrigin')
+ @DocsEditable
void set crossOrigin(String value) native "HTMLImageElement_crossOrigin_Setter";
- @DocsEditable
@DomName('HTMLImageElement.height')
+ @DocsEditable
int get height native "HTMLImageElement_height_Getter";
- @DocsEditable
@DomName('HTMLImageElement.height')
+ @DocsEditable
void set height(int value) native "HTMLImageElement_height_Setter";
- @DocsEditable
@DomName('HTMLImageElement.isMap')
+ @DocsEditable
bool get isMap native "HTMLImageElement_isMap_Getter";
- @DocsEditable
@DomName('HTMLImageElement.isMap')
+ @DocsEditable
void set isMap(bool value) native "HTMLImageElement_isMap_Setter";
- @DocsEditable
@DomName('HTMLImageElement.lowsrc')
+ @DocsEditable
String get lowsrc native "HTMLImageElement_lowsrc_Getter";
- @DocsEditable
@DomName('HTMLImageElement.lowsrc')
+ @DocsEditable
void set lowsrc(String value) native "HTMLImageElement_lowsrc_Setter";
- @DocsEditable
@DomName('HTMLImageElement.naturalHeight')
+ @DocsEditable
int get naturalHeight native "HTMLImageElement_naturalHeight_Getter";
- @DocsEditable
@DomName('HTMLImageElement.naturalWidth')
+ @DocsEditable
int get naturalWidth native "HTMLImageElement_naturalWidth_Getter";
- @DocsEditable
@DomName('HTMLImageElement.src')
+ @DocsEditable
String get src native "HTMLImageElement_src_Getter";
- @DocsEditable
@DomName('HTMLImageElement.src')
+ @DocsEditable
void set src(String value) native "HTMLImageElement_src_Setter";
- @DocsEditable
@DomName('HTMLImageElement.useMap')
+ @DocsEditable
String get useMap native "HTMLImageElement_useMap_Getter";
- @DocsEditable
@DomName('HTMLImageElement.useMap')
+ @DocsEditable
void set useMap(String value) native "HTMLImageElement_useMap_Setter";
- @DocsEditable
@DomName('HTMLImageElement.width')
+ @DocsEditable
int get width native "HTMLImageElement_width_Getter";
- @DocsEditable
@DomName('HTMLImageElement.width')
+ @DocsEditable
void set width(int value) native "HTMLImageElement_width_Setter";
- @DocsEditable
@DomName('HTMLImageElement.x')
+ @DocsEditable
int get x native "HTMLImageElement_x_Getter";
- @DocsEditable
@DomName('HTMLImageElement.y')
+ @DocsEditable
int get y native "HTMLImageElement_y_Getter";
}
@@ -13379,7 +13874,6 @@
// BSD-style license that can be found in the LICENSE file.
-@DocsEditable
@DomName('HTMLInputElement')
class InputElement extends _Element_Merged implements
HiddenInputElement,
@@ -13418,387 +13912,390 @@
}
InputElement.internal() : super.internal();
+ @DomName('HTMLInputElement.webkitSpeechChange')
+ @DocsEditable
static const EventStreamProvider<Event> speechChangeEvent = const EventStreamProvider<Event>('webkitSpeechChange');
@DocsEditable
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
+ @deprecated
InputElementEvents get on =>
new InputElementEvents(this);
- @DocsEditable
@DomName('HTMLInputElement.accept')
+ @DocsEditable
String get accept native "HTMLInputElement_accept_Getter";
- @DocsEditable
@DomName('HTMLInputElement.accept')
+ @DocsEditable
void set accept(String value) native "HTMLInputElement_accept_Setter";
- @DocsEditable
@DomName('HTMLInputElement.alt')
+ @DocsEditable
String get alt native "HTMLInputElement_alt_Getter";
- @DocsEditable
@DomName('HTMLInputElement.alt')
+ @DocsEditable
void set alt(String value) native "HTMLInputElement_alt_Setter";
- @DocsEditable
@DomName('HTMLInputElement.autocomplete')
+ @DocsEditable
String get autocomplete native "HTMLInputElement_autocomplete_Getter";
- @DocsEditable
@DomName('HTMLInputElement.autocomplete')
+ @DocsEditable
void set autocomplete(String value) native "HTMLInputElement_autocomplete_Setter";
- @DocsEditable
@DomName('HTMLInputElement.autofocus')
+ @DocsEditable
bool get autofocus native "HTMLInputElement_autofocus_Getter";
- @DocsEditable
@DomName('HTMLInputElement.autofocus')
+ @DocsEditable
void set autofocus(bool value) native "HTMLInputElement_autofocus_Setter";
- @DocsEditable
@DomName('HTMLInputElement.checked')
+ @DocsEditable
bool get checked native "HTMLInputElement_checked_Getter";
- @DocsEditable
@DomName('HTMLInputElement.checked')
+ @DocsEditable
void set checked(bool value) native "HTMLInputElement_checked_Setter";
- @DocsEditable
@DomName('HTMLInputElement.defaultChecked')
+ @DocsEditable
bool get defaultChecked native "HTMLInputElement_defaultChecked_Getter";
- @DocsEditable
@DomName('HTMLInputElement.defaultChecked')
+ @DocsEditable
void set defaultChecked(bool value) native "HTMLInputElement_defaultChecked_Setter";
- @DocsEditable
@DomName('HTMLInputElement.defaultValue')
+ @DocsEditable
String get defaultValue native "HTMLInputElement_defaultValue_Getter";
- @DocsEditable
@DomName('HTMLInputElement.defaultValue')
+ @DocsEditable
void set defaultValue(String value) native "HTMLInputElement_defaultValue_Setter";
- @DocsEditable
@DomName('HTMLInputElement.dirName')
+ @DocsEditable
String get dirName native "HTMLInputElement_dirName_Getter";
- @DocsEditable
@DomName('HTMLInputElement.dirName')
+ @DocsEditable
void set dirName(String value) native "HTMLInputElement_dirName_Setter";
- @DocsEditable
@DomName('HTMLInputElement.disabled')
+ @DocsEditable
bool get disabled native "HTMLInputElement_disabled_Getter";
- @DocsEditable
@DomName('HTMLInputElement.disabled')
+ @DocsEditable
void set disabled(bool value) native "HTMLInputElement_disabled_Setter";
- @DocsEditable
@DomName('HTMLInputElement.files')
+ @DocsEditable
List<File> get files native "HTMLInputElement_files_Getter";
- @DocsEditable
@DomName('HTMLInputElement.files')
+ @DocsEditable
void set files(List<File> value) native "HTMLInputElement_files_Setter";
- @DocsEditable
@DomName('HTMLInputElement.form')
+ @DocsEditable
FormElement get form native "HTMLInputElement_form_Getter";
- @DocsEditable
@DomName('HTMLInputElement.formAction')
+ @DocsEditable
String get formAction native "HTMLInputElement_formAction_Getter";
- @DocsEditable
@DomName('HTMLInputElement.formAction')
+ @DocsEditable
void set formAction(String value) native "HTMLInputElement_formAction_Setter";
- @DocsEditable
@DomName('HTMLInputElement.formEnctype')
+ @DocsEditable
String get formEnctype native "HTMLInputElement_formEnctype_Getter";
- @DocsEditable
@DomName('HTMLInputElement.formEnctype')
+ @DocsEditable
void set formEnctype(String value) native "HTMLInputElement_formEnctype_Setter";
- @DocsEditable
@DomName('HTMLInputElement.formMethod')
+ @DocsEditable
String get formMethod native "HTMLInputElement_formMethod_Getter";
- @DocsEditable
@DomName('HTMLInputElement.formMethod')
+ @DocsEditable
void set formMethod(String value) native "HTMLInputElement_formMethod_Setter";
- @DocsEditable
@DomName('HTMLInputElement.formNoValidate')
+ @DocsEditable
bool get formNoValidate native "HTMLInputElement_formNoValidate_Getter";
- @DocsEditable
@DomName('HTMLInputElement.formNoValidate')
+ @DocsEditable
void set formNoValidate(bool value) native "HTMLInputElement_formNoValidate_Setter";
- @DocsEditable
@DomName('HTMLInputElement.formTarget')
+ @DocsEditable
String get formTarget native "HTMLInputElement_formTarget_Getter";
- @DocsEditable
@DomName('HTMLInputElement.formTarget')
+ @DocsEditable
void set formTarget(String value) native "HTMLInputElement_formTarget_Setter";
- @DocsEditable
@DomName('HTMLInputElement.height')
+ @DocsEditable
int get height native "HTMLInputElement_height_Getter";
- @DocsEditable
@DomName('HTMLInputElement.height')
+ @DocsEditable
void set height(int value) native "HTMLInputElement_height_Setter";
- @DocsEditable
@DomName('HTMLInputElement.incremental')
+ @DocsEditable
bool get incremental native "HTMLInputElement_incremental_Getter";
- @DocsEditable
@DomName('HTMLInputElement.incremental')
+ @DocsEditable
void set incremental(bool value) native "HTMLInputElement_incremental_Setter";
- @DocsEditable
@DomName('HTMLInputElement.indeterminate')
+ @DocsEditable
bool get indeterminate native "HTMLInputElement_indeterminate_Getter";
- @DocsEditable
@DomName('HTMLInputElement.indeterminate')
+ @DocsEditable
void set indeterminate(bool value) native "HTMLInputElement_indeterminate_Setter";
- @DocsEditable
@DomName('HTMLInputElement.labels')
+ @DocsEditable
List<Node> get labels native "HTMLInputElement_labels_Getter";
- @DocsEditable
@DomName('HTMLInputElement.list')
+ @DocsEditable
Element get list native "HTMLInputElement_list_Getter";
- @DocsEditable
@DomName('HTMLInputElement.max')
+ @DocsEditable
String get max native "HTMLInputElement_max_Getter";
- @DocsEditable
@DomName('HTMLInputElement.max')
+ @DocsEditable
void set max(String value) native "HTMLInputElement_max_Setter";
- @DocsEditable
@DomName('HTMLInputElement.maxLength')
+ @DocsEditable
int get maxLength native "HTMLInputElement_maxLength_Getter";
- @DocsEditable
@DomName('HTMLInputElement.maxLength')
+ @DocsEditable
void set maxLength(int value) native "HTMLInputElement_maxLength_Setter";
- @DocsEditable
@DomName('HTMLInputElement.min')
+ @DocsEditable
String get min native "HTMLInputElement_min_Getter";
- @DocsEditable
@DomName('HTMLInputElement.min')
+ @DocsEditable
void set min(String value) native "HTMLInputElement_min_Setter";
- @DocsEditable
@DomName('HTMLInputElement.multiple')
+ @DocsEditable
bool get multiple native "HTMLInputElement_multiple_Getter";
- @DocsEditable
@DomName('HTMLInputElement.multiple')
+ @DocsEditable
void set multiple(bool value) native "HTMLInputElement_multiple_Setter";
- @DocsEditable
@DomName('HTMLInputElement.name')
+ @DocsEditable
String get name native "HTMLInputElement_name_Getter";
- @DocsEditable
@DomName('HTMLInputElement.name')
+ @DocsEditable
void set name(String value) native "HTMLInputElement_name_Setter";
- @DocsEditable
@DomName('HTMLInputElement.pattern')
+ @DocsEditable
String get pattern native "HTMLInputElement_pattern_Getter";
- @DocsEditable
@DomName('HTMLInputElement.pattern')
+ @DocsEditable
void set pattern(String value) native "HTMLInputElement_pattern_Setter";
- @DocsEditable
@DomName('HTMLInputElement.placeholder')
+ @DocsEditable
String get placeholder native "HTMLInputElement_placeholder_Getter";
- @DocsEditable
@DomName('HTMLInputElement.placeholder')
+ @DocsEditable
void set placeholder(String value) native "HTMLInputElement_placeholder_Setter";
- @DocsEditable
@DomName('HTMLInputElement.readOnly')
+ @DocsEditable
bool get readOnly native "HTMLInputElement_readOnly_Getter";
- @DocsEditable
@DomName('HTMLInputElement.readOnly')
+ @DocsEditable
void set readOnly(bool value) native "HTMLInputElement_readOnly_Setter";
- @DocsEditable
@DomName('HTMLInputElement.required')
+ @DocsEditable
bool get required native "HTMLInputElement_required_Getter";
- @DocsEditable
@DomName('HTMLInputElement.required')
+ @DocsEditable
void set required(bool value) native "HTMLInputElement_required_Setter";
- @DocsEditable
@DomName('HTMLInputElement.selectionDirection')
+ @DocsEditable
String get selectionDirection native "HTMLInputElement_selectionDirection_Getter";
- @DocsEditable
@DomName('HTMLInputElement.selectionDirection')
+ @DocsEditable
void set selectionDirection(String value) native "HTMLInputElement_selectionDirection_Setter";
- @DocsEditable
@DomName('HTMLInputElement.selectionEnd')
+ @DocsEditable
int get selectionEnd native "HTMLInputElement_selectionEnd_Getter";
- @DocsEditable
@DomName('HTMLInputElement.selectionEnd')
+ @DocsEditable
void set selectionEnd(int value) native "HTMLInputElement_selectionEnd_Setter";
- @DocsEditable
@DomName('HTMLInputElement.selectionStart')
+ @DocsEditable
int get selectionStart native "HTMLInputElement_selectionStart_Getter";
- @DocsEditable
@DomName('HTMLInputElement.selectionStart')
+ @DocsEditable
void set selectionStart(int value) native "HTMLInputElement_selectionStart_Setter";
- @DocsEditable
@DomName('HTMLInputElement.size')
+ @DocsEditable
int get size native "HTMLInputElement_size_Getter";
- @DocsEditable
@DomName('HTMLInputElement.size')
+ @DocsEditable
void set size(int value) native "HTMLInputElement_size_Setter";
- @DocsEditable
@DomName('HTMLInputElement.src')
+ @DocsEditable
String get src native "HTMLInputElement_src_Getter";
- @DocsEditable
@DomName('HTMLInputElement.src')
+ @DocsEditable
void set src(String value) native "HTMLInputElement_src_Setter";
- @DocsEditable
@DomName('HTMLInputElement.step')
+ @DocsEditable
String get step native "HTMLInputElement_step_Getter";
- @DocsEditable
@DomName('HTMLInputElement.step')
+ @DocsEditable
void set step(String value) native "HTMLInputElement_step_Setter";
- @DocsEditable
@DomName('HTMLInputElement.type')
+ @DocsEditable
String get type native "HTMLInputElement_type_Getter";
- @DocsEditable
@DomName('HTMLInputElement.type')
+ @DocsEditable
void set type(String value) native "HTMLInputElement_type_Setter";
- @DocsEditable
@DomName('HTMLInputElement.useMap')
+ @DocsEditable
String get useMap native "HTMLInputElement_useMap_Getter";
- @DocsEditable
@DomName('HTMLInputElement.useMap')
+ @DocsEditable
void set useMap(String value) native "HTMLInputElement_useMap_Setter";
- @DocsEditable
@DomName('HTMLInputElement.validationMessage')
+ @DocsEditable
String get validationMessage native "HTMLInputElement_validationMessage_Getter";
- @DocsEditable
@DomName('HTMLInputElement.validity')
+ @DocsEditable
ValidityState get validity native "HTMLInputElement_validity_Getter";
- @DocsEditable
@DomName('HTMLInputElement.value')
+ @DocsEditable
String get value native "HTMLInputElement_value_Getter";
- @DocsEditable
@DomName('HTMLInputElement.value')
+ @DocsEditable
void set value(String value) native "HTMLInputElement_value_Setter";
- @DocsEditable
@DomName('HTMLInputElement.valueAsDate')
+ @DocsEditable
Date get valueAsDate native "HTMLInputElement_valueAsDate_Getter";
- @DocsEditable
@DomName('HTMLInputElement.valueAsDate')
+ @DocsEditable
void set valueAsDate(Date value) native "HTMLInputElement_valueAsDate_Setter";
- @DocsEditable
@DomName('HTMLInputElement.valueAsNumber')
+ @DocsEditable
num get valueAsNumber native "HTMLInputElement_valueAsNumber_Getter";
- @DocsEditable
@DomName('HTMLInputElement.valueAsNumber')
+ @DocsEditable
void set valueAsNumber(num value) native "HTMLInputElement_valueAsNumber_Setter";
- @DocsEditable
@DomName('HTMLInputElement.webkitEntries')
+ @DocsEditable
List<Entry> get webkitEntries native "HTMLInputElement_webkitEntries_Getter";
- @DocsEditable
@DomName('HTMLInputElement.webkitGrammar')
+ @DocsEditable
bool get webkitGrammar native "HTMLInputElement_webkitGrammar_Getter";
- @DocsEditable
@DomName('HTMLInputElement.webkitGrammar')
+ @DocsEditable
void set webkitGrammar(bool value) native "HTMLInputElement_webkitGrammar_Setter";
- @DocsEditable
@DomName('HTMLInputElement.webkitSpeech')
+ @DocsEditable
bool get webkitSpeech native "HTMLInputElement_webkitSpeech_Getter";
- @DocsEditable
@DomName('HTMLInputElement.webkitSpeech')
+ @DocsEditable
void set webkitSpeech(bool value) native "HTMLInputElement_webkitSpeech_Setter";
- @DocsEditable
@DomName('HTMLInputElement.webkitdirectory')
+ @DocsEditable
bool get webkitdirectory native "HTMLInputElement_webkitdirectory_Getter";
- @DocsEditable
@DomName('HTMLInputElement.webkitdirectory')
+ @DocsEditable
void set webkitdirectory(bool value) native "HTMLInputElement_webkitdirectory_Setter";
- @DocsEditable
@DomName('HTMLInputElement.width')
+ @DocsEditable
int get width native "HTMLInputElement_width_Getter";
- @DocsEditable
@DomName('HTMLInputElement.width')
+ @DocsEditable
void set width(int value) native "HTMLInputElement_width_Setter";
- @DocsEditable
@DomName('HTMLInputElement.willValidate')
+ @DocsEditable
bool get willValidate native "HTMLInputElement_willValidate_Getter";
- @DocsEditable
@DomName('HTMLInputElement.checkValidity')
+ @DocsEditable
bool checkValidity() native "HTMLInputElement_checkValidity_Callback";
- @DocsEditable
@DomName('HTMLInputElement.select')
+ @DocsEditable
void select() native "HTMLInputElement_select_Callback";
- @DocsEditable
@DomName('HTMLInputElement.setCustomValidity')
+ @DocsEditable
void setCustomValidity(String error) native "HTMLInputElement_setCustomValidity_Callback";
void setRangeText(String replacement, [int start, int end, String selectionMode]) {
@@ -13813,16 +14310,16 @@
throw new ArgumentError("Incorrect number or type of arguments");
}
+ @DomName('HTMLInputElement._setRangeText_1')
@DocsEditable
- @DomName('HTMLInputElement.setRangeText_1')
- void _setRangeText_1(replacement) native "HTMLInputElement_setRangeText_1_Callback";
+ void _setRangeText_1(replacement) native "HTMLInputElement__setRangeText_1_Callback";
+ @DomName('HTMLInputElement._setRangeText_2')
@DocsEditable
- @DomName('HTMLInputElement.setRangeText_2')
- void _setRangeText_2(replacement, start, end, selectionMode) native "HTMLInputElement_setRangeText_2_Callback";
+ void _setRangeText_2(replacement, start, end, selectionMode) native "HTMLInputElement__setRangeText_2_Callback";
- @DocsEditable
@DomName('HTMLInputElement.setSelectionRange')
+ @DocsEditable
void setSelectionRange(int start, int end, [String direction]) native "HTMLInputElement_setSelectionRange_Callback";
void stepDown([int n]) {
@@ -13831,15 +14328,16 @@
return;
}
_stepDown_2();
+ return;
}
+ @DomName('HTMLInputElement._stepDown_1')
@DocsEditable
- @DomName('HTMLInputElement.stepDown_1')
- void _stepDown_1(n) native "HTMLInputElement_stepDown_1_Callback";
+ void _stepDown_1(n) native "HTMLInputElement__stepDown_1_Callback";
+ @DomName('HTMLInputElement._stepDown_2')
@DocsEditable
- @DomName('HTMLInputElement.stepDown_2')
- void _stepDown_2() native "HTMLInputElement_stepDown_2_Callback";
+ void _stepDown_2() native "HTMLInputElement__stepDown_2_Callback";
void stepUp([int n]) {
if (?n) {
@@ -13847,16 +14345,19 @@
return;
}
_stepUp_2();
+ return;
}
+ @DomName('HTMLInputElement._stepUp_1')
@DocsEditable
- @DomName('HTMLInputElement.stepUp_1')
- void _stepUp_1(n) native "HTMLInputElement_stepUp_1_Callback";
+ void _stepUp_1(n) native "HTMLInputElement__stepUp_1_Callback";
+ @DomName('HTMLInputElement._stepUp_2')
@DocsEditable
- @DomName('HTMLInputElement.stepUp_2')
- void _stepUp_2() native "HTMLInputElement_stepUp_2_Callback";
+ void _stepUp_2() native "HTMLInputElement__stepUp_2_Callback";
+ @DomName('HTMLInputElement.webkitSpeechChange')
+ @DocsEditable
Stream<Event> get onSpeechChange => speechChangeEvent.forTarget(this);
}
@@ -14128,12 +14629,12 @@
* Use [supported] to check if this is supported on the current platform.
*/
@SupportedBrowser(SupportedBrowser.CHROME, '25')
-@Experimental()
+@Experimental
abstract class DateTimeInputElement implements RangeInputElementBase {
factory DateTimeInputElement() => new InputElement(type: 'datetime');
@DomName('HTMLInputElement.valueAsDate')
- Date valueAsDate;
+ DateTime valueAsDate;
@DomName('HTMLInputElement.readOnly')
bool readOnly;
@@ -14153,12 +14654,12 @@
* Use [supported] to check if this is supported on the current platform.
*/
@SupportedBrowser(SupportedBrowser.CHROME, '25')
-@Experimental()
+@Experimental
abstract class DateInputElement implements RangeInputElementBase {
factory DateInputElement() => new InputElement(type: 'date');
@DomName('HTMLInputElement.valueAsDate')
- Date valueAsDate;
+ DateTime valueAsDate;
@DomName('HTMLInputElement.readOnly')
bool readOnly;
@@ -14178,12 +14679,12 @@
* Use [supported] to check if this is supported on the current platform.
*/
@SupportedBrowser(SupportedBrowser.CHROME, '25')
-@Experimental()
+@Experimental
abstract class MonthInputElement implements RangeInputElementBase {
factory MonthInputElement() => new InputElement(type: 'month');
@DomName('HTMLInputElement.valueAsDate')
- Date valueAsDate;
+ DateTime valueAsDate;
@DomName('HTMLInputElement.readOnly')
bool readOnly;
@@ -14203,12 +14704,12 @@
* Use [supported] to check if this is supported on the current platform.
*/
@SupportedBrowser(SupportedBrowser.CHROME, '25')
-@Experimental()
+@Experimental
abstract class WeekInputElement implements RangeInputElementBase {
factory WeekInputElement() => new InputElement(type: 'week');
@DomName('HTMLInputElement.valueAsDate')
- Date valueAsDate;
+ DateTime valueAsDate;
@DomName('HTMLInputElement.readOnly')
bool readOnly;
@@ -14228,12 +14729,12 @@
* Use [supported] to check if this is supported on the current platform.
*/
@SupportedBrowser(SupportedBrowser.CHROME)
-@Experimental()
+@Experimental
abstract class TimeInputElement implements RangeInputElementBase {
factory TimeInputElement() => new InputElement(type: 'time');
@DomName('HTMLInputElement.valueAsDate')
- Date valueAsDate;
+ DateTime valueAsDate;
@DomName('HTMLInputElement.readOnly')
bool readOnly;
@@ -14254,7 +14755,7 @@
* Use [supported] to check if this is supported on the current platform.
*/
@SupportedBrowser(SupportedBrowser.CHROME, '25')
-@Experimental()
+@Experimental
abstract class LocalDateTimeInputElement implements RangeInputElementBase {
factory LocalDateTimeInputElement() =>
new InputElement(type: 'datetime-local');
@@ -14277,7 +14778,7 @@
@SupportedBrowser(SupportedBrowser.CHROME)
@SupportedBrowser(SupportedBrowser.IE)
@SupportedBrowser(SupportedBrowser.SAFARI)
-@Experimental()
+@Experimental
abstract class NumberInputElement implements RangeInputElementBase {
factory NumberInputElement() => new InputElement(type: 'number');
@@ -14304,7 +14805,7 @@
*/
@SupportedBrowser(SupportedBrowser.CHROME)
@SupportedBrowser(SupportedBrowser.IE, '10')
-@Experimental()
+@Experimental
abstract class RangeInputElement implements RangeInputElementBase {
factory RangeInputElement() => new InputElement(type: 'range');
@@ -14444,6 +14945,7 @@
@DocsEditable
+@deprecated
class InputElementEvents extends ElementEvents {
@DocsEditable
InputElementEvents(EventTarget _ptr) : super(_ptr);
@@ -14474,16 +14976,16 @@
static const int BYTES_PER_ELEMENT = 2;
- @DocsEditable
@DomName('Int16Array.length')
+ @DocsEditable
int get length native "Int16Array_length_Getter";
- @DocsEditable
@DomName('Int16Array.numericIndexGetter')
+ @DocsEditable
int operator[](int index) native "Int16Array_numericIndexGetter_Callback";
- @DocsEditable
@DomName('Int16Array.numericIndexSetter')
+ @DocsEditable
void operator[]=(int index, int value) native "Int16Array_numericIndexSetter_Callback";
// -- start List<int> mixins.
// int is the element type.
@@ -14505,11 +15007,13 @@
void forEach(void f(int element)) => IterableMixinWorkaround.forEach(this, f);
- String join([String separator]) => IterableMixinWorkaround.joinList(this, separator);
+ String join([String separator]) =>
+ IterableMixinWorkaround.joinList(this, separator);
List mappedBy(f(int element)) => IterableMixinWorkaround.mappedByList(this, f);
- Iterable<int> where(bool f(int element)) => IterableMixinWorkaround.where(this, f);
+ Iterable<int> where(bool f(int element)) =>
+ IterableMixinWorkaround.where(this, f);
bool every(bool f(int element)) => IterableMixinWorkaround.every(this, f);
@@ -14571,6 +15075,9 @@
throw new UnsupportedError("Cannot clear immutable List.");
}
+ List<int> get reversed =>
+ new ReversedListView<int>(this, 0, null);
+
void sort([int compare(int a, int b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -14599,9 +15106,11 @@
throw new StateError("More than one element");
}
- int min([int compare(int a, int b)]) => IterableMixinWorkaround.min(this, compare);
+ int min([int compare(int a, int b)]) =>
+ IterableMixinWorkaround.min(this, compare);
- int max([int compare(int a, int b)]) => IterableMixinWorkaround.max(this, compare);
+ int max([int compare(int a, int b)]) =>
+ IterableMixinWorkaround.max(this, compare);
int removeAt(int pos) {
throw new UnsupportedError("Cannot remove from immutable List.");
@@ -14648,8 +15157,8 @@
// -- end List<int> mixins.
- @DocsEditable
@DomName('Int16Array.setElements')
+ @DocsEditable
void setElements(Object array, [int offset]) native "Int16Array_setElements_Callback";
Int16Array subarray(int start, [int end]) {
@@ -14659,13 +15168,13 @@
return _subarray_2(start);
}
+ @DomName('Int16Array._subarray_1')
@DocsEditable
- @DomName('Int16Array.subarray_1')
- Int16Array _subarray_1(start, end) native "Int16Array_subarray_1_Callback";
+ Int16Array _subarray_1(start, end) native "Int16Array__subarray_1_Callback";
+ @DomName('Int16Array._subarray_2')
@DocsEditable
- @DomName('Int16Array.subarray_2')
- Int16Array _subarray_2(start) native "Int16Array_subarray_2_Callback";
+ Int16Array _subarray_2(start) native "Int16Array__subarray_2_Callback";
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -14691,16 +15200,16 @@
static const int BYTES_PER_ELEMENT = 4;
- @DocsEditable
@DomName('Int32Array.length')
+ @DocsEditable
int get length native "Int32Array_length_Getter";
- @DocsEditable
@DomName('Int32Array.numericIndexGetter')
+ @DocsEditable
int operator[](int index) native "Int32Array_numericIndexGetter_Callback";
- @DocsEditable
@DomName('Int32Array.numericIndexSetter')
+ @DocsEditable
void operator[]=(int index, int value) native "Int32Array_numericIndexSetter_Callback";
// -- start List<int> mixins.
// int is the element type.
@@ -14722,11 +15231,13 @@
void forEach(void f(int element)) => IterableMixinWorkaround.forEach(this, f);
- String join([String separator]) => IterableMixinWorkaround.joinList(this, separator);
+ String join([String separator]) =>
+ IterableMixinWorkaround.joinList(this, separator);
List mappedBy(f(int element)) => IterableMixinWorkaround.mappedByList(this, f);
- Iterable<int> where(bool f(int element)) => IterableMixinWorkaround.where(this, f);
+ Iterable<int> where(bool f(int element)) =>
+ IterableMixinWorkaround.where(this, f);
bool every(bool f(int element)) => IterableMixinWorkaround.every(this, f);
@@ -14788,6 +15299,9 @@
throw new UnsupportedError("Cannot clear immutable List.");
}
+ List<int> get reversed =>
+ new ReversedListView<int>(this, 0, null);
+
void sort([int compare(int a, int b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -14816,9 +15330,11 @@
throw new StateError("More than one element");
}
- int min([int compare(int a, int b)]) => IterableMixinWorkaround.min(this, compare);
+ int min([int compare(int a, int b)]) =>
+ IterableMixinWorkaround.min(this, compare);
- int max([int compare(int a, int b)]) => IterableMixinWorkaround.max(this, compare);
+ int max([int compare(int a, int b)]) =>
+ IterableMixinWorkaround.max(this, compare);
int removeAt(int pos) {
throw new UnsupportedError("Cannot remove from immutable List.");
@@ -14865,8 +15381,8 @@
// -- end List<int> mixins.
- @DocsEditable
@DomName('Int32Array.setElements')
+ @DocsEditable
void setElements(Object array, [int offset]) native "Int32Array_setElements_Callback";
Int32Array subarray(int start, [int end]) {
@@ -14876,13 +15392,13 @@
return _subarray_2(start);
}
+ @DomName('Int32Array._subarray_1')
@DocsEditable
- @DomName('Int32Array.subarray_1')
- Int32Array _subarray_1(start, end) native "Int32Array_subarray_1_Callback";
+ Int32Array _subarray_1(start, end) native "Int32Array__subarray_1_Callback";
+ @DomName('Int32Array._subarray_2')
@DocsEditable
- @DomName('Int32Array.subarray_2')
- Int32Array _subarray_2(start) native "Int32Array_subarray_2_Callback";
+ Int32Array _subarray_2(start) native "Int32Array__subarray_2_Callback";
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -14908,16 +15424,16 @@
static const int BYTES_PER_ELEMENT = 1;
- @DocsEditable
@DomName('Int8Array.length')
+ @DocsEditable
int get length native "Int8Array_length_Getter";
- @DocsEditable
@DomName('Int8Array.numericIndexGetter')
+ @DocsEditable
int operator[](int index) native "Int8Array_numericIndexGetter_Callback";
- @DocsEditable
@DomName('Int8Array.numericIndexSetter')
+ @DocsEditable
void operator[]=(int index, int value) native "Int8Array_numericIndexSetter_Callback";
// -- start List<int> mixins.
// int is the element type.
@@ -14939,11 +15455,13 @@
void forEach(void f(int element)) => IterableMixinWorkaround.forEach(this, f);
- String join([String separator]) => IterableMixinWorkaround.joinList(this, separator);
+ String join([String separator]) =>
+ IterableMixinWorkaround.joinList(this, separator);
List mappedBy(f(int element)) => IterableMixinWorkaround.mappedByList(this, f);
- Iterable<int> where(bool f(int element)) => IterableMixinWorkaround.where(this, f);
+ Iterable<int> where(bool f(int element)) =>
+ IterableMixinWorkaround.where(this, f);
bool every(bool f(int element)) => IterableMixinWorkaround.every(this, f);
@@ -15005,6 +15523,9 @@
throw new UnsupportedError("Cannot clear immutable List.");
}
+ List<int> get reversed =>
+ new ReversedListView<int>(this, 0, null);
+
void sort([int compare(int a, int b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -15033,9 +15554,11 @@
throw new StateError("More than one element");
}
- int min([int compare(int a, int b)]) => IterableMixinWorkaround.min(this, compare);
+ int min([int compare(int a, int b)]) =>
+ IterableMixinWorkaround.min(this, compare);
- int max([int compare(int a, int b)]) => IterableMixinWorkaround.max(this, compare);
+ int max([int compare(int a, int b)]) =>
+ IterableMixinWorkaround.max(this, compare);
int removeAt(int pos) {
throw new UnsupportedError("Cannot remove from immutable List.");
@@ -15082,8 +15605,8 @@
// -- end List<int> mixins.
- @DocsEditable
@DomName('Int8Array.setElements')
+ @DocsEditable
void setElements(Object array, [int offset]) native "Int8Array_setElements_Callback";
Int8Array subarray(int start, [int end]) {
@@ -15093,13 +15616,13 @@
return _subarray_2(start);
}
+ @DomName('Int8Array._subarray_1')
@DocsEditable
- @DomName('Int8Array.subarray_1')
- Int8Array _subarray_1(start, end) native "Int8Array_subarray_1_Callback";
+ Int8Array _subarray_1(start, end) native "Int8Array__subarray_1_Callback";
+ @DomName('Int8Array._subarray_2')
@DocsEditable
- @DomName('Int8Array.subarray_2')
- Int8Array _subarray_2(start) native "Int8Array_subarray_2_Callback";
+ Int8Array _subarray_2(start) native "Int8Array__subarray_2_Callback";
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -15124,48 +15647,48 @@
static const int WITH_SCOPE = 2;
- @DocsEditable
@DomName('JavaScriptCallFrame.caller')
+ @DocsEditable
JavaScriptCallFrame get caller native "JavaScriptCallFrame_caller_Getter";
- @DocsEditable
@DomName('JavaScriptCallFrame.column')
+ @DocsEditable
int get column native "JavaScriptCallFrame_column_Getter";
- @DocsEditable
@DomName('JavaScriptCallFrame.functionName')
+ @DocsEditable
String get functionName native "JavaScriptCallFrame_functionName_Getter";
- @DocsEditable
@DomName('JavaScriptCallFrame.line')
+ @DocsEditable
int get line native "JavaScriptCallFrame_line_Getter";
- @DocsEditable
@DomName('JavaScriptCallFrame.scopeChain')
+ @DocsEditable
List get scopeChain native "JavaScriptCallFrame_scopeChain_Getter";
- @DocsEditable
@DomName('JavaScriptCallFrame.sourceID')
+ @DocsEditable
int get sourceID native "JavaScriptCallFrame_sourceID_Getter";
- @DocsEditable
@DomName('JavaScriptCallFrame.thisObject')
+ @DocsEditable
Object get thisObject native "JavaScriptCallFrame_thisObject_Getter";
- @DocsEditable
@DomName('JavaScriptCallFrame.type')
+ @DocsEditable
String get type native "JavaScriptCallFrame_type_Getter";
- @DocsEditable
@DomName('JavaScriptCallFrame.evaluate')
+ @DocsEditable
void evaluate(String script) native "JavaScriptCallFrame_evaluate_Callback";
- @DocsEditable
@DomName('JavaScriptCallFrame.restart')
+ @DocsEditable
Object restart() native "JavaScriptCallFrame_restart_Callback";
- @DocsEditable
@DomName('JavaScriptCallFrame.scopeType')
+ @DocsEditable
int scopeType(int scopeIndex) native "JavaScriptCallFrame_scopeType_Callback";
}
@@ -15177,11 +15700,14 @@
@DomName('KeyboardEvent')
class KeyboardEvent extends UIEvent {
- factory KeyboardEvent(String type, Window view,
- [bool canBubble = true, bool cancelable = true,
- String keyIdentifier = "", int keyLocation = 1, bool ctrlKey = false,
- bool altKey = false, bool shiftKey = false, bool metaKey = false,
- bool altGraphKey = false]) {
+ factory KeyboardEvent(String type,
+ {Window view, bool canBubble: true, bool cancelable: true,
+ String keyIdentifier: "", int keyLocation: 1, bool ctrlKey: false,
+ bool altKey: false, bool shiftKey: false, bool metaKey: false,
+ bool altGraphKey: false}) {
+ if (view == null) {
+ view = window;
+ }
final e = document.$dom_createEvent("KeyboardEvent");
e.$dom_initKeyboardEvent(type, canBubble, cancelable, view, keyIdentifier,
keyLocation, ctrlKey, altKey, shiftKey, metaKey, altGraphKey);
@@ -15190,41 +15716,41 @@
@DomName('KeyboardEvent.keyCode')
int get keyCode => $dom_keyCode;
-
+
@DomName('KeyboardEvent.charCode')
int get charCode => $dom_charCode;
KeyboardEvent.internal() : super.internal();
- @DocsEditable
@DomName('KeyboardEvent.altGraphKey')
+ @DocsEditable
bool get altGraphKey native "KeyboardEvent_altGraphKey_Getter";
- @DocsEditable
@DomName('KeyboardEvent.altKey')
+ @DocsEditable
bool get altKey native "KeyboardEvent_altKey_Getter";
- @DocsEditable
@DomName('KeyboardEvent.ctrlKey')
+ @DocsEditable
bool get ctrlKey native "KeyboardEvent_ctrlKey_Getter";
- @DocsEditable
@DomName('KeyboardEvent.keyIdentifier')
+ @DocsEditable
String get $dom_keyIdentifier native "KeyboardEvent_keyIdentifier_Getter";
- @DocsEditable
@DomName('KeyboardEvent.keyLocation')
+ @DocsEditable
int get keyLocation native "KeyboardEvent_keyLocation_Getter";
- @DocsEditable
@DomName('KeyboardEvent.metaKey')
+ @DocsEditable
bool get metaKey native "KeyboardEvent_metaKey_Getter";
- @DocsEditable
@DomName('KeyboardEvent.shiftKey')
+ @DocsEditable
bool get shiftKey native "KeyboardEvent_shiftKey_Getter";
- @DocsEditable
@DomName('KeyboardEvent.initKeyboardEvent')
+ @DocsEditable
void $dom_initKeyboardEvent(String type, bool canBubble, bool cancelable, Window view, String keyIdentifier, int keyLocation, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, bool altGraphKey) native "KeyboardEvent_initKeyboardEvent_Callback";
}
@@ -15239,7 +15765,7 @@
@DomName('HTMLKeygenElement')
@SupportedBrowser(SupportedBrowser.CHROME)
@SupportedBrowser(SupportedBrowser.SAFARI)
-@Experimental()
+@Experimental
class KeygenElement extends _Element_Merged {
KeygenElement.internal() : super.internal();
@@ -15249,76 +15775,76 @@
/// Checks if this type is supported on the current platform.
static bool get supported => true;
- @DocsEditable
@DomName('HTMLKeygenElement.autofocus')
+ @DocsEditable
bool get autofocus native "HTMLKeygenElement_autofocus_Getter";
- @DocsEditable
@DomName('HTMLKeygenElement.autofocus')
+ @DocsEditable
void set autofocus(bool value) native "HTMLKeygenElement_autofocus_Setter";
- @DocsEditable
@DomName('HTMLKeygenElement.challenge')
+ @DocsEditable
String get challenge native "HTMLKeygenElement_challenge_Getter";
- @DocsEditable
@DomName('HTMLKeygenElement.challenge')
+ @DocsEditable
void set challenge(String value) native "HTMLKeygenElement_challenge_Setter";
- @DocsEditable
@DomName('HTMLKeygenElement.disabled')
+ @DocsEditable
bool get disabled native "HTMLKeygenElement_disabled_Getter";
- @DocsEditable
@DomName('HTMLKeygenElement.disabled')
+ @DocsEditable
void set disabled(bool value) native "HTMLKeygenElement_disabled_Setter";
- @DocsEditable
@DomName('HTMLKeygenElement.form')
+ @DocsEditable
FormElement get form native "HTMLKeygenElement_form_Getter";
- @DocsEditable
@DomName('HTMLKeygenElement.keytype')
+ @DocsEditable
String get keytype native "HTMLKeygenElement_keytype_Getter";
- @DocsEditable
@DomName('HTMLKeygenElement.keytype')
+ @DocsEditable
void set keytype(String value) native "HTMLKeygenElement_keytype_Setter";
- @DocsEditable
@DomName('HTMLKeygenElement.labels')
+ @DocsEditable
List<Node> get labels native "HTMLKeygenElement_labels_Getter";
- @DocsEditable
@DomName('HTMLKeygenElement.name')
+ @DocsEditable
String get name native "HTMLKeygenElement_name_Getter";
- @DocsEditable
@DomName('HTMLKeygenElement.name')
+ @DocsEditable
void set name(String value) native "HTMLKeygenElement_name_Setter";
- @DocsEditable
@DomName('HTMLKeygenElement.type')
+ @DocsEditable
String get type native "HTMLKeygenElement_type_Getter";
- @DocsEditable
@DomName('HTMLKeygenElement.validationMessage')
+ @DocsEditable
String get validationMessage native "HTMLKeygenElement_validationMessage_Getter";
- @DocsEditable
@DomName('HTMLKeygenElement.validity')
+ @DocsEditable
ValidityState get validity native "HTMLKeygenElement_validity_Getter";
- @DocsEditable
@DomName('HTMLKeygenElement.willValidate')
+ @DocsEditable
bool get willValidate native "HTMLKeygenElement_willValidate_Getter";
- @DocsEditable
@DomName('HTMLKeygenElement.checkValidity')
+ @DocsEditable
bool checkValidity() native "HTMLKeygenElement_checkValidity_Callback";
- @DocsEditable
@DomName('HTMLKeygenElement.setCustomValidity')
+ @DocsEditable
void setCustomValidity(String error) native "HTMLKeygenElement_setCustomValidity_Callback";
}
@@ -15337,20 +15863,20 @@
@DocsEditable
factory LIElement() => document.$dom_createElement("li");
- @DocsEditable
@DomName('HTMLLIElement.type')
+ @DocsEditable
String get type native "HTMLLIElement_type_Getter";
- @DocsEditable
@DomName('HTMLLIElement.type')
+ @DocsEditable
void set type(String value) native "HTMLLIElement_type_Setter";
- @DocsEditable
@DomName('HTMLLIElement.value')
+ @DocsEditable
int get value native "HTMLLIElement_value_Getter";
- @DocsEditable
@DomName('HTMLLIElement.value')
+ @DocsEditable
void set value(int value) native "HTMLLIElement_value_Setter";
}
@@ -15369,20 +15895,20 @@
@DocsEditable
factory LabelElement() => document.$dom_createElement("label");
- @DocsEditable
@DomName('HTMLLabelElement.control')
+ @DocsEditable
Element get control native "HTMLLabelElement_control_Getter";
- @DocsEditable
@DomName('HTMLLabelElement.form')
+ @DocsEditable
FormElement get form native "HTMLLabelElement_form_Getter";
- @DocsEditable
@DomName('HTMLLabelElement.htmlFor')
+ @DocsEditable
String get htmlFor native "HTMLLabelElement_htmlFor_Getter";
- @DocsEditable
@DomName('HTMLLabelElement.htmlFor')
+ @DocsEditable
void set htmlFor(String value) native "HTMLLabelElement_htmlFor_Setter";
}
@@ -15401,8 +15927,8 @@
@DocsEditable
factory LegendElement() => document.$dom_createElement("legend");
- @DocsEditable
@DomName('HTMLLegendElement.form')
+ @DocsEditable
FormElement get form native "HTMLLegendElement_form_Getter";
}
@@ -15421,64 +15947,64 @@
@DocsEditable
factory LinkElement() => document.$dom_createElement("link");
- @DocsEditable
@DomName('HTMLLinkElement.disabled')
+ @DocsEditable
bool get disabled native "HTMLLinkElement_disabled_Getter";
- @DocsEditable
@DomName('HTMLLinkElement.disabled')
+ @DocsEditable
void set disabled(bool value) native "HTMLLinkElement_disabled_Setter";
- @DocsEditable
@DomName('HTMLLinkElement.href')
+ @DocsEditable
String get href native "HTMLLinkElement_href_Getter";
- @DocsEditable
@DomName('HTMLLinkElement.href')
+ @DocsEditable
void set href(String value) native "HTMLLinkElement_href_Setter";
- @DocsEditable
@DomName('HTMLLinkElement.hreflang')
+ @DocsEditable
String get hreflang native "HTMLLinkElement_hreflang_Getter";
- @DocsEditable
@DomName('HTMLLinkElement.hreflang')
+ @DocsEditable
void set hreflang(String value) native "HTMLLinkElement_hreflang_Setter";
- @DocsEditable
@DomName('HTMLLinkElement.media')
+ @DocsEditable
String get media native "HTMLLinkElement_media_Getter";
- @DocsEditable
@DomName('HTMLLinkElement.media')
+ @DocsEditable
void set media(String value) native "HTMLLinkElement_media_Setter";
- @DocsEditable
@DomName('HTMLLinkElement.rel')
+ @DocsEditable
String get rel native "HTMLLinkElement_rel_Getter";
- @DocsEditable
@DomName('HTMLLinkElement.rel')
+ @DocsEditable
void set rel(String value) native "HTMLLinkElement_rel_Setter";
- @DocsEditable
@DomName('HTMLLinkElement.sheet')
+ @DocsEditable
StyleSheet get sheet native "HTMLLinkElement_sheet_Getter";
- @DocsEditable
@DomName('HTMLLinkElement.sizes')
+ @DocsEditable
DomSettableTokenList get sizes native "HTMLLinkElement_sizes_Getter";
- @DocsEditable
@DomName('HTMLLinkElement.sizes')
+ @DocsEditable
void set sizes(DomSettableTokenList value) native "HTMLLinkElement_sizes_Setter";
- @DocsEditable
@DomName('HTMLLinkElement.type')
+ @DocsEditable
String get type native "HTMLLinkElement_type_Getter";
- @DocsEditable
@DomName('HTMLLinkElement.type')
+ @DocsEditable
void set type(String value) native "HTMLLinkElement_type_Setter";
}
@@ -15494,8 +16020,8 @@
class LocalMediaStream extends MediaStream implements EventTarget {
LocalMediaStream.internal() : super.internal();
- @DocsEditable
@DomName('LocalMediaStream.stop')
+ @DocsEditable
void stop() native "LocalMediaStream_stop_Callback";
}
@@ -15511,92 +16037,92 @@
class Location extends NativeFieldWrapperClass1 implements LocationBase {
Location.internal();
- @DocsEditable
@DomName('Location.ancestorOrigins')
+ @DocsEditable
List<String> get ancestorOrigins native "Location_ancestorOrigins_Getter";
- @DocsEditable
@DomName('Location.hash')
+ @DocsEditable
String get hash native "Location_hash_Getter";
- @DocsEditable
@DomName('Location.hash')
+ @DocsEditable
void set hash(String value) native "Location_hash_Setter";
- @DocsEditable
@DomName('Location.host')
+ @DocsEditable
String get host native "Location_host_Getter";
- @DocsEditable
@DomName('Location.host')
+ @DocsEditable
void set host(String value) native "Location_host_Setter";
- @DocsEditable
@DomName('Location.hostname')
+ @DocsEditable
String get hostname native "Location_hostname_Getter";
- @DocsEditable
@DomName('Location.hostname')
+ @DocsEditable
void set hostname(String value) native "Location_hostname_Setter";
- @DocsEditable
@DomName('Location.href')
+ @DocsEditable
String get href native "Location_href_Getter";
- @DocsEditable
@DomName('Location.href')
+ @DocsEditable
void set href(String value) native "Location_href_Setter";
- @DocsEditable
@DomName('Location.origin')
+ @DocsEditable
String get origin native "Location_origin_Getter";
- @DocsEditable
@DomName('Location.pathname')
+ @DocsEditable
String get pathname native "Location_pathname_Getter";
- @DocsEditable
@DomName('Location.pathname')
+ @DocsEditable
void set pathname(String value) native "Location_pathname_Setter";
- @DocsEditable
@DomName('Location.port')
+ @DocsEditable
String get port native "Location_port_Getter";
- @DocsEditable
@DomName('Location.port')
+ @DocsEditable
void set port(String value) native "Location_port_Setter";
- @DocsEditable
@DomName('Location.protocol')
+ @DocsEditable
String get protocol native "Location_protocol_Getter";
- @DocsEditable
@DomName('Location.protocol')
+ @DocsEditable
void set protocol(String value) native "Location_protocol_Setter";
- @DocsEditable
@DomName('Location.search')
+ @DocsEditable
String get search native "Location_search_Getter";
- @DocsEditable
@DomName('Location.search')
+ @DocsEditable
void set search(String value) native "Location_search_Setter";
- @DocsEditable
@DomName('Location.assign')
+ @DocsEditable
void assign(String url) native "Location_assign_Callback";
- @DocsEditable
@DomName('Location.reload')
+ @DocsEditable
void reload() native "Location_reload_Callback";
- @DocsEditable
@DomName('Location.replace')
+ @DocsEditable
void replace(String url) native "Location_replace_Callback";
- @DocsEditable
@DomName('Location.toString')
+ @DocsEditable
String toString() native "Location_toString_Callback";
}
@@ -15615,16 +16141,16 @@
@DocsEditable
factory MapElement() => document.$dom_createElement("map");
- @DocsEditable
@DomName('HTMLMapElement.areas')
+ @DocsEditable
HtmlCollection get areas native "HTMLMapElement_areas_Getter";
- @DocsEditable
@DomName('HTMLMapElement.name')
+ @DocsEditable
String get name native "HTMLMapElement_name_Getter";
- @DocsEditable
@DomName('HTMLMapElement.name')
+ @DocsEditable
void set name(String value) native "HTMLMapElement_name_Setter";
}
@@ -15644,92 +16170,92 @@
factory MediaController() => MediaController._create();
static MediaController _create() native "MediaController_constructor_Callback";
- @DocsEditable
@DomName('MediaController.buffered')
+ @DocsEditable
TimeRanges get buffered native "MediaController_buffered_Getter";
- @DocsEditable
@DomName('MediaController.currentTime')
+ @DocsEditable
num get currentTime native "MediaController_currentTime_Getter";
- @DocsEditable
@DomName('MediaController.currentTime')
+ @DocsEditable
void set currentTime(num value) native "MediaController_currentTime_Setter";
- @DocsEditable
@DomName('MediaController.defaultPlaybackRate')
+ @DocsEditable
num get defaultPlaybackRate native "MediaController_defaultPlaybackRate_Getter";
- @DocsEditable
@DomName('MediaController.defaultPlaybackRate')
+ @DocsEditable
void set defaultPlaybackRate(num value) native "MediaController_defaultPlaybackRate_Setter";
- @DocsEditable
@DomName('MediaController.duration')
+ @DocsEditable
num get duration native "MediaController_duration_Getter";
- @DocsEditable
@DomName('MediaController.muted')
+ @DocsEditable
bool get muted native "MediaController_muted_Getter";
- @DocsEditable
@DomName('MediaController.muted')
+ @DocsEditable
void set muted(bool value) native "MediaController_muted_Setter";
- @DocsEditable
@DomName('MediaController.paused')
+ @DocsEditable
bool get paused native "MediaController_paused_Getter";
- @DocsEditable
@DomName('MediaController.playbackRate')
+ @DocsEditable
num get playbackRate native "MediaController_playbackRate_Getter";
- @DocsEditable
@DomName('MediaController.playbackRate')
+ @DocsEditable
void set playbackRate(num value) native "MediaController_playbackRate_Setter";
- @DocsEditable
@DomName('MediaController.playbackState')
+ @DocsEditable
String get playbackState native "MediaController_playbackState_Getter";
- @DocsEditable
@DomName('MediaController.played')
+ @DocsEditable
TimeRanges get played native "MediaController_played_Getter";
- @DocsEditable
@DomName('MediaController.seekable')
+ @DocsEditable
TimeRanges get seekable native "MediaController_seekable_Getter";
- @DocsEditable
@DomName('MediaController.volume')
+ @DocsEditable
num get volume native "MediaController_volume_Getter";
- @DocsEditable
@DomName('MediaController.volume')
+ @DocsEditable
void set volume(num value) native "MediaController_volume_Setter";
- @DocsEditable
@DomName('MediaController.addEventListener')
+ @DocsEditable
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native "MediaController_addEventListener_Callback";
- @DocsEditable
@DomName('MediaController.dispatchEvent')
- bool $dom_dispatchEvent(Event evt) native "MediaController_dispatchEvent_Callback";
-
@DocsEditable
+ bool dispatchEvent(Event evt) native "MediaController_dispatchEvent_Callback";
+
@DomName('MediaController.pause')
+ @DocsEditable
void pause() native "MediaController_pause_Callback";
- @DocsEditable
@DomName('MediaController.play')
+ @DocsEditable
void play() native "MediaController_play_Callback";
- @DocsEditable
@DomName('MediaController.removeEventListener')
+ @DocsEditable
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native "MediaController_removeEventListener_Callback";
- @DocsEditable
@DomName('MediaController.unpause')
+ @DocsEditable
void unpause() native "MediaController_unpause_Callback";
}
@@ -15745,58 +16271,109 @@
class MediaElement extends _Element_Merged {
MediaElement.internal() : super.internal();
+ @DomName('HTMLMediaElement.canplay')
+ @DocsEditable
static const EventStreamProvider<Event> canPlayEvent = const EventStreamProvider<Event>('canplay');
+ @DomName('HTMLMediaElement.canplaythrough')
+ @DocsEditable
static const EventStreamProvider<Event> canPlayThroughEvent = const EventStreamProvider<Event>('canplaythrough');
+ @DomName('HTMLMediaElement.durationchange')
+ @DocsEditable
static const EventStreamProvider<Event> durationChangeEvent = const EventStreamProvider<Event>('durationchange');
+ @DomName('HTMLMediaElement.emptied')
+ @DocsEditable
static const EventStreamProvider<Event> emptiedEvent = const EventStreamProvider<Event>('emptied');
+ @DomName('HTMLMediaElement.ended')
+ @DocsEditable
static const EventStreamProvider<Event> endedEvent = const EventStreamProvider<Event>('ended');
+ @DomName('HTMLMediaElement.loadeddata')
+ @DocsEditable
static const EventStreamProvider<Event> loadedDataEvent = const EventStreamProvider<Event>('loadeddata');
+ @DomName('HTMLMediaElement.loadedmetadata')
+ @DocsEditable
static const EventStreamProvider<Event> loadedMetadataEvent = const EventStreamProvider<Event>('loadedmetadata');
+ @DomName('HTMLMediaElement.loadstart')
+ @DocsEditable
static const EventStreamProvider<Event> loadStartEvent = const EventStreamProvider<Event>('loadstart');
+ @DomName('HTMLMediaElement.pause')
+ @DocsEditable
static const EventStreamProvider<Event> pauseEvent = const EventStreamProvider<Event>('pause');
+ @DomName('HTMLMediaElement.play')
+ @DocsEditable
static const EventStreamProvider<Event> playEvent = const EventStreamProvider<Event>('play');
+ @DomName('HTMLMediaElement.playing')
+ @DocsEditable
static const EventStreamProvider<Event> playingEvent = const EventStreamProvider<Event>('playing');
+ @DomName('HTMLMediaElement.progress')
+ @DocsEditable
static const EventStreamProvider<Event> progressEvent = const EventStreamProvider<Event>('progress');
+ @DomName('HTMLMediaElement.ratechange')
+ @DocsEditable
static const EventStreamProvider<Event> rateChangeEvent = const EventStreamProvider<Event>('ratechange');
+ @DomName('HTMLMediaElement.seeked')
+ @DocsEditable
static const EventStreamProvider<Event> seekedEvent = const EventStreamProvider<Event>('seeked');
+ @DomName('HTMLMediaElement.seeking')
+ @DocsEditable
static const EventStreamProvider<Event> seekingEvent = const EventStreamProvider<Event>('seeking');
+ @DomName('HTMLMediaElement.show')
+ @DocsEditable
static const EventStreamProvider<Event> showEvent = const EventStreamProvider<Event>('show');
+ @DomName('HTMLMediaElement.stalled')
+ @DocsEditable
static const EventStreamProvider<Event> stalledEvent = const EventStreamProvider<Event>('stalled');
+ @DomName('HTMLMediaElement.suspend')
+ @DocsEditable
static const EventStreamProvider<Event> suspendEvent = const EventStreamProvider<Event>('suspend');
+ @DomName('HTMLMediaElement.timeupdate')
+ @DocsEditable
static const EventStreamProvider<Event> timeUpdateEvent = const EventStreamProvider<Event>('timeupdate');
+ @DomName('HTMLMediaElement.volumechange')
+ @DocsEditable
static const EventStreamProvider<Event> volumeChangeEvent = const EventStreamProvider<Event>('volumechange');
+ @DomName('HTMLMediaElement.waiting')
+ @DocsEditable
static const EventStreamProvider<Event> waitingEvent = const EventStreamProvider<Event>('waiting');
+ @DomName('HTMLMediaElement.webkitkeyadded')
+ @DocsEditable
static const EventStreamProvider<MediaKeyEvent> keyAddedEvent = const EventStreamProvider<MediaKeyEvent>('webkitkeyadded');
+ @DomName('HTMLMediaElement.webkitkeyerror')
+ @DocsEditable
static const EventStreamProvider<MediaKeyEvent> keyErrorEvent = const EventStreamProvider<MediaKeyEvent>('webkitkeyerror');
+ @DomName('HTMLMediaElement.webkitkeymessage')
+ @DocsEditable
static const EventStreamProvider<MediaKeyEvent> keyMessageEvent = const EventStreamProvider<MediaKeyEvent>('webkitkeymessage');
+ @DomName('HTMLMediaElement.webkitneedkey')
+ @DocsEditable
static const EventStreamProvider<MediaKeyEvent> needKeyEvent = const EventStreamProvider<MediaKeyEvent>('webkitneedkey');
@DocsEditable
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
+ @deprecated
MediaElementEvents get on =>
new MediaElementEvents(this);
@@ -15818,192 +16395,192 @@
static const int NETWORK_NO_SOURCE = 3;
- @DocsEditable
@DomName('HTMLMediaElement.autoplay')
+ @DocsEditable
bool get autoplay native "HTMLMediaElement_autoplay_Getter";
- @DocsEditable
@DomName('HTMLMediaElement.autoplay')
+ @DocsEditable
void set autoplay(bool value) native "HTMLMediaElement_autoplay_Setter";
- @DocsEditable
@DomName('HTMLMediaElement.buffered')
+ @DocsEditable
TimeRanges get buffered native "HTMLMediaElement_buffered_Getter";
- @DocsEditable
@DomName('HTMLMediaElement.controller')
+ @DocsEditable
MediaController get controller native "HTMLMediaElement_controller_Getter";
- @DocsEditable
@DomName('HTMLMediaElement.controller')
+ @DocsEditable
void set controller(MediaController value) native "HTMLMediaElement_controller_Setter";
- @DocsEditable
@DomName('HTMLMediaElement.controls')
+ @DocsEditable
bool get controls native "HTMLMediaElement_controls_Getter";
- @DocsEditable
@DomName('HTMLMediaElement.controls')
+ @DocsEditable
void set controls(bool value) native "HTMLMediaElement_controls_Setter";
- @DocsEditable
@DomName('HTMLMediaElement.currentSrc')
+ @DocsEditable
String get currentSrc native "HTMLMediaElement_currentSrc_Getter";
- @DocsEditable
@DomName('HTMLMediaElement.currentTime')
+ @DocsEditable
num get currentTime native "HTMLMediaElement_currentTime_Getter";
- @DocsEditable
@DomName('HTMLMediaElement.currentTime')
+ @DocsEditable
void set currentTime(num value) native "HTMLMediaElement_currentTime_Setter";
- @DocsEditable
@DomName('HTMLMediaElement.defaultMuted')
+ @DocsEditable
bool get defaultMuted native "HTMLMediaElement_defaultMuted_Getter";
- @DocsEditable
@DomName('HTMLMediaElement.defaultMuted')
+ @DocsEditable
void set defaultMuted(bool value) native "HTMLMediaElement_defaultMuted_Setter";
- @DocsEditable
@DomName('HTMLMediaElement.defaultPlaybackRate')
+ @DocsEditable
num get defaultPlaybackRate native "HTMLMediaElement_defaultPlaybackRate_Getter";
- @DocsEditable
@DomName('HTMLMediaElement.defaultPlaybackRate')
+ @DocsEditable
void set defaultPlaybackRate(num value) native "HTMLMediaElement_defaultPlaybackRate_Setter";
- @DocsEditable
@DomName('HTMLMediaElement.duration')
+ @DocsEditable
num get duration native "HTMLMediaElement_duration_Getter";
- @DocsEditable
@DomName('HTMLMediaElement.ended')
+ @DocsEditable
bool get ended native "HTMLMediaElement_ended_Getter";
- @DocsEditable
@DomName('HTMLMediaElement.error')
+ @DocsEditable
MediaError get error native "HTMLMediaElement_error_Getter";
- @DocsEditable
@DomName('HTMLMediaElement.initialTime')
+ @DocsEditable
num get initialTime native "HTMLMediaElement_initialTime_Getter";
- @DocsEditable
@DomName('HTMLMediaElement.loop')
+ @DocsEditable
bool get loop native "HTMLMediaElement_loop_Getter";
- @DocsEditable
@DomName('HTMLMediaElement.loop')
+ @DocsEditable
void set loop(bool value) native "HTMLMediaElement_loop_Setter";
- @DocsEditable
@DomName('HTMLMediaElement.mediaGroup')
+ @DocsEditable
String get mediaGroup native "HTMLMediaElement_mediaGroup_Getter";
- @DocsEditable
@DomName('HTMLMediaElement.mediaGroup')
+ @DocsEditable
void set mediaGroup(String value) native "HTMLMediaElement_mediaGroup_Setter";
- @DocsEditable
@DomName('HTMLMediaElement.muted')
+ @DocsEditable
bool get muted native "HTMLMediaElement_muted_Getter";
- @DocsEditable
@DomName('HTMLMediaElement.muted')
+ @DocsEditable
void set muted(bool value) native "HTMLMediaElement_muted_Setter";
- @DocsEditable
@DomName('HTMLMediaElement.networkState')
+ @DocsEditable
int get networkState native "HTMLMediaElement_networkState_Getter";
- @DocsEditable
@DomName('HTMLMediaElement.paused')
+ @DocsEditable
bool get paused native "HTMLMediaElement_paused_Getter";
- @DocsEditable
@DomName('HTMLMediaElement.playbackRate')
+ @DocsEditable
num get playbackRate native "HTMLMediaElement_playbackRate_Getter";
- @DocsEditable
@DomName('HTMLMediaElement.playbackRate')
+ @DocsEditable
void set playbackRate(num value) native "HTMLMediaElement_playbackRate_Setter";
- @DocsEditable
@DomName('HTMLMediaElement.played')
+ @DocsEditable
TimeRanges get played native "HTMLMediaElement_played_Getter";
- @DocsEditable
@DomName('HTMLMediaElement.preload')
+ @DocsEditable
String get preload native "HTMLMediaElement_preload_Getter";
- @DocsEditable
@DomName('HTMLMediaElement.preload')
+ @DocsEditable
void set preload(String value) native "HTMLMediaElement_preload_Setter";
- @DocsEditable
@DomName('HTMLMediaElement.readyState')
+ @DocsEditable
int get readyState native "HTMLMediaElement_readyState_Getter";
- @DocsEditable
@DomName('HTMLMediaElement.seekable')
+ @DocsEditable
TimeRanges get seekable native "HTMLMediaElement_seekable_Getter";
- @DocsEditable
@DomName('HTMLMediaElement.seeking')
+ @DocsEditable
bool get seeking native "HTMLMediaElement_seeking_Getter";
- @DocsEditable
@DomName('HTMLMediaElement.src')
+ @DocsEditable
String get src native "HTMLMediaElement_src_Getter";
- @DocsEditable
@DomName('HTMLMediaElement.src')
+ @DocsEditable
void set src(String value) native "HTMLMediaElement_src_Setter";
- @DocsEditable
@DomName('HTMLMediaElement.startTime')
+ @DocsEditable
num get startTime native "HTMLMediaElement_startTime_Getter";
- @DocsEditable
@DomName('HTMLMediaElement.textTracks')
+ @DocsEditable
TextTrackList get textTracks native "HTMLMediaElement_textTracks_Getter";
- @DocsEditable
@DomName('HTMLMediaElement.volume')
+ @DocsEditable
num get volume native "HTMLMediaElement_volume_Getter";
- @DocsEditable
@DomName('HTMLMediaElement.volume')
+ @DocsEditable
void set volume(num value) native "HTMLMediaElement_volume_Setter";
- @DocsEditable
@DomName('HTMLMediaElement.webkitAudioDecodedByteCount')
+ @DocsEditable
int get webkitAudioDecodedByteCount native "HTMLMediaElement_webkitAudioDecodedByteCount_Getter";
- @DocsEditable
@DomName('HTMLMediaElement.webkitClosedCaptionsVisible')
+ @DocsEditable
bool get webkitClosedCaptionsVisible native "HTMLMediaElement_webkitClosedCaptionsVisible_Getter";
- @DocsEditable
@DomName('HTMLMediaElement.webkitClosedCaptionsVisible')
+ @DocsEditable
void set webkitClosedCaptionsVisible(bool value) native "HTMLMediaElement_webkitClosedCaptionsVisible_Setter";
- @DocsEditable
@DomName('HTMLMediaElement.webkitHasClosedCaptions')
+ @DocsEditable
bool get webkitHasClosedCaptions native "HTMLMediaElement_webkitHasClosedCaptions_Getter";
- @DocsEditable
@DomName('HTMLMediaElement.webkitPreservesPitch')
+ @DocsEditable
bool get webkitPreservesPitch native "HTMLMediaElement_webkitPreservesPitch_Getter";
- @DocsEditable
@DomName('HTMLMediaElement.webkitPreservesPitch')
+ @DocsEditable
void set webkitPreservesPitch(bool value) native "HTMLMediaElement_webkitPreservesPitch_Setter";
- @DocsEditable
@DomName('HTMLMediaElement.webkitVideoDecodedByteCount')
+ @DocsEditable
int get webkitVideoDecodedByteCount native "HTMLMediaElement_webkitVideoDecodedByteCount_Getter";
TextTrack addTextTrack(String kind, [String label, String language]) {
@@ -16016,32 +16593,32 @@
return _addTextTrack_3(kind);
}
+ @DomName('HTMLMediaElement._addTextTrack_1')
@DocsEditable
- @DomName('HTMLMediaElement.addTextTrack_1')
- TextTrack _addTextTrack_1(kind, label, language) native "HTMLMediaElement_addTextTrack_1_Callback";
+ TextTrack _addTextTrack_1(kind, label, language) native "HTMLMediaElement__addTextTrack_1_Callback";
+ @DomName('HTMLMediaElement._addTextTrack_2')
@DocsEditable
- @DomName('HTMLMediaElement.addTextTrack_2')
- TextTrack _addTextTrack_2(kind, label) native "HTMLMediaElement_addTextTrack_2_Callback";
+ TextTrack _addTextTrack_2(kind, label) native "HTMLMediaElement__addTextTrack_2_Callback";
+ @DomName('HTMLMediaElement._addTextTrack_3')
@DocsEditable
- @DomName('HTMLMediaElement.addTextTrack_3')
- TextTrack _addTextTrack_3(kind) native "HTMLMediaElement_addTextTrack_3_Callback";
+ TextTrack _addTextTrack_3(kind) native "HTMLMediaElement__addTextTrack_3_Callback";
- @DocsEditable
@DomName('HTMLMediaElement.canPlayType')
+ @DocsEditable
String canPlayType(String type, String keySystem) native "HTMLMediaElement_canPlayType_Callback";
- @DocsEditable
@DomName('HTMLMediaElement.load')
+ @DocsEditable
void load() native "HTMLMediaElement_load_Callback";
- @DocsEditable
@DomName('HTMLMediaElement.pause')
+ @DocsEditable
void pause() native "HTMLMediaElement_pause_Callback";
- @DocsEditable
@DomName('HTMLMediaElement.play')
+ @DocsEditable
void play() native "HTMLMediaElement_play_Callback";
void webkitAddKey(String keySystem, Uint8Array key, [Uint8Array initData, String sessionId]) {
@@ -16050,18 +16627,19 @@
return;
}
_webkitAddKey_2(keySystem, key);
+ return;
}
+ @DomName('HTMLMediaElement._webkitAddKey_1')
@DocsEditable
- @DomName('HTMLMediaElement.webkitAddKey_1')
- void _webkitAddKey_1(keySystem, key, initData, sessionId) native "HTMLMediaElement_webkitAddKey_1_Callback";
+ void _webkitAddKey_1(keySystem, key, initData, sessionId) native "HTMLMediaElement__webkitAddKey_1_Callback";
+ @DomName('HTMLMediaElement._webkitAddKey_2')
@DocsEditable
- @DomName('HTMLMediaElement.webkitAddKey_2')
- void _webkitAddKey_2(keySystem, key) native "HTMLMediaElement_webkitAddKey_2_Callback";
+ void _webkitAddKey_2(keySystem, key) native "HTMLMediaElement__webkitAddKey_2_Callback";
- @DocsEditable
@DomName('HTMLMediaElement.webkitCancelKeyRequest')
+ @DocsEditable
void webkitCancelKeyRequest(String keySystem, String sessionId) native "HTMLMediaElement_webkitCancelKeyRequest_Callback";
void webkitGenerateKeyRequest(String keySystem, [Uint8Array initData]) {
@@ -16070,69 +16648,121 @@
return;
}
_webkitGenerateKeyRequest_2(keySystem);
+ return;
}
+ @DomName('HTMLMediaElement._webkitGenerateKeyRequest_1')
@DocsEditable
- @DomName('HTMLMediaElement.webkitGenerateKeyRequest_1')
- void _webkitGenerateKeyRequest_1(keySystem, initData) native "HTMLMediaElement_webkitGenerateKeyRequest_1_Callback";
+ void _webkitGenerateKeyRequest_1(keySystem, initData) native "HTMLMediaElement__webkitGenerateKeyRequest_1_Callback";
+ @DomName('HTMLMediaElement._webkitGenerateKeyRequest_2')
@DocsEditable
- @DomName('HTMLMediaElement.webkitGenerateKeyRequest_2')
- void _webkitGenerateKeyRequest_2(keySystem) native "HTMLMediaElement_webkitGenerateKeyRequest_2_Callback";
+ void _webkitGenerateKeyRequest_2(keySystem) native "HTMLMediaElement__webkitGenerateKeyRequest_2_Callback";
+ @DomName('HTMLMediaElement.canplay')
+ @DocsEditable
Stream<Event> get onCanPlay => canPlayEvent.forTarget(this);
+ @DomName('HTMLMediaElement.canplaythrough')
+ @DocsEditable
Stream<Event> get onCanPlayThrough => canPlayThroughEvent.forTarget(this);
+ @DomName('HTMLMediaElement.durationchange')
+ @DocsEditable
Stream<Event> get onDurationChange => durationChangeEvent.forTarget(this);
+ @DomName('HTMLMediaElement.emptied')
+ @DocsEditable
Stream<Event> get onEmptied => emptiedEvent.forTarget(this);
+ @DomName('HTMLMediaElement.ended')
+ @DocsEditable
Stream<Event> get onEnded => endedEvent.forTarget(this);
+ @DomName('HTMLMediaElement.loadeddata')
+ @DocsEditable
Stream<Event> get onLoadedData => loadedDataEvent.forTarget(this);
+ @DomName('HTMLMediaElement.loadedmetadata')
+ @DocsEditable
Stream<Event> get onLoadedMetadata => loadedMetadataEvent.forTarget(this);
+ @DomName('HTMLMediaElement.loadstart')
+ @DocsEditable
Stream<Event> get onLoadStart => loadStartEvent.forTarget(this);
+ @DomName('HTMLMediaElement.pause')
+ @DocsEditable
Stream<Event> get onPause => pauseEvent.forTarget(this);
+ @DomName('HTMLMediaElement.play')
+ @DocsEditable
Stream<Event> get onPlay => playEvent.forTarget(this);
+ @DomName('HTMLMediaElement.playing')
+ @DocsEditable
Stream<Event> get onPlaying => playingEvent.forTarget(this);
+ @DomName('HTMLMediaElement.progress')
+ @DocsEditable
Stream<Event> get onProgress => progressEvent.forTarget(this);
+ @DomName('HTMLMediaElement.ratechange')
+ @DocsEditable
Stream<Event> get onRateChange => rateChangeEvent.forTarget(this);
+ @DomName('HTMLMediaElement.seeked')
+ @DocsEditable
Stream<Event> get onSeeked => seekedEvent.forTarget(this);
+ @DomName('HTMLMediaElement.seeking')
+ @DocsEditable
Stream<Event> get onSeeking => seekingEvent.forTarget(this);
+ @DomName('HTMLMediaElement.show')
+ @DocsEditable
Stream<Event> get onShow => showEvent.forTarget(this);
+ @DomName('HTMLMediaElement.stalled')
+ @DocsEditable
Stream<Event> get onStalled => stalledEvent.forTarget(this);
+ @DomName('HTMLMediaElement.suspend')
+ @DocsEditable
Stream<Event> get onSuspend => suspendEvent.forTarget(this);
+ @DomName('HTMLMediaElement.timeupdate')
+ @DocsEditable
Stream<Event> get onTimeUpdate => timeUpdateEvent.forTarget(this);
+ @DomName('HTMLMediaElement.volumechange')
+ @DocsEditable
Stream<Event> get onVolumeChange => volumeChangeEvent.forTarget(this);
+ @DomName('HTMLMediaElement.waiting')
+ @DocsEditable
Stream<Event> get onWaiting => waitingEvent.forTarget(this);
+ @DomName('HTMLMediaElement.webkitkeyadded')
+ @DocsEditable
Stream<MediaKeyEvent> get onKeyAdded => keyAddedEvent.forTarget(this);
+ @DomName('HTMLMediaElement.webkitkeyerror')
+ @DocsEditable
Stream<MediaKeyEvent> get onKeyError => keyErrorEvent.forTarget(this);
+ @DomName('HTMLMediaElement.webkitkeymessage')
+ @DocsEditable
Stream<MediaKeyEvent> get onKeyMessage => keyMessageEvent.forTarget(this);
+ @DomName('HTMLMediaElement.webkitneedkey')
+ @DocsEditable
Stream<MediaKeyEvent> get onNeedKey => needKeyEvent.forTarget(this);
}
@DocsEditable
+@deprecated
class MediaElementEvents extends ElementEvents {
@DocsEditable
MediaElementEvents(EventTarget _ptr) : super(_ptr);
@@ -16234,8 +16864,8 @@
static const int MEDIA_ERR_SRC_NOT_SUPPORTED = 4;
- @DocsEditable
@DomName('MediaError.code')
+ @DocsEditable
int get code native "MediaError_code_Getter";
}
@@ -16263,8 +16893,8 @@
static const int MEDIA_KEYERR_UNKNOWN = 1;
- @DocsEditable
@DomName('MediaKeyError.code')
+ @DocsEditable
int get code native "MediaKeyError_code_Getter";
}
@@ -16280,32 +16910,32 @@
class MediaKeyEvent extends Event {
MediaKeyEvent.internal() : super.internal();
- @DocsEditable
@DomName('MediaKeyEvent.defaultURL')
+ @DocsEditable
String get defaultUrl native "MediaKeyEvent_defaultURL_Getter";
- @DocsEditable
@DomName('MediaKeyEvent.errorCode')
+ @DocsEditable
MediaKeyError get errorCode native "MediaKeyEvent_errorCode_Getter";
- @DocsEditable
@DomName('MediaKeyEvent.initData')
+ @DocsEditable
Uint8Array get initData native "MediaKeyEvent_initData_Getter";
- @DocsEditable
@DomName('MediaKeyEvent.keySystem')
+ @DocsEditable
String get keySystem native "MediaKeyEvent_keySystem_Getter";
- @DocsEditable
@DomName('MediaKeyEvent.message')
+ @DocsEditable
Uint8Array get message native "MediaKeyEvent_message_Getter";
- @DocsEditable
@DomName('MediaKeyEvent.sessionId')
+ @DocsEditable
String get sessionId native "MediaKeyEvent_sessionId_Getter";
- @DocsEditable
@DomName('MediaKeyEvent.systemCode')
+ @DocsEditable
int get systemCode native "MediaKeyEvent_systemCode_Getter";
}
@@ -16321,28 +16951,28 @@
class MediaList extends NativeFieldWrapperClass1 {
MediaList.internal();
- @DocsEditable
@DomName('MediaList.length')
+ @DocsEditable
int get length native "MediaList_length_Getter";
- @DocsEditable
@DomName('MediaList.mediaText')
+ @DocsEditable
String get mediaText native "MediaList_mediaText_Getter";
- @DocsEditable
@DomName('MediaList.mediaText')
+ @DocsEditable
void set mediaText(String value) native "MediaList_mediaText_Setter";
- @DocsEditable
@DomName('MediaList.appendMedium')
+ @DocsEditable
void appendMedium(String newMedium) native "MediaList_appendMedium_Callback";
- @DocsEditable
@DomName('MediaList.deleteMedium')
+ @DocsEditable
void deleteMedium(String oldMedium) native "MediaList_deleteMedium_Callback";
- @DocsEditable
@DomName('MediaList.item')
+ @DocsEditable
String item(int index) native "MediaList_item_Callback";
}
@@ -16358,20 +16988,20 @@
class MediaQueryList extends NativeFieldWrapperClass1 {
MediaQueryList.internal();
- @DocsEditable
@DomName('MediaQueryList.matches')
+ @DocsEditable
bool get matches native "MediaQueryList_matches_Getter";
- @DocsEditable
@DomName('MediaQueryList.media')
+ @DocsEditable
String get media native "MediaQueryList_media_Getter";
- @DocsEditable
@DomName('MediaQueryList.addListener')
+ @DocsEditable
void addListener(MediaQueryListListener listener) native "MediaQueryList_addListener_Callback";
- @DocsEditable
@DomName('MediaQueryList.removeListener')
+ @DocsEditable
void removeListener(MediaQueryListListener listener) native "MediaQueryList_removeListener_Callback";
}
@@ -16387,8 +17017,8 @@
class MediaQueryListListener extends NativeFieldWrapperClass1 {
MediaQueryListListener.internal();
- @DocsEditable
@DomName('MediaQueryListListener.queryChanged')
+ @DocsEditable
void queryChanged(MediaQueryList list) native "MediaQueryListListener_queryChanged_Callback";
}
@@ -16408,48 +17038,48 @@
factory MediaSource() => MediaSource._create();
static MediaSource _create() native "MediaSource_constructor_Callback";
- @DocsEditable
@DomName('MediaSource.activeSourceBuffers')
+ @DocsEditable
SourceBufferList get activeSourceBuffers native "MediaSource_activeSourceBuffers_Getter";
- @DocsEditable
@DomName('MediaSource.duration')
+ @DocsEditable
num get duration native "MediaSource_duration_Getter";
- @DocsEditable
@DomName('MediaSource.duration')
+ @DocsEditable
void set duration(num value) native "MediaSource_duration_Setter";
- @DocsEditable
@DomName('MediaSource.readyState')
+ @DocsEditable
String get readyState native "MediaSource_readyState_Getter";
- @DocsEditable
@DomName('MediaSource.sourceBuffers')
+ @DocsEditable
SourceBufferList get sourceBuffers native "MediaSource_sourceBuffers_Getter";
- @DocsEditable
@DomName('MediaSource.addEventListener')
+ @DocsEditable
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native "MediaSource_addEventListener_Callback";
- @DocsEditable
@DomName('MediaSource.addSourceBuffer')
+ @DocsEditable
SourceBuffer addSourceBuffer(String type) native "MediaSource_addSourceBuffer_Callback";
- @DocsEditable
@DomName('MediaSource.dispatchEvent')
- bool $dom_dispatchEvent(Event event) native "MediaSource_dispatchEvent_Callback";
-
@DocsEditable
+ bool dispatchEvent(Event event) native "MediaSource_dispatchEvent_Callback";
+
@DomName('MediaSource.endOfStream')
+ @DocsEditable
void endOfStream(String error) native "MediaSource_endOfStream_Callback";
- @DocsEditable
@DomName('MediaSource.removeEventListener')
+ @DocsEditable
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native "MediaSource_removeEventListener_Callback";
- @DocsEditable
@DomName('MediaSource.removeSourceBuffer')
+ @DocsEditable
void removeSourceBuffer(SourceBuffer buffer) native "MediaSource_removeSourceBuffer_Callback";
}
@@ -16458,12 +17088,13 @@
// BSD-style license that can be found in the LICENSE file.
-/// @domName MediaStream; @docsEditable true
-@DocsEditable
-@DomName('MediaStream')
+/// @domName MediaStream; @docsEditable true@DomName('MediaStream')
+
class MediaStream extends EventTarget {
MediaStream.internal() : super.internal();
+ @DomName('MediaStream.ended')
+ @DocsEditable
static const EventStreamProvider<Event> endedEvent = const EventStreamProvider<Event>('ended');
@DocsEditable
@@ -16472,53 +17103,56 @@
@DocsEditable
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
+ @deprecated
MediaStreamEvents get on =>
new MediaStreamEvents(this);
- @DocsEditable
@DomName('MediaStream.ended')
+ @DocsEditable
bool get ended native "MediaStream_ended_Getter";
- @DocsEditable
@DomName('MediaStream.id')
+ @DocsEditable
String get id native "MediaStream_id_Getter";
- @DocsEditable
@DomName('MediaStream.label')
+ @DocsEditable
String get label native "MediaStream_label_Getter";
- @DocsEditable
@DomName('MediaStream.addEventListener')
+ @DocsEditable
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native "MediaStream_addEventListener_Callback";
- @DocsEditable
@DomName('MediaStream.addTrack')
+ @DocsEditable
void addTrack(MediaStreamTrack track) native "MediaStream_addTrack_Callback";
- @DocsEditable
@DomName('MediaStream.dispatchEvent')
- bool $dom_dispatchEvent(Event event) native "MediaStream_dispatchEvent_Callback";
-
@DocsEditable
+ bool dispatchEvent(Event event) native "MediaStream_dispatchEvent_Callback";
+
@DomName('MediaStream.getAudioTracks')
+ @DocsEditable
List<MediaStreamTrack> getAudioTracks() native "MediaStream_getAudioTracks_Callback";
- @DocsEditable
@DomName('MediaStream.getTrackById')
+ @DocsEditable
MediaStreamTrack getTrackById(String trackId) native "MediaStream_getTrackById_Callback";
- @DocsEditable
@DomName('MediaStream.getVideoTracks')
+ @DocsEditable
List<MediaStreamTrack> getVideoTracks() native "MediaStream_getVideoTracks_Callback";
- @DocsEditable
@DomName('MediaStream.removeEventListener')
+ @DocsEditable
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native "MediaStream_removeEventListener_Callback";
- @DocsEditable
@DomName('MediaStream.removeTrack')
+ @DocsEditable
void removeTrack(MediaStreamTrack track) native "MediaStream_removeTrack_Callback";
+ @DomName('MediaStream.ended')
+ @DocsEditable
Stream<Event> get onEnded => endedEvent.forTarget(this);
@@ -16533,6 +17167,7 @@
}
@DocsEditable
+@deprecated
class MediaStreamEvents extends Events {
@DocsEditable
MediaStreamEvents(EventTarget _ptr) : super(_ptr);
@@ -16558,8 +17193,11 @@
class MediaStreamEvent extends Event {
MediaStreamEvent.internal() : super.internal();
- @DocsEditable
+ /// Checks if this type is supported on the current platform.
+ static bool get supported => true;
+
@DomName('MediaStreamEvent.stream')
+ @DocsEditable
MediaStream get stream native "MediaStreamEvent_stream_Getter";
}
@@ -16575,14 +17213,21 @@
class MediaStreamTrack extends EventTarget {
MediaStreamTrack.internal() : super.internal();
+ @DomName('MediaStreamTrack.ended')
+ @DocsEditable
static const EventStreamProvider<Event> endedEvent = const EventStreamProvider<Event>('ended');
+ @DomName('MediaStreamTrack.mute')
+ @DocsEditable
static const EventStreamProvider<Event> muteEvent = const EventStreamProvider<Event>('mute');
+ @DomName('MediaStreamTrack.unmute')
+ @DocsEditable
static const EventStreamProvider<Event> unmuteEvent = const EventStreamProvider<Event>('unmute');
@DocsEditable
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
+ @deprecated
MediaStreamTrackEvents get on =>
new MediaStreamTrackEvents(this);
@@ -16592,51 +17237,58 @@
static const int MUTED = 1;
- @DocsEditable
@DomName('MediaStreamTrack.enabled')
+ @DocsEditable
bool get enabled native "MediaStreamTrack_enabled_Getter";
- @DocsEditable
@DomName('MediaStreamTrack.enabled')
+ @DocsEditable
void set enabled(bool value) native "MediaStreamTrack_enabled_Setter";
- @DocsEditable
@DomName('MediaStreamTrack.id')
+ @DocsEditable
String get id native "MediaStreamTrack_id_Getter";
- @DocsEditable
@DomName('MediaStreamTrack.kind')
+ @DocsEditable
String get kind native "MediaStreamTrack_kind_Getter";
- @DocsEditable
@DomName('MediaStreamTrack.label')
+ @DocsEditable
String get label native "MediaStreamTrack_label_Getter";
- @DocsEditable
@DomName('MediaStreamTrack.readyState')
+ @DocsEditable
int get readyState native "MediaStreamTrack_readyState_Getter";
- @DocsEditable
@DomName('MediaStreamTrack.addEventListener')
+ @DocsEditable
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native "MediaStreamTrack_addEventListener_Callback";
- @DocsEditable
@DomName('MediaStreamTrack.dispatchEvent')
- bool $dom_dispatchEvent(Event event) native "MediaStreamTrack_dispatchEvent_Callback";
-
@DocsEditable
+ bool dispatchEvent(Event event) native "MediaStreamTrack_dispatchEvent_Callback";
+
@DomName('MediaStreamTrack.removeEventListener')
+ @DocsEditable
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native "MediaStreamTrack_removeEventListener_Callback";
+ @DomName('MediaStreamTrack.ended')
+ @DocsEditable
Stream<Event> get onEnded => endedEvent.forTarget(this);
+ @DomName('MediaStreamTrack.mute')
+ @DocsEditable
Stream<Event> get onMute => muteEvent.forTarget(this);
+ @DomName('MediaStreamTrack.unmute')
+ @DocsEditable
Stream<Event> get onUnmute => unmuteEvent.forTarget(this);
}
@DocsEditable
+@deprecated
class MediaStreamTrackEvents extends Events {
@DocsEditable
MediaStreamTrackEvents(EventTarget _ptr) : super(_ptr);
@@ -16662,8 +17314,11 @@
class MediaStreamTrackEvent extends Event {
MediaStreamTrackEvent.internal() : super.internal();
- @DocsEditable
+ /// Checks if this type is supported on the current platform.
+ static bool get supported => true;
+
@DomName('MediaStreamTrackEvent.track')
+ @DocsEditable
MediaStreamTrack get track native "MediaStreamTrackEvent_track_Getter";
}
@@ -16679,16 +17334,16 @@
class MemoryInfo extends NativeFieldWrapperClass1 {
MemoryInfo.internal();
- @DocsEditable
@DomName('MemoryInfo.jsHeapSizeLimit')
+ @DocsEditable
int get jsHeapSizeLimit native "MemoryInfo_jsHeapSizeLimit_Getter";
- @DocsEditable
@DomName('MemoryInfo.totalJSHeapSize')
+ @DocsEditable
int get totalJSHeapSize native "MemoryInfo_totalJSHeapSize_Getter";
- @DocsEditable
@DomName('MemoryInfo.usedJSHeapSize')
+ @DocsEditable
int get usedJSHeapSize native "MemoryInfo_usedJSHeapSize_Getter";
}
@@ -16724,54 +17379,61 @@
factory MessageChannel() => MessageChannel._create();
static MessageChannel _create() native "MessageChannel_constructor_Callback";
- @DocsEditable
@DomName('MessageChannel.port1')
+ @DocsEditable
MessagePort get port1 native "MessageChannel_port1_Getter";
- @DocsEditable
@DomName('MessageChannel.port2')
+ @DocsEditable
MessagePort get port2 native "MessageChannel_port2_Getter";
}
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// WARNING: Do not edit - generated code.
-@DocsEditable
@DomName('MessageEvent')
class MessageEvent extends Event {
+ factory MessageEvent(String type,
+ {bool canBubble: false, bool cancelable: false, Object data,
+ String origin, String lastEventId,
+ Window source, List messagePorts}) {
+ if (source == null) {
+ source = window;
+ }
+ var event = document.$dom_createEvent("MessageEvent");
+ event.$dom_initMessageEvent(type, canBubble, cancelable, data, origin,
+ lastEventId, source, messagePorts);
+ return event;
+ }
MessageEvent.internal() : super.internal();
- @DocsEditable
@DomName('MessageEvent.data')
+ @DocsEditable
Object get data native "MessageEvent_data_Getter";
- @DocsEditable
@DomName('MessageEvent.lastEventId')
+ @DocsEditable
String get lastEventId native "MessageEvent_lastEventId_Getter";
- @DocsEditable
@DomName('MessageEvent.origin')
+ @DocsEditable
String get origin native "MessageEvent_origin_Getter";
- @DocsEditable
@DomName('MessageEvent.ports')
+ @DocsEditable
List get ports native "MessageEvent_ports_Getter";
- @DocsEditable
@DomName('MessageEvent.source')
+ @DocsEditable
WindowBase get source native "MessageEvent_source_Getter";
- @DocsEditable
@DomName('MessageEvent.initMessageEvent')
- void initMessageEvent(String typeArg, bool canBubbleArg, bool cancelableArg, Object dataArg, String originArg, String lastEventIdArg, Window sourceArg, List messagePorts) native "MessageEvent_initMessageEvent_Callback";
-
@DocsEditable
- @DomName('MessageEvent.webkitInitMessageEvent')
- void webkitInitMessageEvent(String typeArg, bool canBubbleArg, bool cancelableArg, Object dataArg, String originArg, String lastEventIdArg, Window sourceArg, List transferables) native "MessageEvent_webkitInitMessageEvent_Callback";
+ void $dom_initMessageEvent(String typeArg, bool canBubbleArg, bool cancelableArg, Object dataArg, String originArg, String lastEventIdArg, Window sourceArg, List messagePorts) native "MessageEvent_initMessageEvent_Callback";
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -16786,42 +17448,48 @@
class MessagePort extends EventTarget {
MessagePort.internal() : super.internal();
+ @DomName('MessagePort.message')
+ @DocsEditable
static const EventStreamProvider<MessageEvent> messageEvent = const EventStreamProvider<MessageEvent>('message');
@DocsEditable
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
+ @deprecated
MessagePortEvents get on =>
new MessagePortEvents(this);
- @DocsEditable
@DomName('MessagePort.addEventListener')
+ @DocsEditable
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native "MessagePort_addEventListener_Callback";
- @DocsEditable
@DomName('MessagePort.close')
+ @DocsEditable
void close() native "MessagePort_close_Callback";
- @DocsEditable
@DomName('MessagePort.dispatchEvent')
- bool $dom_dispatchEvent(Event evt) native "MessagePort_dispatchEvent_Callback";
-
@DocsEditable
+ bool dispatchEvent(Event evt) native "MessagePort_dispatchEvent_Callback";
+
@DomName('MessagePort.postMessage')
+ @DocsEditable
void postMessage(Object message, [List messagePorts]) native "MessagePort_postMessage_Callback";
- @DocsEditable
@DomName('MessagePort.removeEventListener')
+ @DocsEditable
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native "MessagePort_removeEventListener_Callback";
- @DocsEditable
@DomName('MessagePort.start')
+ @DocsEditable
void start() native "MessagePort_start_Callback";
+ @DomName('MessagePort.message')
+ @DocsEditable
Stream<MessageEvent> get onMessage => messageEvent.forTarget(this);
}
@DocsEditable
+@deprecated
class MessagePortEvents extends Events {
@DocsEditable
MessagePortEvents(EventTarget _ptr) : super(_ptr);
@@ -16841,28 +17509,28 @@
class MetaElement extends _Element_Merged {
MetaElement.internal() : super.internal();
- @DocsEditable
@DomName('HTMLMetaElement.content')
+ @DocsEditable
String get content native "HTMLMetaElement_content_Getter";
- @DocsEditable
@DomName('HTMLMetaElement.content')
+ @DocsEditable
void set content(String value) native "HTMLMetaElement_content_Setter";
- @DocsEditable
@DomName('HTMLMetaElement.httpEquiv')
+ @DocsEditable
String get httpEquiv native "HTMLMetaElement_httpEquiv_Getter";
- @DocsEditable
@DomName('HTMLMetaElement.httpEquiv')
+ @DocsEditable
void set httpEquiv(String value) native "HTMLMetaElement_httpEquiv_Setter";
- @DocsEditable
@DomName('HTMLMetaElement.name')
+ @DocsEditable
String get name native "HTMLMetaElement_name_Getter";
- @DocsEditable
@DomName('HTMLMetaElement.name')
+ @DocsEditable
void set name(String value) native "HTMLMetaElement_name_Setter";
}
@@ -16878,12 +17546,12 @@
class Metadata extends NativeFieldWrapperClass1 {
Metadata.internal();
- @DocsEditable
@DomName('Metadata.modificationTime')
+ @DocsEditable
Date get modificationTime native "Metadata_modificationTime_Getter";
- @DocsEditable
@DomName('Metadata.size')
+ @DocsEditable
int get size native "Metadata_size_Getter";
}
@@ -16916,56 +17584,56 @@
/// Checks if this type is supported on the current platform.
static bool get supported => true;
- @DocsEditable
@DomName('HTMLMeterElement.high')
+ @DocsEditable
num get high native "HTMLMeterElement_high_Getter";
- @DocsEditable
@DomName('HTMLMeterElement.high')
+ @DocsEditable
void set high(num value) native "HTMLMeterElement_high_Setter";
- @DocsEditable
@DomName('HTMLMeterElement.labels')
+ @DocsEditable
List<Node> get labels native "HTMLMeterElement_labels_Getter";
- @DocsEditable
@DomName('HTMLMeterElement.low')
+ @DocsEditable
num get low native "HTMLMeterElement_low_Getter";
- @DocsEditable
@DomName('HTMLMeterElement.low')
+ @DocsEditable
void set low(num value) native "HTMLMeterElement_low_Setter";
- @DocsEditable
@DomName('HTMLMeterElement.max')
+ @DocsEditable
num get max native "HTMLMeterElement_max_Getter";
- @DocsEditable
@DomName('HTMLMeterElement.max')
+ @DocsEditable
void set max(num value) native "HTMLMeterElement_max_Setter";
- @DocsEditable
@DomName('HTMLMeterElement.min')
+ @DocsEditable
num get min native "HTMLMeterElement_min_Getter";
- @DocsEditable
@DomName('HTMLMeterElement.min')
+ @DocsEditable
void set min(num value) native "HTMLMeterElement_min_Setter";
- @DocsEditable
@DomName('HTMLMeterElement.optimum')
+ @DocsEditable
num get optimum native "HTMLMeterElement_optimum_Getter";
- @DocsEditable
@DomName('HTMLMeterElement.optimum')
+ @DocsEditable
void set optimum(num value) native "HTMLMeterElement_optimum_Setter";
- @DocsEditable
@DomName('HTMLMeterElement.value')
+ @DocsEditable
num get value native "HTMLMeterElement_value_Getter";
- @DocsEditable
@DomName('HTMLMeterElement.value')
+ @DocsEditable
void set value(num value) native "HTMLMeterElement_value_Setter";
}
@@ -16981,20 +17649,20 @@
class ModElement extends _Element_Merged {
ModElement.internal() : super.internal();
- @DocsEditable
@DomName('HTMLModElement.cite')
+ @DocsEditable
String get cite native "HTMLModElement_cite_Getter";
- @DocsEditable
@DomName('HTMLModElement.cite')
+ @DocsEditable
void set cite(String value) native "HTMLModElement_cite_Setter";
- @DocsEditable
@DomName('HTMLModElement.dateTime')
+ @DocsEditable
String get dateTime native "HTMLModElement_dateTime_Getter";
- @DocsEditable
@DomName('HTMLModElement.dateTime')
+ @DocsEditable
void set dateTime(String value) native "HTMLModElement_dateTime_Setter";
}
@@ -17005,99 +17673,103 @@
// WARNING: Do not edit - generated code.
-@DocsEditable
@DomName('MouseEvent')
class MouseEvent extends UIEvent {
- factory MouseEvent(String type, Window view, int detail, int screenX,
- int screenY, int clientX, int clientY, int button, [bool canBubble = true,
- bool cancelable = true, bool ctrlKey = false, bool altKey = false,
- bool shiftKey = false, bool metaKey = false,
- EventTarget relatedTarget = null]) =>
- _MouseEventFactoryProvider.createMouseEvent(
- type, view, detail, screenX, screenY,
- clientX, clientY, button, canBubble, cancelable,
- ctrlKey, altKey, shiftKey, metaKey,
- relatedTarget);
+ factory MouseEvent(String type,
+ {Window view, int detail: 0, int screenX: 0, int screenY: 0,
+ int clientX: 0, int clientY: 0, int button: 0, bool canBubble: true,
+ bool cancelable: true, bool ctrlKey: false, bool altKey: false,
+ bool shiftKey: false, bool metaKey: false, EventTarget relatedTarget}) {
+
+ if (view == null) {
+ view = window;
+ }
+ var event = document.$dom_createEvent('MouseEvent');
+ event.$dom_initMouseEvent(type, canBubble, cancelable, view, detail,
+ screenX, screenY, clientX, clientY, ctrlKey, altKey, shiftKey, metaKey,
+ button, relatedTarget);
+ return event;
+ }
MouseEvent.internal() : super.internal();
- @DocsEditable
@DomName('MouseEvent.altKey')
+ @DocsEditable
bool get altKey native "MouseEvent_altKey_Getter";
- @DocsEditable
@DomName('MouseEvent.button')
+ @DocsEditable
int get button native "MouseEvent_button_Getter";
- @DocsEditable
@DomName('MouseEvent.clientX')
+ @DocsEditable
int get clientX native "MouseEvent_clientX_Getter";
- @DocsEditable
@DomName('MouseEvent.clientY')
+ @DocsEditable
int get clientY native "MouseEvent_clientY_Getter";
- @DocsEditable
@DomName('MouseEvent.ctrlKey')
+ @DocsEditable
bool get ctrlKey native "MouseEvent_ctrlKey_Getter";
- @DocsEditable
@DomName('MouseEvent.dataTransfer')
+ @DocsEditable
Clipboard get dataTransfer native "MouseEvent_dataTransfer_Getter";
- @DocsEditable
@DomName('MouseEvent.fromElement')
+ @DocsEditable
Node get fromElement native "MouseEvent_fromElement_Getter";
- @DocsEditable
@DomName('MouseEvent.metaKey')
+ @DocsEditable
bool get metaKey native "MouseEvent_metaKey_Getter";
- @DocsEditable
@DomName('MouseEvent.offsetX')
+ @DocsEditable
int get offsetX native "MouseEvent_offsetX_Getter";
- @DocsEditable
@DomName('MouseEvent.offsetY')
+ @DocsEditable
int get offsetY native "MouseEvent_offsetY_Getter";
- @DocsEditable
@DomName('MouseEvent.relatedTarget')
+ @DocsEditable
EventTarget get relatedTarget native "MouseEvent_relatedTarget_Getter";
- @DocsEditable
@DomName('MouseEvent.screenX')
+ @DocsEditable
int get screenX native "MouseEvent_screenX_Getter";
- @DocsEditable
@DomName('MouseEvent.screenY')
+ @DocsEditable
int get screenY native "MouseEvent_screenY_Getter";
- @DocsEditable
@DomName('MouseEvent.shiftKey')
+ @DocsEditable
bool get shiftKey native "MouseEvent_shiftKey_Getter";
- @DocsEditable
@DomName('MouseEvent.toElement')
+ @DocsEditable
Node get toElement native "MouseEvent_toElement_Getter";
- @DocsEditable
@DomName('MouseEvent.webkitMovementX')
+ @DocsEditable
int get webkitMovementX native "MouseEvent_webkitMovementX_Getter";
- @DocsEditable
@DomName('MouseEvent.webkitMovementY')
+ @DocsEditable
int get webkitMovementY native "MouseEvent_webkitMovementY_Getter";
- @DocsEditable
@DomName('MouseEvent.x')
+ @DocsEditable
int get x native "MouseEvent_x_Getter";
- @DocsEditable
@DomName('MouseEvent.y')
+ @DocsEditable
int get y native "MouseEvent_y_Getter";
- @DocsEditable
@DomName('MouseEvent.initMouseEvent')
+ @DocsEditable
void $dom_initMouseEvent(String type, bool canBubble, bool cancelable, Window view, int detail, int screenX, int screenY, int clientX, int clientY, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, int button, EventTarget relatedTarget) native "MouseEvent_initMouseEvent_Callback";
}
@@ -17113,12 +17785,18 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// WARNING: Do not edit - generated code.
-
-@DocsEditable
@DomName('MutationEvent')
class MutationEvent extends Event {
+ factory MutationEvent(String type,
+ {bool canBubble: false, bool cancelable: false, Node relatedNode,
+ String prevValue, String newValue, String attrName, int attrChange: 0}) {
+
+ var event = document.$dom_createEvent('MutationEvent');
+ event.$dom_initMutationEvent(type, canBubble, cancelable, relatedNode,
+ prevValue, newValue, attrName, attrChange);
+ return event;
+ }
MutationEvent.internal() : super.internal();
static const int ADDITION = 2;
@@ -17127,42 +17805,44 @@
static const int REMOVAL = 3;
- @DocsEditable
@DomName('MutationEvent.attrChange')
+ @DocsEditable
int get attrChange native "MutationEvent_attrChange_Getter";
- @DocsEditable
@DomName('MutationEvent.attrName')
+ @DocsEditable
String get attrName native "MutationEvent_attrName_Getter";
- @DocsEditable
@DomName('MutationEvent.newValue')
+ @DocsEditable
String get newValue native "MutationEvent_newValue_Getter";
- @DocsEditable
@DomName('MutationEvent.prevValue')
+ @DocsEditable
String get prevValue native "MutationEvent_prevValue_Getter";
- @DocsEditable
@DomName('MutationEvent.relatedNode')
+ @DocsEditable
Node get relatedNode native "MutationEvent_relatedNode_Getter";
- @DocsEditable
@DomName('MutationEvent.initMutationEvent')
- void initMutationEvent(String type, bool canBubble, bool cancelable, Node relatedNode, String prevValue, String newValue, String attrName, int attrChange) native "MutationEvent_initMutationEvent_Callback";
+ @DocsEditable
+ void $dom_initMutationEvent(String type, bool canBubble, bool cancelable, Node relatedNode, String prevValue, String newValue, String attrName, int attrChange) native "MutationEvent_initMutationEvent_Callback";
}
+
+
+
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-@DocsEditable
@DomName('MutationObserver')
@SupportedBrowser(SupportedBrowser.CHROME)
@SupportedBrowser(SupportedBrowser.FIREFOX)
@SupportedBrowser(SupportedBrowser.SAFARI)
-@Experimental()
+@Experimental
class MutationObserver extends NativeFieldWrapperClass1 {
MutationObserver.internal();
@@ -17170,16 +17850,16 @@
factory MutationObserver(MutationCallback callback) => MutationObserver._create(callback);
static MutationObserver _create(MutationCallback callback) native "MutationObserver_constructor_Callback";
- @DocsEditable
@DomName('MutationObserver.disconnect')
+ @DocsEditable
void disconnect() native "MutationObserver_disconnect_Callback";
- @DocsEditable
@DomName('MutationObserver._observe')
+ @DocsEditable
void _observe(Node target, Map options) native "MutationObserver__observe_Callback";
- @DocsEditable
@DomName('MutationObserver.takeRecords')
+ @DocsEditable
List<MutationRecord> takeRecords() native "MutationObserver_takeRecords_Callback";
/**
@@ -17264,40 +17944,40 @@
class MutationRecord extends NativeFieldWrapperClass1 {
MutationRecord.internal();
- @DocsEditable
@DomName('MutationRecord.addedNodes')
+ @DocsEditable
List<Node> get addedNodes native "MutationRecord_addedNodes_Getter";
- @DocsEditable
@DomName('MutationRecord.attributeName')
+ @DocsEditable
String get attributeName native "MutationRecord_attributeName_Getter";
- @DocsEditable
@DomName('MutationRecord.attributeNamespace')
+ @DocsEditable
String get attributeNamespace native "MutationRecord_attributeNamespace_Getter";
- @DocsEditable
@DomName('MutationRecord.nextSibling')
+ @DocsEditable
Node get nextSibling native "MutationRecord_nextSibling_Getter";
- @DocsEditable
@DomName('MutationRecord.oldValue')
+ @DocsEditable
String get oldValue native "MutationRecord_oldValue_Getter";
- @DocsEditable
@DomName('MutationRecord.previousSibling')
+ @DocsEditable
Node get previousSibling native "MutationRecord_previousSibling_Getter";
- @DocsEditable
@DomName('MutationRecord.removedNodes')
+ @DocsEditable
List<Node> get removedNodes native "MutationRecord_removedNodes_Getter";
- @DocsEditable
@DomName('MutationRecord.target')
+ @DocsEditable
Node get target native "MutationRecord_target_Getter";
- @DocsEditable
@DomName('MutationRecord.type')
+ @DocsEditable
String get type native "MutationRecord_type_Getter";
}
@@ -17313,8 +17993,8 @@
class NamedNodeMap extends NativeFieldWrapperClass1 implements List<Node> {
NamedNodeMap.internal();
- @DocsEditable
@DomName('NamedNodeMap.length')
+ @DocsEditable
int get length native "NamedNodeMap_length_Getter";
Node operator[](int index) native "NamedNodeMap_item_Callback";
@@ -17342,11 +18022,13 @@
void forEach(void f(Node element)) => IterableMixinWorkaround.forEach(this, f);
- String join([String separator]) => IterableMixinWorkaround.joinList(this, separator);
+ String join([String separator]) =>
+ IterableMixinWorkaround.joinList(this, separator);
List mappedBy(f(Node element)) => IterableMixinWorkaround.mappedByList(this, f);
- Iterable<Node> where(bool f(Node element)) => IterableMixinWorkaround.where(this, f);
+ Iterable<Node> where(bool f(Node element)) =>
+ IterableMixinWorkaround.where(this, f);
bool every(bool f(Node element)) => IterableMixinWorkaround.every(this, f);
@@ -17408,6 +18090,9 @@
throw new UnsupportedError("Cannot clear immutable List.");
}
+ List<Node> get reversed =>
+ new ReversedListView<Node>(this, 0, null);
+
void sort([int compare(Node a, Node b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -17436,9 +18121,11 @@
throw new StateError("More than one element");
}
- Node min([int compare(Node a, Node b)]) => IterableMixinWorkaround.min(this, compare);
+ Node min([int compare(Node a, Node b)]) =>
+ IterableMixinWorkaround.min(this, compare);
- Node max([int compare(Node a, Node b)]) => IterableMixinWorkaround.max(this, compare);
+ Node max([int compare(Node a, Node b)]) =>
+ IterableMixinWorkaround.max(this, compare);
Node removeAt(int pos) {
throw new UnsupportedError("Cannot remove from immutable List.");
@@ -17485,32 +18172,32 @@
// -- end List<Node> mixins.
- @DocsEditable
@DomName('NamedNodeMap.getNamedItem')
+ @DocsEditable
Node getNamedItem(String name) native "NamedNodeMap_getNamedItem_Callback";
- @DocsEditable
@DomName('NamedNodeMap.getNamedItemNS')
+ @DocsEditable
Node getNamedItemNS(String namespaceURI, String localName) native "NamedNodeMap_getNamedItemNS_Callback";
- @DocsEditable
@DomName('NamedNodeMap.item')
+ @DocsEditable
Node item(int index) native "NamedNodeMap_item_Callback";
- @DocsEditable
@DomName('NamedNodeMap.removeNamedItem')
+ @DocsEditable
Node removeNamedItem(String name) native "NamedNodeMap_removeNamedItem_Callback";
- @DocsEditable
@DomName('NamedNodeMap.removeNamedItemNS')
+ @DocsEditable
Node removeNamedItemNS(String namespaceURI, String localName) native "NamedNodeMap_removeNamedItemNS_Callback";
- @DocsEditable
@DomName('NamedNodeMap.setNamedItem')
+ @DocsEditable
Node setNamedItem(Node node) native "NamedNodeMap_setNamedItem_Callback";
- @DocsEditable
@DomName('NamedNodeMap.setNamedItemNS')
+ @DocsEditable
Node setNamedItemNS(Node node) native "NamedNodeMap_setNamedItemNS_Callback";
}
@@ -17519,7 +18206,6 @@
// BSD-style license that can be found in the LICENSE file.
-@DocsEditable
@DomName('Navigator')
class Navigator extends NativeFieldWrapperClass1 {
@@ -17544,7 +18230,7 @@
*/
@DomName('Navigator.webkitGetUserMedia')
@SupportedBrowser(SupportedBrowser.CHROME)
- @Experimental()
+ @Experimental
Future<LocalMediaStream> getUserMedia({bool audio: false,
bool video: false}) {
var completer = new Completer<LocalMediaStream>();
@@ -17565,84 +18251,84 @@
Navigator.internal();
- @DocsEditable
@DomName('Navigator.appCodeName')
+ @DocsEditable
String get appCodeName native "Navigator_appCodeName_Getter";
- @DocsEditable
@DomName('Navigator.appName')
+ @DocsEditable
String get appName native "Navigator_appName_Getter";
- @DocsEditable
@DomName('Navigator.appVersion')
+ @DocsEditable
String get appVersion native "Navigator_appVersion_Getter";
- @DocsEditable
@DomName('Navigator.cookieEnabled')
+ @DocsEditable
bool get cookieEnabled native "Navigator_cookieEnabled_Getter";
- @DocsEditable
@DomName('Navigator.geolocation')
+ @DocsEditable
Geolocation get geolocation native "Navigator_geolocation_Getter";
- @DocsEditable
@DomName('Navigator.language')
+ @DocsEditable
String get language native "Navigator_language_Getter";
- @DocsEditable
@DomName('Navigator.mimeTypes')
+ @DocsEditable
DomMimeTypeArray get mimeTypes native "Navigator_mimeTypes_Getter";
- @DocsEditable
@DomName('Navigator.onLine')
+ @DocsEditable
bool get onLine native "Navigator_onLine_Getter";
- @DocsEditable
@DomName('Navigator.platform')
+ @DocsEditable
String get platform native "Navigator_platform_Getter";
- @DocsEditable
@DomName('Navigator.plugins')
+ @DocsEditable
DomPluginArray get plugins native "Navigator_plugins_Getter";
- @DocsEditable
@DomName('Navigator.product')
+ @DocsEditable
String get product native "Navigator_product_Getter";
- @DocsEditable
@DomName('Navigator.productSub')
+ @DocsEditable
String get productSub native "Navigator_productSub_Getter";
- @DocsEditable
@DomName('Navigator.userAgent')
+ @DocsEditable
String get userAgent native "Navigator_userAgent_Getter";
- @DocsEditable
@DomName('Navigator.vendor')
+ @DocsEditable
String get vendor native "Navigator_vendor_Getter";
- @DocsEditable
@DomName('Navigator.vendorSub')
+ @DocsEditable
String get vendorSub native "Navigator_vendorSub_Getter";
- @DocsEditable
@DomName('Navigator.webkitBattery')
+ @DocsEditable
BatteryManager get webkitBattery native "Navigator_webkitBattery_Getter";
- @DocsEditable
@DomName('Navigator.getStorageUpdates')
+ @DocsEditable
void getStorageUpdates() native "Navigator_getStorageUpdates_Callback";
- @DocsEditable
@DomName('Navigator.javaEnabled')
+ @DocsEditable
bool javaEnabled() native "Navigator_javaEnabled_Callback";
- @DocsEditable
@DomName('Navigator.webkitGetGamepads')
+ @DocsEditable
List<Gamepad> webkitGetGamepads() native "Navigator_webkitGetGamepads_Callback";
- @DocsEditable
@DomName('Navigator.webkitGetUserMedia')
+ @DocsEditable
void _getUserMedia(Map options, _NavigatorUserMediaSuccessCallback successCallback, [_NavigatorUserMediaErrorCallback errorCallback]) native "Navigator_webkitGetUserMedia_Callback";
}
@@ -17660,8 +18346,8 @@
static const int PERMISSION_DENIED = 1;
- @DocsEditable
@DomName('NavigatorUserMediaError.code')
+ @DocsEditable
int get code native "NavigatorUserMediaError_code_Getter";
}
@@ -17852,6 +18538,9 @@
return this[index];
}
+ List<Node> get reversed =>
+ new ReversedListView<Node>(this, 0, null);
+
// TODO(jacobr): this could be implemented for child node lists.
// The exception we throw here is misleading.
void sort([int compare(Node a, Node b)]) {
@@ -17894,7 +18583,6 @@
Node operator[](int index) => _this.$dom_childNodes[index];
}
-@DocsEditable
@DomName('Node')
class Node extends EventTarget {
List<Node> get nodes {
@@ -17940,104 +18628,104 @@
Node.internal() : super.internal();
- @DocsEditable
@DomName('Node.attributes')
+ @DocsEditable
NamedNodeMap get $dom_attributes native "Node_attributes_Getter";
- @DocsEditable
@DomName('Node.childNodes')
+ @DocsEditable
List<Node> get $dom_childNodes native "Node_childNodes_Getter";
- @DocsEditable
@DomName('Node.firstChild')
+ @DocsEditable
Node get $dom_firstChild native "Node_firstChild_Getter";
- @DocsEditable
@DomName('Node.lastChild')
+ @DocsEditable
Node get $dom_lastChild native "Node_lastChild_Getter";
- @DocsEditable
@DomName('Node.localName')
+ @DocsEditable
String get $dom_localName native "Node_localName_Getter";
- @DocsEditable
@DomName('Node.namespaceURI')
+ @DocsEditable
String get $dom_namespaceUri native "Node_namespaceURI_Getter";
- @DocsEditable
@DomName('Node.nextSibling')
+ @DocsEditable
Node get nextNode native "Node_nextSibling_Getter";
- @DocsEditable
@DomName('Node.nodeType')
+ @DocsEditable
int get nodeType native "Node_nodeType_Getter";
- @DocsEditable
@DomName('Node.nodeValue')
+ @DocsEditable
String get nodeValue native "Node_nodeValue_Getter";
- @DocsEditable
@DomName('Node.ownerDocument')
+ @DocsEditable
Document get document native "Node_ownerDocument_Getter";
- @DocsEditable
@DomName('Node.parentElement')
+ @DocsEditable
Element get parent native "Node_parentElement_Getter";
- @DocsEditable
@DomName('Node.parentNode')
+ @DocsEditable
Node get parentNode native "Node_parentNode_Getter";
- @DocsEditable
@DomName('Node.previousSibling')
+ @DocsEditable
Node get previousNode native "Node_previousSibling_Getter";
- @DocsEditable
@DomName('Node.textContent')
+ @DocsEditable
String get text native "Node_textContent_Getter";
- @DocsEditable
@DomName('Node.textContent')
+ @DocsEditable
void set text(String value) native "Node_textContent_Setter";
- @DocsEditable
@DomName('Node.addEventListener')
+ @DocsEditable
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native "Node_addEventListener_Callback";
- @DocsEditable
@DomName('Node.appendChild')
+ @DocsEditable
Node $dom_appendChild(Node newChild) native "Node_appendChild_Callback";
- @DocsEditable
@DomName('Node.cloneNode')
+ @DocsEditable
Node clone(bool deep) native "Node_cloneNode_Callback";
- @DocsEditable
@DomName('Node.contains')
+ @DocsEditable
bool contains(Node other) native "Node_contains_Callback";
- @DocsEditable
@DomName('Node.dispatchEvent')
- bool $dom_dispatchEvent(Event event) native "Node_dispatchEvent_Callback";
-
@DocsEditable
+ bool dispatchEvent(Event event) native "Node_dispatchEvent_Callback";
+
@DomName('Node.hasChildNodes')
+ @DocsEditable
bool hasChildNodes() native "Node_hasChildNodes_Callback";
- @DocsEditable
@DomName('Node.insertBefore')
+ @DocsEditable
Node insertBefore(Node newChild, Node refChild) native "Node_insertBefore_Callback";
- @DocsEditable
@DomName('Node.removeChild')
+ @DocsEditable
Node $dom_removeChild(Node oldChild) native "Node_removeChild_Callback";
- @DocsEditable
@DomName('Node.removeEventListener')
+ @DocsEditable
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native "Node_removeEventListener_Callback";
- @DocsEditable
@DomName('Node.replaceChild')
+ @DocsEditable
Node $dom_replaceChild(Node newChild, Node oldChild) native "Node_replaceChild_Callback";
}
@@ -18085,8 +18773,8 @@
static const int SHOW_TEXT = 0x00000004;
- @DocsEditable
@DomName('NodeFilter.acceptNode')
+ @DocsEditable
int acceptNode(Node n) native "NodeFilter_acceptNode_Callback";
}
@@ -18102,40 +18790,40 @@
class NodeIterator extends NativeFieldWrapperClass1 {
NodeIterator.internal();
- @DocsEditable
@DomName('NodeIterator.expandEntityReferences')
+ @DocsEditable
bool get expandEntityReferences native "NodeIterator_expandEntityReferences_Getter";
- @DocsEditable
@DomName('NodeIterator.filter')
+ @DocsEditable
NodeFilter get filter native "NodeIterator_filter_Getter";
- @DocsEditable
@DomName('NodeIterator.pointerBeforeReferenceNode')
+ @DocsEditable
bool get pointerBeforeReferenceNode native "NodeIterator_pointerBeforeReferenceNode_Getter";
- @DocsEditable
@DomName('NodeIterator.referenceNode')
+ @DocsEditable
Node get referenceNode native "NodeIterator_referenceNode_Getter";
- @DocsEditable
@DomName('NodeIterator.root')
+ @DocsEditable
Node get root native "NodeIterator_root_Getter";
- @DocsEditable
@DomName('NodeIterator.whatToShow')
+ @DocsEditable
int get whatToShow native "NodeIterator_whatToShow_Getter";
- @DocsEditable
@DomName('NodeIterator.detach')
+ @DocsEditable
void detach() native "NodeIterator_detach_Callback";
- @DocsEditable
@DomName('NodeIterator.nextNode')
+ @DocsEditable
Node nextNode() native "NodeIterator_nextNode_Callback";
- @DocsEditable
@DomName('NodeIterator.previousNode')
+ @DocsEditable
Node previousNode() native "NodeIterator_previousNode_Callback";
}
@@ -18151,8 +18839,8 @@
class NodeList extends NativeFieldWrapperClass1 implements List<Node> {
NodeList.internal();
- @DocsEditable
@DomName('NodeList.length')
+ @DocsEditable
int get length native "NodeList_length_Getter";
Node operator[](int index) native "NodeList_item_Callback";
@@ -18180,11 +18868,13 @@
void forEach(void f(Node element)) => IterableMixinWorkaround.forEach(this, f);
- String join([String separator]) => IterableMixinWorkaround.joinList(this, separator);
+ String join([String separator]) =>
+ IterableMixinWorkaround.joinList(this, separator);
List mappedBy(f(Node element)) => IterableMixinWorkaround.mappedByList(this, f);
- Iterable<Node> where(bool f(Node element)) => IterableMixinWorkaround.where(this, f);
+ Iterable<Node> where(bool f(Node element)) =>
+ IterableMixinWorkaround.where(this, f);
bool every(bool f(Node element)) => IterableMixinWorkaround.every(this, f);
@@ -18246,6 +18936,9 @@
throw new UnsupportedError("Cannot clear immutable List.");
}
+ List<Node> get reversed =>
+ new ReversedListView<Node>(this, 0, null);
+
void sort([int compare(Node a, Node b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -18274,9 +18967,11 @@
throw new StateError("More than one element");
}
- Node min([int compare(Node a, Node b)]) => IterableMixinWorkaround.min(this, compare);
+ Node min([int compare(Node a, Node b)]) =>
+ IterableMixinWorkaround.min(this, compare);
- Node max([int compare(Node a, Node b)]) => IterableMixinWorkaround.max(this, compare);
+ Node max([int compare(Node a, Node b)]) =>
+ IterableMixinWorkaround.max(this, compare);
Node removeAt(int pos) {
throw new UnsupportedError("Cannot remove from immutable List.");
@@ -18323,8 +19018,8 @@
// -- end List<Node> mixins.
- @DocsEditable
@DomName('NodeList.item')
+ @DocsEditable
Node _item(int index) native "NodeList_item_Callback";
}
@@ -18340,12 +19035,12 @@
class Notation extends Node {
Notation.internal() : super.internal();
- @DocsEditable
@DomName('Notation.publicId')
+ @DocsEditable
String get publicId native "Notation_publicId_Getter";
- @DocsEditable
@DomName('Notation.systemId')
+ @DocsEditable
String get systemId native "Notation_systemId_Getter";
}
@@ -18361,14 +19056,24 @@
class Notification extends EventTarget {
Notification.internal() : super.internal();
+ @DomName('Notification.click')
+ @DocsEditable
static const EventStreamProvider<Event> clickEvent = const EventStreamProvider<Event>('click');
+ @DomName('Notification.close')
+ @DocsEditable
static const EventStreamProvider<Event> closeEvent = const EventStreamProvider<Event>('close');
+ @DomName('Notification.display')
+ @DocsEditable
static const EventStreamProvider<Event> displayEvent = const EventStreamProvider<Event>('display');
+ @DomName('Notification.error')
+ @DocsEditable
static const EventStreamProvider<Event> errorEvent = const EventStreamProvider<Event>('error');
+ @DomName('Notification.show')
+ @DocsEditable
static const EventStreamProvider<Event> showEvent = const EventStreamProvider<Event>('show');
@DocsEditable
@@ -18382,78 +19087,90 @@
@DocsEditable
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
+ @deprecated
NotificationEvents get on =>
new NotificationEvents(this);
- @DocsEditable
@DomName('Notification.dir')
+ @DocsEditable
String get dir native "Notification_dir_Getter";
- @DocsEditable
@DomName('Notification.dir')
+ @DocsEditable
void set dir(String value) native "Notification_dir_Setter";
- @DocsEditable
@DomName('Notification.permission')
+ @DocsEditable
String get permission native "Notification_permission_Getter";
- @DocsEditable
@DomName('Notification.replaceId')
+ @DocsEditable
String get replaceId native "Notification_replaceId_Getter";
- @DocsEditable
@DomName('Notification.replaceId')
+ @DocsEditable
void set replaceId(String value) native "Notification_replaceId_Setter";
- @DocsEditable
@DomName('Notification.tag')
+ @DocsEditable
String get tag native "Notification_tag_Getter";
- @DocsEditable
@DomName('Notification.tag')
+ @DocsEditable
void set tag(String value) native "Notification_tag_Setter";
- @DocsEditable
@DomName('Notification.addEventListener')
+ @DocsEditable
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native "Notification_addEventListener_Callback";
- @DocsEditable
@DomName('Notification.cancel')
+ @DocsEditable
void cancel() native "Notification_cancel_Callback";
- @DocsEditable
@DomName('Notification.close')
+ @DocsEditable
void close() native "Notification_close_Callback";
- @DocsEditable
@DomName('Notification.dispatchEvent')
- bool $dom_dispatchEvent(Event evt) native "Notification_dispatchEvent_Callback";
-
@DocsEditable
+ bool dispatchEvent(Event evt) native "Notification_dispatchEvent_Callback";
+
@DomName('Notification.removeEventListener')
+ @DocsEditable
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native "Notification_removeEventListener_Callback";
- @DocsEditable
@DomName('Notification.requestPermission')
+ @DocsEditable
static void requestPermission(NotificationPermissionCallback callback) native "Notification_requestPermission_Callback";
- @DocsEditable
@DomName('Notification.show')
+ @DocsEditable
void show() native "Notification_show_Callback";
+ @DomName('Notification.click')
+ @DocsEditable
Stream<Event> get onClick => clickEvent.forTarget(this);
+ @DomName('Notification.close')
+ @DocsEditable
Stream<Event> get onClose => closeEvent.forTarget(this);
+ @DomName('Notification.display')
+ @DocsEditable
Stream<Event> get onDisplay => displayEvent.forTarget(this);
+ @DomName('Notification.error')
+ @DocsEditable
Stream<Event> get onError => errorEvent.forTarget(this);
+ @DomName('Notification.show')
+ @DocsEditable
Stream<Event> get onShow => showEvent.forTarget(this);
}
@DocsEditable
+@deprecated
class NotificationEvents extends Events {
@DocsEditable
NotificationEvents(EventTarget _ptr) : super(_ptr);
@@ -18484,27 +19201,27 @@
@DomName('NotificationCenter')
@SupportedBrowser(SupportedBrowser.CHROME)
@SupportedBrowser(SupportedBrowser.SAFARI)
-@Experimental()
+@Experimental
class NotificationCenter extends NativeFieldWrapperClass1 {
NotificationCenter.internal();
/// Checks if this type is supported on the current platform.
static bool get supported => true;
- @DocsEditable
@DomName('NotificationCenter.checkPermission')
+ @DocsEditable
int checkPermission() native "NotificationCenter_checkPermission_Callback";
- @DocsEditable
@DomName('NotificationCenter.createHTMLNotification')
+ @DocsEditable
Notification createHtmlNotification(String url) native "NotificationCenter_createHTMLNotification_Callback";
- @DocsEditable
@DomName('NotificationCenter.createNotification')
+ @DocsEditable
Notification createNotification(String iconUrl, String title, String body) native "NotificationCenter_createNotification_Callback";
- @DocsEditable
@DomName('NotificationCenter.requestPermission')
+ @DocsEditable
void requestPermission(VoidCallback callback) native "NotificationCenter_requestPermission_Callback";
}
@@ -18531,28 +19248,28 @@
@DocsEditable
factory OListElement() => document.$dom_createElement("ol");
- @DocsEditable
@DomName('HTMLOListElement.reversed')
+ @DocsEditable
bool get reversed native "HTMLOListElement_reversed_Getter";
- @DocsEditable
@DomName('HTMLOListElement.reversed')
+ @DocsEditable
void set reversed(bool value) native "HTMLOListElement_reversed_Setter";
- @DocsEditable
@DomName('HTMLOListElement.start')
+ @DocsEditable
int get start native "HTMLOListElement_start_Getter";
- @DocsEditable
@DomName('HTMLOListElement.start')
+ @DocsEditable
void set start(int value) native "HTMLOListElement_start_Setter";
- @DocsEditable
@DomName('HTMLOListElement.type')
+ @DocsEditable
String get type native "HTMLOListElement_type_Getter";
- @DocsEditable
@DomName('HTMLOListElement.type')
+ @DocsEditable
void set type(String value) native "HTMLOListElement_type_Setter";
}
@@ -18577,84 +19294,84 @@
/// Checks if this type is supported on the current platform.
static bool get supported => true;
- @DocsEditable
@DomName('HTMLObjectElement.code')
+ @DocsEditable
String get code native "HTMLObjectElement_code_Getter";
- @DocsEditable
@DomName('HTMLObjectElement.code')
+ @DocsEditable
void set code(String value) native "HTMLObjectElement_code_Setter";
- @DocsEditable
@DomName('HTMLObjectElement.data')
+ @DocsEditable
String get data native "HTMLObjectElement_data_Getter";
- @DocsEditable
@DomName('HTMLObjectElement.data')
+ @DocsEditable
void set data(String value) native "HTMLObjectElement_data_Setter";
- @DocsEditable
@DomName('HTMLObjectElement.form')
+ @DocsEditable
FormElement get form native "HTMLObjectElement_form_Getter";
- @DocsEditable
@DomName('HTMLObjectElement.height')
+ @DocsEditable
String get height native "HTMLObjectElement_height_Getter";
- @DocsEditable
@DomName('HTMLObjectElement.height')
+ @DocsEditable
void set height(String value) native "HTMLObjectElement_height_Setter";
- @DocsEditable
@DomName('HTMLObjectElement.name')
+ @DocsEditable
String get name native "HTMLObjectElement_name_Getter";
- @DocsEditable
@DomName('HTMLObjectElement.name')
+ @DocsEditable
void set name(String value) native "HTMLObjectElement_name_Setter";
- @DocsEditable
@DomName('HTMLObjectElement.type')
+ @DocsEditable
String get type native "HTMLObjectElement_type_Getter";
- @DocsEditable
@DomName('HTMLObjectElement.type')
+ @DocsEditable
void set type(String value) native "HTMLObjectElement_type_Setter";
- @DocsEditable
@DomName('HTMLObjectElement.useMap')
+ @DocsEditable
String get useMap native "HTMLObjectElement_useMap_Getter";
- @DocsEditable
@DomName('HTMLObjectElement.useMap')
+ @DocsEditable
void set useMap(String value) native "HTMLObjectElement_useMap_Setter";
- @DocsEditable
@DomName('HTMLObjectElement.validationMessage')
+ @DocsEditable
String get validationMessage native "HTMLObjectElement_validationMessage_Getter";
- @DocsEditable
@DomName('HTMLObjectElement.validity')
+ @DocsEditable
ValidityState get validity native "HTMLObjectElement_validity_Getter";
- @DocsEditable
@DomName('HTMLObjectElement.width')
+ @DocsEditable
String get width native "HTMLObjectElement_width_Getter";
- @DocsEditable
@DomName('HTMLObjectElement.width')
+ @DocsEditable
void set width(String value) native "HTMLObjectElement_width_Setter";
- @DocsEditable
@DomName('HTMLObjectElement.willValidate')
+ @DocsEditable
bool get willValidate native "HTMLObjectElement_willValidate_Getter";
- @DocsEditable
@DomName('HTMLObjectElement.checkValidity')
+ @DocsEditable
bool checkValidity() native "HTMLObjectElement_checkValidity_Callback";
- @DocsEditable
@DomName('HTMLObjectElement.setCustomValidity')
+ @DocsEditable
void setCustomValidity(String error) native "HTMLObjectElement_setCustomValidity_Callback";
}
@@ -18713,20 +19430,20 @@
static const int VERTEX_ARRAY_BINDING_OES = 0x85B5;
- @DocsEditable
@DomName('OESVertexArrayObject.bindVertexArrayOES')
+ @DocsEditable
void bindVertexArray(WebGLVertexArrayObject arrayObject) native "OESVertexArrayObject_bindVertexArrayOES_Callback";
- @DocsEditable
@DomName('OESVertexArrayObject.createVertexArrayOES')
+ @DocsEditable
WebGLVertexArrayObject createVertexArray() native "OESVertexArrayObject_createVertexArrayOES_Callback";
- @DocsEditable
@DomName('OESVertexArrayObject.deleteVertexArrayOES')
+ @DocsEditable
void deleteVertexArray(WebGLVertexArrayObject arrayObject) native "OESVertexArrayObject_deleteVertexArrayOES_Callback";
- @DocsEditable
@DomName('OESVertexArrayObject.isVertexArrayOES')
+ @DocsEditable
bool isVertexArray(WebGLVertexArrayObject arrayObject) native "OESVertexArrayObject_isVertexArrayOES_Callback";
}
@@ -18745,20 +19462,20 @@
@DocsEditable
factory OptGroupElement() => document.$dom_createElement("optgroup");
- @DocsEditable
@DomName('HTMLOptGroupElement.disabled')
+ @DocsEditable
bool get disabled native "HTMLOptGroupElement_disabled_Getter";
- @DocsEditable
@DomName('HTMLOptGroupElement.disabled')
+ @DocsEditable
void set disabled(bool value) native "HTMLOptGroupElement_disabled_Setter";
- @DocsEditable
@DomName('HTMLOptGroupElement.label')
+ @DocsEditable
String get label native "HTMLOptGroupElement_label_Getter";
- @DocsEditable
@DomName('HTMLOptGroupElement.label')
+ @DocsEditable
void set label(String value) native "HTMLOptGroupElement_label_Setter";
}
@@ -18792,52 +19509,52 @@
}
static OptionElement _create([String data, String value, bool defaultSelected, bool selected]) native "HTMLOptionElement_constructor_Callback";
- @DocsEditable
@DomName('HTMLOptionElement.defaultSelected')
+ @DocsEditable
bool get defaultSelected native "HTMLOptionElement_defaultSelected_Getter";
- @DocsEditable
@DomName('HTMLOptionElement.defaultSelected')
+ @DocsEditable
void set defaultSelected(bool value) native "HTMLOptionElement_defaultSelected_Setter";
- @DocsEditable
@DomName('HTMLOptionElement.disabled')
+ @DocsEditable
bool get disabled native "HTMLOptionElement_disabled_Getter";
- @DocsEditable
@DomName('HTMLOptionElement.disabled')
+ @DocsEditable
void set disabled(bool value) native "HTMLOptionElement_disabled_Setter";
- @DocsEditable
@DomName('HTMLOptionElement.form')
+ @DocsEditable
FormElement get form native "HTMLOptionElement_form_Getter";
- @DocsEditable
@DomName('HTMLOptionElement.index')
+ @DocsEditable
int get index native "HTMLOptionElement_index_Getter";
- @DocsEditable
@DomName('HTMLOptionElement.label')
+ @DocsEditable
String get label native "HTMLOptionElement_label_Getter";
- @DocsEditable
@DomName('HTMLOptionElement.label')
+ @DocsEditable
void set label(String value) native "HTMLOptionElement_label_Setter";
- @DocsEditable
@DomName('HTMLOptionElement.selected')
+ @DocsEditable
bool get selected native "HTMLOptionElement_selected_Getter";
- @DocsEditable
@DomName('HTMLOptionElement.selected')
+ @DocsEditable
void set selected(bool value) native "HTMLOptionElement_selected_Setter";
- @DocsEditable
@DomName('HTMLOptionElement.value')
+ @DocsEditable
String get value native "HTMLOptionElement_value_Getter";
- @DocsEditable
@DomName('HTMLOptionElement.value')
+ @DocsEditable
void set value(String value) native "HTMLOptionElement_value_Setter";
}
@@ -18862,68 +19579,68 @@
/// Checks if this type is supported on the current platform.
static bool get supported => true;
- @DocsEditable
@DomName('HTMLOutputElement.defaultValue')
+ @DocsEditable
String get defaultValue native "HTMLOutputElement_defaultValue_Getter";
- @DocsEditable
@DomName('HTMLOutputElement.defaultValue')
+ @DocsEditable
void set defaultValue(String value) native "HTMLOutputElement_defaultValue_Setter";
- @DocsEditable
@DomName('HTMLOutputElement.form')
+ @DocsEditable
FormElement get form native "HTMLOutputElement_form_Getter";
- @DocsEditable
@DomName('HTMLOutputElement.htmlFor')
+ @DocsEditable
DomSettableTokenList get htmlFor native "HTMLOutputElement_htmlFor_Getter";
- @DocsEditable
@DomName('HTMLOutputElement.htmlFor')
+ @DocsEditable
void set htmlFor(DomSettableTokenList value) native "HTMLOutputElement_htmlFor_Setter";
- @DocsEditable
@DomName('HTMLOutputElement.labels')
+ @DocsEditable
List<Node> get labels native "HTMLOutputElement_labels_Getter";
- @DocsEditable
@DomName('HTMLOutputElement.name')
+ @DocsEditable
String get name native "HTMLOutputElement_name_Getter";
- @DocsEditable
@DomName('HTMLOutputElement.name')
+ @DocsEditable
void set name(String value) native "HTMLOutputElement_name_Setter";
- @DocsEditable
@DomName('HTMLOutputElement.type')
+ @DocsEditable
String get type native "HTMLOutputElement_type_Getter";
- @DocsEditable
@DomName('HTMLOutputElement.validationMessage')
+ @DocsEditable
String get validationMessage native "HTMLOutputElement_validationMessage_Getter";
- @DocsEditable
@DomName('HTMLOutputElement.validity')
+ @DocsEditable
ValidityState get validity native "HTMLOutputElement_validity_Getter";
- @DocsEditable
@DomName('HTMLOutputElement.value')
+ @DocsEditable
String get value native "HTMLOutputElement_value_Getter";
- @DocsEditable
@DomName('HTMLOutputElement.value')
+ @DocsEditable
void set value(String value) native "HTMLOutputElement_value_Setter";
- @DocsEditable
@DomName('HTMLOutputElement.willValidate')
+ @DocsEditable
bool get willValidate native "HTMLOutputElement_willValidate_Getter";
- @DocsEditable
@DomName('HTMLOutputElement.checkValidity')
+ @DocsEditable
bool checkValidity() native "HTMLOutputElement_checkValidity_Callback";
- @DocsEditable
@DomName('HTMLOutputElement.setCustomValidity')
+ @DocsEditable
void setCustomValidity(String error) native "HTMLOutputElement_setCustomValidity_Callback";
}
@@ -18945,16 +19662,16 @@
static const int VERTICAL = 1;
- @DocsEditable
@DomName('OverflowEvent.horizontalOverflow')
+ @DocsEditable
bool get horizontalOverflow native "OverflowEvent_horizontalOverflow_Getter";
- @DocsEditable
@DomName('OverflowEvent.orient')
+ @DocsEditable
int get orient native "OverflowEvent_orient_Getter";
- @DocsEditable
@DomName('OverflowEvent.verticalOverflow')
+ @DocsEditable
bool get verticalOverflow native "OverflowEvent_verticalOverflow_Getter";
}
@@ -18970,20 +19687,20 @@
class PagePopupController extends NativeFieldWrapperClass1 {
PagePopupController.internal();
- @DocsEditable
@DomName('PagePopupController.formatMonth')
+ @DocsEditable
String formatMonth(int year, int zeroBaseMonth) native "PagePopupController_formatMonth_Callback";
- @DocsEditable
@DomName('PagePopupController.histogramEnumeration')
+ @DocsEditable
void histogramEnumeration(String name, int sample, int boundaryValue) native "PagePopupController_histogramEnumeration_Callback";
- @DocsEditable
@DomName('PagePopupController.localizeNumberString')
+ @DocsEditable
String localizeNumberString(String numberString) native "PagePopupController_localizeNumberString_Callback";
- @DocsEditable
@DomName('PagePopupController.setValueAndClosePopup')
+ @DocsEditable
void setValueAndClosePopup(int numberValue, String stringValue) native "PagePopupController_setValueAndClosePopup_Callback";
}
@@ -18999,8 +19716,8 @@
class PageTransitionEvent extends Event {
PageTransitionEvent.internal() : super.internal();
- @DocsEditable
@DomName('PageTransitionEvent.persisted')
+ @DocsEditable
bool get persisted native "PageTransitionEvent_persisted_Getter";
}
@@ -19035,20 +19752,20 @@
@DocsEditable
factory ParamElement() => document.$dom_createElement("param");
- @DocsEditable
@DomName('HTMLParamElement.name')
+ @DocsEditable
String get name native "HTMLParamElement_name_Getter";
- @DocsEditable
@DomName('HTMLParamElement.name')
+ @DocsEditable
void set name(String value) native "HTMLParamElement_name_Setter";
- @DocsEditable
@DomName('HTMLParamElement.value')
+ @DocsEditable
String get value native "HTMLParamElement_value_Getter";
- @DocsEditable
@DomName('HTMLParamElement.value')
+ @DocsEditable
void set value(String value) native "HTMLParamElement_value_Setter";
}
@@ -19070,20 +19787,20 @@
/// Checks if this type is supported on the current platform.
static bool get supported => true;
- @DocsEditable
@DomName('Performance.memory')
+ @DocsEditable
MemoryInfo get memory native "Performance_memory_Getter";
- @DocsEditable
@DomName('Performance.navigation')
+ @DocsEditable
PerformanceNavigation get navigation native "Performance_navigation_Getter";
- @DocsEditable
@DomName('Performance.timing')
+ @DocsEditable
PerformanceTiming get timing native "Performance_timing_Getter";
- @DocsEditable
@DomName('Performance.now')
+ @DocsEditable
num now() native "Performance_now_Callback";
}
@@ -19107,12 +19824,12 @@
static const int TYPE_RESERVED = 255;
- @DocsEditable
@DomName('PerformanceNavigation.redirectCount')
+ @DocsEditable
int get redirectCount native "PerformanceNavigation_redirectCount_Getter";
- @DocsEditable
@DomName('PerformanceNavigation.type')
+ @DocsEditable
int get type native "PerformanceNavigation_type_Getter";
}
@@ -19128,88 +19845,88 @@
class PerformanceTiming extends NativeFieldWrapperClass1 {
PerformanceTiming.internal();
- @DocsEditable
@DomName('PerformanceTiming.connectEnd')
+ @DocsEditable
int get connectEnd native "PerformanceTiming_connectEnd_Getter";
- @DocsEditable
@DomName('PerformanceTiming.connectStart')
+ @DocsEditable
int get connectStart native "PerformanceTiming_connectStart_Getter";
- @DocsEditable
@DomName('PerformanceTiming.domComplete')
+ @DocsEditable
int get domComplete native "PerformanceTiming_domComplete_Getter";
- @DocsEditable
@DomName('PerformanceTiming.domContentLoadedEventEnd')
+ @DocsEditable
int get domContentLoadedEventEnd native "PerformanceTiming_domContentLoadedEventEnd_Getter";
- @DocsEditable
@DomName('PerformanceTiming.domContentLoadedEventStart')
+ @DocsEditable
int get domContentLoadedEventStart native "PerformanceTiming_domContentLoadedEventStart_Getter";
- @DocsEditable
@DomName('PerformanceTiming.domInteractive')
+ @DocsEditable
int get domInteractive native "PerformanceTiming_domInteractive_Getter";
- @DocsEditable
@DomName('PerformanceTiming.domLoading')
+ @DocsEditable
int get domLoading native "PerformanceTiming_domLoading_Getter";
- @DocsEditable
@DomName('PerformanceTiming.domainLookupEnd')
+ @DocsEditable
int get domainLookupEnd native "PerformanceTiming_domainLookupEnd_Getter";
- @DocsEditable
@DomName('PerformanceTiming.domainLookupStart')
+ @DocsEditable
int get domainLookupStart native "PerformanceTiming_domainLookupStart_Getter";
- @DocsEditable
@DomName('PerformanceTiming.fetchStart')
+ @DocsEditable
int get fetchStart native "PerformanceTiming_fetchStart_Getter";
- @DocsEditable
@DomName('PerformanceTiming.loadEventEnd')
+ @DocsEditable
int get loadEventEnd native "PerformanceTiming_loadEventEnd_Getter";
- @DocsEditable
@DomName('PerformanceTiming.loadEventStart')
+ @DocsEditable
int get loadEventStart native "PerformanceTiming_loadEventStart_Getter";
- @DocsEditable
@DomName('PerformanceTiming.navigationStart')
+ @DocsEditable
int get navigationStart native "PerformanceTiming_navigationStart_Getter";
- @DocsEditable
@DomName('PerformanceTiming.redirectEnd')
+ @DocsEditable
int get redirectEnd native "PerformanceTiming_redirectEnd_Getter";
- @DocsEditable
@DomName('PerformanceTiming.redirectStart')
+ @DocsEditable
int get redirectStart native "PerformanceTiming_redirectStart_Getter";
- @DocsEditable
@DomName('PerformanceTiming.requestStart')
+ @DocsEditable
int get requestStart native "PerformanceTiming_requestStart_Getter";
- @DocsEditable
@DomName('PerformanceTiming.responseEnd')
+ @DocsEditable
int get responseEnd native "PerformanceTiming_responseEnd_Getter";
- @DocsEditable
@DomName('PerformanceTiming.responseStart')
+ @DocsEditable
int get responseStart native "PerformanceTiming_responseStart_Getter";
- @DocsEditable
@DomName('PerformanceTiming.secureConnectionStart')
+ @DocsEditable
int get secureConnectionStart native "PerformanceTiming_secureConnectionStart_Getter";
- @DocsEditable
@DomName('PerformanceTiming.unloadEventEnd')
+ @DocsEditable
int get unloadEventEnd native "PerformanceTiming_unloadEventEnd_Getter";
- @DocsEditable
@DomName('PerformanceTiming.unloadEventStart')
+ @DocsEditable
int get unloadEventStart native "PerformanceTiming_unloadEventStart_Getter";
}
@@ -19229,20 +19946,20 @@
factory Point(num x, num y) => Point._create(x, y);
static Point _create(num x, num y) native "WebKitPoint_constructor_Callback";
- @DocsEditable
@DomName('WebKitPoint.x')
+ @DocsEditable
num get x native "WebKitPoint_x_Getter";
- @DocsEditable
@DomName('WebKitPoint.x')
+ @DocsEditable
void set x(num value) native "WebKitPoint_x_Setter";
- @DocsEditable
@DomName('WebKitPoint.y')
+ @DocsEditable
num get y native "WebKitPoint_y_Getter";
- @DocsEditable
@DomName('WebKitPoint.y')
+ @DocsEditable
void set y(num value) native "WebKitPoint_y_Setter";
}
@@ -19255,11 +19972,15 @@
@DocsEditable
@DomName('PopStateEvent')
+@SupportedBrowser(SupportedBrowser.CHROME)
+@SupportedBrowser(SupportedBrowser.FIREFOX)
+@SupportedBrowser(SupportedBrowser.IE, '10')
+@SupportedBrowser(SupportedBrowser.SAFARI)
class PopStateEvent extends Event {
PopStateEvent.internal() : super.internal();
- @DocsEditable
@DomName('PopStateEvent.state')
+ @DocsEditable
Object get state native "PopStateEvent_state_Getter";
}
@@ -19289,12 +20010,12 @@
static const int TIMEOUT = 3;
- @DocsEditable
@DomName('PositionError.code')
+ @DocsEditable
int get code native "PositionError_code_Getter";
- @DocsEditable
@DomName('PositionError.message')
+ @DocsEditable
String get message native "PositionError_message_Getter";
}
@@ -19321,12 +20042,12 @@
@DocsEditable
factory PreElement() => document.$dom_createElement("pre");
- @DocsEditable
@DomName('HTMLPreElement.wrap')
+ @DocsEditable
bool get wrap native "HTMLPreElement_wrap_Getter";
- @DocsEditable
@DomName('HTMLPreElement.wrap')
+ @DocsEditable
void set wrap(bool value) native "HTMLPreElement_wrap_Setter";
}
@@ -19342,20 +20063,20 @@
class ProcessingInstruction extends Node {
ProcessingInstruction.internal() : super.internal();
- @DocsEditable
@DomName('ProcessingInstruction.data')
+ @DocsEditable
String get data native "ProcessingInstruction_data_Getter";
- @DocsEditable
@DomName('ProcessingInstruction.data')
+ @DocsEditable
void set data(String value) native "ProcessingInstruction_data_Setter";
- @DocsEditable
@DomName('ProcessingInstruction.sheet')
+ @DocsEditable
StyleSheet get sheet native "ProcessingInstruction_sheet_Getter";
- @DocsEditable
@DomName('ProcessingInstruction.target')
+ @DocsEditable
String get target native "ProcessingInstruction_target_Getter";
}
@@ -19381,28 +20102,28 @@
/// Checks if this type is supported on the current platform.
static bool get supported => true;
- @DocsEditable
@DomName('HTMLProgressElement.labels')
+ @DocsEditable
List<Node> get labels native "HTMLProgressElement_labels_Getter";
- @DocsEditable
@DomName('HTMLProgressElement.max')
+ @DocsEditable
num get max native "HTMLProgressElement_max_Getter";
- @DocsEditable
@DomName('HTMLProgressElement.max')
+ @DocsEditable
void set max(num value) native "HTMLProgressElement_max_Setter";
- @DocsEditable
@DomName('HTMLProgressElement.position')
+ @DocsEditable
num get position native "HTMLProgressElement_position_Getter";
- @DocsEditable
@DomName('HTMLProgressElement.value')
+ @DocsEditable
num get value native "HTMLProgressElement_value_Getter";
- @DocsEditable
@DomName('HTMLProgressElement.value')
+ @DocsEditable
void set value(num value) native "HTMLProgressElement_value_Setter";
}
@@ -19418,16 +20139,16 @@
class ProgressEvent extends Event {
ProgressEvent.internal() : super.internal();
- @DocsEditable
@DomName('ProgressEvent.lengthComputable')
+ @DocsEditable
bool get lengthComputable native "ProgressEvent_lengthComputable_Getter";
- @DocsEditable
@DomName('ProgressEvent.loaded')
+ @DocsEditable
int get loaded native "ProgressEvent_loaded_Getter";
- @DocsEditable
@DomName('ProgressEvent.total')
+ @DocsEditable
int get total native "ProgressEvent_total_Getter";
}
@@ -19443,12 +20164,12 @@
class QuoteElement extends _Element_Merged {
QuoteElement.internal() : super.internal();
- @DocsEditable
@DomName('HTMLQuoteElement.cite')
+ @DocsEditable
String get cite native "HTMLQuoteElement_cite_Getter";
- @DocsEditable
@DomName('HTMLQuoteElement.cite')
+ @DocsEditable
void set cite(String value) native "HTMLQuoteElement_cite_Setter";
}
@@ -19488,12 +20209,12 @@
class RadioNodeList extends NodeList {
RadioNodeList.internal() : super.internal();
- @DocsEditable
@DomName('RadioNodeList.value')
+ @DocsEditable
String get value native "RadioNodeList_value_Getter";
- @DocsEditable
@DomName('RadioNodeList.value')
+ @DocsEditable
void set value(String value) native "RadioNodeList_value_Setter";
}
@@ -19504,7 +20225,6 @@
// WARNING: Do not edit - generated code.
-@DocsEditable
@DomName('Range')
class Range extends NativeFieldWrapperClass1 {
factory Range() => document.$dom_createRange();
@@ -19527,128 +20247,128 @@
static const int START_TO_START = 0;
- @DocsEditable
@DomName('Range.collapsed')
+ @DocsEditable
bool get collapsed native "Range_collapsed_Getter";
- @DocsEditable
@DomName('Range.commonAncestorContainer')
+ @DocsEditable
Node get commonAncestorContainer native "Range_commonAncestorContainer_Getter";
- @DocsEditable
@DomName('Range.endContainer')
+ @DocsEditable
Node get endContainer native "Range_endContainer_Getter";
- @DocsEditable
@DomName('Range.endOffset')
+ @DocsEditable
int get endOffset native "Range_endOffset_Getter";
- @DocsEditable
@DomName('Range.startContainer')
+ @DocsEditable
Node get startContainer native "Range_startContainer_Getter";
- @DocsEditable
@DomName('Range.startOffset')
+ @DocsEditable
int get startOffset native "Range_startOffset_Getter";
- @DocsEditable
@DomName('Range.cloneContents')
+ @DocsEditable
DocumentFragment cloneContents() native "Range_cloneContents_Callback";
- @DocsEditable
@DomName('Range.cloneRange')
+ @DocsEditable
Range cloneRange() native "Range_cloneRange_Callback";
- @DocsEditable
@DomName('Range.collapse')
+ @DocsEditable
void collapse(bool toStart) native "Range_collapse_Callback";
- @DocsEditable
@DomName('Range.compareNode')
+ @DocsEditable
int compareNode(Node refNode) native "Range_compareNode_Callback";
- @DocsEditable
@DomName('Range.comparePoint')
+ @DocsEditable
int comparePoint(Node refNode, int offset) native "Range_comparePoint_Callback";
- @DocsEditable
@DomName('Range.createContextualFragment')
+ @DocsEditable
DocumentFragment createContextualFragment(String html) native "Range_createContextualFragment_Callback";
- @DocsEditable
@DomName('Range.deleteContents')
+ @DocsEditable
void deleteContents() native "Range_deleteContents_Callback";
- @DocsEditable
@DomName('Range.detach')
+ @DocsEditable
void detach() native "Range_detach_Callback";
- @DocsEditable
@DomName('Range.expand')
+ @DocsEditable
void expand(String unit) native "Range_expand_Callback";
- @DocsEditable
@DomName('Range.extractContents')
+ @DocsEditable
DocumentFragment extractContents() native "Range_extractContents_Callback";
- @DocsEditable
@DomName('Range.getBoundingClientRect')
+ @DocsEditable
ClientRect getBoundingClientRect() native "Range_getBoundingClientRect_Callback";
- @DocsEditable
@DomName('Range.getClientRects')
+ @DocsEditable
List<ClientRect> getClientRects() native "Range_getClientRects_Callback";
- @DocsEditable
@DomName('Range.insertNode')
+ @DocsEditable
void insertNode(Node newNode) native "Range_insertNode_Callback";
- @DocsEditable
@DomName('Range.intersectsNode')
+ @DocsEditable
bool intersectsNode(Node refNode) native "Range_intersectsNode_Callback";
- @DocsEditable
@DomName('Range.isPointInRange')
+ @DocsEditable
bool isPointInRange(Node refNode, int offset) native "Range_isPointInRange_Callback";
- @DocsEditable
@DomName('Range.selectNode')
+ @DocsEditable
void selectNode(Node refNode) native "Range_selectNode_Callback";
- @DocsEditable
@DomName('Range.selectNodeContents')
+ @DocsEditable
void selectNodeContents(Node refNode) native "Range_selectNodeContents_Callback";
- @DocsEditable
@DomName('Range.setEnd')
+ @DocsEditable
void setEnd(Node refNode, int offset) native "Range_setEnd_Callback";
- @DocsEditable
@DomName('Range.setEndAfter')
+ @DocsEditable
void setEndAfter(Node refNode) native "Range_setEndAfter_Callback";
- @DocsEditable
@DomName('Range.setEndBefore')
+ @DocsEditable
void setEndBefore(Node refNode) native "Range_setEndBefore_Callback";
- @DocsEditable
@DomName('Range.setStart')
+ @DocsEditable
void setStart(Node refNode, int offset) native "Range_setStart_Callback";
- @DocsEditable
@DomName('Range.setStartAfter')
+ @DocsEditable
void setStartAfter(Node refNode) native "Range_setStartAfter_Callback";
- @DocsEditable
@DomName('Range.setStartBefore')
+ @DocsEditable
void setStartBefore(Node refNode) native "Range_setStartBefore_Callback";
- @DocsEditable
@DomName('Range.surroundContents')
+ @DocsEditable
void surroundContents(Node newParent) native "Range_surroundContents_Callback";
- @DocsEditable
@DomName('Range.toString')
+ @DocsEditable
String toString() native "Range_toString_Callback";
}
@@ -19668,20 +20388,20 @@
static const int INVALID_NODE_TYPE_ERR = 2;
- @DocsEditable
@DomName('RangeException.code')
+ @DocsEditable
int get code native "RangeException_code_Getter";
- @DocsEditable
@DomName('RangeException.message')
+ @DocsEditable
String get message native "RangeException_message_Getter";
- @DocsEditable
@DomName('RangeException.name')
+ @DocsEditable
String get name native "RangeException_name_Getter";
- @DocsEditable
@DomName('RangeException.toString')
+ @DocsEditable
String toString() native "RangeException_toString_Callback";
}
@@ -19697,20 +20417,20 @@
class Rect extends NativeFieldWrapperClass1 {
Rect.internal();
- @DocsEditable
@DomName('Rect.bottom')
+ @DocsEditable
CssPrimitiveValue get bottom native "Rect_bottom_Getter";
- @DocsEditable
@DomName('Rect.left')
+ @DocsEditable
CssPrimitiveValue get left native "Rect_left_Getter";
- @DocsEditable
@DomName('Rect.right')
+ @DocsEditable
CssPrimitiveValue get right native "Rect_right_Getter";
- @DocsEditable
@DomName('Rect.top')
+ @DocsEditable
CssPrimitiveValue get top native "Rect_top_Getter";
}
@@ -19734,16 +20454,16 @@
class RgbColor extends NativeFieldWrapperClass1 {
RgbColor.internal();
- @DocsEditable
@DomName('RGBColor.blue')
+ @DocsEditable
CssPrimitiveValue get blue native "RGBColor_blue_Getter";
- @DocsEditable
@DomName('RGBColor.green')
+ @DocsEditable
CssPrimitiveValue get green native "RGBColor_green_Getter";
- @DocsEditable
@DomName('RGBColor.red')
+ @DocsEditable
CssPrimitiveValue get red native "RGBColor_red_Getter";
}
@@ -19759,57 +20479,66 @@
class RtcDataChannel extends EventTarget {
RtcDataChannel.internal() : super.internal();
+ @DomName('RTCDataChannel.close')
+ @DocsEditable
static const EventStreamProvider<Event> closeEvent = const EventStreamProvider<Event>('close');
+ @DomName('RTCDataChannel.error')
+ @DocsEditable
static const EventStreamProvider<Event> errorEvent = const EventStreamProvider<Event>('error');
+ @DomName('RTCDataChannel.message')
+ @DocsEditable
static const EventStreamProvider<MessageEvent> messageEvent = const EventStreamProvider<MessageEvent>('message');
+ @DomName('RTCDataChannel.open')
+ @DocsEditable
static const EventStreamProvider<Event> openEvent = const EventStreamProvider<Event>('open');
@DocsEditable
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
+ @deprecated
RtcDataChannelEvents get on =>
new RtcDataChannelEvents(this);
- @DocsEditable
@DomName('RTCDataChannel.binaryType')
+ @DocsEditable
String get binaryType native "RTCDataChannel_binaryType_Getter";
- @DocsEditable
@DomName('RTCDataChannel.binaryType')
+ @DocsEditable
void set binaryType(String value) native "RTCDataChannel_binaryType_Setter";
- @DocsEditable
@DomName('RTCDataChannel.bufferedAmount')
+ @DocsEditable
int get bufferedAmount native "RTCDataChannel_bufferedAmount_Getter";
- @DocsEditable
@DomName('RTCDataChannel.label')
+ @DocsEditable
String get label native "RTCDataChannel_label_Getter";
- @DocsEditable
@DomName('RTCDataChannel.readyState')
+ @DocsEditable
String get readyState native "RTCDataChannel_readyState_Getter";
- @DocsEditable
@DomName('RTCDataChannel.reliable')
+ @DocsEditable
bool get reliable native "RTCDataChannel_reliable_Getter";
- @DocsEditable
@DomName('RTCDataChannel.addEventListener')
+ @DocsEditable
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native "RTCDataChannel_addEventListener_Callback";
- @DocsEditable
@DomName('RTCDataChannel.close')
+ @DocsEditable
void close() native "RTCDataChannel_close_Callback";
- @DocsEditable
@DomName('RTCDataChannel.dispatchEvent')
- bool $dom_dispatchEvent(Event event) native "RTCDataChannel_dispatchEvent_Callback";
-
@DocsEditable
+ bool dispatchEvent(Event event) native "RTCDataChannel_dispatchEvent_Callback";
+
@DomName('RTCDataChannel.removeEventListener')
+ @DocsEditable
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native "RTCDataChannel_removeEventListener_Callback";
void send(data) {
@@ -19832,33 +20561,42 @@
throw new ArgumentError("Incorrect number or type of arguments");
}
+ @DomName('RTCDataChannel._send_1')
@DocsEditable
- @DomName('RTCDataChannel.send_1')
- void _send_1(data) native "RTCDataChannel_send_1_Callback";
+ void _send_1(data) native "RTCDataChannel__send_1_Callback";
+ @DomName('RTCDataChannel._send_2')
@DocsEditable
- @DomName('RTCDataChannel.send_2')
- void _send_2(data) native "RTCDataChannel_send_2_Callback";
+ void _send_2(data) native "RTCDataChannel__send_2_Callback";
+ @DomName('RTCDataChannel._send_3')
@DocsEditable
- @DomName('RTCDataChannel.send_3')
- void _send_3(data) native "RTCDataChannel_send_3_Callback";
+ void _send_3(data) native "RTCDataChannel__send_3_Callback";
+ @DomName('RTCDataChannel._send_4')
@DocsEditable
- @DomName('RTCDataChannel.send_4')
- void _send_4(data) native "RTCDataChannel_send_4_Callback";
+ void _send_4(data) native "RTCDataChannel__send_4_Callback";
+ @DomName('RTCDataChannel.close')
+ @DocsEditable
Stream<Event> get onClose => closeEvent.forTarget(this);
+ @DomName('RTCDataChannel.error')
+ @DocsEditable
Stream<Event> get onError => errorEvent.forTarget(this);
+ @DomName('RTCDataChannel.message')
+ @DocsEditable
Stream<MessageEvent> get onMessage => messageEvent.forTarget(this);
+ @DomName('RTCDataChannel.open')
+ @DocsEditable
Stream<Event> get onOpen => openEvent.forTarget(this);
}
@DocsEditable
+@deprecated
class RtcDataChannelEvents extends Events {
@DocsEditable
RtcDataChannelEvents(EventTarget _ptr) : super(_ptr);
@@ -19887,8 +20625,8 @@
class RtcDataChannelEvent extends Event {
RtcDataChannelEvent.internal() : super.internal();
- @DocsEditable
@DomName('RTCDataChannelEvent.channel')
+ @DocsEditable
RtcDataChannel get channel native "RTCDataChannelEvent_channel_Getter";
}
@@ -19908,16 +20646,16 @@
factory RtcIceCandidate(Map dictionary) => RtcIceCandidate._create(dictionary);
static RtcIceCandidate _create(Map dictionary) native "RTCIceCandidate_constructor_Callback";
- @DocsEditable
@DomName('RTCIceCandidate.candidate')
+ @DocsEditable
String get candidate native "RTCIceCandidate_candidate_Getter";
- @DocsEditable
@DomName('RTCIceCandidate.sdpMLineIndex')
+ @DocsEditable
int get sdpMLineIndex native "RTCIceCandidate_sdpMLineIndex_Getter";
- @DocsEditable
@DomName('RTCIceCandidate.sdpMid')
+ @DocsEditable
String get sdpMid native "RTCIceCandidate_sdpMid_Getter";
}
@@ -19933,8 +20671,8 @@
class RtcIceCandidateEvent extends Event {
RtcIceCandidateEvent.internal() : super.internal();
- @DocsEditable
@DomName('RTCIceCandidateEvent.candidate')
+ @DocsEditable
RtcIceCandidate get candidate native "RTCIceCandidateEvent_candidate_Getter";
}
@@ -19950,20 +20688,36 @@
class RtcPeerConnection extends EventTarget {
RtcPeerConnection.internal() : super.internal();
+ @DomName('RTCPeerConnection.addstream')
+ @DocsEditable
static const EventStreamProvider<MediaStreamEvent> addStreamEvent = const EventStreamProvider<MediaStreamEvent>('addstream');
+ @DomName('RTCPeerConnection.datachannel')
+ @DocsEditable
static const EventStreamProvider<RtcDataChannelEvent> dataChannelEvent = const EventStreamProvider<RtcDataChannelEvent>('datachannel');
+ @DomName('RTCPeerConnection.icecandidate')
+ @DocsEditable
static const EventStreamProvider<RtcIceCandidateEvent> iceCandidateEvent = const EventStreamProvider<RtcIceCandidateEvent>('icecandidate');
+ @DomName('RTCPeerConnection.icechange')
+ @DocsEditable
static const EventStreamProvider<Event> iceChangeEvent = const EventStreamProvider<Event>('icechange');
+ @DomName('RTCPeerConnection.negotiationneeded')
+ @DocsEditable
static const EventStreamProvider<Event> negotiationNeededEvent = const EventStreamProvider<Event>('negotiationneeded');
+ @DomName('RTCPeerConnection.open')
+ @DocsEditable
static const EventStreamProvider<Event> openEvent = const EventStreamProvider<Event>('open');
+ @DomName('RTCPeerConnection.removestream')
+ @DocsEditable
static const EventStreamProvider<MediaStreamEvent> removeStreamEvent = const EventStreamProvider<MediaStreamEvent>('removestream');
+ @DomName('RTCPeerConnection.statechange')
+ @DocsEditable
static const EventStreamProvider<Event> stateChangeEvent = const EventStreamProvider<Event>('statechange');
@DocsEditable
@@ -19977,112 +20731,130 @@
@DocsEditable
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
+ @deprecated
RtcPeerConnectionEvents get on =>
new RtcPeerConnectionEvents(this);
- @DocsEditable
@DomName('RTCPeerConnection.iceGatheringState')
+ @DocsEditable
String get iceGatheringState native "RTCPeerConnection_iceGatheringState_Getter";
- @DocsEditable
@DomName('RTCPeerConnection.iceState')
+ @DocsEditable
String get iceState native "RTCPeerConnection_iceState_Getter";
- @DocsEditable
@DomName('RTCPeerConnection.localDescription')
+ @DocsEditable
RtcSessionDescription get localDescription native "RTCPeerConnection_localDescription_Getter";
- @DocsEditable
@DomName('RTCPeerConnection.localStreams')
+ @DocsEditable
List<MediaStream> get localStreams native "RTCPeerConnection_localStreams_Getter";
- @DocsEditable
@DomName('RTCPeerConnection.readyState')
+ @DocsEditable
String get readyState native "RTCPeerConnection_readyState_Getter";
- @DocsEditable
@DomName('RTCPeerConnection.remoteDescription')
+ @DocsEditable
RtcSessionDescription get remoteDescription native "RTCPeerConnection_remoteDescription_Getter";
- @DocsEditable
@DomName('RTCPeerConnection.remoteStreams')
+ @DocsEditable
List<MediaStream> get remoteStreams native "RTCPeerConnection_remoteStreams_Getter";
- @DocsEditable
@DomName('RTCPeerConnection.addEventListener')
+ @DocsEditable
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native "RTCPeerConnection_addEventListener_Callback";
- @DocsEditable
@DomName('RTCPeerConnection.addIceCandidate')
+ @DocsEditable
void addIceCandidate(RtcIceCandidate candidate) native "RTCPeerConnection_addIceCandidate_Callback";
- @DocsEditable
@DomName('RTCPeerConnection.addStream')
+ @DocsEditable
void addStream(MediaStream stream, [Map mediaConstraints]) native "RTCPeerConnection_addStream_Callback";
- @DocsEditable
@DomName('RTCPeerConnection.close')
+ @DocsEditable
void close() native "RTCPeerConnection_close_Callback";
- @DocsEditable
@DomName('RTCPeerConnection.createAnswer')
+ @DocsEditable
void createAnswer(RtcSessionDescriptionCallback successCallback, [RtcErrorCallback failureCallback, Map mediaConstraints]) native "RTCPeerConnection_createAnswer_Callback";
- @DocsEditable
@DomName('RTCPeerConnection.createDataChannel')
+ @DocsEditable
RtcDataChannel createDataChannel(String label, [Map options]) native "RTCPeerConnection_createDataChannel_Callback";
- @DocsEditable
@DomName('RTCPeerConnection.createOffer')
+ @DocsEditable
void createOffer(RtcSessionDescriptionCallback successCallback, [RtcErrorCallback failureCallback, Map mediaConstraints]) native "RTCPeerConnection_createOffer_Callback";
- @DocsEditable
@DomName('RTCPeerConnection.dispatchEvent')
- bool $dom_dispatchEvent(Event event) native "RTCPeerConnection_dispatchEvent_Callback";
-
@DocsEditable
+ bool dispatchEvent(Event event) native "RTCPeerConnection_dispatchEvent_Callback";
+
@DomName('RTCPeerConnection.getStats')
+ @DocsEditable
void getStats(RtcStatsCallback successCallback, MediaStreamTrack selector) native "RTCPeerConnection_getStats_Callback";
- @DocsEditable
@DomName('RTCPeerConnection.removeEventListener')
+ @DocsEditable
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native "RTCPeerConnection_removeEventListener_Callback";
- @DocsEditable
@DomName('RTCPeerConnection.removeStream')
+ @DocsEditable
void removeStream(MediaStream stream) native "RTCPeerConnection_removeStream_Callback";
- @DocsEditable
@DomName('RTCPeerConnection.setLocalDescription')
+ @DocsEditable
void setLocalDescription(RtcSessionDescription description, [VoidCallback successCallback, RtcErrorCallback failureCallback]) native "RTCPeerConnection_setLocalDescription_Callback";
- @DocsEditable
@DomName('RTCPeerConnection.setRemoteDescription')
+ @DocsEditable
void setRemoteDescription(RtcSessionDescription description, [VoidCallback successCallback, RtcErrorCallback failureCallback]) native "RTCPeerConnection_setRemoteDescription_Callback";
- @DocsEditable
@DomName('RTCPeerConnection.updateIce')
+ @DocsEditable
void updateIce([Map configuration, Map mediaConstraints]) native "RTCPeerConnection_updateIce_Callback";
+ @DomName('RTCPeerConnection.addstream')
+ @DocsEditable
Stream<MediaStreamEvent> get onAddStream => addStreamEvent.forTarget(this);
+ @DomName('RTCPeerConnection.datachannel')
+ @DocsEditable
Stream<RtcDataChannelEvent> get onDataChannel => dataChannelEvent.forTarget(this);
+ @DomName('RTCPeerConnection.icecandidate')
+ @DocsEditable
Stream<RtcIceCandidateEvent> get onIceCandidate => iceCandidateEvent.forTarget(this);
+ @DomName('RTCPeerConnection.icechange')
+ @DocsEditable
Stream<Event> get onIceChange => iceChangeEvent.forTarget(this);
+ @DomName('RTCPeerConnection.negotiationneeded')
+ @DocsEditable
Stream<Event> get onNegotiationNeeded => negotiationNeededEvent.forTarget(this);
+ @DomName('RTCPeerConnection.open')
+ @DocsEditable
Stream<Event> get onOpen => openEvent.forTarget(this);
+ @DomName('RTCPeerConnection.removestream')
+ @DocsEditable
Stream<MediaStreamEvent> get onRemoveStream => removeStreamEvent.forTarget(this);
+ @DomName('RTCPeerConnection.statechange')
+ @DocsEditable
Stream<Event> get onStateChange => stateChangeEvent.forTarget(this);
}
@DocsEditable
+@deprecated
class RtcPeerConnectionEvents extends Events {
@DocsEditable
RtcPeerConnectionEvents(EventTarget _ptr) : super(_ptr);
@@ -20124,20 +20896,20 @@
factory RtcSessionDescription(Map dictionary) => RtcSessionDescription._create(dictionary);
static RtcSessionDescription _create(Map dictionary) native "RTCSessionDescription_constructor_Callback";
- @DocsEditable
@DomName('RTCSessionDescription.sdp')
+ @DocsEditable
String get sdp native "RTCSessionDescription_sdp_Getter";
- @DocsEditable
@DomName('RTCSessionDescription.sdp')
+ @DocsEditable
void set sdp(String value) native "RTCSessionDescription_sdp_Setter";
- @DocsEditable
@DomName('RTCSessionDescription.type')
+ @DocsEditable
String get type native "RTCSessionDescription_type_Getter";
- @DocsEditable
@DomName('RTCSessionDescription.type')
+ @DocsEditable
void set type(String value) native "RTCSessionDescription_type_Setter";
}
@@ -20153,16 +20925,16 @@
class RtcStatsElement extends NativeFieldWrapperClass1 {
RtcStatsElement.internal();
- @DocsEditable
@DomName('RTCStatsElement.timestamp')
+ @DocsEditable
Date get timestamp native "RTCStatsElement_timestamp_Getter";
- @DocsEditable
@DomName('RTCStatsElement.names')
+ @DocsEditable
List<String> names() native "RTCStatsElement_names_Callback";
- @DocsEditable
@DomName('RTCStatsElement.stat')
+ @DocsEditable
String stat(String name) native "RTCStatsElement_stat_Callback";
}
@@ -20178,12 +20950,12 @@
class RtcStatsReport extends NativeFieldWrapperClass1 {
RtcStatsReport.internal();
- @DocsEditable
@DomName('RTCStatsReport.local')
+ @DocsEditable
RtcStatsElement get local native "RTCStatsReport_local_Getter";
- @DocsEditable
@DomName('RTCStatsReport.remote')
+ @DocsEditable
RtcStatsElement get remote native "RTCStatsReport_remote_Getter";
}
@@ -20199,8 +20971,8 @@
class RtcStatsResponse extends NativeFieldWrapperClass1 {
RtcStatsResponse.internal();
- @DocsEditable
@DomName('RTCStatsResponse.result')
+ @DocsEditable
List<RtcStatsReport> result() native "RTCStatsResponse_result_Callback";
}
@@ -20256,36 +21028,36 @@
class Screen extends NativeFieldWrapperClass1 {
Screen.internal();
- @DocsEditable
@DomName('Screen.availHeight')
+ @DocsEditable
int get availHeight native "Screen_availHeight_Getter";
- @DocsEditable
@DomName('Screen.availLeft')
+ @DocsEditable
int get availLeft native "Screen_availLeft_Getter";
- @DocsEditable
@DomName('Screen.availTop')
+ @DocsEditable
int get availTop native "Screen_availTop_Getter";
- @DocsEditable
@DomName('Screen.availWidth')
+ @DocsEditable
int get availWidth native "Screen_availWidth_Getter";
- @DocsEditable
@DomName('Screen.colorDepth')
+ @DocsEditable
int get colorDepth native "Screen_colorDepth_Getter";
- @DocsEditable
@DomName('Screen.height')
+ @DocsEditable
int get height native "Screen_height_Getter";
- @DocsEditable
@DomName('Screen.pixelDepth')
+ @DocsEditable
int get pixelDepth native "Screen_pixelDepth_Getter";
- @DocsEditable
@DomName('Screen.width')
+ @DocsEditable
int get width native "Screen_width_Getter";
}
@@ -20304,68 +21076,68 @@
@DocsEditable
factory ScriptElement() => document.$dom_createElement("script");
- @DocsEditable
@DomName('HTMLScriptElement.async')
+ @DocsEditable
bool get async native "HTMLScriptElement_async_Getter";
- @DocsEditable
@DomName('HTMLScriptElement.async')
+ @DocsEditable
void set async(bool value) native "HTMLScriptElement_async_Setter";
- @DocsEditable
@DomName('HTMLScriptElement.charset')
+ @DocsEditable
String get charset native "HTMLScriptElement_charset_Getter";
- @DocsEditable
@DomName('HTMLScriptElement.charset')
+ @DocsEditable
void set charset(String value) native "HTMLScriptElement_charset_Setter";
- @DocsEditable
@DomName('HTMLScriptElement.crossOrigin')
+ @DocsEditable
String get crossOrigin native "HTMLScriptElement_crossOrigin_Getter";
- @DocsEditable
@DomName('HTMLScriptElement.crossOrigin')
+ @DocsEditable
void set crossOrigin(String value) native "HTMLScriptElement_crossOrigin_Setter";
- @DocsEditable
@DomName('HTMLScriptElement.defer')
+ @DocsEditable
bool get defer native "HTMLScriptElement_defer_Getter";
- @DocsEditable
@DomName('HTMLScriptElement.defer')
+ @DocsEditable
void set defer(bool value) native "HTMLScriptElement_defer_Setter";
- @DocsEditable
@DomName('HTMLScriptElement.event')
+ @DocsEditable
String get event native "HTMLScriptElement_event_Getter";
- @DocsEditable
@DomName('HTMLScriptElement.event')
+ @DocsEditable
void set event(String value) native "HTMLScriptElement_event_Setter";
- @DocsEditable
@DomName('HTMLScriptElement.htmlFor')
+ @DocsEditable
String get htmlFor native "HTMLScriptElement_htmlFor_Getter";
- @DocsEditable
@DomName('HTMLScriptElement.htmlFor')
+ @DocsEditable
void set htmlFor(String value) native "HTMLScriptElement_htmlFor_Setter";
- @DocsEditable
@DomName('HTMLScriptElement.src')
+ @DocsEditable
String get src native "HTMLScriptElement_src_Getter";
- @DocsEditable
@DomName('HTMLScriptElement.src')
+ @DocsEditable
void set src(String value) native "HTMLScriptElement_src_Setter";
- @DocsEditable
@DomName('HTMLScriptElement.type')
+ @DocsEditable
String get type native "HTMLScriptElement_type_Getter";
- @DocsEditable
@DomName('HTMLScriptElement.type')
+ @DocsEditable
void set type(String value) native "HTMLScriptElement_type_Setter";
}
@@ -20381,20 +21153,20 @@
class ScriptProfile extends NativeFieldWrapperClass1 {
ScriptProfile.internal();
- @DocsEditable
@DomName('ScriptProfile.head')
+ @DocsEditable
ScriptProfileNode get head native "ScriptProfile_head_Getter";
- @DocsEditable
@DomName('ScriptProfile.idleTime')
+ @DocsEditable
num get idleTime native "ScriptProfile_idleTime_Getter";
- @DocsEditable
@DomName('ScriptProfile.title')
+ @DocsEditable
String get title native "ScriptProfile_title_Getter";
- @DocsEditable
@DomName('ScriptProfile.uid')
+ @DocsEditable
int get uid native "ScriptProfile_uid_Getter";
}
@@ -20410,40 +21182,40 @@
class ScriptProfileNode extends NativeFieldWrapperClass1 {
ScriptProfileNode.internal();
- @DocsEditable
@DomName('ScriptProfileNode.callUID')
+ @DocsEditable
int get callUid native "ScriptProfileNode_callUID_Getter";
- @DocsEditable
@DomName('ScriptProfileNode.functionName')
+ @DocsEditable
String get functionName native "ScriptProfileNode_functionName_Getter";
- @DocsEditable
@DomName('ScriptProfileNode.lineNumber')
+ @DocsEditable
int get lineNumber native "ScriptProfileNode_lineNumber_Getter";
- @DocsEditable
@DomName('ScriptProfileNode.numberOfCalls')
+ @DocsEditable
int get numberOfCalls native "ScriptProfileNode_numberOfCalls_Getter";
- @DocsEditable
@DomName('ScriptProfileNode.selfTime')
+ @DocsEditable
num get selfTime native "ScriptProfileNode_selfTime_Getter";
- @DocsEditable
@DomName('ScriptProfileNode.totalTime')
+ @DocsEditable
num get totalTime native "ScriptProfileNode_totalTime_Getter";
- @DocsEditable
@DomName('ScriptProfileNode.url')
+ @DocsEditable
String get url native "ScriptProfileNode_url_Getter";
- @DocsEditable
@DomName('ScriptProfileNode.visible')
+ @DocsEditable
bool get visible native "ScriptProfileNode_visible_Getter";
- @DocsEditable
@DomName('ScriptProfileNode.children')
+ @DocsEditable
List<ScriptProfileNode> children() native "ScriptProfileNode_children_Callback";
}
@@ -20452,7 +21224,6 @@
// BSD-style license that can be found in the LICENSE file.
-@DocsEditable
@DomName('HTMLSelectElement')
class SelectElement extends _Element_Merged {
SelectElement.internal() : super.internal();
@@ -20460,116 +21231,116 @@
@DocsEditable
factory SelectElement() => document.$dom_createElement("select");
- @DocsEditable
@DomName('HTMLSelectElement.autofocus')
+ @DocsEditable
bool get autofocus native "HTMLSelectElement_autofocus_Getter";
- @DocsEditable
@DomName('HTMLSelectElement.autofocus')
+ @DocsEditable
void set autofocus(bool value) native "HTMLSelectElement_autofocus_Setter";
- @DocsEditable
@DomName('HTMLSelectElement.disabled')
+ @DocsEditable
bool get disabled native "HTMLSelectElement_disabled_Getter";
- @DocsEditable
@DomName('HTMLSelectElement.disabled')
+ @DocsEditable
void set disabled(bool value) native "HTMLSelectElement_disabled_Setter";
- @DocsEditable
@DomName('HTMLSelectElement.form')
+ @DocsEditable
FormElement get form native "HTMLSelectElement_form_Getter";
- @DocsEditable
@DomName('HTMLSelectElement.labels')
+ @DocsEditable
List<Node> get labels native "HTMLSelectElement_labels_Getter";
- @DocsEditable
@DomName('HTMLSelectElement.length')
+ @DocsEditable
int get length native "HTMLSelectElement_length_Getter";
- @DocsEditable
@DomName('HTMLSelectElement.length')
+ @DocsEditable
void set length(int value) native "HTMLSelectElement_length_Setter";
- @DocsEditable
@DomName('HTMLSelectElement.multiple')
+ @DocsEditable
bool get multiple native "HTMLSelectElement_multiple_Getter";
- @DocsEditable
@DomName('HTMLSelectElement.multiple')
+ @DocsEditable
void set multiple(bool value) native "HTMLSelectElement_multiple_Setter";
- @DocsEditable
@DomName('HTMLSelectElement.name')
+ @DocsEditable
String get name native "HTMLSelectElement_name_Getter";
- @DocsEditable
@DomName('HTMLSelectElement.name')
+ @DocsEditable
void set name(String value) native "HTMLSelectElement_name_Setter";
- @DocsEditable
@DomName('HTMLSelectElement.required')
+ @DocsEditable
bool get required native "HTMLSelectElement_required_Getter";
- @DocsEditable
@DomName('HTMLSelectElement.required')
+ @DocsEditable
void set required(bool value) native "HTMLSelectElement_required_Setter";
- @DocsEditable
@DomName('HTMLSelectElement.selectedIndex')
+ @DocsEditable
int get selectedIndex native "HTMLSelectElement_selectedIndex_Getter";
- @DocsEditable
@DomName('HTMLSelectElement.selectedIndex')
+ @DocsEditable
void set selectedIndex(int value) native "HTMLSelectElement_selectedIndex_Setter";
- @DocsEditable
@DomName('HTMLSelectElement.size')
+ @DocsEditable
int get size native "HTMLSelectElement_size_Getter";
- @DocsEditable
@DomName('HTMLSelectElement.size')
+ @DocsEditable
void set size(int value) native "HTMLSelectElement_size_Setter";
- @DocsEditable
@DomName('HTMLSelectElement.type')
+ @DocsEditable
String get type native "HTMLSelectElement_type_Getter";
- @DocsEditable
@DomName('HTMLSelectElement.validationMessage')
+ @DocsEditable
String get validationMessage native "HTMLSelectElement_validationMessage_Getter";
- @DocsEditable
@DomName('HTMLSelectElement.validity')
+ @DocsEditable
ValidityState get validity native "HTMLSelectElement_validity_Getter";
- @DocsEditable
@DomName('HTMLSelectElement.value')
+ @DocsEditable
String get value native "HTMLSelectElement_value_Getter";
- @DocsEditable
@DomName('HTMLSelectElement.value')
+ @DocsEditable
void set value(String value) native "HTMLSelectElement_value_Setter";
- @DocsEditable
@DomName('HTMLSelectElement.willValidate')
+ @DocsEditable
bool get willValidate native "HTMLSelectElement_willValidate_Getter";
- @DocsEditable
@DomName('HTMLSelectElement.checkValidity')
+ @DocsEditable
bool checkValidity() native "HTMLSelectElement_checkValidity_Callback";
- @DocsEditable
@DomName('HTMLSelectElement.item')
+ @DocsEditable
Node item(int index) native "HTMLSelectElement_item_Callback";
- @DocsEditable
@DomName('HTMLSelectElement.namedItem')
+ @DocsEditable
Node namedItem(String name) native "HTMLSelectElement_namedItem_Callback";
- @DocsEditable
@DomName('HTMLSelectElement.setCustomValidity')
+ @DocsEditable
void setCustomValidity(String error) native "HTMLSelectElement_setCustomValidity_Callback";
@@ -20577,14 +21348,16 @@
// does not operate as a List.
List<OptionElement> get options {
var options = this.children.where((e) => e is OptionElement).toList();
- return new ListView(options, 0, options.length);
+ // TODO(floitsch): find better way to create a read-only list view.
+ return options.take(options.length);
}
List<OptionElement> get selectedOptions {
// IE does not change the selected flag for single-selection items.
if (this.multiple) {
var options = this.options.where((o) => o.selected).toList();
- return new ListView(options, 0, options.length);
+ // TODO(floitsch): find better way to create a read-only list view.
+ return options.take(options.length);
} else {
return [this.options[this.selectedIndex]];
}
@@ -20600,23 +21373,23 @@
@DocsEditable
@DomName('HTMLShadowElement')
@SupportedBrowser(SupportedBrowser.CHROME, '25')
-@Experimental()
+@Experimental
class ShadowElement extends _Element_Merged {
ShadowElement.internal() : super.internal();
/// Checks if this type is supported on the current platform.
static bool get supported => true;
- @DocsEditable
@DomName('HTMLShadowElement.olderShadowRoot')
+ @DocsEditable
ShadowRoot get olderShadowRoot native "HTMLShadowElement_olderShadowRoot_Getter";
- @DocsEditable
@DomName('HTMLShadowElement.resetStyleInheritance')
+ @DocsEditable
bool get resetStyleInheritance native "HTMLShadowElement_resetStyleInheritance_Getter";
- @DocsEditable
@DomName('HTMLShadowElement.resetStyleInheritance')
+ @DocsEditable
void set resetStyleInheritance(bool value) native "HTMLShadowElement_resetStyleInheritance_Setter";
}
@@ -20627,63 +21400,62 @@
// WARNING: Do not edit - generated code.
-@DocsEditable
@DomName('ShadowRoot')
@SupportedBrowser(SupportedBrowser.CHROME, '25')
-@Experimental()
+@Experimental
class ShadowRoot extends DocumentFragment {
ShadowRoot.internal() : super.internal();
- @DocsEditable
@DomName('ShadowRoot.activeElement')
+ @DocsEditable
Element get activeElement native "ShadowRoot_activeElement_Getter";
- @DocsEditable
@DomName('ShadowRoot.applyAuthorStyles')
+ @DocsEditable
bool get applyAuthorStyles native "ShadowRoot_applyAuthorStyles_Getter";
- @DocsEditable
@DomName('ShadowRoot.applyAuthorStyles')
+ @DocsEditable
void set applyAuthorStyles(bool value) native "ShadowRoot_applyAuthorStyles_Setter";
- @DocsEditable
@DomName('ShadowRoot.innerHTML')
+ @DocsEditable
String get innerHtml native "ShadowRoot_innerHTML_Getter";
- @DocsEditable
@DomName('ShadowRoot.innerHTML')
+ @DocsEditable
void set innerHtml(String value) native "ShadowRoot_innerHTML_Setter";
- @DocsEditable
@DomName('ShadowRoot.resetStyleInheritance')
+ @DocsEditable
bool get resetStyleInheritance native "ShadowRoot_resetStyleInheritance_Getter";
- @DocsEditable
@DomName('ShadowRoot.resetStyleInheritance')
+ @DocsEditable
void set resetStyleInheritance(bool value) native "ShadowRoot_resetStyleInheritance_Setter";
- @DocsEditable
@DomName('ShadowRoot.cloneNode')
+ @DocsEditable
Node clone(bool deep) native "ShadowRoot_cloneNode_Callback";
- @DocsEditable
@DomName('ShadowRoot.elementFromPoint')
+ @DocsEditable
Element elementFromPoint(int x, int y) native "ShadowRoot_elementFromPoint_Callback";
- @DocsEditable
@DomName('ShadowRoot.getElementById')
+ @DocsEditable
Element $dom_getElementById(String elementId) native "ShadowRoot_getElementById_Callback";
- @DocsEditable
@DomName('ShadowRoot.getElementsByClassName')
+ @DocsEditable
List<Node> $dom_getElementsByClassName(String className) native "ShadowRoot_getElementsByClassName_Callback";
- @DocsEditable
@DomName('ShadowRoot.getElementsByTagName')
+ @DocsEditable
List<Node> $dom_getElementsByTagName(String tagName) native "ShadowRoot_getElementsByTagName_Callback";
- @DocsEditable
@DomName('ShadowRoot.getSelection')
+ @DocsEditable
DomSelection getSelection() native "ShadowRoot_getSelection_Callback";
static bool get supported => _Utils.shadowRootSupported(window.document);
@@ -20709,8 +21481,8 @@
}
static SharedWorker _create(String scriptURL, [String name]) native "SharedWorker_constructor_Callback";
- @DocsEditable
@DomName('SharedWorker.port')
+ @DocsEditable
MessagePort get port native "SharedWorker_port_Getter";
}
@@ -20726,22 +21498,28 @@
class SharedWorkerContext extends WorkerContext {
SharedWorkerContext.internal() : super.internal();
+ @DomName('SharedWorkerContext.connect')
+ @DocsEditable
static const EventStreamProvider<Event> connectEvent = const EventStreamProvider<Event>('connect');
@DocsEditable
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
+ @deprecated
SharedWorkerContextEvents get on =>
new SharedWorkerContextEvents(this);
- @DocsEditable
@DomName('SharedWorkerContext.name')
+ @DocsEditable
String get name native "SharedWorkerContext_name_Getter";
+ @DomName('SharedWorkerContext.connect')
+ @DocsEditable
Stream<Event> get onConnect => connectEvent.forTarget(this);
}
@DocsEditable
+@deprecated
class SharedWorkerContextEvents extends WorkerContextEvents {
@DocsEditable
SharedWorkerContextEvents(EventTarget _ptr) : super(_ptr);
@@ -20761,24 +21539,24 @@
class SourceBuffer extends NativeFieldWrapperClass1 {
SourceBuffer.internal();
- @DocsEditable
@DomName('SourceBuffer.buffered')
+ @DocsEditable
TimeRanges get buffered native "SourceBuffer_buffered_Getter";
- @DocsEditable
@DomName('SourceBuffer.timestampOffset')
+ @DocsEditable
num get timestampOffset native "SourceBuffer_timestampOffset_Getter";
- @DocsEditable
@DomName('SourceBuffer.timestampOffset')
+ @DocsEditable
void set timestampOffset(num value) native "SourceBuffer_timestampOffset_Setter";
- @DocsEditable
@DomName('SourceBuffer.abort')
+ @DocsEditable
void abort() native "SourceBuffer_abort_Callback";
- @DocsEditable
@DomName('SourceBuffer.append')
+ @DocsEditable
void append(Uint8Array data) native "SourceBuffer_append_Callback";
}
@@ -20794,8 +21572,8 @@
class SourceBufferList extends EventTarget implements List<SourceBuffer> {
SourceBufferList.internal() : super.internal();
- @DocsEditable
@DomName('SourceBufferList.length')
+ @DocsEditable
int get length native "SourceBufferList_length_Getter";
SourceBuffer operator[](int index) native "SourceBufferList_item_Callback";
@@ -20823,11 +21601,13 @@
void forEach(void f(SourceBuffer element)) => IterableMixinWorkaround.forEach(this, f);
- String join([String separator]) => IterableMixinWorkaround.joinList(this, separator);
+ String join([String separator]) =>
+ IterableMixinWorkaround.joinList(this, separator);
List mappedBy(f(SourceBuffer element)) => IterableMixinWorkaround.mappedByList(this, f);
- Iterable<SourceBuffer> where(bool f(SourceBuffer element)) => IterableMixinWorkaround.where(this, f);
+ Iterable<SourceBuffer> where(bool f(SourceBuffer element)) =>
+ IterableMixinWorkaround.where(this, f);
bool every(bool f(SourceBuffer element)) => IterableMixinWorkaround.every(this, f);
@@ -20889,6 +21669,9 @@
throw new UnsupportedError("Cannot clear immutable List.");
}
+ List<SourceBuffer> get reversed =>
+ new ReversedListView<SourceBuffer>(this, 0, null);
+
void sort([int compare(SourceBuffer a, SourceBuffer b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -20917,9 +21700,11 @@
throw new StateError("More than one element");
}
- SourceBuffer min([int compare(SourceBuffer a, SourceBuffer b)]) => IterableMixinWorkaround.min(this, compare);
+ SourceBuffer min([int compare(SourceBuffer a, SourceBuffer b)]) =>
+ IterableMixinWorkaround.min(this, compare);
- SourceBuffer max([int compare(SourceBuffer a, SourceBuffer b)]) => IterableMixinWorkaround.max(this, compare);
+ SourceBuffer max([int compare(SourceBuffer a, SourceBuffer b)]) =>
+ IterableMixinWorkaround.max(this, compare);
SourceBuffer removeAt(int pos) {
throw new UnsupportedError("Cannot remove from immutable List.");
@@ -20966,20 +21751,20 @@
// -- end List<SourceBuffer> mixins.
- @DocsEditable
@DomName('SourceBufferList.addEventListener')
+ @DocsEditable
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native "SourceBufferList_addEventListener_Callback";
- @DocsEditable
@DomName('SourceBufferList.dispatchEvent')
- bool $dom_dispatchEvent(Event event) native "SourceBufferList_dispatchEvent_Callback";
-
@DocsEditable
+ bool dispatchEvent(Event event) native "SourceBufferList_dispatchEvent_Callback";
+
@DomName('SourceBufferList.item')
+ @DocsEditable
SourceBuffer item(int index) native "SourceBufferList_item_Callback";
- @DocsEditable
@DomName('SourceBufferList.removeEventListener')
+ @DocsEditable
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native "SourceBufferList_removeEventListener_Callback";
}
@@ -20998,28 +21783,28 @@
@DocsEditable
factory SourceElement() => document.$dom_createElement("source");
- @DocsEditable
@DomName('HTMLSourceElement.media')
+ @DocsEditable
String get media native "HTMLSourceElement_media_Getter";
- @DocsEditable
@DomName('HTMLSourceElement.media')
+ @DocsEditable
void set media(String value) native "HTMLSourceElement_media_Setter";
- @DocsEditable
@DomName('HTMLSourceElement.src')
+ @DocsEditable
String get src native "HTMLSourceElement_src_Getter";
- @DocsEditable
@DomName('HTMLSourceElement.src')
+ @DocsEditable
void set src(String value) native "HTMLSourceElement_src_Setter";
- @DocsEditable
@DomName('HTMLSourceElement.type')
+ @DocsEditable
String get type native "HTMLSourceElement_type_Getter";
- @DocsEditable
@DomName('HTMLSourceElement.type')
+ @DocsEditable
void set type(String value) native "HTMLSourceElement_type_Setter";
}
@@ -21055,20 +21840,20 @@
factory SpeechGrammar() => SpeechGrammar._create();
static SpeechGrammar _create() native "SpeechGrammar_constructor_Callback";
- @DocsEditable
@DomName('SpeechGrammar.src')
+ @DocsEditable
String get src native "SpeechGrammar_src_Getter";
- @DocsEditable
@DomName('SpeechGrammar.src')
+ @DocsEditable
void set src(String value) native "SpeechGrammar_src_Setter";
- @DocsEditable
@DomName('SpeechGrammar.weight')
+ @DocsEditable
num get weight native "SpeechGrammar_weight_Getter";
- @DocsEditable
@DomName('SpeechGrammar.weight')
+ @DocsEditable
void set weight(num value) native "SpeechGrammar_weight_Setter";
}
@@ -21088,8 +21873,8 @@
factory SpeechGrammarList() => SpeechGrammarList._create();
static SpeechGrammarList _create() native "SpeechGrammarList_constructor_Callback";
- @DocsEditable
@DomName('SpeechGrammarList.length')
+ @DocsEditable
int get length native "SpeechGrammarList_length_Getter";
SpeechGrammar operator[](int index) native "SpeechGrammarList_item_Callback";
@@ -21117,11 +21902,13 @@
void forEach(void f(SpeechGrammar element)) => IterableMixinWorkaround.forEach(this, f);
- String join([String separator]) => IterableMixinWorkaround.joinList(this, separator);
+ String join([String separator]) =>
+ IterableMixinWorkaround.joinList(this, separator);
List mappedBy(f(SpeechGrammar element)) => IterableMixinWorkaround.mappedByList(this, f);
- Iterable<SpeechGrammar> where(bool f(SpeechGrammar element)) => IterableMixinWorkaround.where(this, f);
+ Iterable<SpeechGrammar> where(bool f(SpeechGrammar element)) =>
+ IterableMixinWorkaround.where(this, f);
bool every(bool f(SpeechGrammar element)) => IterableMixinWorkaround.every(this, f);
@@ -21183,6 +21970,9 @@
throw new UnsupportedError("Cannot clear immutable List.");
}
+ List<SpeechGrammar> get reversed =>
+ new ReversedListView<SpeechGrammar>(this, 0, null);
+
void sort([int compare(SpeechGrammar a, SpeechGrammar b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -21211,9 +22001,11 @@
throw new StateError("More than one element");
}
- SpeechGrammar min([int compare(SpeechGrammar a, SpeechGrammar b)]) => IterableMixinWorkaround.min(this, compare);
+ SpeechGrammar min([int compare(SpeechGrammar a, SpeechGrammar b)]) =>
+ IterableMixinWorkaround.min(this, compare);
- SpeechGrammar max([int compare(SpeechGrammar a, SpeechGrammar b)]) => IterableMixinWorkaround.max(this, compare);
+ SpeechGrammar max([int compare(SpeechGrammar a, SpeechGrammar b)]) =>
+ IterableMixinWorkaround.max(this, compare);
SpeechGrammar removeAt(int pos) {
throw new UnsupportedError("Cannot remove from immutable List.");
@@ -21266,15 +22058,16 @@
return;
}
_addFromString_2(string);
+ return;
}
+ @DomName('SpeechGrammarList._addFromString_1')
@DocsEditable
- @DomName('SpeechGrammarList.addFromString_1')
- void _addFromString_1(string, weight) native "SpeechGrammarList_addFromString_1_Callback";
+ void _addFromString_1(string, weight) native "SpeechGrammarList__addFromString_1_Callback";
+ @DomName('SpeechGrammarList._addFromString_2')
@DocsEditable
- @DomName('SpeechGrammarList.addFromString_2')
- void _addFromString_2(string) native "SpeechGrammarList_addFromString_2_Callback";
+ void _addFromString_2(string) native "SpeechGrammarList__addFromString_2_Callback";
void addFromUri(String src, [num weight]) {
if (?weight) {
@@ -21282,18 +22075,19 @@
return;
}
_addFromUri_2(src);
+ return;
}
+ @DomName('SpeechGrammarList._addFromUri_1')
@DocsEditable
- @DomName('SpeechGrammarList.addFromUri_1')
- void _addFromUri_1(src, weight) native "SpeechGrammarList_addFromUri_1_Callback";
+ void _addFromUri_1(src, weight) native "SpeechGrammarList__addFromUri_1_Callback";
+ @DomName('SpeechGrammarList._addFromUri_2')
@DocsEditable
- @DomName('SpeechGrammarList.addFromUri_2')
- void _addFromUri_2(src) native "SpeechGrammarList_addFromUri_2_Callback";
+ void _addFromUri_2(src) native "SpeechGrammarList__addFromUri_2_Callback";
- @DocsEditable
@DomName('SpeechGrammarList.item')
+ @DocsEditable
SpeechGrammar item(int index) native "SpeechGrammarList_item_Callback";
}
@@ -21309,8 +22103,8 @@
class SpeechInputEvent extends Event {
SpeechInputEvent.internal() : super.internal();
- @DocsEditable
@DomName('SpeechInputEvent.results')
+ @DocsEditable
List<SpeechInputResult> get results native "SpeechInputEvent_results_Getter";
}
@@ -21326,12 +22120,12 @@
class SpeechInputResult extends NativeFieldWrapperClass1 {
SpeechInputResult.internal();
- @DocsEditable
@DomName('SpeechInputResult.confidence')
+ @DocsEditable
num get confidence native "SpeechInputResult_confidence_Getter";
- @DocsEditable
@DomName('SpeechInputResult.utterance')
+ @DocsEditable
String get utterance native "SpeechInputResult_utterance_Getter";
}
@@ -21344,129 +22138,180 @@
@DocsEditable
@DomName('SpeechRecognition')
+@SupportedBrowser(SupportedBrowser.CHROME, '25')
+@Experimental
class SpeechRecognition extends EventTarget {
SpeechRecognition.internal() : super.internal();
+ @DomName('SpeechRecognition.audioend')
+ @DocsEditable
static const EventStreamProvider<Event> audioEndEvent = const EventStreamProvider<Event>('audioend');
+ @DomName('SpeechRecognition.audiostart')
+ @DocsEditable
static const EventStreamProvider<Event> audioStartEvent = const EventStreamProvider<Event>('audiostart');
+ @DomName('SpeechRecognition.end')
+ @DocsEditable
static const EventStreamProvider<Event> endEvent = const EventStreamProvider<Event>('end');
+ @DomName('SpeechRecognition.error')
+ @DocsEditable
static const EventStreamProvider<SpeechRecognitionError> errorEvent = const EventStreamProvider<SpeechRecognitionError>('error');
+ @DomName('SpeechRecognition.nomatch')
+ @DocsEditable
static const EventStreamProvider<SpeechRecognitionEvent> noMatchEvent = const EventStreamProvider<SpeechRecognitionEvent>('nomatch');
+ @DomName('SpeechRecognition.result')
+ @DocsEditable
static const EventStreamProvider<SpeechRecognitionEvent> resultEvent = const EventStreamProvider<SpeechRecognitionEvent>('result');
+ @DomName('SpeechRecognition.soundend')
+ @DocsEditable
static const EventStreamProvider<Event> soundEndEvent = const EventStreamProvider<Event>('soundend');
+ @DomName('SpeechRecognition.soundstart')
+ @DocsEditable
static const EventStreamProvider<Event> soundStartEvent = const EventStreamProvider<Event>('soundstart');
+ @DomName('SpeechRecognition.speechend')
+ @DocsEditable
static const EventStreamProvider<Event> speechEndEvent = const EventStreamProvider<Event>('speechend');
+ @DomName('SpeechRecognition.speechstart')
+ @DocsEditable
static const EventStreamProvider<Event> speechStartEvent = const EventStreamProvider<Event>('speechstart');
+ @DomName('SpeechRecognition.start')
+ @DocsEditable
static const EventStreamProvider<Event> startEvent = const EventStreamProvider<Event>('start');
@DocsEditable
factory SpeechRecognition() => SpeechRecognition._create();
static SpeechRecognition _create() native "SpeechRecognition_constructor_Callback";
+ /// Checks if this type is supported on the current platform.
+ static bool get supported => true;
+
@DocsEditable
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
+ @deprecated
SpeechRecognitionEvents get on =>
new SpeechRecognitionEvents(this);
- @DocsEditable
@DomName('SpeechRecognition.continuous')
+ @DocsEditable
bool get continuous native "SpeechRecognition_continuous_Getter";
- @DocsEditable
@DomName('SpeechRecognition.continuous')
+ @DocsEditable
void set continuous(bool value) native "SpeechRecognition_continuous_Setter";
- @DocsEditable
@DomName('SpeechRecognition.grammars')
+ @DocsEditable
SpeechGrammarList get grammars native "SpeechRecognition_grammars_Getter";
- @DocsEditable
@DomName('SpeechRecognition.grammars')
+ @DocsEditable
void set grammars(SpeechGrammarList value) native "SpeechRecognition_grammars_Setter";
- @DocsEditable
@DomName('SpeechRecognition.interimResults')
+ @DocsEditable
bool get interimResults native "SpeechRecognition_interimResults_Getter";
- @DocsEditable
@DomName('SpeechRecognition.interimResults')
+ @DocsEditable
void set interimResults(bool value) native "SpeechRecognition_interimResults_Setter";
- @DocsEditable
@DomName('SpeechRecognition.lang')
+ @DocsEditable
String get lang native "SpeechRecognition_lang_Getter";
- @DocsEditable
@DomName('SpeechRecognition.lang')
+ @DocsEditable
void set lang(String value) native "SpeechRecognition_lang_Setter";
- @DocsEditable
@DomName('SpeechRecognition.maxAlternatives')
+ @DocsEditable
int get maxAlternatives native "SpeechRecognition_maxAlternatives_Getter";
- @DocsEditable
@DomName('SpeechRecognition.maxAlternatives')
+ @DocsEditable
void set maxAlternatives(int value) native "SpeechRecognition_maxAlternatives_Setter";
- @DocsEditable
@DomName('SpeechRecognition.abort')
+ @DocsEditable
void abort() native "SpeechRecognition_abort_Callback";
- @DocsEditable
@DomName('SpeechRecognition.addEventListener')
+ @DocsEditable
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native "SpeechRecognition_addEventListener_Callback";
- @DocsEditable
@DomName('SpeechRecognition.dispatchEvent')
- bool $dom_dispatchEvent(Event evt) native "SpeechRecognition_dispatchEvent_Callback";
-
@DocsEditable
+ bool dispatchEvent(Event evt) native "SpeechRecognition_dispatchEvent_Callback";
+
@DomName('SpeechRecognition.removeEventListener')
+ @DocsEditable
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native "SpeechRecognition_removeEventListener_Callback";
- @DocsEditable
@DomName('SpeechRecognition.start')
+ @DocsEditable
void start() native "SpeechRecognition_start_Callback";
- @DocsEditable
@DomName('SpeechRecognition.stop')
+ @DocsEditable
void stop() native "SpeechRecognition_stop_Callback";
+ @DomName('SpeechRecognition.audioend')
+ @DocsEditable
Stream<Event> get onAudioEnd => audioEndEvent.forTarget(this);
+ @DomName('SpeechRecognition.audiostart')
+ @DocsEditable
Stream<Event> get onAudioStart => audioStartEvent.forTarget(this);
+ @DomName('SpeechRecognition.end')
+ @DocsEditable
Stream<Event> get onEnd => endEvent.forTarget(this);
+ @DomName('SpeechRecognition.error')
+ @DocsEditable
Stream<SpeechRecognitionError> get onError => errorEvent.forTarget(this);
+ @DomName('SpeechRecognition.nomatch')
+ @DocsEditable
Stream<SpeechRecognitionEvent> get onNoMatch => noMatchEvent.forTarget(this);
+ @DomName('SpeechRecognition.result')
+ @DocsEditable
Stream<SpeechRecognitionEvent> get onResult => resultEvent.forTarget(this);
+ @DomName('SpeechRecognition.soundend')
+ @DocsEditable
Stream<Event> get onSoundEnd => soundEndEvent.forTarget(this);
+ @DomName('SpeechRecognition.soundstart')
+ @DocsEditable
Stream<Event> get onSoundStart => soundStartEvent.forTarget(this);
+ @DomName('SpeechRecognition.speechend')
+ @DocsEditable
Stream<Event> get onSpeechEnd => speechEndEvent.forTarget(this);
+ @DomName('SpeechRecognition.speechstart')
+ @DocsEditable
Stream<Event> get onSpeechStart => speechStartEvent.forTarget(this);
+ @DomName('SpeechRecognition.start')
+ @DocsEditable
Stream<Event> get onStart => startEvent.forTarget(this);
}
@DocsEditable
+@deprecated
class SpeechRecognitionEvents extends Events {
@DocsEditable
SpeechRecognitionEvents(EventTarget _ptr) : super(_ptr);
@@ -21513,15 +22358,17 @@
@DocsEditable
@DomName('SpeechRecognitionAlternative')
+@SupportedBrowser(SupportedBrowser.CHROME, '25')
+@Experimental
class SpeechRecognitionAlternative extends NativeFieldWrapperClass1 {
SpeechRecognitionAlternative.internal();
- @DocsEditable
@DomName('SpeechRecognitionAlternative.confidence')
+ @DocsEditable
num get confidence native "SpeechRecognitionAlternative_confidence_Getter";
- @DocsEditable
@DomName('SpeechRecognitionAlternative.transcript')
+ @DocsEditable
String get transcript native "SpeechRecognitionAlternative_transcript_Getter";
}
@@ -21534,15 +22381,17 @@
@DocsEditable
@DomName('SpeechRecognitionError')
+@SupportedBrowser(SupportedBrowser.CHROME, '25')
+@Experimental
class SpeechRecognitionError extends Event {
SpeechRecognitionError.internal() : super.internal();
- @DocsEditable
@DomName('SpeechRecognitionError.error')
+ @DocsEditable
String get error native "SpeechRecognitionError_error_Getter";
- @DocsEditable
@DomName('SpeechRecognitionError.message')
+ @DocsEditable
String get message native "SpeechRecognitionError_message_Getter";
}
@@ -21555,23 +22404,25 @@
@DocsEditable
@DomName('SpeechRecognitionEvent')
+@SupportedBrowser(SupportedBrowser.CHROME, '25')
+@Experimental
class SpeechRecognitionEvent extends Event {
SpeechRecognitionEvent.internal() : super.internal();
- @DocsEditable
@DomName('SpeechRecognitionEvent.result')
+ @DocsEditable
SpeechRecognitionResult get result native "SpeechRecognitionEvent_result_Getter";
- @DocsEditable
@DomName('SpeechRecognitionEvent.resultHistory')
+ @DocsEditable
List<SpeechRecognitionResult> get resultHistory native "SpeechRecognitionEvent_resultHistory_Getter";
- @DocsEditable
@DomName('SpeechRecognitionEvent.resultIndex')
+ @DocsEditable
int get resultIndex native "SpeechRecognitionEvent_resultIndex_Getter";
- @DocsEditable
@DomName('SpeechRecognitionEvent.results')
+ @DocsEditable
List<SpeechRecognitionResult> get results native "SpeechRecognitionEvent_results_Getter";
}
@@ -21584,19 +22435,21 @@
@DocsEditable
@DomName('SpeechRecognitionResult')
+@SupportedBrowser(SupportedBrowser.CHROME, '25')
+@Experimental
class SpeechRecognitionResult extends NativeFieldWrapperClass1 {
SpeechRecognitionResult.internal();
- @DocsEditable
@DomName('SpeechRecognitionResult.isFinal')
+ @DocsEditable
bool get isFinal native "SpeechRecognitionResult_isFinal_Getter";
- @DocsEditable
@DomName('SpeechRecognitionResult.length')
+ @DocsEditable
int get length native "SpeechRecognitionResult_length_Getter";
- @DocsEditable
@DomName('SpeechRecognitionResult.item')
+ @DocsEditable
SpeechRecognitionAlternative item(int index) native "SpeechRecognitionResult_item_Callback";
}
@@ -21628,12 +22481,12 @@
static const int VERSION_ERR = 2;
- @DocsEditable
@DomName('SQLError.code')
+ @DocsEditable
int get code native "SQLError_code_Getter";
- @DocsEditable
@DomName('SQLError.message')
+ @DocsEditable
String get message native "SQLError_message_Getter";
}
@@ -21665,12 +22518,12 @@
static const int VERSION_ERR = 2;
- @DocsEditable
@DomName('SQLException.code')
+ @DocsEditable
int get code native "SQLException_code_Getter";
- @DocsEditable
@DomName('SQLException.message')
+ @DocsEditable
String get message native "SQLException_message_Getter";
}
@@ -21686,16 +22539,16 @@
class SqlResultSet extends NativeFieldWrapperClass1 {
SqlResultSet.internal();
- @DocsEditable
@DomName('SQLResultSet.insertId')
+ @DocsEditable
int get insertId native "SQLResultSet_insertId_Getter";
- @DocsEditable
@DomName('SQLResultSet.rows')
+ @DocsEditable
SqlResultSetRowList get rows native "SQLResultSet_rows_Getter";
- @DocsEditable
@DomName('SQLResultSet.rowsAffected')
+ @DocsEditable
int get rowsAffected native "SQLResultSet_rowsAffected_Getter";
}
@@ -21711,8 +22564,8 @@
class SqlResultSetRowList extends NativeFieldWrapperClass1 implements List<Map> {
SqlResultSetRowList.internal();
- @DocsEditable
@DomName('SQLResultSetRowList.length')
+ @DocsEditable
int get length native "SQLResultSetRowList_length_Getter";
Map operator[](int index) native "SQLResultSetRowList_item_Callback";
@@ -21740,11 +22593,13 @@
void forEach(void f(Map element)) => IterableMixinWorkaround.forEach(this, f);
- String join([String separator]) => IterableMixinWorkaround.joinList(this, separator);
+ String join([String separator]) =>
+ IterableMixinWorkaround.joinList(this, separator);
List mappedBy(f(Map element)) => IterableMixinWorkaround.mappedByList(this, f);
- Iterable<Map> where(bool f(Map element)) => IterableMixinWorkaround.where(this, f);
+ Iterable<Map> where(bool f(Map element)) =>
+ IterableMixinWorkaround.where(this, f);
bool every(bool f(Map element)) => IterableMixinWorkaround.every(this, f);
@@ -21806,6 +22661,9 @@
throw new UnsupportedError("Cannot clear immutable List.");
}
+ List<Map> get reversed =>
+ new ReversedListView<Map>(this, 0, null);
+
void sort([int compare(Map a, Map b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -21834,9 +22692,11 @@
throw new StateError("More than one element");
}
- Map min([int compare(Map a, Map b)]) => IterableMixinWorkaround.min(this, compare);
+ Map min([int compare(Map a, Map b)]) =>
+ IterableMixinWorkaround.min(this, compare);
- Map max([int compare(Map a, Map b)]) => IterableMixinWorkaround.max(this, compare);
+ Map max([int compare(Map a, Map b)]) =>
+ IterableMixinWorkaround.max(this, compare);
Map removeAt(int pos) {
throw new UnsupportedError("Cannot remove from immutable List.");
@@ -21883,8 +22743,8 @@
// -- end List<Map> mixins.
- @DocsEditable
@DomName('SQLResultSetRowList.item')
+ @DocsEditable
Map item(int index) native "SQLResultSetRowList_item_Callback";
}
@@ -21900,8 +22760,8 @@
class SqlTransaction extends NativeFieldWrapperClass1 {
SqlTransaction.internal();
- @DocsEditable
@DomName('SQLTransaction.executeSql')
+ @DocsEditable
void executeSql(String sqlStatement, List arguments, [SqlStatementCallback callback, SqlStatementErrorCallback errorCallback]) native "SQLTransaction_executeSql_Callback";
}
@@ -21917,8 +22777,8 @@
class SqlTransactionSync extends NativeFieldWrapperClass1 {
SqlTransactionSync.internal();
- @DocsEditable
@DomName('SQLTransactionSync.executeSql')
+ @DocsEditable
SqlResultSet executeSql(String sqlStatement, List arguments) native "SQLTransactionSync_executeSql_Callback";
}
@@ -21927,9 +22787,9 @@
// BSD-style license that can be found in the LICENSE file.
-@DocsEditable
@DomName('Storage')
-class Storage extends NativeFieldWrapperClass1 implements Map<String, String> {
+class Storage extends NativeFieldWrapperClass1 implements Map<String, String>
+ {
// TODO(nweiz): update this when maps support lazy iteration
bool containsValue(String value) => values.any((e) => e == value);
@@ -21979,66 +22839,74 @@
bool get isEmpty => $dom_key(0) == null;
Storage.internal();
- @DocsEditable
@DomName('Storage.length')
+ @DocsEditable
int get $dom_length native "Storage_length_Getter";
- @DocsEditable
@DomName('Storage.clear')
+ @DocsEditable
void $dom_clear() native "Storage_clear_Callback";
- @DocsEditable
@DomName('Storage.getItem')
+ @DocsEditable
String $dom_getItem(String key) native "Storage_getItem_Callback";
- @DocsEditable
@DomName('Storage.key')
+ @DocsEditable
String $dom_key(int index) native "Storage_key_Callback";
- @DocsEditable
@DomName('Storage.removeItem')
+ @DocsEditable
void $dom_removeItem(String key) native "Storage_removeItem_Callback";
- @DocsEditable
@DomName('Storage.setItem')
+ @DocsEditable
void $dom_setItem(String key, String data) native "Storage_setItem_Callback";
}
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// WARNING: Do not edit - generated code.
-@DocsEditable
@DomName('StorageEvent')
class StorageEvent extends Event {
+ factory StorageEvent(String type,
+ {bool canBubble: false, bool cancelable: false, String key, String oldValue,
+ String newValue, String url, Storage storageArea}) {
+
+ var e = document.$dom_createEvent("StorageEvent");
+ e.$dom_initStorageEvent(type, canBubble, cancelable, key, oldValue,
+ newValue, url, storageArea);
+ return e;
+ }
StorageEvent.internal() : super.internal();
- @DocsEditable
@DomName('StorageEvent.key')
+ @DocsEditable
String get key native "StorageEvent_key_Getter";
- @DocsEditable
@DomName('StorageEvent.newValue')
+ @DocsEditable
String get newValue native "StorageEvent_newValue_Getter";
- @DocsEditable
@DomName('StorageEvent.oldValue')
+ @DocsEditable
String get oldValue native "StorageEvent_oldValue_Getter";
- @DocsEditable
@DomName('StorageEvent.storageArea')
+ @DocsEditable
Storage get storageArea native "StorageEvent_storageArea_Getter";
- @DocsEditable
@DomName('StorageEvent.url')
+ @DocsEditable
String get url native "StorageEvent_url_Getter";
- @DocsEditable
@DomName('StorageEvent.initStorageEvent')
- void initStorageEvent(String typeArg, bool canBubbleArg, bool cancelableArg, String keyArg, String oldValueArg, String newValueArg, String urlArg, Storage storageAreaArg) native "StorageEvent_initStorageEvent_Callback";
+ @DocsEditable
+ void $dom_initStorageEvent(String typeArg, bool canBubbleArg, bool cancelableArg, String keyArg, String oldValueArg, String newValueArg, String urlArg, Storage storageAreaArg) native "StorageEvent_initStorageEvent_Callback";
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -22057,12 +22925,12 @@
static const int TEMPORARY = 0;
- @DocsEditable
@DomName('StorageInfo.queryUsageAndQuota')
+ @DocsEditable
void queryUsageAndQuota(int storageType, [StorageInfoUsageCallback usageCallback, StorageInfoErrorCallback errorCallback]) native "StorageInfo_queryUsageAndQuota_Callback";
- @DocsEditable
@DomName('StorageInfo.requestQuota')
+ @DocsEditable
void requestQuota(int storageType, int newQuotaInBytes, [StorageInfoQuotaCallback quotaCallback, StorageInfoErrorCallback errorCallback]) native "StorageInfo_requestQuota_Callback";
}
@@ -22113,40 +22981,40 @@
@DocsEditable
factory StyleElement() => document.$dom_createElement("style");
- @DocsEditable
@DomName('HTMLStyleElement.disabled')
+ @DocsEditable
bool get disabled native "HTMLStyleElement_disabled_Getter";
- @DocsEditable
@DomName('HTMLStyleElement.disabled')
+ @DocsEditable
void set disabled(bool value) native "HTMLStyleElement_disabled_Setter";
- @DocsEditable
@DomName('HTMLStyleElement.media')
+ @DocsEditable
String get media native "HTMLStyleElement_media_Getter";
- @DocsEditable
@DomName('HTMLStyleElement.media')
+ @DocsEditable
void set media(String value) native "HTMLStyleElement_media_Setter";
- @DocsEditable
@DomName('HTMLStyleElement.scoped')
+ @DocsEditable
bool get scoped native "HTMLStyleElement_scoped_Getter";
- @DocsEditable
@DomName('HTMLStyleElement.scoped')
+ @DocsEditable
void set scoped(bool value) native "HTMLStyleElement_scoped_Setter";
- @DocsEditable
@DomName('HTMLStyleElement.sheet')
+ @DocsEditable
StyleSheet get sheet native "HTMLStyleElement_sheet_Getter";
- @DocsEditable
@DomName('HTMLStyleElement.type')
+ @DocsEditable
String get type native "HTMLStyleElement_type_Getter";
- @DocsEditable
@DomName('HTMLStyleElement.type')
+ @DocsEditable
void set type(String value) native "HTMLStyleElement_type_Setter";
}
@@ -22162,12 +23030,12 @@
class StyleMedia extends NativeFieldWrapperClass1 {
StyleMedia.internal();
- @DocsEditable
@DomName('StyleMedia.type')
+ @DocsEditable
String get type native "StyleMedia_type_Getter";
- @DocsEditable
@DomName('StyleMedia.matchMedium')
+ @DocsEditable
bool matchMedium(String mediaquery) native "StyleMedia_matchMedium_Callback";
}
@@ -22183,36 +23051,36 @@
class StyleSheet extends NativeFieldWrapperClass1 {
StyleSheet.internal();
- @DocsEditable
@DomName('StyleSheet.disabled')
+ @DocsEditable
bool get disabled native "StyleSheet_disabled_Getter";
- @DocsEditable
@DomName('StyleSheet.disabled')
+ @DocsEditable
void set disabled(bool value) native "StyleSheet_disabled_Setter";
- @DocsEditable
@DomName('StyleSheet.href')
+ @DocsEditable
String get href native "StyleSheet_href_Getter";
- @DocsEditable
@DomName('StyleSheet.media')
+ @DocsEditable
MediaList get media native "StyleSheet_media_Getter";
- @DocsEditable
@DomName('StyleSheet.ownerNode')
+ @DocsEditable
Node get ownerNode native "StyleSheet_ownerNode_Getter";
- @DocsEditable
@DomName('StyleSheet.parentStyleSheet')
+ @DocsEditable
StyleSheet get parentStyleSheet native "StyleSheet_parentStyleSheet_Getter";
- @DocsEditable
@DomName('StyleSheet.title')
+ @DocsEditable
String get title native "StyleSheet_title_Getter";
- @DocsEditable
@DomName('StyleSheet.type')
+ @DocsEditable
String get type native "StyleSheet_type_Getter";
}
@@ -22247,32 +23115,32 @@
@DocsEditable
factory TableCellElement() => document.$dom_createElement("td");
- @DocsEditable
@DomName('HTMLTableCellElement.cellIndex')
+ @DocsEditable
int get cellIndex native "HTMLTableCellElement_cellIndex_Getter";
- @DocsEditable
@DomName('HTMLTableCellElement.colSpan')
+ @DocsEditable
int get colSpan native "HTMLTableCellElement_colSpan_Getter";
- @DocsEditable
@DomName('HTMLTableCellElement.colSpan')
+ @DocsEditable
void set colSpan(int value) native "HTMLTableCellElement_colSpan_Setter";
- @DocsEditable
@DomName('HTMLTableCellElement.headers')
+ @DocsEditable
String get headers native "HTMLTableCellElement_headers_Getter";
- @DocsEditable
@DomName('HTMLTableCellElement.headers')
+ @DocsEditable
void set headers(String value) native "HTMLTableCellElement_headers_Setter";
- @DocsEditable
@DomName('HTMLTableCellElement.rowSpan')
+ @DocsEditable
int get rowSpan native "HTMLTableCellElement_rowSpan_Getter";
- @DocsEditable
@DomName('HTMLTableCellElement.rowSpan')
+ @DocsEditable
void set rowSpan(int value) native "HTMLTableCellElement_rowSpan_Setter";
}
@@ -22291,12 +23159,12 @@
@DocsEditable
factory TableColElement() => document.$dom_createElement("col");
- @DocsEditable
@DomName('HTMLTableColElement.span')
+ @DocsEditable
int get span native "HTMLTableColElement_span_Getter";
- @DocsEditable
@DomName('HTMLTableColElement.span')
+ @DocsEditable
void set span(int value) native "HTMLTableColElement_span_Setter";
}
@@ -22315,80 +23183,80 @@
@DocsEditable
factory TableElement() => document.$dom_createElement("table");
- @DocsEditable
@DomName('HTMLTableElement.border')
+ @DocsEditable
String get border native "HTMLTableElement_border_Getter";
- @DocsEditable
@DomName('HTMLTableElement.border')
+ @DocsEditable
void set border(String value) native "HTMLTableElement_border_Setter";
- @DocsEditable
@DomName('HTMLTableElement.caption')
+ @DocsEditable
TableCaptionElement get caption native "HTMLTableElement_caption_Getter";
- @DocsEditable
@DomName('HTMLTableElement.caption')
+ @DocsEditable
void set caption(TableCaptionElement value) native "HTMLTableElement_caption_Setter";
- @DocsEditable
@DomName('HTMLTableElement.rows')
+ @DocsEditable
HtmlCollection get rows native "HTMLTableElement_rows_Getter";
- @DocsEditable
@DomName('HTMLTableElement.tBodies')
+ @DocsEditable
HtmlCollection get tBodies native "HTMLTableElement_tBodies_Getter";
- @DocsEditable
@DomName('HTMLTableElement.tFoot')
+ @DocsEditable
TableSectionElement get tFoot native "HTMLTableElement_tFoot_Getter";
- @DocsEditable
@DomName('HTMLTableElement.tFoot')
+ @DocsEditable
void set tFoot(TableSectionElement value) native "HTMLTableElement_tFoot_Setter";
- @DocsEditable
@DomName('HTMLTableElement.tHead')
+ @DocsEditable
TableSectionElement get tHead native "HTMLTableElement_tHead_Getter";
- @DocsEditable
@DomName('HTMLTableElement.tHead')
+ @DocsEditable
void set tHead(TableSectionElement value) native "HTMLTableElement_tHead_Setter";
- @DocsEditable
@DomName('HTMLTableElement.createCaption')
+ @DocsEditable
Element createCaption() native "HTMLTableElement_createCaption_Callback";
- @DocsEditable
@DomName('HTMLTableElement.createTBody')
+ @DocsEditable
Element createTBody() native "HTMLTableElement_createTBody_Callback";
- @DocsEditable
@DomName('HTMLTableElement.createTFoot')
+ @DocsEditable
Element createTFoot() native "HTMLTableElement_createTFoot_Callback";
- @DocsEditable
@DomName('HTMLTableElement.createTHead')
+ @DocsEditable
Element createTHead() native "HTMLTableElement_createTHead_Callback";
- @DocsEditable
@DomName('HTMLTableElement.deleteCaption')
+ @DocsEditable
void deleteCaption() native "HTMLTableElement_deleteCaption_Callback";
- @DocsEditable
@DomName('HTMLTableElement.deleteRow')
+ @DocsEditable
void deleteRow(int index) native "HTMLTableElement_deleteRow_Callback";
- @DocsEditable
@DomName('HTMLTableElement.deleteTFoot')
+ @DocsEditable
void deleteTFoot() native "HTMLTableElement_deleteTFoot_Callback";
- @DocsEditable
@DomName('HTMLTableElement.deleteTHead')
+ @DocsEditable
void deleteTHead() native "HTMLTableElement_deleteTHead_Callback";
- @DocsEditable
@DomName('HTMLTableElement.insertRow')
+ @DocsEditable
Element insertRow(int index) native "HTMLTableElement_insertRow_Callback";
}
@@ -22407,24 +23275,24 @@
@DocsEditable
factory TableRowElement() => document.$dom_createElement("tr");
- @DocsEditable
@DomName('HTMLTableRowElement.cells')
+ @DocsEditable
HtmlCollection get cells native "HTMLTableRowElement_cells_Getter";
- @DocsEditable
@DomName('HTMLTableRowElement.rowIndex')
+ @DocsEditable
int get rowIndex native "HTMLTableRowElement_rowIndex_Getter";
- @DocsEditable
@DomName('HTMLTableRowElement.sectionRowIndex')
+ @DocsEditable
int get sectionRowIndex native "HTMLTableRowElement_sectionRowIndex_Getter";
- @DocsEditable
@DomName('HTMLTableRowElement.deleteCell')
+ @DocsEditable
void deleteCell(int index) native "HTMLTableRowElement_deleteCell_Callback";
- @DocsEditable
@DomName('HTMLTableRowElement.insertCell')
+ @DocsEditable
Element insertCell(int index) native "HTMLTableRowElement_insertCell_Callback";
}
@@ -22440,16 +23308,16 @@
class TableSectionElement extends _Element_Merged {
TableSectionElement.internal() : super.internal();
- @DocsEditable
@DomName('HTMLTableSectionElement.rows')
+ @DocsEditable
HtmlCollection get rows native "HTMLTableSectionElement_rows_Getter";
- @DocsEditable
@DomName('HTMLTableSectionElement.deleteRow')
+ @DocsEditable
void deleteRow(int index) native "HTMLTableSectionElement_deleteRow_Callback";
- @DocsEditable
@DomName('HTMLTableSectionElement.insertRow')
+ @DocsEditable
Element insertRow(int index) native "HTMLTableSectionElement_insertRow_Callback";
}
@@ -22460,22 +23328,21 @@
// WARNING: Do not edit - generated code.
-@DocsEditable
@DomName('Text')
class Text extends CharacterData {
factory Text(String data) => _TextFactoryProvider.createText(data);
Text.internal() : super.internal();
- @DocsEditable
@DomName('Text.wholeText')
+ @DocsEditable
String get wholeText native "Text_wholeText_Getter";
- @DocsEditable
@DomName('Text.replaceWholeText')
+ @DocsEditable
Text replaceWholeText(String content) native "Text_replaceWholeText_Callback";
- @DocsEditable
@DomName('Text.splitText')
+ @DocsEditable
Text splitText(int offset) native "Text_splitText_Callback";
}
@@ -22494,172 +23361,172 @@
@DocsEditable
factory TextAreaElement() => document.$dom_createElement("textarea");
- @DocsEditable
@DomName('HTMLTextAreaElement.autofocus')
+ @DocsEditable
bool get autofocus native "HTMLTextAreaElement_autofocus_Getter";
- @DocsEditable
@DomName('HTMLTextAreaElement.autofocus')
+ @DocsEditable
void set autofocus(bool value) native "HTMLTextAreaElement_autofocus_Setter";
- @DocsEditable
@DomName('HTMLTextAreaElement.cols')
+ @DocsEditable
int get cols native "HTMLTextAreaElement_cols_Getter";
- @DocsEditable
@DomName('HTMLTextAreaElement.cols')
+ @DocsEditable
void set cols(int value) native "HTMLTextAreaElement_cols_Setter";
- @DocsEditable
@DomName('HTMLTextAreaElement.defaultValue')
+ @DocsEditable
String get defaultValue native "HTMLTextAreaElement_defaultValue_Getter";
- @DocsEditable
@DomName('HTMLTextAreaElement.defaultValue')
+ @DocsEditable
void set defaultValue(String value) native "HTMLTextAreaElement_defaultValue_Setter";
- @DocsEditable
@DomName('HTMLTextAreaElement.dirName')
+ @DocsEditable
String get dirName native "HTMLTextAreaElement_dirName_Getter";
- @DocsEditable
@DomName('HTMLTextAreaElement.dirName')
+ @DocsEditable
void set dirName(String value) native "HTMLTextAreaElement_dirName_Setter";
- @DocsEditable
@DomName('HTMLTextAreaElement.disabled')
+ @DocsEditable
bool get disabled native "HTMLTextAreaElement_disabled_Getter";
- @DocsEditable
@DomName('HTMLTextAreaElement.disabled')
+ @DocsEditable
void set disabled(bool value) native "HTMLTextAreaElement_disabled_Setter";
- @DocsEditable
@DomName('HTMLTextAreaElement.form')
+ @DocsEditable
FormElement get form native "HTMLTextAreaElement_form_Getter";
- @DocsEditable
@DomName('HTMLTextAreaElement.labels')
+ @DocsEditable
List<Node> get labels native "HTMLTextAreaElement_labels_Getter";
- @DocsEditable
@DomName('HTMLTextAreaElement.maxLength')
+ @DocsEditable
int get maxLength native "HTMLTextAreaElement_maxLength_Getter";
- @DocsEditable
@DomName('HTMLTextAreaElement.maxLength')
+ @DocsEditable
void set maxLength(int value) native "HTMLTextAreaElement_maxLength_Setter";
- @DocsEditable
@DomName('HTMLTextAreaElement.name')
+ @DocsEditable
String get name native "HTMLTextAreaElement_name_Getter";
- @DocsEditable
@DomName('HTMLTextAreaElement.name')
+ @DocsEditable
void set name(String value) native "HTMLTextAreaElement_name_Setter";
- @DocsEditable
@DomName('HTMLTextAreaElement.placeholder')
+ @DocsEditable
String get placeholder native "HTMLTextAreaElement_placeholder_Getter";
- @DocsEditable
@DomName('HTMLTextAreaElement.placeholder')
+ @DocsEditable
void set placeholder(String value) native "HTMLTextAreaElement_placeholder_Setter";
- @DocsEditable
@DomName('HTMLTextAreaElement.readOnly')
+ @DocsEditable
bool get readOnly native "HTMLTextAreaElement_readOnly_Getter";
- @DocsEditable
@DomName('HTMLTextAreaElement.readOnly')
+ @DocsEditable
void set readOnly(bool value) native "HTMLTextAreaElement_readOnly_Setter";
- @DocsEditable
@DomName('HTMLTextAreaElement.required')
+ @DocsEditable
bool get required native "HTMLTextAreaElement_required_Getter";
- @DocsEditable
@DomName('HTMLTextAreaElement.required')
+ @DocsEditable
void set required(bool value) native "HTMLTextAreaElement_required_Setter";
- @DocsEditable
@DomName('HTMLTextAreaElement.rows')
+ @DocsEditable
int get rows native "HTMLTextAreaElement_rows_Getter";
- @DocsEditable
@DomName('HTMLTextAreaElement.rows')
+ @DocsEditable
void set rows(int value) native "HTMLTextAreaElement_rows_Setter";
- @DocsEditable
@DomName('HTMLTextAreaElement.selectionDirection')
+ @DocsEditable
String get selectionDirection native "HTMLTextAreaElement_selectionDirection_Getter";
- @DocsEditable
@DomName('HTMLTextAreaElement.selectionDirection')
+ @DocsEditable
void set selectionDirection(String value) native "HTMLTextAreaElement_selectionDirection_Setter";
- @DocsEditable
@DomName('HTMLTextAreaElement.selectionEnd')
+ @DocsEditable
int get selectionEnd native "HTMLTextAreaElement_selectionEnd_Getter";
- @DocsEditable
@DomName('HTMLTextAreaElement.selectionEnd')
+ @DocsEditable
void set selectionEnd(int value) native "HTMLTextAreaElement_selectionEnd_Setter";
- @DocsEditable
@DomName('HTMLTextAreaElement.selectionStart')
+ @DocsEditable
int get selectionStart native "HTMLTextAreaElement_selectionStart_Getter";
- @DocsEditable
@DomName('HTMLTextAreaElement.selectionStart')
+ @DocsEditable
void set selectionStart(int value) native "HTMLTextAreaElement_selectionStart_Setter";
- @DocsEditable
@DomName('HTMLTextAreaElement.textLength')
+ @DocsEditable
int get textLength native "HTMLTextAreaElement_textLength_Getter";
- @DocsEditable
@DomName('HTMLTextAreaElement.type')
+ @DocsEditable
String get type native "HTMLTextAreaElement_type_Getter";
- @DocsEditable
@DomName('HTMLTextAreaElement.validationMessage')
+ @DocsEditable
String get validationMessage native "HTMLTextAreaElement_validationMessage_Getter";
- @DocsEditable
@DomName('HTMLTextAreaElement.validity')
+ @DocsEditable
ValidityState get validity native "HTMLTextAreaElement_validity_Getter";
- @DocsEditable
@DomName('HTMLTextAreaElement.value')
+ @DocsEditable
String get value native "HTMLTextAreaElement_value_Getter";
- @DocsEditable
@DomName('HTMLTextAreaElement.value')
+ @DocsEditable
void set value(String value) native "HTMLTextAreaElement_value_Setter";
- @DocsEditable
@DomName('HTMLTextAreaElement.willValidate')
+ @DocsEditable
bool get willValidate native "HTMLTextAreaElement_willValidate_Getter";
- @DocsEditable
@DomName('HTMLTextAreaElement.wrap')
+ @DocsEditable
String get wrap native "HTMLTextAreaElement_wrap_Getter";
- @DocsEditable
@DomName('HTMLTextAreaElement.wrap')
+ @DocsEditable
void set wrap(String value) native "HTMLTextAreaElement_wrap_Setter";
- @DocsEditable
@DomName('HTMLTextAreaElement.checkValidity')
+ @DocsEditable
bool checkValidity() native "HTMLTextAreaElement_checkValidity_Callback";
- @DocsEditable
@DomName('HTMLTextAreaElement.select')
+ @DocsEditable
void select() native "HTMLTextAreaElement_select_Callback";
- @DocsEditable
@DomName('HTMLTextAreaElement.setCustomValidity')
+ @DocsEditable
void setCustomValidity(String error) native "HTMLTextAreaElement_setCustomValidity_Callback";
void setRangeText(String replacement, [int start, int end, String selectionMode]) {
@@ -22674,13 +23541,13 @@
throw new ArgumentError("Incorrect number or type of arguments");
}
+ @DomName('HTMLTextAreaElement._setRangeText_1')
@DocsEditable
- @DomName('HTMLTextAreaElement.setRangeText_1')
- void _setRangeText_1(replacement) native "HTMLTextAreaElement_setRangeText_1_Callback";
+ void _setRangeText_1(replacement) native "HTMLTextAreaElement__setRangeText_1_Callback";
+ @DomName('HTMLTextAreaElement._setRangeText_2')
@DocsEditable
- @DomName('HTMLTextAreaElement.setRangeText_2')
- void _setRangeText_2(replacement, start, end, selectionMode) native "HTMLTextAreaElement_setRangeText_2_Callback";
+ void _setRangeText_2(replacement, start, end, selectionMode) native "HTMLTextAreaElement__setRangeText_2_Callback";
void setSelectionRange(int start, int end, [String direction]) {
if (?direction) {
@@ -22688,36 +23555,45 @@
return;
}
_setSelectionRange_2(start, end);
+ return;
}
+ @DomName('HTMLTextAreaElement._setSelectionRange_1')
@DocsEditable
- @DomName('HTMLTextAreaElement.setSelectionRange_1')
- void _setSelectionRange_1(start, end, direction) native "HTMLTextAreaElement_setSelectionRange_1_Callback";
+ void _setSelectionRange_1(start, end, direction) native "HTMLTextAreaElement__setSelectionRange_1_Callback";
+ @DomName('HTMLTextAreaElement._setSelectionRange_2')
@DocsEditable
- @DomName('HTMLTextAreaElement.setSelectionRange_2')
- void _setSelectionRange_2(start, end) native "HTMLTextAreaElement_setSelectionRange_2_Callback";
+ void _setSelectionRange_2(start, end) native "HTMLTextAreaElement__setSelectionRange_2_Callback";
}
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// WARNING: Do not edit - generated code.
-@DocsEditable
@DomName('TextEvent')
class TextEvent extends UIEvent {
+ factory TextEvent(String type,
+ {bool canBubble: false, bool cancelable: false, Window view, String data}) {
+ if (view == null) {
+ view = window;
+ }
+ var e = document.$dom_createEvent("TextEvent");
+ e.$dom_initTextEvent(type, canBubble, cancelable, view, data);
+ return e;
+ }
TextEvent.internal() : super.internal();
- @DocsEditable
@DomName('TextEvent.data')
+ @DocsEditable
String get data native "TextEvent_data_Getter";
- @DocsEditable
@DomName('TextEvent.initTextEvent')
- void initTextEvent(String typeArg, bool canBubbleArg, bool cancelableArg, Window viewArg, String dataArg) native "TextEvent_initTextEvent_Callback";
+ @DocsEditable
+ void $dom_initTextEvent(String typeArg, bool canBubbleArg, bool cancelableArg, Window viewArg, String dataArg) native "TextEvent_initTextEvent_Callback";
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -22732,8 +23608,8 @@
class TextMetrics extends NativeFieldWrapperClass1 {
TextMetrics.internal();
- @DocsEditable
@DomName('TextMetrics.width')
+ @DocsEditable
num get width native "TextMetrics_width_Getter";
}
@@ -22749,66 +23625,72 @@
class TextTrack extends EventTarget {
TextTrack.internal() : super.internal();
+ @DomName('TextTrack.cuechange')
+ @DocsEditable
static const EventStreamProvider<Event> cueChangeEvent = const EventStreamProvider<Event>('cuechange');
@DocsEditable
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
+ @deprecated
TextTrackEvents get on =>
new TextTrackEvents(this);
- @DocsEditable
@DomName('TextTrack.activeCues')
+ @DocsEditable
TextTrackCueList get activeCues native "TextTrack_activeCues_Getter";
- @DocsEditable
@DomName('TextTrack.cues')
+ @DocsEditable
TextTrackCueList get cues native "TextTrack_cues_Getter";
- @DocsEditable
@DomName('TextTrack.kind')
+ @DocsEditable
String get kind native "TextTrack_kind_Getter";
- @DocsEditable
@DomName('TextTrack.label')
+ @DocsEditable
String get label native "TextTrack_label_Getter";
- @DocsEditable
@DomName('TextTrack.language')
+ @DocsEditable
String get language native "TextTrack_language_Getter";
- @DocsEditable
@DomName('TextTrack.mode')
+ @DocsEditable
String get mode native "TextTrack_mode_Getter";
- @DocsEditable
@DomName('TextTrack.mode')
+ @DocsEditable
void set mode(String value) native "TextTrack_mode_Setter";
- @DocsEditable
@DomName('TextTrack.addCue')
+ @DocsEditable
void addCue(TextTrackCue cue) native "TextTrack_addCue_Callback";
- @DocsEditable
@DomName('TextTrack.addEventListener')
+ @DocsEditable
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native "TextTrack_addEventListener_Callback";
- @DocsEditable
@DomName('TextTrack.dispatchEvent')
- bool $dom_dispatchEvent(Event evt) native "TextTrack_dispatchEvent_Callback";
-
@DocsEditable
+ bool dispatchEvent(Event evt) native "TextTrack_dispatchEvent_Callback";
+
@DomName('TextTrack.removeCue')
+ @DocsEditable
void removeCue(TextTrackCue cue) native "TextTrack_removeCue_Callback";
- @DocsEditable
@DomName('TextTrack.removeEventListener')
+ @DocsEditable
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native "TextTrack_removeEventListener_Callback";
+ @DomName('TextTrack.cuechange')
+ @DocsEditable
Stream<Event> get onCueChange => cueChangeEvent.forTarget(this);
}
@DocsEditable
+@deprecated
class TextTrackEvents extends Events {
@DocsEditable
TextTrackEvents(EventTarget _ptr) : super(_ptr);
@@ -22828,8 +23710,12 @@
class TextTrackCue extends EventTarget {
TextTrackCue.internal() : super.internal();
+ @DomName('TextTrackCue.enter')
+ @DocsEditable
static const EventStreamProvider<Event> enterEvent = const EventStreamProvider<Event>('enter');
+ @DomName('TextTrackCue.exit')
+ @DocsEditable
static const EventStreamProvider<Event> exitEvent = const EventStreamProvider<Event>('exit');
@DocsEditable
@@ -22838,124 +23724,130 @@
@DocsEditable
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
+ @deprecated
TextTrackCueEvents get on =>
new TextTrackCueEvents(this);
- @DocsEditable
@DomName('TextTrackCue.align')
+ @DocsEditable
String get align native "TextTrackCue_align_Getter";
- @DocsEditable
@DomName('TextTrackCue.align')
+ @DocsEditable
void set align(String value) native "TextTrackCue_align_Setter";
- @DocsEditable
@DomName('TextTrackCue.endTime')
+ @DocsEditable
num get endTime native "TextTrackCue_endTime_Getter";
- @DocsEditable
@DomName('TextTrackCue.endTime')
+ @DocsEditable
void set endTime(num value) native "TextTrackCue_endTime_Setter";
- @DocsEditable
@DomName('TextTrackCue.id')
+ @DocsEditable
String get id native "TextTrackCue_id_Getter";
- @DocsEditable
@DomName('TextTrackCue.id')
+ @DocsEditable
void set id(String value) native "TextTrackCue_id_Setter";
- @DocsEditable
@DomName('TextTrackCue.line')
+ @DocsEditable
int get line native "TextTrackCue_line_Getter";
- @DocsEditable
@DomName('TextTrackCue.line')
+ @DocsEditable
void set line(int value) native "TextTrackCue_line_Setter";
- @DocsEditable
@DomName('TextTrackCue.pauseOnExit')
+ @DocsEditable
bool get pauseOnExit native "TextTrackCue_pauseOnExit_Getter";
- @DocsEditable
@DomName('TextTrackCue.pauseOnExit')
+ @DocsEditable
void set pauseOnExit(bool value) native "TextTrackCue_pauseOnExit_Setter";
- @DocsEditable
@DomName('TextTrackCue.position')
+ @DocsEditable
int get position native "TextTrackCue_position_Getter";
- @DocsEditable
@DomName('TextTrackCue.position')
+ @DocsEditable
void set position(int value) native "TextTrackCue_position_Setter";
- @DocsEditable
@DomName('TextTrackCue.size')
+ @DocsEditable
int get size native "TextTrackCue_size_Getter";
- @DocsEditable
@DomName('TextTrackCue.size')
+ @DocsEditable
void set size(int value) native "TextTrackCue_size_Setter";
- @DocsEditable
@DomName('TextTrackCue.snapToLines')
+ @DocsEditable
bool get snapToLines native "TextTrackCue_snapToLines_Getter";
- @DocsEditable
@DomName('TextTrackCue.snapToLines')
+ @DocsEditable
void set snapToLines(bool value) native "TextTrackCue_snapToLines_Setter";
- @DocsEditable
@DomName('TextTrackCue.startTime')
+ @DocsEditable
num get startTime native "TextTrackCue_startTime_Getter";
- @DocsEditable
@DomName('TextTrackCue.startTime')
+ @DocsEditable
void set startTime(num value) native "TextTrackCue_startTime_Setter";
- @DocsEditable
@DomName('TextTrackCue.text')
+ @DocsEditable
String get text native "TextTrackCue_text_Getter";
- @DocsEditable
@DomName('TextTrackCue.text')
+ @DocsEditable
void set text(String value) native "TextTrackCue_text_Setter";
- @DocsEditable
@DomName('TextTrackCue.track')
+ @DocsEditable
TextTrack get track native "TextTrackCue_track_Getter";
- @DocsEditable
@DomName('TextTrackCue.vertical')
+ @DocsEditable
String get vertical native "TextTrackCue_vertical_Getter";
- @DocsEditable
@DomName('TextTrackCue.vertical')
+ @DocsEditable
void set vertical(String value) native "TextTrackCue_vertical_Setter";
- @DocsEditable
@DomName('TextTrackCue.addEventListener')
+ @DocsEditable
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native "TextTrackCue_addEventListener_Callback";
- @DocsEditable
@DomName('TextTrackCue.dispatchEvent')
- bool $dom_dispatchEvent(Event evt) native "TextTrackCue_dispatchEvent_Callback";
-
@DocsEditable
+ bool dispatchEvent(Event evt) native "TextTrackCue_dispatchEvent_Callback";
+
@DomName('TextTrackCue.getCueAsHTML')
+ @DocsEditable
DocumentFragment getCueAsHtml() native "TextTrackCue_getCueAsHTML_Callback";
- @DocsEditable
@DomName('TextTrackCue.removeEventListener')
+ @DocsEditable
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native "TextTrackCue_removeEventListener_Callback";
+ @DomName('TextTrackCue.enter')
+ @DocsEditable
Stream<Event> get onEnter => enterEvent.forTarget(this);
+ @DomName('TextTrackCue.exit')
+ @DocsEditable
Stream<Event> get onExit => exitEvent.forTarget(this);
}
@DocsEditable
+@deprecated
class TextTrackCueEvents extends Events {
@DocsEditable
TextTrackCueEvents(EventTarget _ptr) : super(_ptr);
@@ -22978,8 +23870,8 @@
class TextTrackCueList extends NativeFieldWrapperClass1 implements List<TextTrackCue> {
TextTrackCueList.internal();
- @DocsEditable
@DomName('TextTrackCueList.length')
+ @DocsEditable
int get length native "TextTrackCueList_length_Getter";
TextTrackCue operator[](int index) native "TextTrackCueList_item_Callback";
@@ -23007,11 +23899,13 @@
void forEach(void f(TextTrackCue element)) => IterableMixinWorkaround.forEach(this, f);
- String join([String separator]) => IterableMixinWorkaround.joinList(this, separator);
+ String join([String separator]) =>
+ IterableMixinWorkaround.joinList(this, separator);
List mappedBy(f(TextTrackCue element)) => IterableMixinWorkaround.mappedByList(this, f);
- Iterable<TextTrackCue> where(bool f(TextTrackCue element)) => IterableMixinWorkaround.where(this, f);
+ Iterable<TextTrackCue> where(bool f(TextTrackCue element)) =>
+ IterableMixinWorkaround.where(this, f);
bool every(bool f(TextTrackCue element)) => IterableMixinWorkaround.every(this, f);
@@ -23073,6 +23967,9 @@
throw new UnsupportedError("Cannot clear immutable List.");
}
+ List<TextTrackCue> get reversed =>
+ new ReversedListView<TextTrackCue>(this, 0, null);
+
void sort([int compare(TextTrackCue a, TextTrackCue b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -23101,9 +23998,11 @@
throw new StateError("More than one element");
}
- TextTrackCue min([int compare(TextTrackCue a, TextTrackCue b)]) => IterableMixinWorkaround.min(this, compare);
+ TextTrackCue min([int compare(TextTrackCue a, TextTrackCue b)]) =>
+ IterableMixinWorkaround.min(this, compare);
- TextTrackCue max([int compare(TextTrackCue a, TextTrackCue b)]) => IterableMixinWorkaround.max(this, compare);
+ TextTrackCue max([int compare(TextTrackCue a, TextTrackCue b)]) =>
+ IterableMixinWorkaround.max(this, compare);
TextTrackCue removeAt(int pos) {
throw new UnsupportedError("Cannot remove from immutable List.");
@@ -23150,12 +24049,12 @@
// -- end List<TextTrackCue> mixins.
- @DocsEditable
@DomName('TextTrackCueList.getCueById')
+ @DocsEditable
TextTrackCue getCueById(String id) native "TextTrackCueList_getCueById_Callback";
- @DocsEditable
@DomName('TextTrackCueList.item')
+ @DocsEditable
TextTrackCue item(int index) native "TextTrackCueList_item_Callback";
}
@@ -23171,15 +24070,18 @@
class TextTrackList extends EventTarget implements List<TextTrack> {
TextTrackList.internal() : super.internal();
+ @DomName('TextTrackList.addtrack')
+ @DocsEditable
static const EventStreamProvider<TrackEvent> addTrackEvent = const EventStreamProvider<TrackEvent>('addtrack');
@DocsEditable
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
+ @deprecated
TextTrackListEvents get on =>
new TextTrackListEvents(this);
- @DocsEditable
@DomName('TextTrackList.length')
+ @DocsEditable
int get length native "TextTrackList_length_Getter";
TextTrack operator[](int index) native "TextTrackList_item_Callback";
@@ -23207,11 +24109,13 @@
void forEach(void f(TextTrack element)) => IterableMixinWorkaround.forEach(this, f);
- String join([String separator]) => IterableMixinWorkaround.joinList(this, separator);
+ String join([String separator]) =>
+ IterableMixinWorkaround.joinList(this, separator);
List mappedBy(f(TextTrack element)) => IterableMixinWorkaround.mappedByList(this, f);
- Iterable<TextTrack> where(bool f(TextTrack element)) => IterableMixinWorkaround.where(this, f);
+ Iterable<TextTrack> where(bool f(TextTrack element)) =>
+ IterableMixinWorkaround.where(this, f);
bool every(bool f(TextTrack element)) => IterableMixinWorkaround.every(this, f);
@@ -23273,6 +24177,9 @@
throw new UnsupportedError("Cannot clear immutable List.");
}
+ List<TextTrack> get reversed =>
+ new ReversedListView<TextTrack>(this, 0, null);
+
void sort([int compare(TextTrack a, TextTrack b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -23301,9 +24208,11 @@
throw new StateError("More than one element");
}
- TextTrack min([int compare(TextTrack a, TextTrack b)]) => IterableMixinWorkaround.min(this, compare);
+ TextTrack min([int compare(TextTrack a, TextTrack b)]) =>
+ IterableMixinWorkaround.min(this, compare);
- TextTrack max([int compare(TextTrack a, TextTrack b)]) => IterableMixinWorkaround.max(this, compare);
+ TextTrack max([int compare(TextTrack a, TextTrack b)]) =>
+ IterableMixinWorkaround.max(this, compare);
TextTrack removeAt(int pos) {
throw new UnsupportedError("Cannot remove from immutable List.");
@@ -23350,27 +24259,30 @@
// -- end List<TextTrack> mixins.
- @DocsEditable
@DomName('TextTrackList.addEventListener')
+ @DocsEditable
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native "TextTrackList_addEventListener_Callback";
- @DocsEditable
@DomName('TextTrackList.dispatchEvent')
- bool $dom_dispatchEvent(Event evt) native "TextTrackList_dispatchEvent_Callback";
-
@DocsEditable
+ bool dispatchEvent(Event evt) native "TextTrackList_dispatchEvent_Callback";
+
@DomName('TextTrackList.item')
+ @DocsEditable
TextTrack item(int index) native "TextTrackList_item_Callback";
- @DocsEditable
@DomName('TextTrackList.removeEventListener')
+ @DocsEditable
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native "TextTrackList_removeEventListener_Callback";
+ @DomName('TextTrackList.addtrack')
+ @DocsEditable
Stream<TrackEvent> get onAddTrack => addTrackEvent.forTarget(this);
}
@DocsEditable
+@deprecated
class TextTrackListEvents extends Events {
@DocsEditable
TextTrackListEvents(EventTarget _ptr) : super(_ptr);
@@ -23390,16 +24302,16 @@
class TimeRanges extends NativeFieldWrapperClass1 {
TimeRanges.internal();
- @DocsEditable
@DomName('TimeRanges.length')
+ @DocsEditable
int get length native "TimeRanges_length_Getter";
- @DocsEditable
@DomName('TimeRanges.end')
+ @DocsEditable
num end(int index) native "TimeRanges_end_Callback";
- @DocsEditable
@DomName('TimeRanges.start')
+ @DocsEditable
num start(int index) native "TimeRanges_start_Callback";
}
@@ -23439,98 +24351,110 @@
class Touch extends NativeFieldWrapperClass1 {
Touch.internal();
- @DocsEditable
@DomName('Touch.clientX')
+ @DocsEditable
int get clientX native "Touch_clientX_Getter";
- @DocsEditable
@DomName('Touch.clientY')
+ @DocsEditable
int get clientY native "Touch_clientY_Getter";
- @DocsEditable
@DomName('Touch.identifier')
+ @DocsEditable
int get identifier native "Touch_identifier_Getter";
- @DocsEditable
@DomName('Touch.pageX')
+ @DocsEditable
int get pageX native "Touch_pageX_Getter";
- @DocsEditable
@DomName('Touch.pageY')
+ @DocsEditable
int get pageY native "Touch_pageY_Getter";
- @DocsEditable
@DomName('Touch.screenX')
+ @DocsEditable
int get screenX native "Touch_screenX_Getter";
- @DocsEditable
@DomName('Touch.screenY')
+ @DocsEditable
int get screenY native "Touch_screenY_Getter";
- @DocsEditable
@DomName('Touch.target')
+ @DocsEditable
EventTarget get target native "Touch_target_Getter";
- @DocsEditable
@DomName('Touch.webkitForce')
+ @DocsEditable
num get webkitForce native "Touch_webkitForce_Getter";
- @DocsEditable
@DomName('Touch.webkitRadiusX')
+ @DocsEditable
int get webkitRadiusX native "Touch_webkitRadiusX_Getter";
- @DocsEditable
@DomName('Touch.webkitRadiusY')
+ @DocsEditable
int get webkitRadiusY native "Touch_webkitRadiusY_Getter";
- @DocsEditable
@DomName('Touch.webkitRotationAngle')
+ @DocsEditable
num get webkitRotationAngle native "Touch_webkitRotationAngle_Getter";
}
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// WARNING: Do not edit - generated code.
-@DocsEditable
@DomName('TouchEvent')
class TouchEvent extends UIEvent {
+ factory TouchEvent(TouchList touches, TouchList targetTouches,
+ TouchList changedTouches, String type,
+ {Window view, int screenX: 0, int screenY: 0, int clientX: 0,
+ int clientY: 0, bool ctrlKey: false, bool altKey: false,
+ bool shiftKey: false, bool metaKey: false}) {
+ if (view == null) {
+ view = window;
+ }
+ var e = document.$dom_createEvent("TouchEvent");
+ e.$dom_initTouchEvent(touches, targetTouches, changedTouches, type, view,
+ screenX, screenY, clientX, clientY, ctrlKey, altKey, shiftKey, metaKey);
+ return e;
+ }
TouchEvent.internal() : super.internal();
- @DocsEditable
@DomName('TouchEvent.altKey')
+ @DocsEditable
bool get altKey native "TouchEvent_altKey_Getter";
- @DocsEditable
@DomName('TouchEvent.changedTouches')
+ @DocsEditable
TouchList get changedTouches native "TouchEvent_changedTouches_Getter";
- @DocsEditable
@DomName('TouchEvent.ctrlKey')
+ @DocsEditable
bool get ctrlKey native "TouchEvent_ctrlKey_Getter";
- @DocsEditable
@DomName('TouchEvent.metaKey')
+ @DocsEditable
bool get metaKey native "TouchEvent_metaKey_Getter";
- @DocsEditable
@DomName('TouchEvent.shiftKey')
+ @DocsEditable
bool get shiftKey native "TouchEvent_shiftKey_Getter";
- @DocsEditable
@DomName('TouchEvent.targetTouches')
+ @DocsEditable
TouchList get targetTouches native "TouchEvent_targetTouches_Getter";
- @DocsEditable
@DomName('TouchEvent.touches')
+ @DocsEditable
TouchList get touches native "TouchEvent_touches_Getter";
- @DocsEditable
@DomName('TouchEvent.initTouchEvent')
- void initTouchEvent(TouchList touches, TouchList targetTouches, TouchList changedTouches, String type, Window view, int screenX, int screenY, int clientX, int clientY, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey) native "TouchEvent_initTouchEvent_Callback";
+ @DocsEditable
+ void $dom_initTouchEvent(TouchList touches, TouchList targetTouches, TouchList changedTouches, String type, Window view, int screenX, int screenY, int clientX, int clientY, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey) native "TouchEvent_initTouchEvent_Callback";
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -23545,8 +24469,8 @@
class TouchList extends NativeFieldWrapperClass1 implements List<Touch> {
TouchList.internal();
- @DocsEditable
@DomName('TouchList.length')
+ @DocsEditable
int get length native "TouchList_length_Getter";
Touch operator[](int index) native "TouchList_item_Callback";
@@ -23574,11 +24498,13 @@
void forEach(void f(Touch element)) => IterableMixinWorkaround.forEach(this, f);
- String join([String separator]) => IterableMixinWorkaround.joinList(this, separator);
+ String join([String separator]) =>
+ IterableMixinWorkaround.joinList(this, separator);
List mappedBy(f(Touch element)) => IterableMixinWorkaround.mappedByList(this, f);
- Iterable<Touch> where(bool f(Touch element)) => IterableMixinWorkaround.where(this, f);
+ Iterable<Touch> where(bool f(Touch element)) =>
+ IterableMixinWorkaround.where(this, f);
bool every(bool f(Touch element)) => IterableMixinWorkaround.every(this, f);
@@ -23640,6 +24566,9 @@
throw new UnsupportedError("Cannot clear immutable List.");
}
+ List<Touch> get reversed =>
+ new ReversedListView<Touch>(this, 0, null);
+
void sort([int compare(Touch a, Touch b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -23668,9 +24597,11 @@
throw new StateError("More than one element");
}
- Touch min([int compare(Touch a, Touch b)]) => IterableMixinWorkaround.min(this, compare);
+ Touch min([int compare(Touch a, Touch b)]) =>
+ IterableMixinWorkaround.min(this, compare);
- Touch max([int compare(Touch a, Touch b)]) => IterableMixinWorkaround.max(this, compare);
+ Touch max([int compare(Touch a, Touch b)]) =>
+ IterableMixinWorkaround.max(this, compare);
Touch removeAt(int pos) {
throw new UnsupportedError("Cannot remove from immutable List.");
@@ -23717,8 +24648,8 @@
// -- end List<Touch> mixins.
- @DocsEditable
@DomName('TouchList.item')
+ @DocsEditable
Touch item(int index) native "TouchList_item_Callback";
}
@@ -23751,52 +24682,52 @@
static const int NONE = 0;
- @DocsEditable
@DomName('HTMLTrackElement.default')
+ @DocsEditable
bool get defaultValue native "HTMLTrackElement_default_Getter";
- @DocsEditable
@DomName('HTMLTrackElement.default')
+ @DocsEditable
void set defaultValue(bool value) native "HTMLTrackElement_default_Setter";
- @DocsEditable
@DomName('HTMLTrackElement.kind')
+ @DocsEditable
String get kind native "HTMLTrackElement_kind_Getter";
- @DocsEditable
@DomName('HTMLTrackElement.kind')
+ @DocsEditable
void set kind(String value) native "HTMLTrackElement_kind_Setter";
- @DocsEditable
@DomName('HTMLTrackElement.label')
+ @DocsEditable
String get label native "HTMLTrackElement_label_Getter";
- @DocsEditable
@DomName('HTMLTrackElement.label')
+ @DocsEditable
void set label(String value) native "HTMLTrackElement_label_Setter";
- @DocsEditable
@DomName('HTMLTrackElement.readyState')
+ @DocsEditable
int get readyState native "HTMLTrackElement_readyState_Getter";
- @DocsEditable
@DomName('HTMLTrackElement.src')
+ @DocsEditable
String get src native "HTMLTrackElement_src_Getter";
- @DocsEditable
@DomName('HTMLTrackElement.src')
+ @DocsEditable
void set src(String value) native "HTMLTrackElement_src_Setter";
- @DocsEditable
@DomName('HTMLTrackElement.srclang')
+ @DocsEditable
String get srclang native "HTMLTrackElement_srclang_Getter";
- @DocsEditable
@DomName('HTMLTrackElement.srclang')
+ @DocsEditable
void set srclang(String value) native "HTMLTrackElement_srclang_Setter";
- @DocsEditable
@DomName('HTMLTrackElement.track')
+ @DocsEditable
TextTrack get track native "HTMLTrackElement_track_Getter";
}
@@ -23812,8 +24743,8 @@
class TrackEvent extends Event {
TrackEvent.internal() : super.internal();
- @DocsEditable
@DomName('TrackEvent.track')
+ @DocsEditable
Object get track native "TrackEvent_track_Getter";
}
@@ -23829,12 +24760,12 @@
class TransitionEvent extends Event {
TransitionEvent.internal() : super.internal();
- @DocsEditable
@DomName('WebKitTransitionEvent.elapsedTime')
+ @DocsEditable
num get elapsedTime native "WebKitTransitionEvent_elapsedTime_Getter";
- @DocsEditable
@DomName('WebKitTransitionEvent.propertyName')
+ @DocsEditable
String get propertyName native "WebKitTransitionEvent_propertyName_Getter";
}
@@ -23850,56 +24781,56 @@
class TreeWalker extends NativeFieldWrapperClass1 {
TreeWalker.internal();
- @DocsEditable
@DomName('TreeWalker.currentNode')
+ @DocsEditable
Node get currentNode native "TreeWalker_currentNode_Getter";
- @DocsEditable
@DomName('TreeWalker.currentNode')
+ @DocsEditable
void set currentNode(Node value) native "TreeWalker_currentNode_Setter";
- @DocsEditable
@DomName('TreeWalker.expandEntityReferences')
+ @DocsEditable
bool get expandEntityReferences native "TreeWalker_expandEntityReferences_Getter";
- @DocsEditable
@DomName('TreeWalker.filter')
+ @DocsEditable
NodeFilter get filter native "TreeWalker_filter_Getter";
- @DocsEditable
@DomName('TreeWalker.root')
+ @DocsEditable
Node get root native "TreeWalker_root_Getter";
- @DocsEditable
@DomName('TreeWalker.whatToShow')
+ @DocsEditable
int get whatToShow native "TreeWalker_whatToShow_Getter";
- @DocsEditable
@DomName('TreeWalker.firstChild')
+ @DocsEditable
Node firstChild() native "TreeWalker_firstChild_Callback";
- @DocsEditable
@DomName('TreeWalker.lastChild')
+ @DocsEditable
Node lastChild() native "TreeWalker_lastChild_Callback";
- @DocsEditable
@DomName('TreeWalker.nextNode')
+ @DocsEditable
Node nextNode() native "TreeWalker_nextNode_Callback";
- @DocsEditable
@DomName('TreeWalker.nextSibling')
+ @DocsEditable
Node nextSibling() native "TreeWalker_nextSibling_Callback";
- @DocsEditable
@DomName('TreeWalker.parentNode')
+ @DocsEditable
Node parentNode() native "TreeWalker_parentNode_Callback";
- @DocsEditable
@DomName('TreeWalker.previousNode')
+ @DocsEditable
Node previousNode() native "TreeWalker_previousNode_Callback";
- @DocsEditable
@DomName('TreeWalker.previousSibling')
+ @DocsEditable
Node previousSibling() native "TreeWalker_previousSibling_Callback";
}
@@ -23910,7 +24841,6 @@
// WARNING: Do not edit - generated code.
-@DocsEditable
@DomName('UIEvent')
class UIEvent extends Event {
// In JS, canBubble and cancelable are technically required parameters to
@@ -23919,52 +24849,56 @@
//
// Contrary to JS, we default canBubble and cancelable to true, since that's
// what people want most of the time anyway.
- factory UIEvent(String type, Window view, int detail,
- [bool canBubble = true, bool cancelable = true]) {
+ factory UIEvent(String type,
+ {Window view, int detail: 0, bool canBubble: true,
+ bool cancelable: true}) {
+ if (view == null) {
+ view = window;
+ }
final e = document.$dom_createEvent("UIEvent");
e.$dom_initUIEvent(type, canBubble, cancelable, view, detail);
return e;
}
UIEvent.internal() : super.internal();
- @DocsEditable
@DomName('UIEvent.charCode')
+ @DocsEditable
int get $dom_charCode native "UIEvent_charCode_Getter";
- @DocsEditable
@DomName('UIEvent.detail')
+ @DocsEditable
int get detail native "UIEvent_detail_Getter";
- @DocsEditable
@DomName('UIEvent.keyCode')
+ @DocsEditable
int get $dom_keyCode native "UIEvent_keyCode_Getter";
- @DocsEditable
@DomName('UIEvent.layerX')
+ @DocsEditable
int get layerX native "UIEvent_layerX_Getter";
- @DocsEditable
@DomName('UIEvent.layerY')
+ @DocsEditable
int get layerY native "UIEvent_layerY_Getter";
- @DocsEditable
@DomName('UIEvent.pageX')
+ @DocsEditable
int get pageX native "UIEvent_pageX_Getter";
- @DocsEditable
@DomName('UIEvent.pageY')
+ @DocsEditable
int get pageY native "UIEvent_pageY_Getter";
- @DocsEditable
@DomName('UIEvent.view')
+ @DocsEditable
WindowBase get view native "UIEvent_view_Getter";
- @DocsEditable
@DomName('UIEvent.which')
+ @DocsEditable
int get which native "UIEvent_which_Getter";
- @DocsEditable
@DomName('UIEvent.initUIEvent')
+ @DocsEditable
void $dom_initUIEvent(String type, bool canBubble, bool cancelable, Window view, int detail) native "UIEvent_initUIEvent_Callback";
}
@@ -24007,16 +24941,16 @@
static const int BYTES_PER_ELEMENT = 2;
- @DocsEditable
@DomName('Uint16Array.length')
+ @DocsEditable
int get length native "Uint16Array_length_Getter";
- @DocsEditable
@DomName('Uint16Array.numericIndexGetter')
+ @DocsEditable
int operator[](int index) native "Uint16Array_numericIndexGetter_Callback";
- @DocsEditable
@DomName('Uint16Array.numericIndexSetter')
+ @DocsEditable
void operator[]=(int index, int value) native "Uint16Array_numericIndexSetter_Callback";
// -- start List<int> mixins.
// int is the element type.
@@ -24038,11 +24972,13 @@
void forEach(void f(int element)) => IterableMixinWorkaround.forEach(this, f);
- String join([String separator]) => IterableMixinWorkaround.joinList(this, separator);
+ String join([String separator]) =>
+ IterableMixinWorkaround.joinList(this, separator);
List mappedBy(f(int element)) => IterableMixinWorkaround.mappedByList(this, f);
- Iterable<int> where(bool f(int element)) => IterableMixinWorkaround.where(this, f);
+ Iterable<int> where(bool f(int element)) =>
+ IterableMixinWorkaround.where(this, f);
bool every(bool f(int element)) => IterableMixinWorkaround.every(this, f);
@@ -24104,6 +25040,9 @@
throw new UnsupportedError("Cannot clear immutable List.");
}
+ List<int> get reversed =>
+ new ReversedListView<int>(this, 0, null);
+
void sort([int compare(int a, int b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -24132,9 +25071,11 @@
throw new StateError("More than one element");
}
- int min([int compare(int a, int b)]) => IterableMixinWorkaround.min(this, compare);
+ int min([int compare(int a, int b)]) =>
+ IterableMixinWorkaround.min(this, compare);
- int max([int compare(int a, int b)]) => IterableMixinWorkaround.max(this, compare);
+ int max([int compare(int a, int b)]) =>
+ IterableMixinWorkaround.max(this, compare);
int removeAt(int pos) {
throw new UnsupportedError("Cannot remove from immutable List.");
@@ -24181,8 +25122,8 @@
// -- end List<int> mixins.
- @DocsEditable
@DomName('Uint16Array.setElements')
+ @DocsEditable
void setElements(Object array, [int offset]) native "Uint16Array_setElements_Callback";
Uint16Array subarray(int start, [int end]) {
@@ -24192,13 +25133,13 @@
return _subarray_2(start);
}
+ @DomName('Uint16Array._subarray_1')
@DocsEditable
- @DomName('Uint16Array.subarray_1')
- Uint16Array _subarray_1(start, end) native "Uint16Array_subarray_1_Callback";
+ Uint16Array _subarray_1(start, end) native "Uint16Array__subarray_1_Callback";
+ @DomName('Uint16Array._subarray_2')
@DocsEditable
- @DomName('Uint16Array.subarray_2')
- Uint16Array _subarray_2(start) native "Uint16Array_subarray_2_Callback";
+ Uint16Array _subarray_2(start) native "Uint16Array__subarray_2_Callback";
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -24224,16 +25165,16 @@
static const int BYTES_PER_ELEMENT = 4;
- @DocsEditable
@DomName('Uint32Array.length')
+ @DocsEditable
int get length native "Uint32Array_length_Getter";
- @DocsEditable
@DomName('Uint32Array.numericIndexGetter')
+ @DocsEditable
int operator[](int index) native "Uint32Array_numericIndexGetter_Callback";
- @DocsEditable
@DomName('Uint32Array.numericIndexSetter')
+ @DocsEditable
void operator[]=(int index, int value) native "Uint32Array_numericIndexSetter_Callback";
// -- start List<int> mixins.
// int is the element type.
@@ -24255,11 +25196,13 @@
void forEach(void f(int element)) => IterableMixinWorkaround.forEach(this, f);
- String join([String separator]) => IterableMixinWorkaround.joinList(this, separator);
+ String join([String separator]) =>
+ IterableMixinWorkaround.joinList(this, separator);
List mappedBy(f(int element)) => IterableMixinWorkaround.mappedByList(this, f);
- Iterable<int> where(bool f(int element)) => IterableMixinWorkaround.where(this, f);
+ Iterable<int> where(bool f(int element)) =>
+ IterableMixinWorkaround.where(this, f);
bool every(bool f(int element)) => IterableMixinWorkaround.every(this, f);
@@ -24321,6 +25264,9 @@
throw new UnsupportedError("Cannot clear immutable List.");
}
+ List<int> get reversed =>
+ new ReversedListView<int>(this, 0, null);
+
void sort([int compare(int a, int b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -24349,9 +25295,11 @@
throw new StateError("More than one element");
}
- int min([int compare(int a, int b)]) => IterableMixinWorkaround.min(this, compare);
+ int min([int compare(int a, int b)]) =>
+ IterableMixinWorkaround.min(this, compare);
- int max([int compare(int a, int b)]) => IterableMixinWorkaround.max(this, compare);
+ int max([int compare(int a, int b)]) =>
+ IterableMixinWorkaround.max(this, compare);
int removeAt(int pos) {
throw new UnsupportedError("Cannot remove from immutable List.");
@@ -24398,8 +25346,8 @@
// -- end List<int> mixins.
- @DocsEditable
@DomName('Uint32Array.setElements')
+ @DocsEditable
void setElements(Object array, [int offset]) native "Uint32Array_setElements_Callback";
Uint32Array subarray(int start, [int end]) {
@@ -24409,13 +25357,13 @@
return _subarray_2(start);
}
+ @DomName('Uint32Array._subarray_1')
@DocsEditable
- @DomName('Uint32Array.subarray_1')
- Uint32Array _subarray_1(start, end) native "Uint32Array_subarray_1_Callback";
+ Uint32Array _subarray_1(start, end) native "Uint32Array__subarray_1_Callback";
+ @DomName('Uint32Array._subarray_2')
@DocsEditable
- @DomName('Uint32Array.subarray_2')
- Uint32Array _subarray_2(start) native "Uint32Array_subarray_2_Callback";
+ Uint32Array _subarray_2(start) native "Uint32Array__subarray_2_Callback";
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -24441,16 +25389,16 @@
static const int BYTES_PER_ELEMENT = 1;
- @DocsEditable
@DomName('Uint8Array.length')
+ @DocsEditable
int get length native "Uint8Array_length_Getter";
- @DocsEditable
@DomName('Uint8Array.numericIndexGetter')
+ @DocsEditable
int operator[](int index) native "Uint8Array_numericIndexGetter_Callback";
- @DocsEditable
@DomName('Uint8Array.numericIndexSetter')
+ @DocsEditable
void operator[]=(int index, int value) native "Uint8Array_numericIndexSetter_Callback";
// -- start List<int> mixins.
// int is the element type.
@@ -24472,11 +25420,13 @@
void forEach(void f(int element)) => IterableMixinWorkaround.forEach(this, f);
- String join([String separator]) => IterableMixinWorkaround.joinList(this, separator);
+ String join([String separator]) =>
+ IterableMixinWorkaround.joinList(this, separator);
List mappedBy(f(int element)) => IterableMixinWorkaround.mappedByList(this, f);
- Iterable<int> where(bool f(int element)) => IterableMixinWorkaround.where(this, f);
+ Iterable<int> where(bool f(int element)) =>
+ IterableMixinWorkaround.where(this, f);
bool every(bool f(int element)) => IterableMixinWorkaround.every(this, f);
@@ -24538,6 +25488,9 @@
throw new UnsupportedError("Cannot clear immutable List.");
}
+ List<int> get reversed =>
+ new ReversedListView<int>(this, 0, null);
+
void sort([int compare(int a, int b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -24566,9 +25519,11 @@
throw new StateError("More than one element");
}
- int min([int compare(int a, int b)]) => IterableMixinWorkaround.min(this, compare);
+ int min([int compare(int a, int b)]) =>
+ IterableMixinWorkaround.min(this, compare);
- int max([int compare(int a, int b)]) => IterableMixinWorkaround.max(this, compare);
+ int max([int compare(int a, int b)]) =>
+ IterableMixinWorkaround.max(this, compare);
int removeAt(int pos) {
throw new UnsupportedError("Cannot remove from immutable List.");
@@ -24615,8 +25570,8 @@
// -- end List<int> mixins.
- @DocsEditable
@DomName('Uint8Array.setElements')
+ @DocsEditable
void setElements(Object array, [int offset]) native "Uint8Array_setElements_Callback";
Uint8Array subarray(int start, [int end]) {
@@ -24626,13 +25581,13 @@
return _subarray_2(start);
}
+ @DomName('Uint8Array._subarray_1')
@DocsEditable
- @DomName('Uint8Array.subarray_1')
- Uint8Array _subarray_1(start, end) native "Uint8Array_subarray_1_Callback";
+ Uint8Array _subarray_1(start, end) native "Uint8Array__subarray_1_Callback";
+ @DomName('Uint8Array._subarray_2')
@DocsEditable
- @DomName('Uint8Array.subarray_2')
- Uint8Array _subarray_2(start) native "Uint8Array_subarray_2_Callback";
+ Uint8Array _subarray_2(start) native "Uint8Array__subarray_2_Callback";
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -24656,16 +25611,16 @@
factory Uint8ClampedArray.fromBuffer(ArrayBuffer buffer, [int byteOffset, int length]) =>
_TypedArrayFactoryProvider.createUint8ClampedArray_fromBuffer(buffer, byteOffset, length);
- @DocsEditable
@DomName('Uint8ClampedArray.length')
+ @DocsEditable
int get length native "Uint8ClampedArray_length_Getter";
- @DocsEditable
@DomName('Uint8ClampedArray.numericIndexGetter')
+ @DocsEditable
int operator[](int index) native "Uint8ClampedArray_numericIndexGetter_Callback";
- @DocsEditable
@DomName('Uint8ClampedArray.numericIndexSetter')
+ @DocsEditable
void operator[]=(int index, int value) native "Uint8ClampedArray_numericIndexSetter_Callback";
// -- start List<int> mixins.
// int is the element type.
@@ -24687,11 +25642,13 @@
void forEach(void f(int element)) => IterableMixinWorkaround.forEach(this, f);
- String join([String separator]) => IterableMixinWorkaround.joinList(this, separator);
+ String join([String separator]) =>
+ IterableMixinWorkaround.joinList(this, separator);
List mappedBy(f(int element)) => IterableMixinWorkaround.mappedByList(this, f);
- Iterable<int> where(bool f(int element)) => IterableMixinWorkaround.where(this, f);
+ Iterable<int> where(bool f(int element)) =>
+ IterableMixinWorkaround.where(this, f);
bool every(bool f(int element)) => IterableMixinWorkaround.every(this, f);
@@ -24753,6 +25710,9 @@
throw new UnsupportedError("Cannot clear immutable List.");
}
+ List<int> get reversed =>
+ new ReversedListView<int>(this, 0, null);
+
void sort([int compare(int a, int b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -24781,9 +25741,11 @@
throw new StateError("More than one element");
}
- int min([int compare(int a, int b)]) => IterableMixinWorkaround.min(this, compare);
+ int min([int compare(int a, int b)]) =>
+ IterableMixinWorkaround.min(this, compare);
- int max([int compare(int a, int b)]) => IterableMixinWorkaround.max(this, compare);
+ int max([int compare(int a, int b)]) =>
+ IterableMixinWorkaround.max(this, compare);
int removeAt(int pos) {
throw new UnsupportedError("Cannot remove from immutable List.");
@@ -24830,8 +25792,8 @@
// -- end List<int> mixins.
- @DocsEditable
@DomName('Uint8ClampedArray.setElements')
+ @DocsEditable
void setElements(Object array, [int offset]) native "Uint8ClampedArray_setElements_Callback";
Uint8ClampedArray subarray(int start, [int end]) {
@@ -24841,13 +25803,13 @@
return _subarray_2(start);
}
+ @DomName('Uint8ClampedArray._subarray_1')
@DocsEditable
- @DomName('Uint8ClampedArray.subarray_1')
- Uint8ClampedArray _subarray_1(start, end) native "Uint8ClampedArray_subarray_1_Callback";
+ Uint8ClampedArray _subarray_1(start, end) native "Uint8ClampedArray__subarray_1_Callback";
+ @DomName('Uint8ClampedArray._subarray_2')
@DocsEditable
- @DomName('Uint8ClampedArray.subarray_2')
- Uint8ClampedArray _subarray_2(start) native "Uint8ClampedArray_subarray_2_Callback";
+ Uint8ClampedArray _subarray_2(start) native "Uint8ClampedArray__subarray_2_Callback";
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -24888,20 +25850,20 @@
throw new ArgumentError("Incorrect number or type of arguments");
}
+ @DomName('DOMURL._createObjectURL_1')
@DocsEditable
- @DomName('DOMURL.createObjectURL_1')
- static String _createObjectURL_1(blob_OR_source_OR_stream) native "DOMURL_createObjectURL_1_Callback";
+ static String _createObjectURL_1(blob_OR_source_OR_stream) native "DOMURL__createObjectURL_1_Callback";
+ @DomName('DOMURL._createObjectURL_2')
@DocsEditable
- @DomName('DOMURL.createObjectURL_2')
- static String _createObjectURL_2(blob_OR_source_OR_stream) native "DOMURL_createObjectURL_2_Callback";
+ static String _createObjectURL_2(blob_OR_source_OR_stream) native "DOMURL__createObjectURL_2_Callback";
+ @DomName('DOMURL._createObjectURL_3')
@DocsEditable
- @DomName('DOMURL.createObjectURL_3')
- static String _createObjectURL_3(blob_OR_source_OR_stream) native "DOMURL_createObjectURL_3_Callback";
+ static String _createObjectURL_3(blob_OR_source_OR_stream) native "DOMURL__createObjectURL_3_Callback";
- @DocsEditable
@DomName('DOMURL.revokeObjectURL')
+ @DocsEditable
static void revokeObjectUrl(String url) native "DOMURL_revokeObjectURL_Callback";
}
@@ -24917,44 +25879,44 @@
class ValidityState extends NativeFieldWrapperClass1 {
ValidityState.internal();
- @DocsEditable
@DomName('ValidityState.badInput')
+ @DocsEditable
bool get badInput native "ValidityState_badInput_Getter";
- @DocsEditable
@DomName('ValidityState.customError')
+ @DocsEditable
bool get customError native "ValidityState_customError_Getter";
- @DocsEditable
@DomName('ValidityState.patternMismatch')
+ @DocsEditable
bool get patternMismatch native "ValidityState_patternMismatch_Getter";
- @DocsEditable
@DomName('ValidityState.rangeOverflow')
+ @DocsEditable
bool get rangeOverflow native "ValidityState_rangeOverflow_Getter";
- @DocsEditable
@DomName('ValidityState.rangeUnderflow')
+ @DocsEditable
bool get rangeUnderflow native "ValidityState_rangeUnderflow_Getter";
- @DocsEditable
@DomName('ValidityState.stepMismatch')
+ @DocsEditable
bool get stepMismatch native "ValidityState_stepMismatch_Getter";
- @DocsEditable
@DomName('ValidityState.tooLong')
+ @DocsEditable
bool get tooLong native "ValidityState_tooLong_Getter";
- @DocsEditable
@DomName('ValidityState.typeMismatch')
+ @DocsEditable
bool get typeMismatch native "ValidityState_typeMismatch_Getter";
- @DocsEditable
@DomName('ValidityState.valid')
+ @DocsEditable
bool get valid native "ValidityState_valid_Getter";
- @DocsEditable
@DomName('ValidityState.valueMissing')
+ @DocsEditable
bool get valueMissing native "ValidityState_valueMissing_Getter";
}
@@ -24973,68 +25935,68 @@
@DocsEditable
factory VideoElement() => document.$dom_createElement("video");
- @DocsEditable
@DomName('HTMLVideoElement.height')
+ @DocsEditable
int get height native "HTMLVideoElement_height_Getter";
- @DocsEditable
@DomName('HTMLVideoElement.height')
+ @DocsEditable
void set height(int value) native "HTMLVideoElement_height_Setter";
- @DocsEditable
@DomName('HTMLVideoElement.poster')
+ @DocsEditable
String get poster native "HTMLVideoElement_poster_Getter";
- @DocsEditable
@DomName('HTMLVideoElement.poster')
+ @DocsEditable
void set poster(String value) native "HTMLVideoElement_poster_Setter";
- @DocsEditable
@DomName('HTMLVideoElement.videoHeight')
+ @DocsEditable
int get videoHeight native "HTMLVideoElement_videoHeight_Getter";
- @DocsEditable
@DomName('HTMLVideoElement.videoWidth')
+ @DocsEditable
int get videoWidth native "HTMLVideoElement_videoWidth_Getter";
- @DocsEditable
@DomName('HTMLVideoElement.webkitDecodedFrameCount')
+ @DocsEditable
int get webkitDecodedFrameCount native "HTMLVideoElement_webkitDecodedFrameCount_Getter";
- @DocsEditable
@DomName('HTMLVideoElement.webkitDisplayingFullscreen')
+ @DocsEditable
bool get webkitDisplayingFullscreen native "HTMLVideoElement_webkitDisplayingFullscreen_Getter";
- @DocsEditable
@DomName('HTMLVideoElement.webkitDroppedFrameCount')
+ @DocsEditable
int get webkitDroppedFrameCount native "HTMLVideoElement_webkitDroppedFrameCount_Getter";
- @DocsEditable
@DomName('HTMLVideoElement.webkitSupportsFullscreen')
+ @DocsEditable
bool get webkitSupportsFullscreen native "HTMLVideoElement_webkitSupportsFullscreen_Getter";
- @DocsEditable
@DomName('HTMLVideoElement.width')
+ @DocsEditable
int get width native "HTMLVideoElement_width_Getter";
- @DocsEditable
@DomName('HTMLVideoElement.width')
+ @DocsEditable
void set width(int value) native "HTMLVideoElement_width_Setter";
- @DocsEditable
@DomName('HTMLVideoElement.webkitEnterFullScreen')
+ @DocsEditable
void webkitEnterFullScreen() native "HTMLVideoElement_webkitEnterFullScreen_Callback";
- @DocsEditable
@DomName('HTMLVideoElement.webkitEnterFullscreen')
+ @DocsEditable
void webkitEnterFullscreen() native "HTMLVideoElement_webkitEnterFullscreen_Callback";
- @DocsEditable
@DomName('HTMLVideoElement.webkitExitFullScreen')
+ @DocsEditable
void webkitExitFullScreen() native "HTMLVideoElement_webkitExitFullScreen_Callback";
- @DocsEditable
@DomName('HTMLVideoElement.webkitExitFullscreen')
+ @DocsEditable
void webkitExitFullscreen() native "HTMLVideoElement_webkitExitFullscreen_Callback";
}
@@ -25058,16 +26020,16 @@
class WebGLActiveInfo extends NativeFieldWrapperClass1 {
WebGLActiveInfo.internal();
- @DocsEditable
@DomName('WebGLActiveInfo.name')
+ @DocsEditable
String get name native "WebGLActiveInfo_name_Getter";
- @DocsEditable
@DomName('WebGLActiveInfo.size')
+ @DocsEditable
int get size native "WebGLActiveInfo_size_Getter";
- @DocsEditable
@DomName('WebGLActiveInfo.type')
+ @DocsEditable
int get type native "WebGLActiveInfo_type_Getter";
}
@@ -25117,52 +26079,52 @@
class WebGLContextAttributes extends NativeFieldWrapperClass1 {
WebGLContextAttributes.internal();
- @DocsEditable
@DomName('WebGLContextAttributes.alpha')
+ @DocsEditable
bool get alpha native "WebGLContextAttributes_alpha_Getter";
- @DocsEditable
@DomName('WebGLContextAttributes.alpha')
+ @DocsEditable
void set alpha(bool value) native "WebGLContextAttributes_alpha_Setter";
- @DocsEditable
@DomName('WebGLContextAttributes.antialias')
+ @DocsEditable
bool get antialias native "WebGLContextAttributes_antialias_Getter";
- @DocsEditable
@DomName('WebGLContextAttributes.antialias')
+ @DocsEditable
void set antialias(bool value) native "WebGLContextAttributes_antialias_Setter";
- @DocsEditable
@DomName('WebGLContextAttributes.depth')
+ @DocsEditable
bool get depth native "WebGLContextAttributes_depth_Getter";
- @DocsEditable
@DomName('WebGLContextAttributes.depth')
+ @DocsEditable
void set depth(bool value) native "WebGLContextAttributes_depth_Setter";
- @DocsEditable
@DomName('WebGLContextAttributes.premultipliedAlpha')
+ @DocsEditable
bool get premultipliedAlpha native "WebGLContextAttributes_premultipliedAlpha_Getter";
- @DocsEditable
@DomName('WebGLContextAttributes.premultipliedAlpha')
+ @DocsEditable
void set premultipliedAlpha(bool value) native "WebGLContextAttributes_premultipliedAlpha_Setter";
- @DocsEditable
@DomName('WebGLContextAttributes.preserveDrawingBuffer')
+ @DocsEditable
bool get preserveDrawingBuffer native "WebGLContextAttributes_preserveDrawingBuffer_Getter";
- @DocsEditable
@DomName('WebGLContextAttributes.preserveDrawingBuffer')
+ @DocsEditable
void set preserveDrawingBuffer(bool value) native "WebGLContextAttributes_preserveDrawingBuffer_Setter";
- @DocsEditable
@DomName('WebGLContextAttributes.stencil')
+ @DocsEditable
bool get stencil native "WebGLContextAttributes_stencil_Getter";
- @DocsEditable
@DomName('WebGLContextAttributes.stencil')
+ @DocsEditable
void set stencil(bool value) native "WebGLContextAttributes_stencil_Setter";
}
@@ -25178,8 +26140,8 @@
class WebGLContextEvent extends Event {
WebGLContextEvent.internal() : super.internal();
- @DocsEditable
@DomName('WebGLContextEvent.statusMessage')
+ @DocsEditable
String get statusMessage native "WebGLContextEvent_statusMessage_Getter";
}
@@ -25212,8 +26174,8 @@
class WebGLDebugShaders extends NativeFieldWrapperClass1 {
WebGLDebugShaders.internal();
- @DocsEditable
@DomName('WebGLDebugShaders.getTranslatedShaderSource')
+ @DocsEditable
String getTranslatedShaderSource(WebGLShader shader) native "WebGLDebugShaders_getTranslatedShaderSource_Callback";
}
@@ -25257,12 +26219,12 @@
class WebGLLoseContext extends NativeFieldWrapperClass1 {
WebGLLoseContext.internal();
- @DocsEditable
@DomName('WebGLLoseContext.loseContext')
+ @DocsEditable
void loseContext() native "WebGLLoseContext_loseContext_Callback";
- @DocsEditable
@DomName('WebGLLoseContext.restoreContext')
+ @DocsEditable
void restoreContext() native "WebGLLoseContext_restoreContext_Callback";
}
@@ -25894,60 +26856,60 @@
static const int ZERO = 0;
- @DocsEditable
@DomName('WebGLRenderingContext.drawingBufferHeight')
+ @DocsEditable
int get drawingBufferHeight native "WebGLRenderingContext_drawingBufferHeight_Getter";
- @DocsEditable
@DomName('WebGLRenderingContext.drawingBufferWidth')
+ @DocsEditable
int get drawingBufferWidth native "WebGLRenderingContext_drawingBufferWidth_Getter";
- @DocsEditable
@DomName('WebGLRenderingContext.activeTexture')
+ @DocsEditable
void activeTexture(int texture) native "WebGLRenderingContext_activeTexture_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.attachShader')
+ @DocsEditable
void attachShader(WebGLProgram program, WebGLShader shader) native "WebGLRenderingContext_attachShader_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.bindAttribLocation')
+ @DocsEditable
void bindAttribLocation(WebGLProgram program, int index, String name) native "WebGLRenderingContext_bindAttribLocation_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.bindBuffer')
+ @DocsEditable
void bindBuffer(int target, WebGLBuffer buffer) native "WebGLRenderingContext_bindBuffer_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.bindFramebuffer')
+ @DocsEditable
void bindFramebuffer(int target, WebGLFramebuffer framebuffer) native "WebGLRenderingContext_bindFramebuffer_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.bindRenderbuffer')
+ @DocsEditable
void bindRenderbuffer(int target, WebGLRenderbuffer renderbuffer) native "WebGLRenderingContext_bindRenderbuffer_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.bindTexture')
+ @DocsEditable
void bindTexture(int target, WebGLTexture texture) native "WebGLRenderingContext_bindTexture_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.blendColor')
+ @DocsEditable
void blendColor(num red, num green, num blue, num alpha) native "WebGLRenderingContext_blendColor_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.blendEquation')
+ @DocsEditable
void blendEquation(int mode) native "WebGLRenderingContext_blendEquation_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.blendEquationSeparate')
+ @DocsEditable
void blendEquationSeparate(int modeRGB, int modeAlpha) native "WebGLRenderingContext_blendEquationSeparate_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.blendFunc')
+ @DocsEditable
void blendFunc(int sfactor, int dfactor) native "WebGLRenderingContext_blendFunc_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.blendFuncSeparate')
+ @DocsEditable
void blendFuncSeparate(int srcRGB, int dstRGB, int srcAlpha, int dstAlpha) native "WebGLRenderingContext_blendFuncSeparate_Callback";
void bufferData(int target, data_OR_size, int usage) {
@@ -25966,17 +26928,17 @@
throw new ArgumentError("Incorrect number or type of arguments");
}
+ @DomName('WebGLRenderingContext._bufferData_1')
@DocsEditable
- @DomName('WebGLRenderingContext.bufferData_1')
- void _bufferData_1(target, data_OR_size, usage) native "WebGLRenderingContext_bufferData_1_Callback";
+ void _bufferData_1(target, data_OR_size, usage) native "WebGLRenderingContext__bufferData_1_Callback";
+ @DomName('WebGLRenderingContext._bufferData_2')
@DocsEditable
- @DomName('WebGLRenderingContext.bufferData_2')
- void _bufferData_2(target, data_OR_size, usage) native "WebGLRenderingContext_bufferData_2_Callback";
+ void _bufferData_2(target, data_OR_size, usage) native "WebGLRenderingContext__bufferData_2_Callback";
+ @DomName('WebGLRenderingContext._bufferData_3')
@DocsEditable
- @DomName('WebGLRenderingContext.bufferData_3')
- void _bufferData_3(target, data_OR_size, usage) native "WebGLRenderingContext_bufferData_3_Callback";
+ void _bufferData_3(target, data_OR_size, usage) native "WebGLRenderingContext__bufferData_3_Callback";
void bufferSubData(int target, int offset, data) {
if ((target is int || target == null) && (offset is int || offset == null) && (data is ArrayBuffer || data == null)) {
@@ -25990,364 +26952,364 @@
throw new ArgumentError("Incorrect number or type of arguments");
}
+ @DomName('WebGLRenderingContext._bufferSubData_1')
@DocsEditable
- @DomName('WebGLRenderingContext.bufferSubData_1')
- void _bufferSubData_1(target, offset, data) native "WebGLRenderingContext_bufferSubData_1_Callback";
+ void _bufferSubData_1(target, offset, data) native "WebGLRenderingContext__bufferSubData_1_Callback";
+ @DomName('WebGLRenderingContext._bufferSubData_2')
@DocsEditable
- @DomName('WebGLRenderingContext.bufferSubData_2')
- void _bufferSubData_2(target, offset, data) native "WebGLRenderingContext_bufferSubData_2_Callback";
+ void _bufferSubData_2(target, offset, data) native "WebGLRenderingContext__bufferSubData_2_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.checkFramebufferStatus')
+ @DocsEditable
int checkFramebufferStatus(int target) native "WebGLRenderingContext_checkFramebufferStatus_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.clear')
+ @DocsEditable
void clear(int mask) native "WebGLRenderingContext_clear_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.clearColor')
+ @DocsEditable
void clearColor(num red, num green, num blue, num alpha) native "WebGLRenderingContext_clearColor_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.clearDepth')
+ @DocsEditable
void clearDepth(num depth) native "WebGLRenderingContext_clearDepth_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.clearStencil')
+ @DocsEditable
void clearStencil(int s) native "WebGLRenderingContext_clearStencil_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.colorMask')
+ @DocsEditable
void colorMask(bool red, bool green, bool blue, bool alpha) native "WebGLRenderingContext_colorMask_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.compileShader')
+ @DocsEditable
void compileShader(WebGLShader shader) native "WebGLRenderingContext_compileShader_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.compressedTexImage2D')
+ @DocsEditable
void compressedTexImage2D(int target, int level, int internalformat, int width, int height, int border, ArrayBufferView data) native "WebGLRenderingContext_compressedTexImage2D_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.compressedTexSubImage2D')
+ @DocsEditable
void compressedTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, ArrayBufferView data) native "WebGLRenderingContext_compressedTexSubImage2D_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.copyTexImage2D')
+ @DocsEditable
void copyTexImage2D(int target, int level, int internalformat, int x, int y, int width, int height, int border) native "WebGLRenderingContext_copyTexImage2D_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.copyTexSubImage2D')
+ @DocsEditable
void copyTexSubImage2D(int target, int level, int xoffset, int yoffset, int x, int y, int width, int height) native "WebGLRenderingContext_copyTexSubImage2D_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.createBuffer')
+ @DocsEditable
WebGLBuffer createBuffer() native "WebGLRenderingContext_createBuffer_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.createFramebuffer')
+ @DocsEditable
WebGLFramebuffer createFramebuffer() native "WebGLRenderingContext_createFramebuffer_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.createProgram')
+ @DocsEditable
WebGLProgram createProgram() native "WebGLRenderingContext_createProgram_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.createRenderbuffer')
+ @DocsEditable
WebGLRenderbuffer createRenderbuffer() native "WebGLRenderingContext_createRenderbuffer_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.createShader')
+ @DocsEditable
WebGLShader createShader(int type) native "WebGLRenderingContext_createShader_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.createTexture')
+ @DocsEditable
WebGLTexture createTexture() native "WebGLRenderingContext_createTexture_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.cullFace')
+ @DocsEditable
void cullFace(int mode) native "WebGLRenderingContext_cullFace_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.deleteBuffer')
+ @DocsEditable
void deleteBuffer(WebGLBuffer buffer) native "WebGLRenderingContext_deleteBuffer_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.deleteFramebuffer')
+ @DocsEditable
void deleteFramebuffer(WebGLFramebuffer framebuffer) native "WebGLRenderingContext_deleteFramebuffer_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.deleteProgram')
+ @DocsEditable
void deleteProgram(WebGLProgram program) native "WebGLRenderingContext_deleteProgram_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.deleteRenderbuffer')
+ @DocsEditable
void deleteRenderbuffer(WebGLRenderbuffer renderbuffer) native "WebGLRenderingContext_deleteRenderbuffer_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.deleteShader')
+ @DocsEditable
void deleteShader(WebGLShader shader) native "WebGLRenderingContext_deleteShader_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.deleteTexture')
+ @DocsEditable
void deleteTexture(WebGLTexture texture) native "WebGLRenderingContext_deleteTexture_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.depthFunc')
+ @DocsEditable
void depthFunc(int func) native "WebGLRenderingContext_depthFunc_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.depthMask')
+ @DocsEditable
void depthMask(bool flag) native "WebGLRenderingContext_depthMask_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.depthRange')
+ @DocsEditable
void depthRange(num zNear, num zFar) native "WebGLRenderingContext_depthRange_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.detachShader')
+ @DocsEditable
void detachShader(WebGLProgram program, WebGLShader shader) native "WebGLRenderingContext_detachShader_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.disable')
+ @DocsEditable
void disable(int cap) native "WebGLRenderingContext_disable_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.disableVertexAttribArray')
+ @DocsEditable
void disableVertexAttribArray(int index) native "WebGLRenderingContext_disableVertexAttribArray_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.drawArrays')
+ @DocsEditable
void drawArrays(int mode, int first, int count) native "WebGLRenderingContext_drawArrays_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.drawElements')
+ @DocsEditable
void drawElements(int mode, int count, int type, int offset) native "WebGLRenderingContext_drawElements_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.enable')
+ @DocsEditable
void enable(int cap) native "WebGLRenderingContext_enable_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.enableVertexAttribArray')
+ @DocsEditable
void enableVertexAttribArray(int index) native "WebGLRenderingContext_enableVertexAttribArray_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.finish')
+ @DocsEditable
void finish() native "WebGLRenderingContext_finish_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.flush')
+ @DocsEditable
void flush() native "WebGLRenderingContext_flush_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.framebufferRenderbuffer')
+ @DocsEditable
void framebufferRenderbuffer(int target, int attachment, int renderbuffertarget, WebGLRenderbuffer renderbuffer) native "WebGLRenderingContext_framebufferRenderbuffer_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.framebufferTexture2D')
+ @DocsEditable
void framebufferTexture2D(int target, int attachment, int textarget, WebGLTexture texture, int level) native "WebGLRenderingContext_framebufferTexture2D_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.frontFace')
+ @DocsEditable
void frontFace(int mode) native "WebGLRenderingContext_frontFace_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.generateMipmap')
+ @DocsEditable
void generateMipmap(int target) native "WebGLRenderingContext_generateMipmap_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.getActiveAttrib')
+ @DocsEditable
WebGLActiveInfo getActiveAttrib(WebGLProgram program, int index) native "WebGLRenderingContext_getActiveAttrib_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.getActiveUniform')
+ @DocsEditable
WebGLActiveInfo getActiveUniform(WebGLProgram program, int index) native "WebGLRenderingContext_getActiveUniform_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.getAttachedShaders')
+ @DocsEditable
void getAttachedShaders(WebGLProgram program) native "WebGLRenderingContext_getAttachedShaders_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.getAttribLocation')
+ @DocsEditable
int getAttribLocation(WebGLProgram program, String name) native "WebGLRenderingContext_getAttribLocation_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.getBufferParameter')
+ @DocsEditable
Object getBufferParameter(int target, int pname) native "WebGLRenderingContext_getBufferParameter_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.getContextAttributes')
+ @DocsEditable
WebGLContextAttributes getContextAttributes() native "WebGLRenderingContext_getContextAttributes_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.getError')
+ @DocsEditable
int getError() native "WebGLRenderingContext_getError_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.getExtension')
+ @DocsEditable
Object getExtension(String name) native "WebGLRenderingContext_getExtension_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.getFramebufferAttachmentParameter')
+ @DocsEditable
Object getFramebufferAttachmentParameter(int target, int attachment, int pname) native "WebGLRenderingContext_getFramebufferAttachmentParameter_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.getParameter')
+ @DocsEditable
Object getParameter(int pname) native "WebGLRenderingContext_getParameter_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.getProgramInfoLog')
+ @DocsEditable
String getProgramInfoLog(WebGLProgram program) native "WebGLRenderingContext_getProgramInfoLog_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.getProgramParameter')
+ @DocsEditable
Object getProgramParameter(WebGLProgram program, int pname) native "WebGLRenderingContext_getProgramParameter_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.getRenderbufferParameter')
+ @DocsEditable
Object getRenderbufferParameter(int target, int pname) native "WebGLRenderingContext_getRenderbufferParameter_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.getShaderInfoLog')
+ @DocsEditable
String getShaderInfoLog(WebGLShader shader) native "WebGLRenderingContext_getShaderInfoLog_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.getShaderParameter')
+ @DocsEditable
Object getShaderParameter(WebGLShader shader, int pname) native "WebGLRenderingContext_getShaderParameter_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.getShaderPrecisionFormat')
+ @DocsEditable
WebGLShaderPrecisionFormat getShaderPrecisionFormat(int shadertype, int precisiontype) native "WebGLRenderingContext_getShaderPrecisionFormat_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.getShaderSource')
+ @DocsEditable
String getShaderSource(WebGLShader shader) native "WebGLRenderingContext_getShaderSource_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.getSupportedExtensions')
+ @DocsEditable
List<String> getSupportedExtensions() native "WebGLRenderingContext_getSupportedExtensions_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.getTexParameter')
+ @DocsEditable
Object getTexParameter(int target, int pname) native "WebGLRenderingContext_getTexParameter_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.getUniform')
+ @DocsEditable
Object getUniform(WebGLProgram program, WebGLUniformLocation location) native "WebGLRenderingContext_getUniform_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.getUniformLocation')
+ @DocsEditable
WebGLUniformLocation getUniformLocation(WebGLProgram program, String name) native "WebGLRenderingContext_getUniformLocation_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.getVertexAttrib')
+ @DocsEditable
Object getVertexAttrib(int index, int pname) native "WebGLRenderingContext_getVertexAttrib_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.getVertexAttribOffset')
+ @DocsEditable
int getVertexAttribOffset(int index, int pname) native "WebGLRenderingContext_getVertexAttribOffset_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.hint')
+ @DocsEditable
void hint(int target, int mode) native "WebGLRenderingContext_hint_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.isBuffer')
+ @DocsEditable
bool isBuffer(WebGLBuffer buffer) native "WebGLRenderingContext_isBuffer_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.isContextLost')
+ @DocsEditable
bool isContextLost() native "WebGLRenderingContext_isContextLost_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.isEnabled')
+ @DocsEditable
bool isEnabled(int cap) native "WebGLRenderingContext_isEnabled_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.isFramebuffer')
+ @DocsEditable
bool isFramebuffer(WebGLFramebuffer framebuffer) native "WebGLRenderingContext_isFramebuffer_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.isProgram')
+ @DocsEditable
bool isProgram(WebGLProgram program) native "WebGLRenderingContext_isProgram_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.isRenderbuffer')
+ @DocsEditable
bool isRenderbuffer(WebGLRenderbuffer renderbuffer) native "WebGLRenderingContext_isRenderbuffer_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.isShader')
+ @DocsEditable
bool isShader(WebGLShader shader) native "WebGLRenderingContext_isShader_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.isTexture')
+ @DocsEditable
bool isTexture(WebGLTexture texture) native "WebGLRenderingContext_isTexture_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.lineWidth')
+ @DocsEditable
void lineWidth(num width) native "WebGLRenderingContext_lineWidth_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.linkProgram')
+ @DocsEditable
void linkProgram(WebGLProgram program) native "WebGLRenderingContext_linkProgram_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.pixelStorei')
+ @DocsEditable
void pixelStorei(int pname, int param) native "WebGLRenderingContext_pixelStorei_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.polygonOffset')
+ @DocsEditable
void polygonOffset(num factor, num units) native "WebGLRenderingContext_polygonOffset_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.readPixels')
+ @DocsEditable
void readPixels(int x, int y, int width, int height, int format, int type, ArrayBufferView pixels) native "WebGLRenderingContext_readPixels_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.releaseShaderCompiler')
+ @DocsEditable
void releaseShaderCompiler() native "WebGLRenderingContext_releaseShaderCompiler_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.renderbufferStorage')
+ @DocsEditable
void renderbufferStorage(int target, int internalformat, int width, int height) native "WebGLRenderingContext_renderbufferStorage_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.sampleCoverage')
+ @DocsEditable
void sampleCoverage(num value, bool invert) native "WebGLRenderingContext_sampleCoverage_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.scissor')
+ @DocsEditable
void scissor(int x, int y, int width, int height) native "WebGLRenderingContext_scissor_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.shaderSource')
+ @DocsEditable
void shaderSource(WebGLShader shader, String string) native "WebGLRenderingContext_shaderSource_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.stencilFunc')
+ @DocsEditable
void stencilFunc(int func, int ref, int mask) native "WebGLRenderingContext_stencilFunc_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.stencilFuncSeparate')
+ @DocsEditable
void stencilFuncSeparate(int face, int func, int ref, int mask) native "WebGLRenderingContext_stencilFuncSeparate_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.stencilMask')
+ @DocsEditable
void stencilMask(int mask) native "WebGLRenderingContext_stencilMask_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.stencilMaskSeparate')
+ @DocsEditable
void stencilMaskSeparate(int face, int mask) native "WebGLRenderingContext_stencilMaskSeparate_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.stencilOp')
+ @DocsEditable
void stencilOp(int fail, int zfail, int zpass) native "WebGLRenderingContext_stencilOp_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.stencilOpSeparate')
+ @DocsEditable
void stencilOpSeparate(int face, int fail, int zfail, int zpass) native "WebGLRenderingContext_stencilOpSeparate_Callback";
void texImage2D(int target, int level, int internalformat, int format_OR_width, int height_OR_type, border_OR_canvas_OR_image_OR_pixels_OR_video, [int format, int type, ArrayBufferView pixels]) {
@@ -26374,32 +27336,32 @@
throw new ArgumentError("Incorrect number or type of arguments");
}
+ @DomName('WebGLRenderingContext._texImage2D_1')
@DocsEditable
- @DomName('WebGLRenderingContext.texImage2D_1')
- void _texImage2D_1(target, level, internalformat, format_OR_width, height_OR_type, border_OR_canvas_OR_image_OR_pixels_OR_video, format, type, pixels) native "WebGLRenderingContext_texImage2D_1_Callback";
+ void _texImage2D_1(target, level, internalformat, format_OR_width, height_OR_type, border_OR_canvas_OR_image_OR_pixels_OR_video, format, type, pixels) native "WebGLRenderingContext__texImage2D_1_Callback";
+ @DomName('WebGLRenderingContext._texImage2D_2')
@DocsEditable
- @DomName('WebGLRenderingContext.texImage2D_2')
- void _texImage2D_2(target, level, internalformat, format_OR_width, height_OR_type, border_OR_canvas_OR_image_OR_pixels_OR_video) native "WebGLRenderingContext_texImage2D_2_Callback";
+ void _texImage2D_2(target, level, internalformat, format_OR_width, height_OR_type, border_OR_canvas_OR_image_OR_pixels_OR_video) native "WebGLRenderingContext__texImage2D_2_Callback";
+ @DomName('WebGLRenderingContext._texImage2D_3')
@DocsEditable
- @DomName('WebGLRenderingContext.texImage2D_3')
- void _texImage2D_3(target, level, internalformat, format_OR_width, height_OR_type, border_OR_canvas_OR_image_OR_pixels_OR_video) native "WebGLRenderingContext_texImage2D_3_Callback";
+ void _texImage2D_3(target, level, internalformat, format_OR_width, height_OR_type, border_OR_canvas_OR_image_OR_pixels_OR_video) native "WebGLRenderingContext__texImage2D_3_Callback";
+ @DomName('WebGLRenderingContext._texImage2D_4')
@DocsEditable
- @DomName('WebGLRenderingContext.texImage2D_4')
- void _texImage2D_4(target, level, internalformat, format_OR_width, height_OR_type, border_OR_canvas_OR_image_OR_pixels_OR_video) native "WebGLRenderingContext_texImage2D_4_Callback";
+ void _texImage2D_4(target, level, internalformat, format_OR_width, height_OR_type, border_OR_canvas_OR_image_OR_pixels_OR_video) native "WebGLRenderingContext__texImage2D_4_Callback";
+ @DomName('WebGLRenderingContext._texImage2D_5')
@DocsEditable
- @DomName('WebGLRenderingContext.texImage2D_5')
- void _texImage2D_5(target, level, internalformat, format_OR_width, height_OR_type, border_OR_canvas_OR_image_OR_pixels_OR_video) native "WebGLRenderingContext_texImage2D_5_Callback";
+ void _texImage2D_5(target, level, internalformat, format_OR_width, height_OR_type, border_OR_canvas_OR_image_OR_pixels_OR_video) native "WebGLRenderingContext__texImage2D_5_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.texParameterf')
+ @DocsEditable
void texParameterf(int target, int pname, num param) native "WebGLRenderingContext_texParameterf_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.texParameteri')
+ @DocsEditable
void texParameteri(int target, int pname, int param) native "WebGLRenderingContext_texParameteri_Callback";
void texSubImage2D(int target, int level, int xoffset, int yoffset, int format_OR_width, int height_OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video, [int type, ArrayBufferView pixels]) {
@@ -26426,148 +27388,148 @@
throw new ArgumentError("Incorrect number or type of arguments");
}
+ @DomName('WebGLRenderingContext._texSubImage2D_1')
@DocsEditable
- @DomName('WebGLRenderingContext.texSubImage2D_1')
- void _texSubImage2D_1(target, level, xoffset, yoffset, format_OR_width, height_OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video, type, pixels) native "WebGLRenderingContext_texSubImage2D_1_Callback";
+ void _texSubImage2D_1(target, level, xoffset, yoffset, format_OR_width, height_OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video, type, pixels) native "WebGLRenderingContext__texSubImage2D_1_Callback";
+ @DomName('WebGLRenderingContext._texSubImage2D_2')
@DocsEditable
- @DomName('WebGLRenderingContext.texSubImage2D_2')
- void _texSubImage2D_2(target, level, xoffset, yoffset, format_OR_width, height_OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video) native "WebGLRenderingContext_texSubImage2D_2_Callback";
+ void _texSubImage2D_2(target, level, xoffset, yoffset, format_OR_width, height_OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video) native "WebGLRenderingContext__texSubImage2D_2_Callback";
+ @DomName('WebGLRenderingContext._texSubImage2D_3')
@DocsEditable
- @DomName('WebGLRenderingContext.texSubImage2D_3')
- void _texSubImage2D_3(target, level, xoffset, yoffset, format_OR_width, height_OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video) native "WebGLRenderingContext_texSubImage2D_3_Callback";
+ void _texSubImage2D_3(target, level, xoffset, yoffset, format_OR_width, height_OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video) native "WebGLRenderingContext__texSubImage2D_3_Callback";
+ @DomName('WebGLRenderingContext._texSubImage2D_4')
@DocsEditable
- @DomName('WebGLRenderingContext.texSubImage2D_4')
- void _texSubImage2D_4(target, level, xoffset, yoffset, format_OR_width, height_OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video) native "WebGLRenderingContext_texSubImage2D_4_Callback";
+ void _texSubImage2D_4(target, level, xoffset, yoffset, format_OR_width, height_OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video) native "WebGLRenderingContext__texSubImage2D_4_Callback";
+ @DomName('WebGLRenderingContext._texSubImage2D_5')
@DocsEditable
- @DomName('WebGLRenderingContext.texSubImage2D_5')
- void _texSubImage2D_5(target, level, xoffset, yoffset, format_OR_width, height_OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video) native "WebGLRenderingContext_texSubImage2D_5_Callback";
+ void _texSubImage2D_5(target, level, xoffset, yoffset, format_OR_width, height_OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video) native "WebGLRenderingContext__texSubImage2D_5_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.uniform1f')
+ @DocsEditable
void uniform1f(WebGLUniformLocation location, num x) native "WebGLRenderingContext_uniform1f_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.uniform1fv')
+ @DocsEditable
void uniform1fv(WebGLUniformLocation location, Float32Array v) native "WebGLRenderingContext_uniform1fv_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.uniform1i')
+ @DocsEditable
void uniform1i(WebGLUniformLocation location, int x) native "WebGLRenderingContext_uniform1i_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.uniform1iv')
+ @DocsEditable
void uniform1iv(WebGLUniformLocation location, Int32Array v) native "WebGLRenderingContext_uniform1iv_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.uniform2f')
+ @DocsEditable
void uniform2f(WebGLUniformLocation location, num x, num y) native "WebGLRenderingContext_uniform2f_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.uniform2fv')
+ @DocsEditable
void uniform2fv(WebGLUniformLocation location, Float32Array v) native "WebGLRenderingContext_uniform2fv_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.uniform2i')
+ @DocsEditable
void uniform2i(WebGLUniformLocation location, int x, int y) native "WebGLRenderingContext_uniform2i_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.uniform2iv')
+ @DocsEditable
void uniform2iv(WebGLUniformLocation location, Int32Array v) native "WebGLRenderingContext_uniform2iv_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.uniform3f')
+ @DocsEditable
void uniform3f(WebGLUniformLocation location, num x, num y, num z) native "WebGLRenderingContext_uniform3f_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.uniform3fv')
+ @DocsEditable
void uniform3fv(WebGLUniformLocation location, Float32Array v) native "WebGLRenderingContext_uniform3fv_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.uniform3i')
+ @DocsEditable
void uniform3i(WebGLUniformLocation location, int x, int y, int z) native "WebGLRenderingContext_uniform3i_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.uniform3iv')
+ @DocsEditable
void uniform3iv(WebGLUniformLocation location, Int32Array v) native "WebGLRenderingContext_uniform3iv_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.uniform4f')
+ @DocsEditable
void uniform4f(WebGLUniformLocation location, num x, num y, num z, num w) native "WebGLRenderingContext_uniform4f_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.uniform4fv')
+ @DocsEditable
void uniform4fv(WebGLUniformLocation location, Float32Array v) native "WebGLRenderingContext_uniform4fv_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.uniform4i')
+ @DocsEditable
void uniform4i(WebGLUniformLocation location, int x, int y, int z, int w) native "WebGLRenderingContext_uniform4i_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.uniform4iv')
+ @DocsEditable
void uniform4iv(WebGLUniformLocation location, Int32Array v) native "WebGLRenderingContext_uniform4iv_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.uniformMatrix2fv')
+ @DocsEditable
void uniformMatrix2fv(WebGLUniformLocation location, bool transpose, Float32Array array) native "WebGLRenderingContext_uniformMatrix2fv_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.uniformMatrix3fv')
+ @DocsEditable
void uniformMatrix3fv(WebGLUniformLocation location, bool transpose, Float32Array array) native "WebGLRenderingContext_uniformMatrix3fv_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.uniformMatrix4fv')
+ @DocsEditable
void uniformMatrix4fv(WebGLUniformLocation location, bool transpose, Float32Array array) native "WebGLRenderingContext_uniformMatrix4fv_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.useProgram')
+ @DocsEditable
void useProgram(WebGLProgram program) native "WebGLRenderingContext_useProgram_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.validateProgram')
+ @DocsEditable
void validateProgram(WebGLProgram program) native "WebGLRenderingContext_validateProgram_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.vertexAttrib1f')
+ @DocsEditable
void vertexAttrib1f(int indx, num x) native "WebGLRenderingContext_vertexAttrib1f_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.vertexAttrib1fv')
+ @DocsEditable
void vertexAttrib1fv(int indx, Float32Array values) native "WebGLRenderingContext_vertexAttrib1fv_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.vertexAttrib2f')
+ @DocsEditable
void vertexAttrib2f(int indx, num x, num y) native "WebGLRenderingContext_vertexAttrib2f_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.vertexAttrib2fv')
+ @DocsEditable
void vertexAttrib2fv(int indx, Float32Array values) native "WebGLRenderingContext_vertexAttrib2fv_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.vertexAttrib3f')
+ @DocsEditable
void vertexAttrib3f(int indx, num x, num y, num z) native "WebGLRenderingContext_vertexAttrib3f_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.vertexAttrib3fv')
+ @DocsEditable
void vertexAttrib3fv(int indx, Float32Array values) native "WebGLRenderingContext_vertexAttrib3fv_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.vertexAttrib4f')
+ @DocsEditable
void vertexAttrib4f(int indx, num x, num y, num z, num w) native "WebGLRenderingContext_vertexAttrib4f_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.vertexAttrib4fv')
+ @DocsEditable
void vertexAttrib4fv(int indx, Float32Array values) native "WebGLRenderingContext_vertexAttrib4fv_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.vertexAttribPointer')
+ @DocsEditable
void vertexAttribPointer(int indx, int size, int type, bool normalized, int stride, int offset) native "WebGLRenderingContext_vertexAttribPointer_Callback";
- @DocsEditable
@DomName('WebGLRenderingContext.viewport')
+ @DocsEditable
void viewport(int x, int y, int width, int height) native "WebGLRenderingContext_viewport_Callback";
}
@@ -26596,16 +27558,16 @@
class WebGLShaderPrecisionFormat extends NativeFieldWrapperClass1 {
WebGLShaderPrecisionFormat.internal();
- @DocsEditable
@DomName('WebGLShaderPrecisionFormat.precision')
+ @DocsEditable
int get precision native "WebGLShaderPrecisionFormat_precision_Getter";
- @DocsEditable
@DomName('WebGLShaderPrecisionFormat.rangeMax')
+ @DocsEditable
int get rangeMax native "WebGLShaderPrecisionFormat_rangeMax_Getter";
- @DocsEditable
@DomName('WebGLShaderPrecisionFormat.rangeMin')
+ @DocsEditable
int get rangeMin native "WebGLShaderPrecisionFormat_rangeMin_Getter";
}
@@ -26684,8 +27646,8 @@
static const int CSS_FILTER_SEPIA = 3;
- @DocsEditable
@DomName('WebKitCSSFilterValue.operationType')
+ @DocsEditable
int get operationType native "WebKitCSSFilterValue_operationType_Getter";
}
@@ -26714,40 +27676,40 @@
class WebKitNamedFlow extends EventTarget {
WebKitNamedFlow.internal() : super.internal();
- @DocsEditable
@DomName('WebKitNamedFlow.firstEmptyRegionIndex')
+ @DocsEditable
int get firstEmptyRegionIndex native "WebKitNamedFlow_firstEmptyRegionIndex_Getter";
- @DocsEditable
@DomName('WebKitNamedFlow.name')
+ @DocsEditable
String get name native "WebKitNamedFlow_name_Getter";
- @DocsEditable
@DomName('WebKitNamedFlow.overset')
+ @DocsEditable
bool get overset native "WebKitNamedFlow_overset_Getter";
- @DocsEditable
@DomName('WebKitNamedFlow.addEventListener')
+ @DocsEditable
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native "WebKitNamedFlow_addEventListener_Callback";
- @DocsEditable
@DomName('WebKitNamedFlow.dispatchEvent')
- bool $dom_dispatchEvent(Event event) native "WebKitNamedFlow_dispatchEvent_Callback";
-
@DocsEditable
+ bool dispatchEvent(Event event) native "WebKitNamedFlow_dispatchEvent_Callback";
+
@DomName('WebKitNamedFlow.getContent')
+ @DocsEditable
List<Node> getContent() native "WebKitNamedFlow_getContent_Callback";
- @DocsEditable
@DomName('WebKitNamedFlow.getRegions')
+ @DocsEditable
List<Node> getRegions() native "WebKitNamedFlow_getRegions_Callback";
- @DocsEditable
@DomName('WebKitNamedFlow.getRegionsByContent')
+ @DocsEditable
List<Node> getRegionsByContent(Node contentNode) native "WebKitNamedFlow_getRegionsByContent_Callback";
- @DocsEditable
@DomName('WebKitNamedFlow.removeEventListener')
+ @DocsEditable
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native "WebKitNamedFlow_removeEventListener_Callback";
}
@@ -26767,12 +27729,20 @@
class WebSocket extends EventTarget {
WebSocket.internal() : super.internal();
+ @DomName('WebSocket.close')
+ @DocsEditable
static const EventStreamProvider<CloseEvent> closeEvent = const EventStreamProvider<CloseEvent>('close');
+ @DomName('WebSocket.error')
+ @DocsEditable
static const EventStreamProvider<Event> errorEvent = const EventStreamProvider<Event>('error');
+ @DomName('WebSocket.message')
+ @DocsEditable
static const EventStreamProvider<MessageEvent> messageEvent = const EventStreamProvider<MessageEvent>('message');
+ @DomName('WebSocket.open')
+ @DocsEditable
static const EventStreamProvider<Event> openEvent = const EventStreamProvider<Event>('open');
@DocsEditable
@@ -26784,6 +27754,7 @@
@DocsEditable
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
+ @deprecated
WebSocketEvents get on =>
new WebSocketEvents(this);
@@ -26795,40 +27766,40 @@
static const int OPEN = 1;
- @DocsEditable
@DomName('WebSocket.URL')
+ @DocsEditable
String get Url native "WebSocket_URL_Getter";
- @DocsEditable
@DomName('WebSocket.binaryType')
+ @DocsEditable
String get binaryType native "WebSocket_binaryType_Getter";
- @DocsEditable
@DomName('WebSocket.binaryType')
+ @DocsEditable
void set binaryType(String value) native "WebSocket_binaryType_Setter";
- @DocsEditable
@DomName('WebSocket.bufferedAmount')
+ @DocsEditable
int get bufferedAmount native "WebSocket_bufferedAmount_Getter";
- @DocsEditable
@DomName('WebSocket.extensions')
+ @DocsEditable
String get extensions native "WebSocket_extensions_Getter";
- @DocsEditable
@DomName('WebSocket.protocol')
+ @DocsEditable
String get protocol native "WebSocket_protocol_Getter";
- @DocsEditable
@DomName('WebSocket.readyState')
+ @DocsEditable
int get readyState native "WebSocket_readyState_Getter";
- @DocsEditable
@DomName('WebSocket.url')
+ @DocsEditable
String get url native "WebSocket_url_Getter";
- @DocsEditable
@DomName('WebSocket.addEventListener')
+ @DocsEditable
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native "WebSocket_addEventListener_Callback";
void close([int code, String reason]) {
@@ -26841,43 +27812,53 @@
return;
}
_close_3();
+ return;
}
+ @DomName('WebSocket._close_1')
@DocsEditable
- @DomName('WebSocket.close_1')
- void _close_1(code, reason) native "WebSocket_close_1_Callback";
+ void _close_1(code, reason) native "WebSocket__close_1_Callback";
+ @DomName('WebSocket._close_2')
@DocsEditable
- @DomName('WebSocket.close_2')
- void _close_2(code) native "WebSocket_close_2_Callback";
+ void _close_2(code) native "WebSocket__close_2_Callback";
+ @DomName('WebSocket._close_3')
@DocsEditable
- @DomName('WebSocket.close_3')
- void _close_3() native "WebSocket_close_3_Callback";
+ void _close_3() native "WebSocket__close_3_Callback";
- @DocsEditable
@DomName('WebSocket.dispatchEvent')
- bool $dom_dispatchEvent(Event evt) native "WebSocket_dispatchEvent_Callback";
-
@DocsEditable
+ bool dispatchEvent(Event evt) native "WebSocket_dispatchEvent_Callback";
+
@DomName('WebSocket.removeEventListener')
+ @DocsEditable
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native "WebSocket_removeEventListener_Callback";
- @DocsEditable
@DomName('WebSocket.send')
+ @DocsEditable
void send(data) native "WebSocket_send_Callback";
+ @DomName('WebSocket.close')
+ @DocsEditable
Stream<CloseEvent> get onClose => closeEvent.forTarget(this);
+ @DomName('WebSocket.error')
+ @DocsEditable
Stream<Event> get onError => errorEvent.forTarget(this);
+ @DomName('WebSocket.message')
+ @DocsEditable
Stream<MessageEvent> get onMessage => messageEvent.forTarget(this);
+ @DomName('WebSocket.open')
+ @DocsEditable
Stream<Event> get onOpen => openEvent.forTarget(this);
}
@DocsEditable
+@deprecated
class WebSocketEvents extends Events {
@DocsEditable
WebSocketEvents(EventTarget _ptr) : super(_ptr);
@@ -26899,17 +27880,19 @@
// BSD-style license that can be found in the LICENSE file.
-@DocsEditable
@DomName('WheelEvent')
class WheelEvent extends MouseEvent {
- factory WheelEvent(String type, Window view, int wheelDeltaX, int wheelDeltaY,
- int detail, int screenX, int screenY, int clientX, int clientY,
- int button,
- [bool canBubble = true, bool cancelable = true, bool ctrlKey = false,
- bool altKey = false, bool shiftKey = false, bool metaKey = false,
- EventTarget relatedTarget = null]) {
+ factory WheelEvent(String type,
+ {Window view, int deltaX: 0, int deltaY: 0,
+ int detail: 0, int screenX: 0, int screenY: 0, int clientX: 0,
+ int clientY: 0, int button: 0, bool canBubble: true,
+ bool cancelable: true, bool ctrlKey: false, bool altKey: false,
+ bool shiftKey: false, bool metaKey: false, EventTarget relatedTarget}) {
+ if (view == null) {
+ view = window;
+ }
var eventType = 'WheelEvent';
if (_Device.isFirefox) {
eventType = 'MouseScrollEvents';
@@ -26919,8 +27902,8 @@
event.$dom_initMouseEvent(type, canBubble, cancelable, view, detail,
screenX, screenY, clientX, clientY, ctrlKey, altKey, shiftKey,
metaKey, button, relatedTarget);
- event.$dom_initWebKitWheelEvent(wheelDeltaX,
- wheelDeltaY ~/ 120, // Chrome does an auto-convert to pixels.
+ event.$dom_initWebKitWheelEvent(deltaX,
+ deltaY ~/ 120, // Chrome does an auto-convert to pixels.
view, screenX, screenY, clientX, clientY, ctrlKey, altKey, shiftKey,
metaKey);
@@ -26929,20 +27912,20 @@
WheelEvent.internal() : super.internal();
- @DocsEditable
@DomName('WheelEvent.webkitDirectionInvertedFromDevice')
+ @DocsEditable
bool get webkitDirectionInvertedFromDevice native "WheelEvent_webkitDirectionInvertedFromDevice_Getter";
- @DocsEditable
@DomName('WheelEvent.wheelDeltaX')
+ @DocsEditable
int get $dom_wheelDeltaX native "WheelEvent_wheelDeltaX_Getter";
- @DocsEditable
@DomName('WheelEvent.wheelDeltaY')
+ @DocsEditable
int get $dom_wheelDeltaY native "WheelEvent_wheelDeltaY_Getter";
- @DocsEditable
@DomName('WheelEvent.initWebKitWheelEvent')
+ @DocsEditable
void $dom_initWebKitWheelEvent(int wheelDeltaX, int wheelDeltaY, Window view, int screenX, int screenY, int clientX, int clientY, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey) native "WheelEvent_initWebKitWheelEvent_Callback";
@@ -26959,7 +27942,6 @@
// BSD-style license that can be found in the LICENSE file.
-@DocsEditable
@DomName('Window')
class Window extends EventTarget implements WindowBase {
@@ -26993,42 +27975,77 @@
Window.internal() : super.internal();
+ @DomName('DOMWindow.DOMContentLoaded')
+ @DocsEditable
static const EventStreamProvider<Event> contentLoadedEvent = const EventStreamProvider<Event>('DOMContentLoaded');
+ @DomName('DOMWindow.beforeunload')
+ @DocsEditable
static const EventStreamProvider<Event> beforeUnloadEvent = const EventStreamProvider<Event>('beforeunload');
+ @DomName('DOMWindow.devicemotion')
+ @DocsEditable
static const EventStreamProvider<DeviceMotionEvent> deviceMotionEvent = const EventStreamProvider<DeviceMotionEvent>('devicemotion');
+ @DomName('DOMWindow.deviceorientation')
+ @DocsEditable
static const EventStreamProvider<DeviceOrientationEvent> deviceOrientationEvent = const EventStreamProvider<DeviceOrientationEvent>('deviceorientation');
- static const EventStreamProvider<HashChangeEvent> hashChangeEvent = const EventStreamProvider<HashChangeEvent>('hashchange');
+ @DomName('DOMWindow.hashchange')
+ @DocsEditable
+ static const EventStreamProvider<Event> hashChangeEvent = const EventStreamProvider<Event>('hashchange');
+ @DomName('DOMWindow.message')
+ @DocsEditable
static const EventStreamProvider<MessageEvent> messageEvent = const EventStreamProvider<MessageEvent>('message');
+ @DomName('DOMWindow.offline')
+ @DocsEditable
static const EventStreamProvider<Event> offlineEvent = const EventStreamProvider<Event>('offline');
+ @DomName('DOMWindow.online')
+ @DocsEditable
static const EventStreamProvider<Event> onlineEvent = const EventStreamProvider<Event>('online');
+ @DomName('DOMWindow.pagehide')
+ @DocsEditable
static const EventStreamProvider<Event> pageHideEvent = const EventStreamProvider<Event>('pagehide');
+ @DomName('DOMWindow.pageshow')
+ @DocsEditable
static const EventStreamProvider<Event> pageShowEvent = const EventStreamProvider<Event>('pageshow');
+ @DomName('DOMWindow.popstate')
+ @DocsEditable
static const EventStreamProvider<PopStateEvent> popStateEvent = const EventStreamProvider<PopStateEvent>('popstate');
+ @DomName('DOMWindow.resize')
+ @DocsEditable
static const EventStreamProvider<Event> resizeEvent = const EventStreamProvider<Event>('resize');
+ @DomName('DOMWindow.storage')
+ @DocsEditable
static const EventStreamProvider<StorageEvent> storageEvent = const EventStreamProvider<StorageEvent>('storage');
+ @DomName('DOMWindow.unload')
+ @DocsEditable
static const EventStreamProvider<Event> unloadEvent = const EventStreamProvider<Event>('unload');
+ @DomName('DOMWindow.webkitAnimationEnd')
+ @DocsEditable
static const EventStreamProvider<AnimationEvent> animationEndEvent = const EventStreamProvider<AnimationEvent>('webkitAnimationEnd');
+ @DomName('DOMWindow.webkitAnimationIteration')
+ @DocsEditable
static const EventStreamProvider<AnimationEvent> animationIterationEvent = const EventStreamProvider<AnimationEvent>('webkitAnimationIteration');
+ @DomName('DOMWindow.webkitAnimationStart')
+ @DocsEditable
static const EventStreamProvider<AnimationEvent> animationStartEvent = const EventStreamProvider<AnimationEvent>('webkitAnimationStart');
@DocsEditable
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
+ @deprecated
WindowEvents get on =>
new WindowEvents(this);
@@ -27036,499 +28053,608 @@
static const int TEMPORARY = 0;
- @DocsEditable
@DomName('DOMWindow.applicationCache')
+ @DocsEditable
ApplicationCache get applicationCache native "DOMWindow_applicationCache_Getter";
- @DocsEditable
@DomName('DOMWindow.closed')
+ @DocsEditable
bool get closed native "DOMWindow_closed_Getter";
- @DocsEditable
@DomName('DOMWindow.console')
+ @DocsEditable
Console get console native "DOMWindow_console_Getter";
- @DocsEditable
@DomName('DOMWindow.crypto')
+ @DocsEditable
Crypto get crypto native "DOMWindow_crypto_Getter";
- @DocsEditable
@DomName('DOMWindow.defaultStatus')
+ @DocsEditable
String get defaultStatus native "DOMWindow_defaultStatus_Getter";
- @DocsEditable
@DomName('DOMWindow.defaultStatus')
+ @DocsEditable
void set defaultStatus(String value) native "DOMWindow_defaultStatus_Setter";
- @DocsEditable
@DomName('DOMWindow.defaultstatus')
+ @DocsEditable
String get defaultstatus native "DOMWindow_defaultstatus_Getter";
- @DocsEditable
@DomName('DOMWindow.defaultstatus')
+ @DocsEditable
void set defaultstatus(String value) native "DOMWindow_defaultstatus_Setter";
- @DocsEditable
@DomName('DOMWindow.devicePixelRatio')
+ @DocsEditable
num get devicePixelRatio native "DOMWindow_devicePixelRatio_Getter";
- @DocsEditable
@DomName('DOMWindow.document')
+ @DocsEditable
Document get document native "DOMWindow_document_Getter";
- @DocsEditable
@DomName('DOMWindow.event')
+ @DocsEditable
Event get event native "DOMWindow_event_Getter";
- @DocsEditable
@DomName('DOMWindow.history')
+ @DocsEditable
History get history native "DOMWindow_history_Getter";
- @DocsEditable
@DomName('DOMWindow.indexedDB')
+ @DocsEditable
@SupportedBrowser(SupportedBrowser.CHROME)
@SupportedBrowser(SupportedBrowser.FIREFOX, '15')
@SupportedBrowser(SupportedBrowser.IE, '10')
- @Experimental()
+ @Experimental
IdbFactory get indexedDB native "DOMWindow_indexedDB_Getter";
- @DocsEditable
@DomName('DOMWindow.innerHeight')
+ @DocsEditable
int get innerHeight native "DOMWindow_innerHeight_Getter";
- @DocsEditable
@DomName('DOMWindow.innerWidth')
+ @DocsEditable
int get innerWidth native "DOMWindow_innerWidth_Getter";
- @DocsEditable
@DomName('DOMWindow.localStorage')
+ @DocsEditable
Storage get localStorage native "DOMWindow_localStorage_Getter";
- @DocsEditable
@DomName('DOMWindow.location')
+ @DocsEditable
Location get location native "DOMWindow_location_Getter";
- @DocsEditable
@DomName('DOMWindow.location')
+ @DocsEditable
void set location(Location value) native "DOMWindow_location_Setter";
- @DocsEditable
@DomName('DOMWindow.locationbar')
+ @DocsEditable
BarInfo get locationbar native "DOMWindow_locationbar_Getter";
- @DocsEditable
@DomName('DOMWindow.menubar')
+ @DocsEditable
BarInfo get menubar native "DOMWindow_menubar_Getter";
- @DocsEditable
@DomName('DOMWindow.name')
+ @DocsEditable
String get name native "DOMWindow_name_Getter";
- @DocsEditable
@DomName('DOMWindow.name')
+ @DocsEditable
void set name(String value) native "DOMWindow_name_Setter";
- @DocsEditable
@DomName('DOMWindow.navigator')
+ @DocsEditable
Navigator get navigator native "DOMWindow_navigator_Getter";
- @DocsEditable
@DomName('DOMWindow.offscreenBuffering')
+ @DocsEditable
bool get offscreenBuffering native "DOMWindow_offscreenBuffering_Getter";
- @DocsEditable
@DomName('DOMWindow.opener')
+ @DocsEditable
WindowBase get opener native "DOMWindow_opener_Getter";
- @DocsEditable
@DomName('DOMWindow.outerHeight')
+ @DocsEditable
int get outerHeight native "DOMWindow_outerHeight_Getter";
- @DocsEditable
@DomName('DOMWindow.outerWidth')
+ @DocsEditable
int get outerWidth native "DOMWindow_outerWidth_Getter";
- @DocsEditable
@DomName('DOMWindow.pagePopupController')
+ @DocsEditable
PagePopupController get pagePopupController native "DOMWindow_pagePopupController_Getter";
- @DocsEditable
@DomName('DOMWindow.pageXOffset')
+ @DocsEditable
int get pageXOffset native "DOMWindow_pageXOffset_Getter";
- @DocsEditable
@DomName('DOMWindow.pageYOffset')
+ @DocsEditable
int get pageYOffset native "DOMWindow_pageYOffset_Getter";
- @DocsEditable
@DomName('DOMWindow.parent')
+ @DocsEditable
WindowBase get parent native "DOMWindow_parent_Getter";
- @DocsEditable
@DomName('DOMWindow.performance')
+ @DocsEditable
@SupportedBrowser(SupportedBrowser.CHROME)
@SupportedBrowser(SupportedBrowser.FIREFOX)
@SupportedBrowser(SupportedBrowser.IE)
Performance get performance native "DOMWindow_performance_Getter";
- @DocsEditable
@DomName('DOMWindow.personalbar')
+ @DocsEditable
BarInfo get personalbar native "DOMWindow_personalbar_Getter";
- @DocsEditable
@DomName('DOMWindow.screen')
+ @DocsEditable
Screen get screen native "DOMWindow_screen_Getter";
- @DocsEditable
@DomName('DOMWindow.screenLeft')
+ @DocsEditable
int get screenLeft native "DOMWindow_screenLeft_Getter";
- @DocsEditable
@DomName('DOMWindow.screenTop')
+ @DocsEditable
int get screenTop native "DOMWindow_screenTop_Getter";
- @DocsEditable
@DomName('DOMWindow.screenX')
+ @DocsEditable
int get screenX native "DOMWindow_screenX_Getter";
- @DocsEditable
@DomName('DOMWindow.screenY')
+ @DocsEditable
int get screenY native "DOMWindow_screenY_Getter";
- @DocsEditable
@DomName('DOMWindow.scrollX')
+ @DocsEditable
int get scrollX native "DOMWindow_scrollX_Getter";
- @DocsEditable
@DomName('DOMWindow.scrollY')
+ @DocsEditable
int get scrollY native "DOMWindow_scrollY_Getter";
- @DocsEditable
@DomName('DOMWindow.scrollbars')
+ @DocsEditable
BarInfo get scrollbars native "DOMWindow_scrollbars_Getter";
- @DocsEditable
@DomName('DOMWindow.self')
+ @DocsEditable
WindowBase get self native "DOMWindow_self_Getter";
- @DocsEditable
@DomName('DOMWindow.sessionStorage')
+ @DocsEditable
Storage get sessionStorage native "DOMWindow_sessionStorage_Getter";
- @DocsEditable
@DomName('DOMWindow.status')
+ @DocsEditable
String get status native "DOMWindow_status_Getter";
- @DocsEditable
@DomName('DOMWindow.status')
+ @DocsEditable
void set status(String value) native "DOMWindow_status_Setter";
- @DocsEditable
@DomName('DOMWindow.statusbar')
+ @DocsEditable
BarInfo get statusbar native "DOMWindow_statusbar_Getter";
- @DocsEditable
@DomName('DOMWindow.styleMedia')
+ @DocsEditable
StyleMedia get styleMedia native "DOMWindow_styleMedia_Getter";
- @DocsEditable
@DomName('DOMWindow.toolbar')
+ @DocsEditable
BarInfo get toolbar native "DOMWindow_toolbar_Getter";
- @DocsEditable
@DomName('DOMWindow.top')
+ @DocsEditable
WindowBase get top native "DOMWindow_top_Getter";
- @DocsEditable
@DomName('DOMWindow.webkitNotifications')
+ @DocsEditable
@SupportedBrowser(SupportedBrowser.CHROME)
@SupportedBrowser(SupportedBrowser.SAFARI)
- @Experimental()
+ @Experimental
NotificationCenter get notifications native "DOMWindow_webkitNotifications_Getter";
- @DocsEditable
@DomName('DOMWindow.webkitStorageInfo')
+ @DocsEditable
StorageInfo get webkitStorageInfo native "DOMWindow_webkitStorageInfo_Getter";
- @DocsEditable
@DomName('DOMWindow.window')
+ @DocsEditable
WindowBase get window native "DOMWindow_window_Getter";
- @DocsEditable
@DomName('DOMWindow.addEventListener')
+ @DocsEditable
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native "DOMWindow_addEventListener_Callback";
- @DocsEditable
@DomName('DOMWindow.alert')
+ @DocsEditable
void alert(String message) native "DOMWindow_alert_Callback";
- @DocsEditable
@DomName('DOMWindow.atob')
+ @DocsEditable
String atob(String string) native "DOMWindow_atob_Callback";
- @DocsEditable
@DomName('DOMWindow.btoa')
+ @DocsEditable
String btoa(String string) native "DOMWindow_btoa_Callback";
- @DocsEditable
@DomName('DOMWindow.cancelAnimationFrame')
+ @DocsEditable
void cancelAnimationFrame(int id) native "DOMWindow_cancelAnimationFrame_Callback";
- @DocsEditable
@DomName('DOMWindow.captureEvents')
+ @DocsEditable
void captureEvents() native "DOMWindow_captureEvents_Callback";
- @DocsEditable
@DomName('DOMWindow.clearInterval')
+ @DocsEditable
void clearInterval(int handle) native "DOMWindow_clearInterval_Callback";
- @DocsEditable
@DomName('DOMWindow.clearTimeout')
+ @DocsEditable
void clearTimeout(int handle) native "DOMWindow_clearTimeout_Callback";
- @DocsEditable
@DomName('DOMWindow.close')
+ @DocsEditable
void close() native "DOMWindow_close_Callback";
- @DocsEditable
@DomName('DOMWindow.confirm')
+ @DocsEditable
bool confirm(String message) native "DOMWindow_confirm_Callback";
- @DocsEditable
@DomName('DOMWindow.dispatchEvent')
- bool $dom_dispatchEvent(Event evt) native "DOMWindow_dispatchEvent_Callback";
-
@DocsEditable
+ bool dispatchEvent(Event evt) native "DOMWindow_dispatchEvent_Callback";
+
@DomName('DOMWindow.find')
+ @DocsEditable
bool find(String string, bool caseSensitive, bool backwards, bool wrap, bool wholeWord, bool searchInFrames, bool showDialog) native "DOMWindow_find_Callback";
- @DocsEditable
@DomName('DOMWindow.getComputedStyle')
+ @DocsEditable
CssStyleDeclaration $dom_getComputedStyle(Element element, String pseudoElement) native "DOMWindow_getComputedStyle_Callback";
- @DocsEditable
@DomName('DOMWindow.getMatchedCSSRules')
+ @DocsEditable
List<CssRule> getMatchedCssRules(Element element, String pseudoElement) native "DOMWindow_getMatchedCSSRules_Callback";
- @DocsEditable
@DomName('DOMWindow.getSelection')
+ @DocsEditable
DomSelection getSelection() native "DOMWindow_getSelection_Callback";
- @DocsEditable
@DomName('DOMWindow.matchMedia')
+ @DocsEditable
MediaQueryList matchMedia(String query) native "DOMWindow_matchMedia_Callback";
- @DocsEditable
@DomName('DOMWindow.moveBy')
+ @DocsEditable
void moveBy(num x, num y) native "DOMWindow_moveBy_Callback";
- @DocsEditable
@DomName('DOMWindow.moveTo')
+ @DocsEditable
void moveTo(num x, num y) native "DOMWindow_moveTo_Callback";
- @DocsEditable
@DomName('DOMWindow.open')
+ @DocsEditable
WindowBase open(String url, String name, [String options]) native "DOMWindow_open_Callback";
- @DocsEditable
@DomName('DOMWindow.openDatabase')
+ @DocsEditable
Database openDatabase(String name, String version, String displayName, int estimatedSize, [DatabaseCallback creationCallback]) native "DOMWindow_openDatabase_Callback";
- @DocsEditable
@DomName('DOMWindow.postMessage')
+ @DocsEditable
void postMessage(/*SerializedScriptValue*/ message, String targetOrigin, [List messagePorts]) native "DOMWindow_postMessage_Callback";
- @DocsEditable
@DomName('DOMWindow.print')
+ @DocsEditable
void print() native "DOMWindow_print_Callback";
- @DocsEditable
@DomName('DOMWindow.releaseEvents')
+ @DocsEditable
void releaseEvents() native "DOMWindow_releaseEvents_Callback";
- @DocsEditable
@DomName('DOMWindow.removeEventListener')
+ @DocsEditable
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native "DOMWindow_removeEventListener_Callback";
- @DocsEditable
@DomName('DOMWindow.requestAnimationFrame')
+ @DocsEditable
int requestAnimationFrame(RequestAnimationFrameCallback callback) native "DOMWindow_requestAnimationFrame_Callback";
- @DocsEditable
@DomName('DOMWindow.resizeBy')
+ @DocsEditable
void resizeBy(num x, num y) native "DOMWindow_resizeBy_Callback";
- @DocsEditable
@DomName('DOMWindow.resizeTo')
+ @DocsEditable
void resizeTo(num width, num height) native "DOMWindow_resizeTo_Callback";
- @DocsEditable
@DomName('DOMWindow.scroll')
+ @DocsEditable
void scroll(int x, int y) native "DOMWindow_scroll_Callback";
- @DocsEditable
@DomName('DOMWindow.scrollBy')
+ @DocsEditable
void scrollBy(int x, int y) native "DOMWindow_scrollBy_Callback";
- @DocsEditable
@DomName('DOMWindow.scrollTo')
+ @DocsEditable
void scrollTo(int x, int y) native "DOMWindow_scrollTo_Callback";
- @DocsEditable
@DomName('DOMWindow.setInterval')
+ @DocsEditable
int setInterval(TimeoutHandler handler, int timeout) native "DOMWindow_setInterval_Callback";
- @DocsEditable
@DomName('DOMWindow.setTimeout')
+ @DocsEditable
int setTimeout(TimeoutHandler handler, int timeout) native "DOMWindow_setTimeout_Callback";
- @DocsEditable
@DomName('DOMWindow.showModalDialog')
+ @DocsEditable
Object showModalDialog(String url, [Object dialogArgs, String featureArgs]) native "DOMWindow_showModalDialog_Callback";
- @DocsEditable
@DomName('DOMWindow.stop')
+ @DocsEditable
void stop() native "DOMWindow_stop_Callback";
- @DocsEditable
@DomName('DOMWindow.webkitCancelAnimationFrame')
+ @DocsEditable
void webkitCancelAnimationFrame(int id) native "DOMWindow_webkitCancelAnimationFrame_Callback";
- @DocsEditable
@DomName('DOMWindow.webkitConvertPointFromNodeToPage')
+ @DocsEditable
Point webkitConvertPointFromNodeToPage(Node node, Point p) native "DOMWindow_webkitConvertPointFromNodeToPage_Callback";
- @DocsEditable
@DomName('DOMWindow.webkitConvertPointFromPageToNode')
+ @DocsEditable
Point webkitConvertPointFromPageToNode(Node node, Point p) native "DOMWindow_webkitConvertPointFromPageToNode_Callback";
- @DocsEditable
@DomName('DOMWindow.webkitRequestAnimationFrame')
+ @DocsEditable
int webkitRequestAnimationFrame(RequestAnimationFrameCallback callback) native "DOMWindow_webkitRequestAnimationFrame_Callback";
- @DocsEditable
@DomName('DOMWindow.webkitRequestFileSystem')
+ @DocsEditable
@SupportedBrowser(SupportedBrowser.CHROME)
- @Experimental()
+ @Experimental
void requestFileSystem(int type, int size, FileSystemCallback successCallback, [ErrorCallback errorCallback]) native "DOMWindow_webkitRequestFileSystem_Callback";
- @DocsEditable
@DomName('DOMWindow.webkitResolveLocalFileSystemURL')
+ @DocsEditable
@SupportedBrowser(SupportedBrowser.CHROME)
- @Experimental()
+ @Experimental
void resolveLocalFileSystemUrl(String url, EntryCallback successCallback, [ErrorCallback errorCallback]) native "DOMWindow_webkitResolveLocalFileSystemURL_Callback";
+ @DomName('DOMWindow.DOMContentLoaded')
+ @DocsEditable
Stream<Event> get onContentLoaded => contentLoadedEvent.forTarget(this);
+ @DomName('DOMWindow.abort')
+ @DocsEditable
Stream<Event> get onAbort => Element.abortEvent.forTarget(this);
+ @DomName('DOMWindow.beforeunload')
+ @DocsEditable
Stream<Event> get onBeforeUnload => beforeUnloadEvent.forTarget(this);
+ @DomName('DOMWindow.blur')
+ @DocsEditable
Stream<Event> get onBlur => Element.blurEvent.forTarget(this);
+ @DomName('DOMWindow.change')
+ @DocsEditable
Stream<Event> get onChange => Element.changeEvent.forTarget(this);
+ @DomName('DOMWindow.click')
+ @DocsEditable
Stream<MouseEvent> get onClick => Element.clickEvent.forTarget(this);
+ @DomName('DOMWindow.contextmenu')
+ @DocsEditable
Stream<MouseEvent> get onContextMenu => Element.contextMenuEvent.forTarget(this);
+ @DomName('DOMWindow.dblclick')
+ @DocsEditable
Stream<Event> get onDoubleClick => Element.doubleClickEvent.forTarget(this);
+ @DomName('DOMWindow.devicemotion')
+ @DocsEditable
Stream<DeviceMotionEvent> get onDeviceMotion => deviceMotionEvent.forTarget(this);
+ @DomName('DOMWindow.deviceorientation')
+ @DocsEditable
Stream<DeviceOrientationEvent> get onDeviceOrientation => deviceOrientationEvent.forTarget(this);
+ @DomName('DOMWindow.drag')
+ @DocsEditable
Stream<MouseEvent> get onDrag => Element.dragEvent.forTarget(this);
+ @DomName('DOMWindow.dragend')
+ @DocsEditable
Stream<MouseEvent> get onDragEnd => Element.dragEndEvent.forTarget(this);
+ @DomName('DOMWindow.dragenter')
+ @DocsEditable
Stream<MouseEvent> get onDragEnter => Element.dragEnterEvent.forTarget(this);
+ @DomName('DOMWindow.dragleave')
+ @DocsEditable
Stream<MouseEvent> get onDragLeave => Element.dragLeaveEvent.forTarget(this);
+ @DomName('DOMWindow.dragover')
+ @DocsEditable
Stream<MouseEvent> get onDragOver => Element.dragOverEvent.forTarget(this);
+ @DomName('DOMWindow.dragstart')
+ @DocsEditable
Stream<MouseEvent> get onDragStart => Element.dragStartEvent.forTarget(this);
+ @DomName('DOMWindow.drop')
+ @DocsEditable
Stream<MouseEvent> get onDrop => Element.dropEvent.forTarget(this);
+ @DomName('DOMWindow.error')
+ @DocsEditable
Stream<Event> get onError => Element.errorEvent.forTarget(this);
+ @DomName('DOMWindow.focus')
+ @DocsEditable
Stream<Event> get onFocus => Element.focusEvent.forTarget(this);
- Stream<HashChangeEvent> get onHashChange => hashChangeEvent.forTarget(this);
+ @DomName('DOMWindow.hashchange')
+ @DocsEditable
+ Stream<Event> get onHashChange => hashChangeEvent.forTarget(this);
+ @DomName('DOMWindow.input')
+ @DocsEditable
Stream<Event> get onInput => Element.inputEvent.forTarget(this);
+ @DomName('DOMWindow.invalid')
+ @DocsEditable
Stream<Event> get onInvalid => Element.invalidEvent.forTarget(this);
+ @DomName('DOMWindow.keydown')
+ @DocsEditable
Stream<KeyboardEvent> get onKeyDown => Element.keyDownEvent.forTarget(this);
+ @DomName('DOMWindow.keypress')
+ @DocsEditable
Stream<KeyboardEvent> get onKeyPress => Element.keyPressEvent.forTarget(this);
+ @DomName('DOMWindow.keyup')
+ @DocsEditable
Stream<KeyboardEvent> get onKeyUp => Element.keyUpEvent.forTarget(this);
+ @DomName('DOMWindow.load')
+ @DocsEditable
Stream<Event> get onLoad => Element.loadEvent.forTarget(this);
+ @DomName('DOMWindow.message')
+ @DocsEditable
Stream<MessageEvent> get onMessage => messageEvent.forTarget(this);
+ @DomName('DOMWindow.mousedown')
+ @DocsEditable
Stream<MouseEvent> get onMouseDown => Element.mouseDownEvent.forTarget(this);
+ @DomName('DOMWindow.mousemove')
+ @DocsEditable
Stream<MouseEvent> get onMouseMove => Element.mouseMoveEvent.forTarget(this);
+ @DomName('DOMWindow.mouseout')
+ @DocsEditable
Stream<MouseEvent> get onMouseOut => Element.mouseOutEvent.forTarget(this);
+ @DomName('DOMWindow.mouseover')
+ @DocsEditable
Stream<MouseEvent> get onMouseOver => Element.mouseOverEvent.forTarget(this);
+ @DomName('DOMWindow.mouseup')
+ @DocsEditable
Stream<MouseEvent> get onMouseUp => Element.mouseUpEvent.forTarget(this);
+ @DomName('DOMWindow.mousewheel')
+ @DocsEditable
Stream<WheelEvent> get onMouseWheel => Element.mouseWheelEvent.forTarget(this);
+ @DomName('DOMWindow.offline')
+ @DocsEditable
Stream<Event> get onOffline => offlineEvent.forTarget(this);
+ @DomName('DOMWindow.online')
+ @DocsEditable
Stream<Event> get onOnline => onlineEvent.forTarget(this);
+ @DomName('DOMWindow.pagehide')
+ @DocsEditable
Stream<Event> get onPageHide => pageHideEvent.forTarget(this);
+ @DomName('DOMWindow.pageshow')
+ @DocsEditable
Stream<Event> get onPageShow => pageShowEvent.forTarget(this);
+ @DomName('DOMWindow.popstate')
+ @DocsEditable
Stream<PopStateEvent> get onPopState => popStateEvent.forTarget(this);
+ @DomName('DOMWindow.reset')
+ @DocsEditable
Stream<Event> get onReset => Element.resetEvent.forTarget(this);
+ @DomName('DOMWindow.resize')
+ @DocsEditable
Stream<Event> get onResize => resizeEvent.forTarget(this);
+ @DomName('DOMWindow.scroll')
+ @DocsEditable
Stream<Event> get onScroll => Element.scrollEvent.forTarget(this);
+ @DomName('DOMWindow.search')
+ @DocsEditable
Stream<Event> get onSearch => Element.searchEvent.forTarget(this);
+ @DomName('DOMWindow.select')
+ @DocsEditable
Stream<Event> get onSelect => Element.selectEvent.forTarget(this);
+ @DomName('DOMWindow.storage')
+ @DocsEditable
Stream<StorageEvent> get onStorage => storageEvent.forTarget(this);
+ @DomName('DOMWindow.submit')
+ @DocsEditable
Stream<Event> get onSubmit => Element.submitEvent.forTarget(this);
+ @DomName('DOMWindow.touchcancel')
+ @DocsEditable
Stream<TouchEvent> get onTouchCancel => Element.touchCancelEvent.forTarget(this);
+ @DomName('DOMWindow.touchend')
+ @DocsEditable
Stream<TouchEvent> get onTouchEnd => Element.touchEndEvent.forTarget(this);
+ @DomName('DOMWindow.touchmove')
+ @DocsEditable
Stream<TouchEvent> get onTouchMove => Element.touchMoveEvent.forTarget(this);
+ @DomName('DOMWindow.touchstart')
+ @DocsEditable
Stream<TouchEvent> get onTouchStart => Element.touchStartEvent.forTarget(this);
+ @DomName('DOMWindow.unload')
+ @DocsEditable
Stream<Event> get onUnload => unloadEvent.forTarget(this);
+ @DomName('DOMWindow.webkitAnimationEnd')
+ @DocsEditable
Stream<AnimationEvent> get onAnimationEnd => animationEndEvent.forTarget(this);
+ @DomName('DOMWindow.webkitAnimationIteration')
+ @DocsEditable
Stream<AnimationEvent> get onAnimationIteration => animationIterationEvent.forTarget(this);
+ @DomName('DOMWindow.webkitAnimationStart')
+ @DocsEditable
Stream<AnimationEvent> get onAnimationStart => animationStartEvent.forTarget(this);
+ @DomName('DOMWindow.webkitTransitionEnd')
+ @DocsEditable
Stream<TransitionEvent> get onTransitionEnd => Element.transitionEndEvent.forTarget(this);
}
@DocsEditable
+@deprecated
class WindowEvents extends Events {
@DocsEditable
WindowEvents(EventTarget _ptr) : super(_ptr);
@@ -27767,6 +28893,8 @@
class Worker extends AbstractWorker {
Worker.internal() : super.internal();
+ @DomName('Worker.message')
+ @DocsEditable
static const EventStreamProvider<MessageEvent> messageEvent = const EventStreamProvider<MessageEvent>('message');
@DocsEditable
@@ -27775,22 +28903,26 @@
@DocsEditable
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
+ @deprecated
WorkerEvents get on =>
new WorkerEvents(this);
- @DocsEditable
@DomName('Worker.postMessage')
+ @DocsEditable
void postMessage(/*SerializedScriptValue*/ message, [List messagePorts]) native "Worker_postMessage_Callback";
- @DocsEditable
@DomName('Worker.terminate')
+ @DocsEditable
void terminate() native "Worker_terminate_Callback";
+ @DomName('Worker.message')
+ @DocsEditable
Stream<MessageEvent> get onMessage => messageEvent.forTarget(this);
}
@DocsEditable
+@deprecated
class WorkerEvents extends AbstractWorkerEvents {
@DocsEditable
WorkerEvents(EventTarget _ptr) : super(_ptr);
@@ -27810,10 +28942,13 @@
class WorkerContext extends EventTarget {
WorkerContext.internal() : super.internal();
+ @DomName('WorkerContext.error')
+ @DocsEditable
static const EventStreamProvider<Event> errorEvent = const EventStreamProvider<Event>('error');
@DocsEditable
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
+ @deprecated
WorkerContextEvents get on =>
new WorkerContextEvents(this);
@@ -27821,103 +28956,106 @@
static const int TEMPORARY = 0;
- @DocsEditable
@DomName('WorkerContext.indexedDB')
+ @DocsEditable
@SupportedBrowser(SupportedBrowser.CHROME)
@SupportedBrowser(SupportedBrowser.FIREFOX, '15')
@SupportedBrowser(SupportedBrowser.IE, '10')
- @Experimental()
+ @Experimental
IdbFactory get indexedDB native "WorkerContext_indexedDB_Getter";
- @DocsEditable
@DomName('WorkerContext.location')
+ @DocsEditable
WorkerLocation get location native "WorkerContext_location_Getter";
- @DocsEditable
@DomName('WorkerContext.navigator')
+ @DocsEditable
WorkerNavigator get navigator native "WorkerContext_navigator_Getter";
- @DocsEditable
@DomName('WorkerContext.self')
+ @DocsEditable
WorkerContext get self native "WorkerContext_self_Getter";
- @DocsEditable
@DomName('WorkerContext.webkitNotifications')
+ @DocsEditable
NotificationCenter get webkitNotifications native "WorkerContext_webkitNotifications_Getter";
- @DocsEditable
@DomName('WorkerContext.addEventListener')
+ @DocsEditable
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native "WorkerContext_addEventListener_Callback";
- @DocsEditable
@DomName('WorkerContext.clearInterval')
+ @DocsEditable
void clearInterval(int handle) native "WorkerContext_clearInterval_Callback";
- @DocsEditable
@DomName('WorkerContext.clearTimeout')
+ @DocsEditable
void clearTimeout(int handle) native "WorkerContext_clearTimeout_Callback";
- @DocsEditable
@DomName('WorkerContext.close')
+ @DocsEditable
void close() native "WorkerContext_close_Callback";
- @DocsEditable
@DomName('WorkerContext.dispatchEvent')
- bool $dom_dispatchEvent(Event evt) native "WorkerContext_dispatchEvent_Callback";
-
@DocsEditable
+ bool dispatchEvent(Event evt) native "WorkerContext_dispatchEvent_Callback";
+
@DomName('WorkerContext.importScripts')
+ @DocsEditable
void importScripts() native "WorkerContext_importScripts_Callback";
- @DocsEditable
@DomName('WorkerContext.openDatabase')
+ @DocsEditable
Database openDatabase(String name, String version, String displayName, int estimatedSize, [DatabaseCallback creationCallback]) native "WorkerContext_openDatabase_Callback";
- @DocsEditable
@DomName('WorkerContext.openDatabaseSync')
+ @DocsEditable
DatabaseSync openDatabaseSync(String name, String version, String displayName, int estimatedSize, [DatabaseCallback creationCallback]) native "WorkerContext_openDatabaseSync_Callback";
- @DocsEditable
@DomName('WorkerContext.removeEventListener')
+ @DocsEditable
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native "WorkerContext_removeEventListener_Callback";
- @DocsEditable
@DomName('WorkerContext.setInterval')
+ @DocsEditable
int setInterval(TimeoutHandler handler, int timeout) native "WorkerContext_setInterval_Callback";
- @DocsEditable
@DomName('WorkerContext.setTimeout')
+ @DocsEditable
int setTimeout(TimeoutHandler handler, int timeout) native "WorkerContext_setTimeout_Callback";
- @DocsEditable
@DomName('WorkerContext.webkitRequestFileSystem')
+ @DocsEditable
@SupportedBrowser(SupportedBrowser.CHROME)
- @Experimental()
+ @Experimental
void requestFileSystem(int type, int size, [FileSystemCallback successCallback, ErrorCallback errorCallback]) native "WorkerContext_webkitRequestFileSystem_Callback";
- @DocsEditable
@DomName('WorkerContext.webkitRequestFileSystemSync')
+ @DocsEditable
@SupportedBrowser(SupportedBrowser.CHROME)
- @Experimental()
+ @Experimental
FileSystemSync requestFileSystemSync(int type, int size) native "WorkerContext_webkitRequestFileSystemSync_Callback";
- @DocsEditable
@DomName('WorkerContext.webkitResolveLocalFileSystemSyncURL')
+ @DocsEditable
@SupportedBrowser(SupportedBrowser.CHROME)
- @Experimental()
+ @Experimental
EntrySync resolveLocalFileSystemSyncUrl(String url) native "WorkerContext_webkitResolveLocalFileSystemSyncURL_Callback";
- @DocsEditable
@DomName('WorkerContext.webkitResolveLocalFileSystemURL')
+ @DocsEditable
@SupportedBrowser(SupportedBrowser.CHROME)
- @Experimental()
+ @Experimental
void resolveLocalFileSystemUrl(String url, EntryCallback successCallback, [ErrorCallback errorCallback]) native "WorkerContext_webkitResolveLocalFileSystemURL_Callback";
+ @DomName('WorkerContext.error')
+ @DocsEditable
Stream<Event> get onError => errorEvent.forTarget(this);
}
@DocsEditable
+@deprecated
class WorkerContextEvents extends Events {
@DocsEditable
WorkerContextEvents(EventTarget _ptr) : super(_ptr);
@@ -27937,40 +29075,40 @@
class WorkerLocation extends NativeFieldWrapperClass1 {
WorkerLocation.internal();
- @DocsEditable
@DomName('WorkerLocation.hash')
+ @DocsEditable
String get hash native "WorkerLocation_hash_Getter";
- @DocsEditable
@DomName('WorkerLocation.host')
+ @DocsEditable
String get host native "WorkerLocation_host_Getter";
- @DocsEditable
@DomName('WorkerLocation.hostname')
+ @DocsEditable
String get hostname native "WorkerLocation_hostname_Getter";
- @DocsEditable
@DomName('WorkerLocation.href')
+ @DocsEditable
String get href native "WorkerLocation_href_Getter";
- @DocsEditable
@DomName('WorkerLocation.pathname')
+ @DocsEditable
String get pathname native "WorkerLocation_pathname_Getter";
- @DocsEditable
@DomName('WorkerLocation.port')
+ @DocsEditable
String get port native "WorkerLocation_port_Getter";
- @DocsEditable
@DomName('WorkerLocation.protocol')
+ @DocsEditable
String get protocol native "WorkerLocation_protocol_Getter";
- @DocsEditable
@DomName('WorkerLocation.search')
+ @DocsEditable
String get search native "WorkerLocation_search_Getter";
- @DocsEditable
@DomName('WorkerLocation.toString')
+ @DocsEditable
String toString() native "WorkerLocation_toString_Callback";
}
@@ -27986,24 +29124,24 @@
class WorkerNavigator extends NativeFieldWrapperClass1 {
WorkerNavigator.internal();
- @DocsEditable
@DomName('WorkerNavigator.appName')
+ @DocsEditable
String get appName native "WorkerNavigator_appName_Getter";
- @DocsEditable
@DomName('WorkerNavigator.appVersion')
+ @DocsEditable
String get appVersion native "WorkerNavigator_appVersion_Getter";
- @DocsEditable
@DomName('WorkerNavigator.onLine')
+ @DocsEditable
bool get onLine native "WorkerNavigator_onLine_Getter";
- @DocsEditable
@DomName('WorkerNavigator.platform')
+ @DocsEditable
String get platform native "WorkerNavigator_platform_Getter";
- @DocsEditable
@DomName('WorkerNavigator.userAgent')
+ @DocsEditable
String get userAgent native "WorkerNavigator_userAgent_Getter";
}
@@ -28023,16 +29161,16 @@
factory XPathEvaluator() => XPathEvaluator._create();
static XPathEvaluator _create() native "XPathEvaluator_constructor_Callback";
- @DocsEditable
@DomName('XPathEvaluator.createExpression')
+ @DocsEditable
XPathExpression createExpression(String expression, XPathNSResolver resolver) native "XPathEvaluator_createExpression_Callback";
- @DocsEditable
@DomName('XPathEvaluator.createNSResolver')
+ @DocsEditable
XPathNSResolver createNSResolver(Node nodeResolver) native "XPathEvaluator_createNSResolver_Callback";
- @DocsEditable
@DomName('XPathEvaluator.evaluate')
+ @DocsEditable
XPathResult evaluate(String expression, Node contextNode, XPathNSResolver resolver, int type, XPathResult inResult) native "XPathEvaluator_evaluate_Callback";
}
@@ -28052,20 +29190,20 @@
static const int TYPE_ERR = 52;
- @DocsEditable
@DomName('XPathException.code')
+ @DocsEditable
int get code native "XPathException_code_Getter";
- @DocsEditable
@DomName('XPathException.message')
+ @DocsEditable
String get message native "XPathException_message_Getter";
- @DocsEditable
@DomName('XPathException.name')
+ @DocsEditable
String get name native "XPathException_name_Getter";
- @DocsEditable
@DomName('XPathException.toString')
+ @DocsEditable
String toString() native "XPathException_toString_Callback";
}
@@ -28081,8 +29219,8 @@
class XPathExpression extends NativeFieldWrapperClass1 {
XPathExpression.internal();
- @DocsEditable
@DomName('XPathExpression.evaluate')
+ @DocsEditable
XPathResult evaluate(Node contextNode, int type, XPathResult inResult) native "XPathExpression_evaluate_Callback";
}
@@ -28098,8 +29236,8 @@
class XPathNSResolver extends NativeFieldWrapperClass1 {
XPathNSResolver.internal();
- @DocsEditable
@DomName('XPathNSResolver.lookupNamespaceURI')
+ @DocsEditable
String lookupNamespaceUri(String prefix) native "XPathNSResolver_lookupNamespaceURI_Callback";
}
@@ -28135,40 +29273,40 @@
static const int UNORDERED_NODE_SNAPSHOT_TYPE = 6;
- @DocsEditable
@DomName('XPathResult.booleanValue')
+ @DocsEditable
bool get booleanValue native "XPathResult_booleanValue_Getter";
- @DocsEditable
@DomName('XPathResult.invalidIteratorState')
+ @DocsEditable
bool get invalidIteratorState native "XPathResult_invalidIteratorState_Getter";
- @DocsEditable
@DomName('XPathResult.numberValue')
+ @DocsEditable
num get numberValue native "XPathResult_numberValue_Getter";
- @DocsEditable
@DomName('XPathResult.resultType')
+ @DocsEditable
int get resultType native "XPathResult_resultType_Getter";
- @DocsEditable
@DomName('XPathResult.singleNodeValue')
+ @DocsEditable
Node get singleNodeValue native "XPathResult_singleNodeValue_Getter";
- @DocsEditable
@DomName('XPathResult.snapshotLength')
+ @DocsEditable
int get snapshotLength native "XPathResult_snapshotLength_Getter";
- @DocsEditable
@DomName('XPathResult.stringValue')
+ @DocsEditable
String get stringValue native "XPathResult_stringValue_Getter";
- @DocsEditable
@DomName('XPathResult.iterateNext')
+ @DocsEditable
Node iterateNext() native "XPathResult_iterateNext_Callback";
- @DocsEditable
@DomName('XPathResult.snapshotItem')
+ @DocsEditable
Node snapshotItem(int index) native "XPathResult_snapshotItem_Callback";
}
@@ -28188,8 +29326,8 @@
factory XmlSerializer() => XmlSerializer._create();
static XmlSerializer _create() native "XMLSerializer_constructor_Callback";
- @DocsEditable
@DomName('XMLSerializer.serializeToString')
+ @DocsEditable
String serializeToString(Node node) native "XMLSerializer_serializeToString_Callback";
}
@@ -28209,36 +29347,36 @@
factory XsltProcessor() => XsltProcessor._create();
static XsltProcessor _create() native "XSLTProcessor_constructor_Callback";
- @DocsEditable
@DomName('XSLTProcessor.clearParameters')
+ @DocsEditable
void clearParameters() native "XSLTProcessor_clearParameters_Callback";
- @DocsEditable
@DomName('XSLTProcessor.getParameter')
+ @DocsEditable
String getParameter(String namespaceURI, String localName) native "XSLTProcessor_getParameter_Callback";
- @DocsEditable
@DomName('XSLTProcessor.importStylesheet')
+ @DocsEditable
void importStylesheet(Node stylesheet) native "XSLTProcessor_importStylesheet_Callback";
- @DocsEditable
@DomName('XSLTProcessor.removeParameter')
+ @DocsEditable
void removeParameter(String namespaceURI, String localName) native "XSLTProcessor_removeParameter_Callback";
- @DocsEditable
@DomName('XSLTProcessor.reset')
+ @DocsEditable
void reset() native "XSLTProcessor_reset_Callback";
- @DocsEditable
@DomName('XSLTProcessor.setParameter')
+ @DocsEditable
void setParameter(String namespaceURI, String localName, String value) native "XSLTProcessor_setParameter_Callback";
- @DocsEditable
@DomName('XSLTProcessor.transformToDocument')
+ @DocsEditable
Document transformToDocument(Node source) native "XSLTProcessor_transformToDocument_Callback";
- @DocsEditable
@DomName('XSLTProcessor.transformToFragment')
+ @DocsEditable
DocumentFragment transformToFragment(Node source, Document docVal) native "XSLTProcessor_transformToFragment_Callback";
}
@@ -28280,8 +29418,8 @@
class _ClientRectList extends NativeFieldWrapperClass1 implements List<ClientRect> {
_ClientRectList.internal();
- @DocsEditable
@DomName('ClientRectList.length')
+ @DocsEditable
int get length native "ClientRectList_length_Getter";
ClientRect operator[](int index) native "ClientRectList_item_Callback";
@@ -28309,11 +29447,13 @@
void forEach(void f(ClientRect element)) => IterableMixinWorkaround.forEach(this, f);
- String join([String separator]) => IterableMixinWorkaround.joinList(this, separator);
+ String join([String separator]) =>
+ IterableMixinWorkaround.joinList(this, separator);
List mappedBy(f(ClientRect element)) => IterableMixinWorkaround.mappedByList(this, f);
- Iterable<ClientRect> where(bool f(ClientRect element)) => IterableMixinWorkaround.where(this, f);
+ Iterable<ClientRect> where(bool f(ClientRect element)) =>
+ IterableMixinWorkaround.where(this, f);
bool every(bool f(ClientRect element)) => IterableMixinWorkaround.every(this, f);
@@ -28375,6 +29515,9 @@
throw new UnsupportedError("Cannot clear immutable List.");
}
+ List<ClientRect> get reversed =>
+ new ReversedListView<ClientRect>(this, 0, null);
+
void sort([int compare(ClientRect a, ClientRect b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -28403,9 +29546,11 @@
throw new StateError("More than one element");
}
- ClientRect min([int compare(ClientRect a, ClientRect b)]) => IterableMixinWorkaround.min(this, compare);
+ ClientRect min([int compare(ClientRect a, ClientRect b)]) =>
+ IterableMixinWorkaround.min(this, compare);
- ClientRect max([int compare(ClientRect a, ClientRect b)]) => IterableMixinWorkaround.max(this, compare);
+ ClientRect max([int compare(ClientRect a, ClientRect b)]) =>
+ IterableMixinWorkaround.max(this, compare);
ClientRect removeAt(int pos) {
throw new UnsupportedError("Cannot remove from immutable List.");
@@ -28452,8 +29597,8 @@
// -- end List<ClientRect> mixins.
- @DocsEditable
@DomName('ClientRectList.item')
+ @DocsEditable
ClientRect item(int index) native "ClientRectList_item_Callback";
}
@@ -28469,8 +29614,8 @@
class _CssRuleList extends NativeFieldWrapperClass1 implements List<CssRule> {
_CssRuleList.internal();
- @DocsEditable
@DomName('CSSRuleList.length')
+ @DocsEditable
int get length native "CSSRuleList_length_Getter";
CssRule operator[](int index) native "CSSRuleList_item_Callback";
@@ -28498,11 +29643,13 @@
void forEach(void f(CssRule element)) => IterableMixinWorkaround.forEach(this, f);
- String join([String separator]) => IterableMixinWorkaround.joinList(this, separator);
+ String join([String separator]) =>
+ IterableMixinWorkaround.joinList(this, separator);
List mappedBy(f(CssRule element)) => IterableMixinWorkaround.mappedByList(this, f);
- Iterable<CssRule> where(bool f(CssRule element)) => IterableMixinWorkaround.where(this, f);
+ Iterable<CssRule> where(bool f(CssRule element)) =>
+ IterableMixinWorkaround.where(this, f);
bool every(bool f(CssRule element)) => IterableMixinWorkaround.every(this, f);
@@ -28564,6 +29711,9 @@
throw new UnsupportedError("Cannot clear immutable List.");
}
+ List<CssRule> get reversed =>
+ new ReversedListView<CssRule>(this, 0, null);
+
void sort([int compare(CssRule a, CssRule b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -28592,9 +29742,11 @@
throw new StateError("More than one element");
}
- CssRule min([int compare(CssRule a, CssRule b)]) => IterableMixinWorkaround.min(this, compare);
+ CssRule min([int compare(CssRule a, CssRule b)]) =>
+ IterableMixinWorkaround.min(this, compare);
- CssRule max([int compare(CssRule a, CssRule b)]) => IterableMixinWorkaround.max(this, compare);
+ CssRule max([int compare(CssRule a, CssRule b)]) =>
+ IterableMixinWorkaround.max(this, compare);
CssRule removeAt(int pos) {
throw new UnsupportedError("Cannot remove from immutable List.");
@@ -28641,8 +29793,8 @@
// -- end List<CssRule> mixins.
- @DocsEditable
@DomName('CSSRuleList.item')
+ @DocsEditable
CssRule item(int index) native "CSSRuleList_item_Callback";
}
@@ -28658,8 +29810,8 @@
class _CssValueList extends CssValue implements List<CssValue> {
_CssValueList.internal() : super.internal();
- @DocsEditable
@DomName('CSSValueList.length')
+ @DocsEditable
int get length native "CSSValueList_length_Getter";
CssValue operator[](int index) native "CSSValueList_item_Callback";
@@ -28687,11 +29839,13 @@
void forEach(void f(CssValue element)) => IterableMixinWorkaround.forEach(this, f);
- String join([String separator]) => IterableMixinWorkaround.joinList(this, separator);
+ String join([String separator]) =>
+ IterableMixinWorkaround.joinList(this, separator);
List mappedBy(f(CssValue element)) => IterableMixinWorkaround.mappedByList(this, f);
- Iterable<CssValue> where(bool f(CssValue element)) => IterableMixinWorkaround.where(this, f);
+ Iterable<CssValue> where(bool f(CssValue element)) =>
+ IterableMixinWorkaround.where(this, f);
bool every(bool f(CssValue element)) => IterableMixinWorkaround.every(this, f);
@@ -28753,6 +29907,9 @@
throw new UnsupportedError("Cannot clear immutable List.");
}
+ List<CssValue> get reversed =>
+ new ReversedListView<CssValue>(this, 0, null);
+
void sort([int compare(CssValue a, CssValue b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -28781,9 +29938,11 @@
throw new StateError("More than one element");
}
- CssValue min([int compare(CssValue a, CssValue b)]) => IterableMixinWorkaround.min(this, compare);
+ CssValue min([int compare(CssValue a, CssValue b)]) =>
+ IterableMixinWorkaround.min(this, compare);
- CssValue max([int compare(CssValue a, CssValue b)]) => IterableMixinWorkaround.max(this, compare);
+ CssValue max([int compare(CssValue a, CssValue b)]) =>
+ IterableMixinWorkaround.max(this, compare);
CssValue removeAt(int pos) {
throw new UnsupportedError("Cannot remove from immutable List.");
@@ -28830,8 +29989,8 @@
// -- end List<CssValue> mixins.
- @DocsEditable
@DomName('CSSValueList.item')
+ @DocsEditable
CssValue item(int index) native "CSSValueList_item_Callback";
}
@@ -28860,128 +30019,128 @@
class _Element_Merged extends Element {
_Element_Merged.internal() : super.internal();
- @DocsEditable
@DomName('HTMLElement.children')
+ @DocsEditable
HtmlCollection get $dom_children native "HTMLElement_children_Getter";
- @DocsEditable
@DomName('HTMLElement.contentEditable')
+ @DocsEditable
String get contentEditable native "HTMLElement_contentEditable_Getter";
- @DocsEditable
@DomName('HTMLElement.contentEditable')
+ @DocsEditable
void set contentEditable(String value) native "HTMLElement_contentEditable_Setter";
- @DocsEditable
@DomName('HTMLElement.dir')
+ @DocsEditable
String get dir native "HTMLElement_dir_Getter";
- @DocsEditable
@DomName('HTMLElement.dir')
+ @DocsEditable
void set dir(String value) native "HTMLElement_dir_Setter";
- @DocsEditable
@DomName('HTMLElement.draggable')
+ @DocsEditable
bool get draggable native "HTMLElement_draggable_Getter";
- @DocsEditable
@DomName('HTMLElement.draggable')
+ @DocsEditable
void set draggable(bool value) native "HTMLElement_draggable_Setter";
- @DocsEditable
@DomName('HTMLElement.hidden')
+ @DocsEditable
bool get hidden native "HTMLElement_hidden_Getter";
- @DocsEditable
@DomName('HTMLElement.hidden')
+ @DocsEditable
void set hidden(bool value) native "HTMLElement_hidden_Setter";
- @DocsEditable
@DomName('HTMLElement.id')
+ @DocsEditable
String get id native "HTMLElement_id_Getter";
- @DocsEditable
@DomName('HTMLElement.id')
+ @DocsEditable
void set id(String value) native "HTMLElement_id_Setter";
- @DocsEditable
@DomName('HTMLElement.innerHTML')
+ @DocsEditable
String get innerHtml native "HTMLElement_innerHTML_Getter";
- @DocsEditable
@DomName('HTMLElement.innerHTML')
+ @DocsEditable
void set innerHtml(String value) native "HTMLElement_innerHTML_Setter";
- @DocsEditable
@DomName('HTMLElement.isContentEditable')
+ @DocsEditable
bool get isContentEditable native "HTMLElement_isContentEditable_Getter";
- @DocsEditable
@DomName('HTMLElement.lang')
+ @DocsEditable
String get lang native "HTMLElement_lang_Getter";
- @DocsEditable
@DomName('HTMLElement.lang')
+ @DocsEditable
void set lang(String value) native "HTMLElement_lang_Setter";
- @DocsEditable
@DomName('HTMLElement.outerHTML')
+ @DocsEditable
String get outerHtml native "HTMLElement_outerHTML_Getter";
- @DocsEditable
@DomName('HTMLElement.spellcheck')
+ @DocsEditable
bool get spellcheck native "HTMLElement_spellcheck_Getter";
- @DocsEditable
@DomName('HTMLElement.spellcheck')
+ @DocsEditable
void set spellcheck(bool value) native "HTMLElement_spellcheck_Setter";
- @DocsEditable
@DomName('HTMLElement.tabIndex')
+ @DocsEditable
int get tabIndex native "HTMLElement_tabIndex_Getter";
- @DocsEditable
@DomName('HTMLElement.tabIndex')
+ @DocsEditable
void set tabIndex(int value) native "HTMLElement_tabIndex_Setter";
- @DocsEditable
@DomName('HTMLElement.title')
+ @DocsEditable
String get title native "HTMLElement_title_Getter";
- @DocsEditable
@DomName('HTMLElement.title')
+ @DocsEditable
void set title(String value) native "HTMLElement_title_Setter";
- @DocsEditable
@DomName('HTMLElement.translate')
+ @DocsEditable
bool get translate native "HTMLElement_translate_Getter";
- @DocsEditable
@DomName('HTMLElement.translate')
+ @DocsEditable
void set translate(bool value) native "HTMLElement_translate_Setter";
- @DocsEditable
@DomName('HTMLElement.webkitdropzone')
+ @DocsEditable
String get webkitdropzone native "HTMLElement_webkitdropzone_Getter";
- @DocsEditable
@DomName('HTMLElement.webkitdropzone')
+ @DocsEditable
void set webkitdropzone(String value) native "HTMLElement_webkitdropzone_Setter";
- @DocsEditable
@DomName('HTMLElement.click')
+ @DocsEditable
void click() native "HTMLElement_click_Callback";
- @DocsEditable
@DomName('HTMLElement.insertAdjacentElement')
+ @DocsEditable
Element insertAdjacentElement(String where, Element element) native "HTMLElement_insertAdjacentElement_Callback";
- @DocsEditable
@DomName('HTMLElement.insertAdjacentHTML')
+ @DocsEditable
void insertAdjacentHtml(String where, String html) native "HTMLElement_insertAdjacentHTML_Callback";
- @DocsEditable
@DomName('HTMLElement.insertAdjacentText')
+ @DocsEditable
void insertAdjacentText(String where, String text) native "HTMLElement_insertAdjacentText_Callback";
}
@@ -28997,8 +30156,8 @@
class _EntryArray extends NativeFieldWrapperClass1 implements List<Entry> {
_EntryArray.internal();
- @DocsEditable
@DomName('EntryArray.length')
+ @DocsEditable
int get length native "EntryArray_length_Getter";
Entry operator[](int index) native "EntryArray_item_Callback";
@@ -29026,11 +30185,13 @@
void forEach(void f(Entry element)) => IterableMixinWorkaround.forEach(this, f);
- String join([String separator]) => IterableMixinWorkaround.joinList(this, separator);
+ String join([String separator]) =>
+ IterableMixinWorkaround.joinList(this, separator);
List mappedBy(f(Entry element)) => IterableMixinWorkaround.mappedByList(this, f);
- Iterable<Entry> where(bool f(Entry element)) => IterableMixinWorkaround.where(this, f);
+ Iterable<Entry> where(bool f(Entry element)) =>
+ IterableMixinWorkaround.where(this, f);
bool every(bool f(Entry element)) => IterableMixinWorkaround.every(this, f);
@@ -29092,6 +30253,9 @@
throw new UnsupportedError("Cannot clear immutable List.");
}
+ List<Entry> get reversed =>
+ new ReversedListView<Entry>(this, 0, null);
+
void sort([int compare(Entry a, Entry b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -29120,9 +30284,11 @@
throw new StateError("More than one element");
}
- Entry min([int compare(Entry a, Entry b)]) => IterableMixinWorkaround.min(this, compare);
+ Entry min([int compare(Entry a, Entry b)]) =>
+ IterableMixinWorkaround.min(this, compare);
- Entry max([int compare(Entry a, Entry b)]) => IterableMixinWorkaround.max(this, compare);
+ Entry max([int compare(Entry a, Entry b)]) =>
+ IterableMixinWorkaround.max(this, compare);
Entry removeAt(int pos) {
throw new UnsupportedError("Cannot remove from immutable List.");
@@ -29169,8 +30335,8 @@
// -- end List<Entry> mixins.
- @DocsEditable
@DomName('EntryArray.item')
+ @DocsEditable
Entry item(int index) native "EntryArray_item_Callback";
}
@@ -29186,8 +30352,8 @@
class _EntryArraySync extends NativeFieldWrapperClass1 implements List<EntrySync> {
_EntryArraySync.internal();
- @DocsEditable
@DomName('EntryArraySync.length')
+ @DocsEditable
int get length native "EntryArraySync_length_Getter";
EntrySync operator[](int index) native "EntryArraySync_item_Callback";
@@ -29215,11 +30381,13 @@
void forEach(void f(EntrySync element)) => IterableMixinWorkaround.forEach(this, f);
- String join([String separator]) => IterableMixinWorkaround.joinList(this, separator);
+ String join([String separator]) =>
+ IterableMixinWorkaround.joinList(this, separator);
List mappedBy(f(EntrySync element)) => IterableMixinWorkaround.mappedByList(this, f);
- Iterable<EntrySync> where(bool f(EntrySync element)) => IterableMixinWorkaround.where(this, f);
+ Iterable<EntrySync> where(bool f(EntrySync element)) =>
+ IterableMixinWorkaround.where(this, f);
bool every(bool f(EntrySync element)) => IterableMixinWorkaround.every(this, f);
@@ -29281,6 +30449,9 @@
throw new UnsupportedError("Cannot clear immutable List.");
}
+ List<EntrySync> get reversed =>
+ new ReversedListView<EntrySync>(this, 0, null);
+
void sort([int compare(EntrySync a, EntrySync b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -29309,9 +30480,11 @@
throw new StateError("More than one element");
}
- EntrySync min([int compare(EntrySync a, EntrySync b)]) => IterableMixinWorkaround.min(this, compare);
+ EntrySync min([int compare(EntrySync a, EntrySync b)]) =>
+ IterableMixinWorkaround.min(this, compare);
- EntrySync max([int compare(EntrySync a, EntrySync b)]) => IterableMixinWorkaround.max(this, compare);
+ EntrySync max([int compare(EntrySync a, EntrySync b)]) =>
+ IterableMixinWorkaround.max(this, compare);
EntrySync removeAt(int pos) {
throw new UnsupportedError("Cannot remove from immutable List.");
@@ -29358,8 +30531,8 @@
// -- end List<EntrySync> mixins.
- @DocsEditable
@DomName('EntryArraySync.item')
+ @DocsEditable
EntrySync item(int index) native "EntryArraySync_item_Callback";
}
@@ -29403,12 +30576,14 @@
@DocsEditable
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
+ @deprecated
_FrameSetElementEvents get on =>
new _FrameSetElementEvents(this);
}
@DocsEditable
+@deprecated
class _FrameSetElementEvents extends ElementEvents {
@DocsEditable
_FrameSetElementEvents(EventTarget _ptr) : super(_ptr);
@@ -29464,8 +30639,8 @@
class _GamepadList extends NativeFieldWrapperClass1 implements List<Gamepad> {
_GamepadList.internal();
- @DocsEditable
@DomName('GamepadList.length')
+ @DocsEditable
int get length native "GamepadList_length_Getter";
Gamepad operator[](int index) native "GamepadList_item_Callback";
@@ -29493,11 +30668,13 @@
void forEach(void f(Gamepad element)) => IterableMixinWorkaround.forEach(this, f);
- String join([String separator]) => IterableMixinWorkaround.joinList(this, separator);
+ String join([String separator]) =>
+ IterableMixinWorkaround.joinList(this, separator);
List mappedBy(f(Gamepad element)) => IterableMixinWorkaround.mappedByList(this, f);
- Iterable<Gamepad> where(bool f(Gamepad element)) => IterableMixinWorkaround.where(this, f);
+ Iterable<Gamepad> where(bool f(Gamepad element)) =>
+ IterableMixinWorkaround.where(this, f);
bool every(bool f(Gamepad element)) => IterableMixinWorkaround.every(this, f);
@@ -29559,6 +30736,9 @@
throw new UnsupportedError("Cannot clear immutable List.");
}
+ List<Gamepad> get reversed =>
+ new ReversedListView<Gamepad>(this, 0, null);
+
void sort([int compare(Gamepad a, Gamepad b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -29587,9 +30767,11 @@
throw new StateError("More than one element");
}
- Gamepad min([int compare(Gamepad a, Gamepad b)]) => IterableMixinWorkaround.min(this, compare);
+ Gamepad min([int compare(Gamepad a, Gamepad b)]) =>
+ IterableMixinWorkaround.min(this, compare);
- Gamepad max([int compare(Gamepad a, Gamepad b)]) => IterableMixinWorkaround.max(this, compare);
+ Gamepad max([int compare(Gamepad a, Gamepad b)]) =>
+ IterableMixinWorkaround.max(this, compare);
Gamepad removeAt(int pos) {
throw new UnsupportedError("Cannot remove from immutable List.");
@@ -29636,8 +30818,8 @@
// -- end List<Gamepad> mixins.
- @DocsEditable
@DomName('GamepadList.item')
+ @DocsEditable
Gamepad item(int index) native "GamepadList_item_Callback";
}
@@ -29666,8 +30848,8 @@
class _MediaStreamList extends NativeFieldWrapperClass1 implements List<MediaStream> {
_MediaStreamList.internal();
- @DocsEditable
@DomName('MediaStreamList.length')
+ @DocsEditable
int get length native "MediaStreamList_length_Getter";
MediaStream operator[](int index) native "MediaStreamList_item_Callback";
@@ -29695,11 +30877,13 @@
void forEach(void f(MediaStream element)) => IterableMixinWorkaround.forEach(this, f);
- String join([String separator]) => IterableMixinWorkaround.joinList(this, separator);
+ String join([String separator]) =>
+ IterableMixinWorkaround.joinList(this, separator);
List mappedBy(f(MediaStream element)) => IterableMixinWorkaround.mappedByList(this, f);
- Iterable<MediaStream> where(bool f(MediaStream element)) => IterableMixinWorkaround.where(this, f);
+ Iterable<MediaStream> where(bool f(MediaStream element)) =>
+ IterableMixinWorkaround.where(this, f);
bool every(bool f(MediaStream element)) => IterableMixinWorkaround.every(this, f);
@@ -29761,6 +30945,9 @@
throw new UnsupportedError("Cannot clear immutable List.");
}
+ List<MediaStream> get reversed =>
+ new ReversedListView<MediaStream>(this, 0, null);
+
void sort([int compare(MediaStream a, MediaStream b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -29789,9 +30976,11 @@
throw new StateError("More than one element");
}
- MediaStream min([int compare(MediaStream a, MediaStream b)]) => IterableMixinWorkaround.min(this, compare);
+ MediaStream min([int compare(MediaStream a, MediaStream b)]) =>
+ IterableMixinWorkaround.min(this, compare);
- MediaStream max([int compare(MediaStream a, MediaStream b)]) => IterableMixinWorkaround.max(this, compare);
+ MediaStream max([int compare(MediaStream a, MediaStream b)]) =>
+ IterableMixinWorkaround.max(this, compare);
MediaStream removeAt(int pos) {
throw new UnsupportedError("Cannot remove from immutable List.");
@@ -29838,8 +31027,8 @@
// -- end List<MediaStream> mixins.
- @DocsEditable
@DomName('MediaStreamList.item')
+ @DocsEditable
MediaStream item(int index) native "MediaStreamList_item_Callback";
}
@@ -29855,8 +31044,8 @@
class _SpeechInputResultList extends NativeFieldWrapperClass1 implements List<SpeechInputResult> {
_SpeechInputResultList.internal();
- @DocsEditable
@DomName('SpeechInputResultList.length')
+ @DocsEditable
int get length native "SpeechInputResultList_length_Getter";
SpeechInputResult operator[](int index) native "SpeechInputResultList_item_Callback";
@@ -29884,11 +31073,13 @@
void forEach(void f(SpeechInputResult element)) => IterableMixinWorkaround.forEach(this, f);
- String join([String separator]) => IterableMixinWorkaround.joinList(this, separator);
+ String join([String separator]) =>
+ IterableMixinWorkaround.joinList(this, separator);
List mappedBy(f(SpeechInputResult element)) => IterableMixinWorkaround.mappedByList(this, f);
- Iterable<SpeechInputResult> where(bool f(SpeechInputResult element)) => IterableMixinWorkaround.where(this, f);
+ Iterable<SpeechInputResult> where(bool f(SpeechInputResult element)) =>
+ IterableMixinWorkaround.where(this, f);
bool every(bool f(SpeechInputResult element)) => IterableMixinWorkaround.every(this, f);
@@ -29950,6 +31141,9 @@
throw new UnsupportedError("Cannot clear immutable List.");
}
+ List<SpeechInputResult> get reversed =>
+ new ReversedListView<SpeechInputResult>(this, 0, null);
+
void sort([int compare(SpeechInputResult a, SpeechInputResult b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -29978,9 +31172,11 @@
throw new StateError("More than one element");
}
- SpeechInputResult min([int compare(SpeechInputResult a, SpeechInputResult b)]) => IterableMixinWorkaround.min(this, compare);
+ SpeechInputResult min([int compare(SpeechInputResult a, SpeechInputResult b)]) =>
+ IterableMixinWorkaround.min(this, compare);
- SpeechInputResult max([int compare(SpeechInputResult a, SpeechInputResult b)]) => IterableMixinWorkaround.max(this, compare);
+ SpeechInputResult max([int compare(SpeechInputResult a, SpeechInputResult b)]) =>
+ IterableMixinWorkaround.max(this, compare);
SpeechInputResult removeAt(int pos) {
throw new UnsupportedError("Cannot remove from immutable List.");
@@ -30027,8 +31223,8 @@
// -- end List<SpeechInputResult> mixins.
- @DocsEditable
@DomName('SpeechInputResultList.item')
+ @DocsEditable
SpeechInputResult item(int index) native "SpeechInputResultList_item_Callback";
}
@@ -30044,8 +31240,8 @@
class _SpeechRecognitionResultList extends NativeFieldWrapperClass1 implements List<SpeechRecognitionResult> {
_SpeechRecognitionResultList.internal();
- @DocsEditable
@DomName('SpeechRecognitionResultList.length')
+ @DocsEditable
int get length native "SpeechRecognitionResultList_length_Getter";
SpeechRecognitionResult operator[](int index) native "SpeechRecognitionResultList_item_Callback";
@@ -30073,11 +31269,13 @@
void forEach(void f(SpeechRecognitionResult element)) => IterableMixinWorkaround.forEach(this, f);
- String join([String separator]) => IterableMixinWorkaround.joinList(this, separator);
+ String join([String separator]) =>
+ IterableMixinWorkaround.joinList(this, separator);
List mappedBy(f(SpeechRecognitionResult element)) => IterableMixinWorkaround.mappedByList(this, f);
- Iterable<SpeechRecognitionResult> where(bool f(SpeechRecognitionResult element)) => IterableMixinWorkaround.where(this, f);
+ Iterable<SpeechRecognitionResult> where(bool f(SpeechRecognitionResult element)) =>
+ IterableMixinWorkaround.where(this, f);
bool every(bool f(SpeechRecognitionResult element)) => IterableMixinWorkaround.every(this, f);
@@ -30139,6 +31337,9 @@
throw new UnsupportedError("Cannot clear immutable List.");
}
+ List<SpeechRecognitionResult> get reversed =>
+ new ReversedListView<SpeechRecognitionResult>(this, 0, null);
+
void sort([int compare(SpeechRecognitionResult a, SpeechRecognitionResult b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -30167,9 +31368,11 @@
throw new StateError("More than one element");
}
- SpeechRecognitionResult min([int compare(SpeechRecognitionResult a, SpeechRecognitionResult b)]) => IterableMixinWorkaround.min(this, compare);
+ SpeechRecognitionResult min([int compare(SpeechRecognitionResult a, SpeechRecognitionResult b)]) =>
+ IterableMixinWorkaround.min(this, compare);
- SpeechRecognitionResult max([int compare(SpeechRecognitionResult a, SpeechRecognitionResult b)]) => IterableMixinWorkaround.max(this, compare);
+ SpeechRecognitionResult max([int compare(SpeechRecognitionResult a, SpeechRecognitionResult b)]) =>
+ IterableMixinWorkaround.max(this, compare);
SpeechRecognitionResult removeAt(int pos) {
throw new UnsupportedError("Cannot remove from immutable List.");
@@ -30216,8 +31419,8 @@
// -- end List<SpeechRecognitionResult> mixins.
- @DocsEditable
@DomName('SpeechRecognitionResultList.item')
+ @DocsEditable
SpeechRecognitionResult item(int index) native "SpeechRecognitionResultList_item_Callback";
}
@@ -30233,8 +31436,8 @@
class _StyleSheetList extends NativeFieldWrapperClass1 implements List<StyleSheet> {
_StyleSheetList.internal();
- @DocsEditable
@DomName('StyleSheetList.length')
+ @DocsEditable
int get length native "StyleSheetList_length_Getter";
StyleSheet operator[](int index) native "StyleSheetList_item_Callback";
@@ -30262,11 +31465,13 @@
void forEach(void f(StyleSheet element)) => IterableMixinWorkaround.forEach(this, f);
- String join([String separator]) => IterableMixinWorkaround.joinList(this, separator);
+ String join([String separator]) =>
+ IterableMixinWorkaround.joinList(this, separator);
List mappedBy(f(StyleSheet element)) => IterableMixinWorkaround.mappedByList(this, f);
- Iterable<StyleSheet> where(bool f(StyleSheet element)) => IterableMixinWorkaround.where(this, f);
+ Iterable<StyleSheet> where(bool f(StyleSheet element)) =>
+ IterableMixinWorkaround.where(this, f);
bool every(bool f(StyleSheet element)) => IterableMixinWorkaround.every(this, f);
@@ -30328,6 +31533,9 @@
throw new UnsupportedError("Cannot clear immutable List.");
}
+ List<StyleSheet> get reversed =>
+ new ReversedListView<StyleSheet>(this, 0, null);
+
void sort([int compare(StyleSheet a, StyleSheet b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -30356,9 +31564,11 @@
throw new StateError("More than one element");
}
- StyleSheet min([int compare(StyleSheet a, StyleSheet b)]) => IterableMixinWorkaround.min(this, compare);
+ StyleSheet min([int compare(StyleSheet a, StyleSheet b)]) =>
+ IterableMixinWorkaround.min(this, compare);
- StyleSheet max([int compare(StyleSheet a, StyleSheet b)]) => IterableMixinWorkaround.max(this, compare);
+ StyleSheet max([int compare(StyleSheet a, StyleSheet b)]) =>
+ IterableMixinWorkaround.max(this, compare);
StyleSheet removeAt(int pos) {
throw new UnsupportedError("Cannot remove from immutable List.");
@@ -30405,8 +31615,8 @@
// -- end List<StyleSheet> mixins.
- @DocsEditable
@DomName('StyleSheetList.item')
+ @DocsEditable
StyleSheet item(int index) native "StyleSheetList_item_Callback";
}
@@ -32342,38 +33552,6 @@
// BSD-style license that can be found in the LICENSE file.
-class _CustomEventFactoryProvider {
- static CustomEvent createCustomEvent(String type, [bool canBubble = true,
- bool cancelable = true, Object detail = null]) {
- final CustomEvent e = document.$dom_createEvent("CustomEvent");
- e.$dom_initCustomEvent(type, canBubble, cancelable, detail);
- return e;
- }
-}
-
-class _EventFactoryProvider {
- static Event createEvent(String type, [bool canBubble = true,
- bool cancelable = true]) {
- final Event e = document.$dom_createEvent("Event");
- e.$dom_initEvent(type, canBubble, cancelable);
- return e;
- }
-}
-
-class _MouseEventFactoryProvider {
- static MouseEvent createMouseEvent(String type, Window view, int detail,
- int screenX, int screenY, int clientX, int clientY, int button,
- [bool canBubble = true, bool cancelable = true, bool ctrlKey = false,
- bool altKey = false, bool shiftKey = false, bool metaKey = false,
- EventTarget relatedTarget = null]) {
- final e = document.$dom_createEvent("MouseEvent");
- e.$dom_initMouseEvent(type, canBubble, cancelable, view, detail,
- screenX, screenY, clientX, clientY, ctrlKey, altKey, shiftKey, metaKey,
- button, relatedTarget);
- return e;
- }
-}
-
class _CssStyleDeclarationFactoryProvider {
static CssStyleDeclaration createCssStyleDeclaration_css(String css) {
final style = new Element.tag('div').style;
@@ -32871,8 +34049,9 @@
get _isolateId => ReceivePortSync._isolateId;
void _dispatchEvent(String receiver, var message) {
- var event = new CustomEvent(receiver, false, false, json.stringify(message));
- window.$dom_dispatchEvent(event);
+ var event = new CustomEvent(receiver, canBubble: false, cancelable:false,
+ detail: json.stringify(message));
+ window.dispatchEvent(event);
}
String _getPortSyncEventData(CustomEvent event) => event.detail;
diff --git a/sdk/lib/html/html_common/conversions.dart b/sdk/lib/html/html_common/conversions.dart
index f4d42ad..b8d9183 100644
--- a/sdk/lib/html/html_common/conversions.dart
+++ b/sdk/lib/html/html_common/conversions.dart
@@ -117,9 +117,9 @@
if (e is bool) return e;
if (e is num) return e;
if (e is String) return e;
- if (e is Date) {
+ if (e is DateTime) {
// TODO(sra).
- throw new UnimplementedError('structured clone of Date');
+ throw new UnimplementedError('structured clone of DateTime');
}
if (e is RegExp) {
// TODO(sra).
@@ -265,7 +265,7 @@
if (isJavaScriptDate(e)) {
// TODO(sra).
- throw new UnimplementedError('structured clone of Date');
+ throw new UnimplementedError('structured clone of DateTime');
}
if (isJavaScriptRegExp(e)) {
diff --git a/sdk/lib/html/html_common/filtered_element_list.dart b/sdk/lib/html/html_common/filtered_element_list.dart
index 44768c4..2414539 100644
--- a/sdk/lib/html/html_common/filtered_element_list.dart
+++ b/sdk/lib/html/html_common/filtered_element_list.dart
@@ -69,6 +69,9 @@
return element is Element && _childNodes.contains(element);
}
+ List<Element> get reversed =>
+ new ReversedListView<Element>(_filtered, 0, null);
+
void sort([int compare(Element a, Element b)]) {
throw new UnsupportedError('TODO(jacobr): should we impl?');
}
@@ -123,19 +126,19 @@
void removeAll(Iterable elements) {
// This should be optimized to not use [remove] directly.
- Collections.removeAll(this, elements);
+ IterableMixinWorkaround.removeAll(this, elements);
}
void retainAll(Iterable elements) {
- Collections.retainAll(this, elements);
+ IterableMixinWorkaround.retainAll(this, elements);
}
void removeMatching(bool test(Element element)) {
- Collections.removeMatching(this, test);
+ IterableMixinWorkaround.removeMatching(this, test);
}
void retainMatching(bool test(Element element)) {
- Collections.retainMatching(this, test);
+ IterableMixinWorkaround.retainMatching(this, test);
}
dynamic reduce(dynamic initialValue,
@@ -176,20 +179,20 @@
return _filtered.lastIndexOf(element, start);
}
- Iterable<Element> take(int n) {
- return new TakeIterable<Element>(this, n);
+ List<Element> take(int n) {
+ return IterableMixinWorkaround.takeList(this, n);
}
Iterable<Element> takeWhile(bool test(Element value)) {
- return new TakeWhileIterable<Element>(this, test);
+ return IterableMixinWorkaround.takeWhile(this, test);
}
- Iterable<Element> skip(int n) {
- return new SkipIterable<Element>(this, n);
+ List<Element> skip(int n) {
+ return IterableMixinWorkaround.skipList(this, n);
}
Iterable<Element> skipWhile(bool test(Element value)) {
- return new SkipWhileIterable<Element>(this, test);
+ return IterableMixinWorkaround.skipWhile(this, test);
}
Element get first => _filtered.first;
diff --git a/sdk/lib/html/html_common/html_common.dart b/sdk/lib/html/html_common/html_common.dart
index 94ddf18..d4c2635 100644
--- a/sdk/lib/html/html_common/html_common.dart
+++ b/sdk/lib/html/html_common/html_common.dart
@@ -5,6 +5,7 @@
library html_common;
import 'dart:collection';
+import 'dart:collection-dev';
import 'dart:html';
import 'metadata.dart';
diff --git a/sdk/lib/html/html_common/html_common_dart2js.dart b/sdk/lib/html/html_common/html_common_dart2js.dart
index 0e9c526..3e2d10d 100644
--- a/sdk/lib/html/html_common/html_common_dart2js.dart
+++ b/sdk/lib/html/html_common/html_common_dart2js.dart
@@ -5,7 +5,10 @@
library html_common;
import 'dart:collection';
+import 'dart:collection-dev';
import 'dart:html';
+import 'dart:_js_helper' show Creates, Returns;
+import 'dart:_foreign_helper' show JS;
import 'metadata.dart';
export 'metadata.dart';
diff --git a/sdk/lib/html/html_common/metadata.dart b/sdk/lib/html/html_common/metadata.dart
index a729ac5..d77557d 100644
--- a/sdk/lib/html/html_common/metadata.dart
+++ b/sdk/lib/html/html_common/metadata.dart
@@ -38,9 +38,7 @@
*
* * [W3C recommendation](http://en.wikipedia.org/wiki/W3C_recommendation)
*/
-class Experimental {
- const Experimental();
-}
+class Experimental {}
/**
@@ -58,6 +56,4 @@
/// Metadata that specifies that that member is editable through generated
/// files.
-class DocsEditable {
- const DocsEditable();
-}
+class DocsEditable {}
diff --git a/sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart b/sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart
index dd481b1..e3f6e10 100644
--- a/sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart
+++ b/sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart
@@ -3,6 +3,8 @@
import 'dart:async';
import 'dart:html';
import 'dart:html_common';
+import 'dart:_js_helper' show Creates, Returns, JSName, Null;
+import 'dart:_foreign_helper' show JS;
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
@@ -98,7 +100,7 @@
return false; // number, string.
}
if (containsDate(nativeKey)) {
- throw new UnimplementedError('Key containing Date');
+ throw new UnimplementedError('Key containing DateTime');
}
// TODO: Cache conversion somewhere?
return nativeKey;
@@ -125,7 +127,7 @@
}
-const String _idbKey = '=List|=Object|num|String'; // TODO(sra): Add Date.
+const String _idbKey = '=List|=Object|num|String'; // TODO(sra): Add DateTime.
const _annotation_Creates_IDBKey = const Creates(_idbKey);
const _annotation_Returns_IDBKey = const Returns(_idbKey);
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -133,24 +135,30 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('IDBCursor')
class Cursor native "*IDBCursor" {
- @DocsEditable @DomName('IDBCursor.direction')
+ @DomName('IDBCursor.direction')
+ @DocsEditable
final String direction;
- @DocsEditable @DomName('IDBCursor.key') @_annotation_Creates_IDBKey @_annotation_Returns_IDBKey
+ @DomName('IDBCursor.key')
+ @DocsEditable
+ @_annotation_Creates_IDBKey
+ @_annotation_Returns_IDBKey
final Object key;
- @DocsEditable @DomName('IDBCursor.primaryKey')
+ @DomName('IDBCursor.primaryKey')
+ @DocsEditable
final Object primaryKey;
- @DocsEditable @DomName('IDBCursor.source')
+ @DomName('IDBCursor.source')
+ @DocsEditable
final dynamic source;
- @DocsEditable @DomName('IDBCursor.advance')
+ @DomName('IDBCursor.advance')
+ @DocsEditable
void advance(int count) native;
void continueFunction([/*IDBKey*/ key]) {
@@ -163,13 +171,16 @@
return;
}
@JSName('continue')
- @DocsEditable @DomName('IDBCursor.continue')
+ @DomName('IDBCursor.continue')
+ @DocsEditable
void _continueFunction_1(key) native;
@JSName('continue')
- @DocsEditable @DomName('IDBCursor.continue')
+ @DomName('IDBCursor.continue')
+ @DocsEditable
void _continueFunction_2() native;
- @DocsEditable @DomName('IDBCursor.delete')
+ @DomName('IDBCursor.delete')
+ @DocsEditable
Request delete() native;
Request update(/*any*/ value) {
@@ -177,7 +188,8 @@
return _update_1(value_1);
}
@JSName('update')
- @DocsEditable @DomName('IDBCursor.update')
+ @DomName('IDBCursor.update')
+ @DocsEditable
Request _update_1(value) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -185,12 +197,14 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('IDBCursorWithValue')
class CursorWithValue extends Cursor native "*IDBCursorWithValue" {
- @DocsEditable @DomName('IDBCursorWithValue.value') @annotation_Creates_SerializedScriptValue @annotation_Returns_SerializedScriptValue
+ @DomName('IDBCursorWithValue.value')
+ @DocsEditable
+ @annotation_Creates_SerializedScriptValue
+ @annotation_Returns_SerializedScriptValue
final Object value;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -198,12 +212,11 @@
// BSD-style license that can be found in the LICENSE file.
-@DocsEditable
@DomName('IDBDatabase')
@SupportedBrowser(SupportedBrowser.CHROME)
@SupportedBrowser(SupportedBrowser.FIREFOX, '15')
@SupportedBrowser(SupportedBrowser.IE, '10')
-@Experimental()
+@Experimental
class Database extends EventTarget native "*IDBDatabase" {
Transaction transaction(storeName_OR_storeNames, String mode) {
@@ -224,32 +237,45 @@
Transaction _transaction(stores, mode) native;
+ @DomName('IDBDatabase.abort')
+ @DocsEditable
static const EventStreamProvider<Event> abortEvent = const EventStreamProvider<Event>('abort');
+ @DomName('IDBDatabase.error')
+ @DocsEditable
static const EventStreamProvider<Event> errorEvent = const EventStreamProvider<Event>('error');
+ @DomName('IDBDatabase.versionchange')
+ @DocsEditable
static const EventStreamProvider<UpgradeNeededEvent> versionChangeEvent = const EventStreamProvider<UpgradeNeededEvent>('versionchange');
@DocsEditable
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
+ @deprecated
DatabaseEvents get on =>
new DatabaseEvents(this);
- @DocsEditable @DomName('IDBDatabase.name')
+ @DomName('IDBDatabase.name')
+ @DocsEditable
final String name;
- @DocsEditable @DomName('IDBDatabase.objectStoreNames')
- @Returns('DomStringList') @Creates('DomStringList')
+ @DomName('IDBDatabase.objectStoreNames')
+ @DocsEditable
+ @Returns('DomStringList')
+ @Creates('DomStringList')
final List<String> objectStoreNames;
- @DocsEditable @DomName('IDBDatabase.version')
+ @DomName('IDBDatabase.version')
+ @DocsEditable
final dynamic version;
@JSName('addEventListener')
- @DocsEditable @DomName('IDBDatabase.addEventListener')
+ @DomName('IDBDatabase.addEventListener')
+ @DocsEditable
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native;
- @DocsEditable @DomName('IDBDatabase.close')
+ @DomName('IDBDatabase.close')
+ @DocsEditable
void close() native;
ObjectStore createObjectStore(String name, [Map options]) {
@@ -260,31 +286,42 @@
return _createObjectStore_2(name);
}
@JSName('createObjectStore')
- @DocsEditable @DomName('IDBDatabase.createObjectStore')
+ @DomName('IDBDatabase.createObjectStore')
+ @DocsEditable
ObjectStore _createObjectStore_1(name, options) native;
@JSName('createObjectStore')
- @DocsEditable @DomName('IDBDatabase.createObjectStore')
+ @DomName('IDBDatabase.createObjectStore')
+ @DocsEditable
ObjectStore _createObjectStore_2(name) native;
- @DocsEditable @DomName('IDBDatabase.deleteObjectStore')
+ @DomName('IDBDatabase.deleteObjectStore')
+ @DocsEditable
void deleteObjectStore(String name) native;
- @JSName('dispatchEvent')
- @DocsEditable @DomName('IDBDatabase.dispatchEvent')
- bool $dom_dispatchEvent(Event evt) native;
+ @DomName('IDBDatabase.dispatchEvent')
+ @DocsEditable
+ bool dispatchEvent(Event evt) native;
@JSName('removeEventListener')
- @DocsEditable @DomName('IDBDatabase.removeEventListener')
+ @DomName('IDBDatabase.removeEventListener')
+ @DocsEditable
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native;
+ @DomName('IDBDatabase.abort')
+ @DocsEditable
Stream<Event> get onAbort => abortEvent.forTarget(this);
+ @DomName('IDBDatabase.error')
+ @DocsEditable
Stream<Event> get onError => errorEvent.forTarget(this);
+ @DomName('IDBDatabase.versionchange')
+ @DocsEditable
Stream<UpgradeNeededEvent> get onVersionChange => versionChangeEvent.forTarget(this);
}
@DocsEditable
+@deprecated
class DatabaseEvents extends Events {
@DocsEditable
DatabaseEvents(EventTarget _ptr) : super(_ptr);
@@ -303,12 +340,11 @@
// BSD-style license that can be found in the LICENSE file.
-@DocsEditable
@DomName('IDBFactory')
@SupportedBrowser(SupportedBrowser.CHROME)
@SupportedBrowser(SupportedBrowser.FIREFOX, '15')
@SupportedBrowser(SupportedBrowser.IE, '10')
-@Experimental()
+@Experimental
class IdbFactory native "*IDBFactory" {
/**
* Checks to see if Indexed DB is supported on the current platform.
@@ -327,16 +363,23 @@
return _cmp_1(first_1, second_2);
}
@JSName('cmp')
- @DocsEditable @DomName('IDBFactory.cmp')
+ @DomName('IDBFactory.cmp')
+ @DocsEditable
int _cmp_1(first, second) native;
- @DocsEditable @DomName('IDBFactory.deleteDatabase')
+ @DomName('IDBFactory.deleteDatabase')
+ @DocsEditable
VersionChangeRequest deleteDatabase(String name) native;
- @DocsEditable @DomName('IDBFactory.open') @Returns('Request') @Creates('Request') @Creates('Database')
+ @DomName('IDBFactory.open')
+ @DocsEditable
+ @Returns('Request')
+ @Creates('Request')
+ @Creates('Database')
OpenDBRequest open(String name, [int version]) native;
- @DocsEditable @DomName('IDBFactory.webkitGetDatabaseNames')
+ @DomName('IDBFactory.webkitGetDatabaseNames')
+ @DocsEditable
Request webkitGetDatabaseNames() native;
}
@@ -345,24 +388,28 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('IDBIndex')
class Index native "*IDBIndex" {
- @DocsEditable @DomName('IDBIndex.keyPath')
+ @DomName('IDBIndex.keyPath')
+ @DocsEditable
final dynamic keyPath;
- @DocsEditable @DomName('IDBIndex.multiEntry')
+ @DomName('IDBIndex.multiEntry')
+ @DocsEditable
final bool multiEntry;
- @DocsEditable @DomName('IDBIndex.name')
+ @DomName('IDBIndex.name')
+ @DocsEditable
final String name;
- @DocsEditable @DomName('IDBIndex.objectStore')
+ @DomName('IDBIndex.objectStore')
+ @DocsEditable
final ObjectStore objectStore;
- @DocsEditable @DomName('IDBIndex.unique')
+ @DomName('IDBIndex.unique')
+ @DocsEditable
final bool unique;
Request count([key_OR_range]) {
@@ -379,13 +426,16 @@
throw new ArgumentError("Incorrect number or type of arguments");
}
@JSName('count')
- @DocsEditable @DomName('IDBIndex.count')
+ @DomName('IDBIndex.count')
+ @DocsEditable
Request _count_1() native;
@JSName('count')
- @DocsEditable @DomName('IDBIndex.count')
+ @DomName('IDBIndex.count')
+ @DocsEditable
Request _count_2(KeyRange range) native;
@JSName('count')
- @DocsEditable @DomName('IDBIndex.count')
+ @DomName('IDBIndex.count')
+ @DocsEditable
Request _count_3(key) native;
Request get(key) {
@@ -399,10 +449,18 @@
throw new ArgumentError("Incorrect number or type of arguments");
}
@JSName('get')
- @DocsEditable @DomName('IDBIndex.get') @Returns('Request') @Creates('Request') @annotation_Creates_SerializedScriptValue
+ @DomName('IDBIndex.get')
+ @DocsEditable
+ @Returns('Request')
+ @Creates('Request')
+ @annotation_Creates_SerializedScriptValue
Request _get_1(KeyRange key) native;
@JSName('get')
- @DocsEditable @DomName('IDBIndex.get') @Returns('Request') @Creates('Request') @annotation_Creates_SerializedScriptValue
+ @DomName('IDBIndex.get')
+ @DocsEditable
+ @Returns('Request')
+ @Creates('Request')
+ @annotation_Creates_SerializedScriptValue
Request _get_2(key) native;
Request getKey(key) {
@@ -416,26 +474,33 @@
throw new ArgumentError("Incorrect number or type of arguments");
}
@JSName('getKey')
- @DocsEditable @DomName('IDBIndex.getKey') @Returns('Request') @Creates('Request') @annotation_Creates_SerializedScriptValue @Creates('ObjectStore')
+ @DomName('IDBIndex.getKey')
+ @DocsEditable
+ @Returns('Request')
+ @Creates('Request')
+ @annotation_Creates_SerializedScriptValue
+ @Creates('ObjectStore')
Request _getKey_1(KeyRange key) native;
@JSName('getKey')
- @DocsEditable @DomName('IDBIndex.getKey') @Returns('Request') @Creates('Request') @annotation_Creates_SerializedScriptValue @Creates('ObjectStore')
+ @DomName('IDBIndex.getKey')
+ @DocsEditable
+ @Returns('Request')
+ @Creates('Request')
+ @annotation_Creates_SerializedScriptValue
+ @Creates('ObjectStore')
Request _getKey_2(key) native;
Request openCursor([key_OR_range, String direction]) {
- if (!?key_OR_range &&
- !?direction) {
+ if (!?key_OR_range && !?direction) {
return _openCursor_1();
}
- if ((key_OR_range is KeyRange || key_OR_range == null) &&
- !?direction) {
+ if ((key_OR_range is KeyRange || key_OR_range == null) && !?direction) {
return _openCursor_2(key_OR_range);
}
if ((key_OR_range is KeyRange || key_OR_range == null)) {
return _openCursor_3(key_OR_range, direction);
}
- if (?key_OR_range &&
- !?direction) {
+ if (?key_OR_range && !?direction) {
var key_1 = _convertDartToNative_IDBKey(key_OR_range);
return _openCursor_4(key_1);
}
@@ -446,35 +511,52 @@
throw new ArgumentError("Incorrect number or type of arguments");
}
@JSName('openCursor')
- @DocsEditable @DomName('IDBIndex.openCursor') @Returns('Request') @Creates('Request') @Creates('Cursor')
+ @DomName('IDBIndex.openCursor')
+ @DocsEditable
+ @Returns('Request')
+ @Creates('Request')
+ @Creates('Cursor')
Request _openCursor_1() native;
@JSName('openCursor')
- @DocsEditable @DomName('IDBIndex.openCursor') @Returns('Request') @Creates('Request') @Creates('Cursor')
+ @DomName('IDBIndex.openCursor')
+ @DocsEditable
+ @Returns('Request')
+ @Creates('Request')
+ @Creates('Cursor')
Request _openCursor_2(KeyRange range) native;
@JSName('openCursor')
- @DocsEditable @DomName('IDBIndex.openCursor') @Returns('Request') @Creates('Request') @Creates('Cursor')
+ @DomName('IDBIndex.openCursor')
+ @DocsEditable
+ @Returns('Request')
+ @Creates('Request')
+ @Creates('Cursor')
Request _openCursor_3(KeyRange range, direction) native;
@JSName('openCursor')
- @DocsEditable @DomName('IDBIndex.openCursor') @Returns('Request') @Creates('Request') @Creates('Cursor')
+ @DomName('IDBIndex.openCursor')
+ @DocsEditable
+ @Returns('Request')
+ @Creates('Request')
+ @Creates('Cursor')
Request _openCursor_4(key) native;
@JSName('openCursor')
- @DocsEditable @DomName('IDBIndex.openCursor') @Returns('Request') @Creates('Request') @Creates('Cursor')
+ @DomName('IDBIndex.openCursor')
+ @DocsEditable
+ @Returns('Request')
+ @Creates('Request')
+ @Creates('Cursor')
Request _openCursor_5(key, direction) native;
Request openKeyCursor([key_OR_range, String direction]) {
- if (!?key_OR_range &&
- !?direction) {
+ if (!?key_OR_range && !?direction) {
return _openKeyCursor_1();
}
- if ((key_OR_range is KeyRange || key_OR_range == null) &&
- !?direction) {
+ if ((key_OR_range is KeyRange || key_OR_range == null) && !?direction) {
return _openKeyCursor_2(key_OR_range);
}
if ((key_OR_range is KeyRange || key_OR_range == null)) {
return _openKeyCursor_3(key_OR_range, direction);
}
- if (?key_OR_range &&
- !?direction) {
+ if (?key_OR_range && !?direction) {
var key_1 = _convertDartToNative_IDBKey(key_OR_range);
return _openKeyCursor_4(key_1);
}
@@ -485,19 +567,39 @@
throw new ArgumentError("Incorrect number or type of arguments");
}
@JSName('openKeyCursor')
- @DocsEditable @DomName('IDBIndex.openKeyCursor') @Returns('Request') @Creates('Request') @Creates('Cursor')
+ @DomName('IDBIndex.openKeyCursor')
+ @DocsEditable
+ @Returns('Request')
+ @Creates('Request')
+ @Creates('Cursor')
Request _openKeyCursor_1() native;
@JSName('openKeyCursor')
- @DocsEditable @DomName('IDBIndex.openKeyCursor') @Returns('Request') @Creates('Request') @Creates('Cursor')
+ @DomName('IDBIndex.openKeyCursor')
+ @DocsEditable
+ @Returns('Request')
+ @Creates('Request')
+ @Creates('Cursor')
Request _openKeyCursor_2(KeyRange range) native;
@JSName('openKeyCursor')
- @DocsEditable @DomName('IDBIndex.openKeyCursor') @Returns('Request') @Creates('Request') @Creates('Cursor')
+ @DomName('IDBIndex.openKeyCursor')
+ @DocsEditable
+ @Returns('Request')
+ @Creates('Request')
+ @Creates('Cursor')
Request _openKeyCursor_3(KeyRange range, direction) native;
@JSName('openKeyCursor')
- @DocsEditable @DomName('IDBIndex.openKeyCursor') @Returns('Request') @Creates('Request') @Creates('Cursor')
+ @DomName('IDBIndex.openKeyCursor')
+ @DocsEditable
+ @Returns('Request')
+ @Creates('Request')
+ @Creates('Cursor')
Request _openKeyCursor_4(key) native;
@JSName('openKeyCursor')
- @DocsEditable @DomName('IDBIndex.openKeyCursor') @Returns('Request') @Creates('Request') @Creates('Cursor')
+ @DomName('IDBIndex.openKeyCursor')
+ @DocsEditable
+ @Returns('Request')
+ @Creates('Request')
+ @Creates('Cursor')
Request _openKeyCursor_5(key, direction) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -505,7 +607,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('IDBKey')
class Key native "*IDBKey" {
@@ -515,7 +616,6 @@
// BSD-style license that can be found in the LICENSE file.
-@DocsEditable
@DomName('IDBKeyRange')
class KeyRange native "*IDBKeyRange" {
@DomName('IDBKeyRange.only')
@@ -539,18 +639,22 @@
dynamic get lower => _convertNativeToDart_IDBKey(this._lower);
@JSName('lower')
- @DocsEditable @DomName('IDBKeyRange.lower')
+ @DomName('IDBKeyRange.lower')
+ @DocsEditable
final dynamic _lower;
- @DocsEditable @DomName('IDBKeyRange.lowerOpen')
+ @DomName('IDBKeyRange.lowerOpen')
+ @DocsEditable
final bool lowerOpen;
dynamic get upper => _convertNativeToDart_IDBKey(this._upper);
@JSName('upper')
- @DocsEditable @DomName('IDBKeyRange.upper')
+ @DomName('IDBKeyRange.upper')
+ @DocsEditable
final dynamic _upper;
- @DocsEditable @DomName('IDBKeyRange.upperOpen')
+ @DomName('IDBKeyRange.upperOpen')
+ @DocsEditable
final bool upperOpen;
static KeyRange bound_(/*IDBKey*/ lower, /*IDBKey*/ upper, [bool lowerOpen, bool upperOpen]) {
@@ -569,13 +673,16 @@
return _bound__3(lower_5, upper_6);
}
@JSName('bound')
- @DocsEditable @DomName('IDBKeyRange.bound')
+ @DomName('IDBKeyRange.bound')
+ @DocsEditable
static KeyRange _bound__1(lower, upper, lowerOpen, upperOpen) native;
@JSName('bound')
- @DocsEditable @DomName('IDBKeyRange.bound')
+ @DomName('IDBKeyRange.bound')
+ @DocsEditable
static KeyRange _bound__2(lower, upper, lowerOpen) native;
@JSName('bound')
- @DocsEditable @DomName('IDBKeyRange.bound')
+ @DomName('IDBKeyRange.bound')
+ @DocsEditable
static KeyRange _bound__3(lower, upper) native;
static KeyRange lowerBound_(/*IDBKey*/ bound, [bool open]) {
@@ -587,10 +694,12 @@
return _lowerBound__2(bound_2);
}
@JSName('lowerBound')
- @DocsEditable @DomName('IDBKeyRange.lowerBound')
+ @DomName('IDBKeyRange.lowerBound')
+ @DocsEditable
static KeyRange _lowerBound__1(bound, open) native;
@JSName('lowerBound')
- @DocsEditable @DomName('IDBKeyRange.lowerBound')
+ @DomName('IDBKeyRange.lowerBound')
+ @DocsEditable
static KeyRange _lowerBound__2(bound) native;
static KeyRange only_(/*IDBKey*/ value) {
@@ -598,7 +707,8 @@
return _only__1(value_1);
}
@JSName('only')
- @DocsEditable @DomName('IDBKeyRange.only')
+ @DomName('IDBKeyRange.only')
+ @DocsEditable
static KeyRange _only__1(value) native;
static KeyRange upperBound_(/*IDBKey*/ bound, [bool open]) {
@@ -610,10 +720,12 @@
return _upperBound__2(bound_2);
}
@JSName('upperBound')
- @DocsEditable @DomName('IDBKeyRange.upperBound')
+ @DomName('IDBKeyRange.upperBound')
+ @DocsEditable
static KeyRange _upperBound__1(bound, open) native;
@JSName('upperBound')
- @DocsEditable @DomName('IDBKeyRange.upperBound')
+ @DomName('IDBKeyRange.upperBound')
+ @DocsEditable
static KeyRange _upperBound__2(bound) native;
}
@@ -622,25 +734,30 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('IDBObjectStore')
class ObjectStore native "*IDBObjectStore" {
- @DocsEditable @DomName('IDBObjectStore.autoIncrement')
+ @DomName('IDBObjectStore.autoIncrement')
+ @DocsEditable
final bool autoIncrement;
- @DocsEditable @DomName('IDBObjectStore.indexNames')
- @Returns('DomStringList') @Creates('DomStringList')
+ @DomName('IDBObjectStore.indexNames')
+ @DocsEditable
+ @Returns('DomStringList')
+ @Creates('DomStringList')
final List<String> indexNames;
- @DocsEditable @DomName('IDBObjectStore.keyPath')
+ @DomName('IDBObjectStore.keyPath')
+ @DocsEditable
final dynamic keyPath;
- @DocsEditable @DomName('IDBObjectStore.name')
+ @DomName('IDBObjectStore.name')
+ @DocsEditable
final String name;
- @DocsEditable @DomName('IDBObjectStore.transaction')
+ @DomName('IDBObjectStore.transaction')
+ @DocsEditable
final Transaction transaction;
Request add(/*any*/ value, [/*IDBKey*/ key]) {
@@ -653,13 +770,22 @@
return _add_2(value_3);
}
@JSName('add')
- @DocsEditable @DomName('IDBObjectStore.add') @Returns('Request') @Creates('Request') @_annotation_Creates_IDBKey
+ @DomName('IDBObjectStore.add')
+ @DocsEditable
+ @Returns('Request')
+ @Creates('Request')
+ @_annotation_Creates_IDBKey
Request _add_1(value, key) native;
@JSName('add')
- @DocsEditable @DomName('IDBObjectStore.add') @Returns('Request') @Creates('Request') @_annotation_Creates_IDBKey
+ @DomName('IDBObjectStore.add')
+ @DocsEditable
+ @Returns('Request')
+ @Creates('Request')
+ @_annotation_Creates_IDBKey
Request _add_2(value) native;
- @DocsEditable @DomName('IDBObjectStore.clear')
+ @DomName('IDBObjectStore.clear')
+ @DocsEditable
Request clear() native;
Request count([key_OR_range]) {
@@ -676,26 +802,27 @@
throw new ArgumentError("Incorrect number or type of arguments");
}
@JSName('count')
- @DocsEditable @DomName('IDBObjectStore.count')
+ @DomName('IDBObjectStore.count')
+ @DocsEditable
Request _count_1() native;
@JSName('count')
- @DocsEditable @DomName('IDBObjectStore.count')
+ @DomName('IDBObjectStore.count')
+ @DocsEditable
Request _count_2(KeyRange range) native;
@JSName('count')
- @DocsEditable @DomName('IDBObjectStore.count')
+ @DomName('IDBObjectStore.count')
+ @DocsEditable
Request _count_3(key) native;
Index createIndex(String name, keyPath, [Map options]) {
- if ((keyPath is List<String> || keyPath == null) &&
- !?options) {
+ if ((keyPath is List<String> || keyPath == null) && !?options) {
return _createIndex_1(name, keyPath);
}
if ((keyPath is List<String> || keyPath == null)) {
var options_1 = convertDartToNative_Dictionary(options);
return _createIndex_2(name, keyPath, options_1);
}
- if ((keyPath is String || keyPath == null) &&
- !?options) {
+ if ((keyPath is String || keyPath == null) && !?options) {
return _createIndex_3(name, keyPath);
}
if ((keyPath is String || keyPath == null)) {
@@ -705,16 +832,20 @@
throw new ArgumentError("Incorrect number or type of arguments");
}
@JSName('createIndex')
- @DocsEditable @DomName('IDBObjectStore.createIndex')
+ @DomName('IDBObjectStore.createIndex')
+ @DocsEditable
Index _createIndex_1(name, List<String> keyPath) native;
@JSName('createIndex')
- @DocsEditable @DomName('IDBObjectStore.createIndex')
+ @DomName('IDBObjectStore.createIndex')
+ @DocsEditable
Index _createIndex_2(name, List<String> keyPath, options) native;
@JSName('createIndex')
- @DocsEditable @DomName('IDBObjectStore.createIndex')
+ @DomName('IDBObjectStore.createIndex')
+ @DocsEditable
Index _createIndex_3(name, String keyPath) native;
@JSName('createIndex')
- @DocsEditable @DomName('IDBObjectStore.createIndex')
+ @DomName('IDBObjectStore.createIndex')
+ @DocsEditable
Index _createIndex_4(name, String keyPath, options) native;
Request delete(key_OR_keyRange) {
@@ -728,13 +859,16 @@
throw new ArgumentError("Incorrect number or type of arguments");
}
@JSName('delete')
- @DocsEditable @DomName('IDBObjectStore.delete')
+ @DomName('IDBObjectStore.delete')
+ @DocsEditable
Request _delete_1(KeyRange keyRange) native;
@JSName('delete')
- @DocsEditable @DomName('IDBObjectStore.delete')
+ @DomName('IDBObjectStore.delete')
+ @DocsEditable
Request _delete_2(key) native;
- @DocsEditable @DomName('IDBObjectStore.deleteIndex')
+ @DomName('IDBObjectStore.deleteIndex')
+ @DocsEditable
void deleteIndex(String name) native;
Request getObject(key) {
@@ -748,29 +882,35 @@
throw new ArgumentError("Incorrect number or type of arguments");
}
@JSName('get')
- @DocsEditable @DomName('IDBObjectStore.get') @Returns('Request') @Creates('Request') @annotation_Creates_SerializedScriptValue
+ @DomName('IDBObjectStore.get')
+ @DocsEditable
+ @Returns('Request')
+ @Creates('Request')
+ @annotation_Creates_SerializedScriptValue
Request _getObject_1(KeyRange key) native;
@JSName('get')
- @DocsEditable @DomName('IDBObjectStore.get') @Returns('Request') @Creates('Request') @annotation_Creates_SerializedScriptValue
+ @DomName('IDBObjectStore.get')
+ @DocsEditable
+ @Returns('Request')
+ @Creates('Request')
+ @annotation_Creates_SerializedScriptValue
Request _getObject_2(key) native;
- @DocsEditable @DomName('IDBObjectStore.index')
+ @DomName('IDBObjectStore.index')
+ @DocsEditable
Index index(String name) native;
Request openCursor([key_OR_range, String direction]) {
- if (!?key_OR_range &&
- !?direction) {
+ if (!?key_OR_range && !?direction) {
return _openCursor_1();
}
- if ((key_OR_range is KeyRange || key_OR_range == null) &&
- !?direction) {
+ if ((key_OR_range is KeyRange || key_OR_range == null) && !?direction) {
return _openCursor_2(key_OR_range);
}
if ((key_OR_range is KeyRange || key_OR_range == null)) {
return _openCursor_3(key_OR_range, direction);
}
- if (?key_OR_range &&
- !?direction) {
+ if (?key_OR_range && !?direction) {
var key_1 = _convertDartToNative_IDBKey(key_OR_range);
return _openCursor_4(key_1);
}
@@ -781,19 +921,39 @@
throw new ArgumentError("Incorrect number or type of arguments");
}
@JSName('openCursor')
- @DocsEditable @DomName('IDBObjectStore.openCursor') @Returns('Request') @Creates('Request') @Creates('Cursor')
+ @DomName('IDBObjectStore.openCursor')
+ @DocsEditable
+ @Returns('Request')
+ @Creates('Request')
+ @Creates('Cursor')
Request _openCursor_1() native;
@JSName('openCursor')
- @DocsEditable @DomName('IDBObjectStore.openCursor') @Returns('Request') @Creates('Request') @Creates('Cursor')
+ @DomName('IDBObjectStore.openCursor')
+ @DocsEditable
+ @Returns('Request')
+ @Creates('Request')
+ @Creates('Cursor')
Request _openCursor_2(KeyRange range) native;
@JSName('openCursor')
- @DocsEditable @DomName('IDBObjectStore.openCursor') @Returns('Request') @Creates('Request') @Creates('Cursor')
+ @DomName('IDBObjectStore.openCursor')
+ @DocsEditable
+ @Returns('Request')
+ @Creates('Request')
+ @Creates('Cursor')
Request _openCursor_3(KeyRange range, direction) native;
@JSName('openCursor')
- @DocsEditable @DomName('IDBObjectStore.openCursor') @Returns('Request') @Creates('Request') @Creates('Cursor')
+ @DomName('IDBObjectStore.openCursor')
+ @DocsEditable
+ @Returns('Request')
+ @Creates('Request')
+ @Creates('Cursor')
Request _openCursor_4(key) native;
@JSName('openCursor')
- @DocsEditable @DomName('IDBObjectStore.openCursor') @Returns('Request') @Creates('Request') @Creates('Cursor')
+ @DomName('IDBObjectStore.openCursor')
+ @DocsEditable
+ @Returns('Request')
+ @Creates('Request')
+ @Creates('Cursor')
Request _openCursor_5(key, direction) native;
Request put(/*any*/ value, [/*IDBKey*/ key]) {
@@ -806,10 +966,18 @@
return _put_2(value_3);
}
@JSName('put')
- @DocsEditable @DomName('IDBObjectStore.put') @Returns('Request') @Creates('Request') @_annotation_Creates_IDBKey
+ @DomName('IDBObjectStore.put')
+ @DocsEditable
+ @Returns('Request')
+ @Creates('Request')
+ @_annotation_Creates_IDBKey
Request _put_1(value, key) native;
@JSName('put')
- @DocsEditable @DomName('IDBObjectStore.put') @Returns('Request') @Creates('Request') @_annotation_Creates_IDBKey
+ @DomName('IDBObjectStore.put')
+ @DocsEditable
+ @Returns('Request')
+ @Creates('Request')
+ @_annotation_Creates_IDBKey
Request _put_2(value) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -817,26 +985,35 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('IDBOpenDBRequest')
class OpenDBRequest extends Request implements EventTarget native "*IDBOpenDBRequest" {
+ @DomName('IDBOpenDBRequest.blocked')
+ @DocsEditable
static const EventStreamProvider<Event> blockedEvent = const EventStreamProvider<Event>('blocked');
+ @DomName('IDBOpenDBRequest.upgradeneeded')
+ @DocsEditable
static const EventStreamProvider<VersionChangeEvent> upgradeNeededEvent = const EventStreamProvider<VersionChangeEvent>('upgradeneeded');
@DocsEditable
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
+ @deprecated
OpenDBRequestEvents get on =>
new OpenDBRequestEvents(this);
+ @DomName('IDBOpenDBRequest.blocked')
+ @DocsEditable
Stream<Event> get onBlocked => blockedEvent.forTarget(this);
+ @DomName('IDBOpenDBRequest.upgradeneeded')
+ @DocsEditable
Stream<VersionChangeEvent> get onUpgradeNeeded => upgradeNeededEvent.forTarget(this);
}
@DocsEditable
+@deprecated
class OpenDBRequestEvents extends RequestEvents {
@DocsEditable
OpenDBRequestEvents(EventTarget _ptr) : super(_ptr);
@@ -852,58 +1029,77 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('IDBRequest')
class Request extends EventTarget native "*IDBRequest" {
+ @DomName('IDBRequest.error')
+ @DocsEditable
static const EventStreamProvider<Event> errorEvent = const EventStreamProvider<Event>('error');
+ @DomName('IDBRequest.success')
+ @DocsEditable
static const EventStreamProvider<Event> successEvent = const EventStreamProvider<Event>('success');
@DocsEditable
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
+ @deprecated
RequestEvents get on =>
new RequestEvents(this);
- @DocsEditable @DomName('IDBRequest.error')
+ @DomName('IDBRequest.error')
+ @DocsEditable
final DomError error;
- @DocsEditable @DomName('IDBRequest.readyState')
+ @DomName('IDBRequest.readyState')
+ @DocsEditable
final String readyState;
dynamic get result => _convertNativeToDart_IDBAny(this._result);
@JSName('result')
- @DocsEditable @DomName('IDBRequest.result') @Creates('Null')
+ @DomName('IDBRequest.result')
+ @DocsEditable
+ @Creates('Null')
final dynamic _result;
- @DocsEditable @DomName('IDBRequest.source') @Creates('Null')
+ @DomName('IDBRequest.source')
+ @DocsEditable
+ @Creates('Null')
final dynamic source;
- @DocsEditable @DomName('IDBRequest.transaction')
+ @DomName('IDBRequest.transaction')
+ @DocsEditable
final Transaction transaction;
- @DocsEditable @DomName('IDBRequest.webkitErrorMessage')
+ @DomName('IDBRequest.webkitErrorMessage')
+ @DocsEditable
final String webkitErrorMessage;
@JSName('addEventListener')
- @DocsEditable @DomName('IDBRequest.addEventListener')
+ @DomName('IDBRequest.addEventListener')
+ @DocsEditable
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native;
- @JSName('dispatchEvent')
- @DocsEditable @DomName('IDBRequest.dispatchEvent')
- bool $dom_dispatchEvent(Event evt) native;
+ @DomName('IDBRequest.dispatchEvent')
+ @DocsEditable
+ bool dispatchEvent(Event evt) native;
@JSName('removeEventListener')
- @DocsEditable @DomName('IDBRequest.removeEventListener')
+ @DomName('IDBRequest.removeEventListener')
+ @DocsEditable
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native;
+ @DomName('IDBRequest.error')
+ @DocsEditable
Stream<Event> get onError => errorEvent.forTarget(this);
+ @DomName('IDBRequest.success')
+ @DocsEditable
Stream<Event> get onSuccess => successEvent.forTarget(this);
}
@DocsEditable
+@deprecated
class RequestEvents extends Events {
@DocsEditable
RequestEvents(EventTarget _ptr) : super(_ptr);
@@ -919,60 +1115,81 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('IDBTransaction')
class Transaction extends EventTarget native "*IDBTransaction" {
+ @DomName('IDBTransaction.abort')
+ @DocsEditable
static const EventStreamProvider<Event> abortEvent = const EventStreamProvider<Event>('abort');
+ @DomName('IDBTransaction.complete')
+ @DocsEditable
static const EventStreamProvider<Event> completeEvent = const EventStreamProvider<Event>('complete');
+ @DomName('IDBTransaction.error')
+ @DocsEditable
static const EventStreamProvider<Event> errorEvent = const EventStreamProvider<Event>('error');
@DocsEditable
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
+ @deprecated
TransactionEvents get on =>
new TransactionEvents(this);
- @DocsEditable @DomName('IDBTransaction.db')
+ @DomName('IDBTransaction.db')
+ @DocsEditable
final Database db;
- @DocsEditable @DomName('IDBTransaction.error')
+ @DomName('IDBTransaction.error')
+ @DocsEditable
final DomError error;
- @DocsEditable @DomName('IDBTransaction.mode')
+ @DomName('IDBTransaction.mode')
+ @DocsEditable
final String mode;
- @DocsEditable @DomName('IDBTransaction.webkitErrorMessage')
+ @DomName('IDBTransaction.webkitErrorMessage')
+ @DocsEditable
final String webkitErrorMessage;
- @DocsEditable @DomName('IDBTransaction.abort')
+ @DomName('IDBTransaction.abort')
+ @DocsEditable
void abort() native;
@JSName('addEventListener')
- @DocsEditable @DomName('IDBTransaction.addEventListener')
+ @DomName('IDBTransaction.addEventListener')
+ @DocsEditable
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native;
- @JSName('dispatchEvent')
- @DocsEditable @DomName('IDBTransaction.dispatchEvent')
- bool $dom_dispatchEvent(Event evt) native;
+ @DomName('IDBTransaction.dispatchEvent')
+ @DocsEditable
+ bool dispatchEvent(Event evt) native;
- @DocsEditable @DomName('IDBTransaction.objectStore')
+ @DomName('IDBTransaction.objectStore')
+ @DocsEditable
ObjectStore objectStore(String name) native;
@JSName('removeEventListener')
- @DocsEditable @DomName('IDBTransaction.removeEventListener')
+ @DomName('IDBTransaction.removeEventListener')
+ @DocsEditable
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native;
+ @DomName('IDBTransaction.abort')
+ @DocsEditable
Stream<Event> get onAbort => abortEvent.forTarget(this);
+ @DomName('IDBTransaction.complete')
+ @DocsEditable
Stream<Event> get onComplete => completeEvent.forTarget(this);
+ @DomName('IDBTransaction.error')
+ @DocsEditable
Stream<Event> get onError => errorEvent.forTarget(this);
}
@DocsEditable
+@deprecated
class TransactionEvents extends Events {
@DocsEditable
TransactionEvents(EventTarget _ptr) : super(_ptr);
@@ -991,15 +1208,16 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('IDBVersionChangeEvent')
class UpgradeNeededEvent extends Event native "*IDBVersionChangeEvent" {
- @DocsEditable @DomName('IDBUpgradeNeededEvent.newVersion')
+ @DomName('IDBUpgradeNeededEvent.newVersion')
+ @DocsEditable
final int newVersion;
- @DocsEditable @DomName('IDBUpgradeNeededEvent.oldVersion')
+ @DomName('IDBUpgradeNeededEvent.oldVersion')
+ @DocsEditable
final int oldVersion;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -1007,12 +1225,12 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('IDBVersionChangeEvent')
class VersionChangeEvent extends Event native "*IDBVersionChangeEvent" {
- @DocsEditable @DomName('IDBVersionChangeEvent.version')
+ @DomName('IDBVersionChangeEvent.version')
+ @DocsEditable
final String version;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -1020,22 +1238,27 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('IDBVersionChangeRequest')
class VersionChangeRequest extends Request implements EventTarget native "*IDBVersionChangeRequest" {
+ @DomName('IDBVersionChangeRequest.blocked')
+ @DocsEditable
static const EventStreamProvider<Event> blockedEvent = const EventStreamProvider<Event>('blocked');
@DocsEditable
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
+ @deprecated
VersionChangeRequestEvents get on =>
new VersionChangeRequestEvents(this);
+ @DomName('IDBVersionChangeRequest.blocked')
+ @DocsEditable
Stream<Event> get onBlocked => blockedEvent.forTarget(this);
}
@DocsEditable
+@deprecated
class VersionChangeRequestEvents extends RequestEvents {
@DocsEditable
VersionChangeRequestEvents(EventTarget _ptr) : super(_ptr);
@@ -1048,7 +1271,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('IDBAny')
class _Any native "*IDBAny" {
diff --git a/sdk/lib/indexed_db/dartium/indexed_db_dartium.dart b/sdk/lib/indexed_db/dartium/indexed_db_dartium.dart
index fbf035e..ea68244 100644
--- a/sdk/lib/indexed_db/dartium/indexed_db_dartium.dart
+++ b/sdk/lib/indexed_db/dartium/indexed_db_dartium.dart
@@ -45,24 +45,24 @@
class Cursor extends NativeFieldWrapperClass1 {
Cursor.internal();
- @DocsEditable
@DomName('IDBCursor.direction')
+ @DocsEditable
String get direction native "IDBCursor_direction_Getter";
- @DocsEditable
@DomName('IDBCursor.key')
+ @DocsEditable
Object get key native "IDBCursor_key_Getter";
- @DocsEditable
@DomName('IDBCursor.primaryKey')
+ @DocsEditable
Object get primaryKey native "IDBCursor_primaryKey_Getter";
- @DocsEditable
@DomName('IDBCursor.source')
+ @DocsEditable
dynamic get source native "IDBCursor_source_Getter";
- @DocsEditable
@DomName('IDBCursor.advance')
+ @DocsEditable
void advance(int count) native "IDBCursor_advance_Callback";
void continueFunction([/*IDBKey*/ key]) {
@@ -71,22 +71,23 @@
return;
}
_continue_2();
+ return;
}
+ @DomName('IDBCursor._continue_1')
@DocsEditable
- @DomName('IDBCursor.continue_1')
- void _continue_1(key) native "IDBCursor_continue_1_Callback";
+ void _continue_1(key) native "IDBCursor__continue_1_Callback";
+ @DomName('IDBCursor._continue_2')
@DocsEditable
- @DomName('IDBCursor.continue_2')
- void _continue_2() native "IDBCursor_continue_2_Callback";
+ void _continue_2() native "IDBCursor__continue_2_Callback";
- @DocsEditable
@DomName('IDBCursor.delete')
+ @DocsEditable
Request delete() native "IDBCursor_delete_Callback";
- @DocsEditable
@DomName('IDBCursor.update')
+ @DocsEditable
Request update(Object value) native "IDBCursor_update_Callback";
}
@@ -102,8 +103,8 @@
class CursorWithValue extends Cursor {
CursorWithValue.internal() : super.internal();
- @DocsEditable
@DomName('IDBCursorWithValue.value')
+ @DocsEditable
Object get value native "IDBCursorWithValue_value_Getter";
}
@@ -119,55 +120,62 @@
@SupportedBrowser(SupportedBrowser.CHROME)
@SupportedBrowser(SupportedBrowser.FIREFOX, '15')
@SupportedBrowser(SupportedBrowser.IE, '10')
-@Experimental()
+@Experimental
class Database extends EventTarget {
Database.internal() : super.internal();
+ @DomName('IDBDatabase.abort')
+ @DocsEditable
static const EventStreamProvider<Event> abortEvent = const EventStreamProvider<Event>('abort');
+ @DomName('IDBDatabase.error')
+ @DocsEditable
static const EventStreamProvider<Event> errorEvent = const EventStreamProvider<Event>('error');
+ @DomName('IDBDatabase.versionchange')
+ @DocsEditable
static const EventStreamProvider<UpgradeNeededEvent> versionChangeEvent = const EventStreamProvider<UpgradeNeededEvent>('versionchange');
@DocsEditable
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
+ @deprecated
DatabaseEvents get on =>
new DatabaseEvents(this);
- @DocsEditable
@DomName('IDBDatabase.name')
+ @DocsEditable
String get name native "IDBDatabase_name_Getter";
- @DocsEditable
@DomName('IDBDatabase.objectStoreNames')
+ @DocsEditable
List<String> get objectStoreNames native "IDBDatabase_objectStoreNames_Getter";
- @DocsEditable
@DomName('IDBDatabase.version')
+ @DocsEditable
dynamic get version native "IDBDatabase_version_Getter";
- @DocsEditable
@DomName('IDBDatabase.addEventListener')
+ @DocsEditable
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native "IDBDatabase_addEventListener_Callback";
- @DocsEditable
@DomName('IDBDatabase.close')
+ @DocsEditable
void close() native "IDBDatabase_close_Callback";
- @DocsEditable
@DomName('IDBDatabase.createObjectStore')
+ @DocsEditable
ObjectStore createObjectStore(String name, [Map options]) native "IDBDatabase_createObjectStore_Callback";
- @DocsEditable
@DomName('IDBDatabase.deleteObjectStore')
+ @DocsEditable
void deleteObjectStore(String name) native "IDBDatabase_deleteObjectStore_Callback";
- @DocsEditable
@DomName('IDBDatabase.dispatchEvent')
- bool $dom_dispatchEvent(Event evt) native "IDBDatabase_dispatchEvent_Callback";
-
@DocsEditable
+ bool dispatchEvent(Event evt) native "IDBDatabase_dispatchEvent_Callback";
+
@DomName('IDBDatabase.removeEventListener')
+ @DocsEditable
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native "IDBDatabase_removeEventListener_Callback";
Transaction transaction(storeName_OR_storeNames, String mode) {
@@ -183,27 +191,34 @@
throw new ArgumentError("Incorrect number or type of arguments");
}
+ @DomName('IDBDatabase._transaction_1')
@DocsEditable
- @DomName('IDBDatabase.transaction_1')
- Transaction _transaction_1(storeName_OR_storeNames, mode) native "IDBDatabase_transaction_1_Callback";
+ Transaction _transaction_1(storeName_OR_storeNames, mode) native "IDBDatabase__transaction_1_Callback";
+ @DomName('IDBDatabase._transaction_2')
@DocsEditable
- @DomName('IDBDatabase.transaction_2')
- Transaction _transaction_2(storeName_OR_storeNames, mode) native "IDBDatabase_transaction_2_Callback";
+ Transaction _transaction_2(storeName_OR_storeNames, mode) native "IDBDatabase__transaction_2_Callback";
+ @DomName('IDBDatabase._transaction_3')
@DocsEditable
- @DomName('IDBDatabase.transaction_3')
- Transaction _transaction_3(storeName_OR_storeNames, mode) native "IDBDatabase_transaction_3_Callback";
+ Transaction _transaction_3(storeName_OR_storeNames, mode) native "IDBDatabase__transaction_3_Callback";
+ @DomName('IDBDatabase.abort')
+ @DocsEditable
Stream<Event> get onAbort => abortEvent.forTarget(this);
+ @DomName('IDBDatabase.error')
+ @DocsEditable
Stream<Event> get onError => errorEvent.forTarget(this);
+ @DomName('IDBDatabase.versionchange')
+ @DocsEditable
Stream<UpgradeNeededEvent> get onVersionChange => versionChangeEvent.forTarget(this);
}
@DocsEditable
+@deprecated
class DatabaseEvents extends Events {
@DocsEditable
DatabaseEvents(EventTarget _ptr) : super(_ptr);
@@ -222,12 +237,11 @@
// BSD-style license that can be found in the LICENSE file.
-@DocsEditable
@DomName('IDBFactory')
@SupportedBrowser(SupportedBrowser.CHROME)
@SupportedBrowser(SupportedBrowser.FIREFOX, '15')
@SupportedBrowser(SupportedBrowser.IE, '10')
-@Experimental()
+@Experimental
class IdbFactory extends NativeFieldWrapperClass1 {
/**
* Checks to see if Indexed DB is supported on the current platform.
@@ -238,12 +252,12 @@
IdbFactory.internal();
- @DocsEditable
@DomName('IDBFactory.cmp')
+ @DocsEditable
int cmp(/*IDBKey*/ first, /*IDBKey*/ second) native "IDBFactory_cmp_Callback";
- @DocsEditable
@DomName('IDBFactory.deleteDatabase')
+ @DocsEditable
VersionChangeRequest deleteDatabase(String name) native "IDBFactory_deleteDatabase_Callback";
OpenDBRequest open(String name, [int version]) {
@@ -253,16 +267,16 @@
return _open_2(name);
}
+ @DomName('IDBFactory._open_1')
@DocsEditable
- @DomName('IDBFactory.open_1')
- OpenDBRequest _open_1(name, version) native "IDBFactory_open_1_Callback";
+ OpenDBRequest _open_1(name, version) native "IDBFactory__open_1_Callback";
+ @DomName('IDBFactory._open_2')
@DocsEditable
- @DomName('IDBFactory.open_2')
- OpenDBRequest _open_2(name) native "IDBFactory_open_2_Callback";
+ OpenDBRequest _open_2(name) native "IDBFactory__open_2_Callback";
- @DocsEditable
@DomName('IDBFactory.webkitGetDatabaseNames')
+ @DocsEditable
Request webkitGetDatabaseNames() native "IDBFactory_webkitGetDatabaseNames_Callback";
}
@@ -278,24 +292,24 @@
class Index extends NativeFieldWrapperClass1 {
Index.internal();
- @DocsEditable
@DomName('IDBIndex.keyPath')
+ @DocsEditable
dynamic get keyPath native "IDBIndex_keyPath_Getter";
- @DocsEditable
@DomName('IDBIndex.multiEntry')
+ @DocsEditable
bool get multiEntry native "IDBIndex_multiEntry_Getter";
- @DocsEditable
@DomName('IDBIndex.name')
+ @DocsEditable
String get name native "IDBIndex_name_Getter";
- @DocsEditable
@DomName('IDBIndex.objectStore')
+ @DocsEditable
ObjectStore get objectStore native "IDBIndex_objectStore_Getter";
- @DocsEditable
@DomName('IDBIndex.unique')
+ @DocsEditable
bool get unique native "IDBIndex_unique_Getter";
Request count([key_OR_range]) {
@@ -311,17 +325,17 @@
throw new ArgumentError("Incorrect number or type of arguments");
}
+ @DomName('IDBIndex._count_1')
@DocsEditable
- @DomName('IDBIndex.count_1')
- Request _count_1() native "IDBIndex_count_1_Callback";
+ Request _count_1() native "IDBIndex__count_1_Callback";
+ @DomName('IDBIndex._count_2')
@DocsEditable
- @DomName('IDBIndex.count_2')
- Request _count_2(key_OR_range) native "IDBIndex_count_2_Callback";
+ Request _count_2(key_OR_range) native "IDBIndex__count_2_Callback";
+ @DomName('IDBIndex._count_3')
@DocsEditable
- @DomName('IDBIndex.count_3')
- Request _count_3(key_OR_range) native "IDBIndex_count_3_Callback";
+ Request _count_3(key_OR_range) native "IDBIndex__count_3_Callback";
Request get(key) {
if ((key is KeyRange || key == null)) {
@@ -333,13 +347,13 @@
throw new ArgumentError("Incorrect number or type of arguments");
}
+ @DomName('IDBIndex._get_1')
@DocsEditable
- @DomName('IDBIndex.get_1')
- Request _get_1(key) native "IDBIndex_get_1_Callback";
+ Request _get_1(key) native "IDBIndex__get_1_Callback";
+ @DomName('IDBIndex._get_2')
@DocsEditable
- @DomName('IDBIndex.get_2')
- Request _get_2(key) native "IDBIndex_get_2_Callback";
+ Request _get_2(key) native "IDBIndex__get_2_Callback";
Request getKey(key) {
if ((key is KeyRange || key == null)) {
@@ -351,13 +365,13 @@
throw new ArgumentError("Incorrect number or type of arguments");
}
+ @DomName('IDBIndex._getKey_1')
@DocsEditable
- @DomName('IDBIndex.getKey_1')
- Request _getKey_1(key) native "IDBIndex_getKey_1_Callback";
+ Request _getKey_1(key) native "IDBIndex__getKey_1_Callback";
+ @DomName('IDBIndex._getKey_2')
@DocsEditable
- @DomName('IDBIndex.getKey_2')
- Request _getKey_2(key) native "IDBIndex_getKey_2_Callback";
+ Request _getKey_2(key) native "IDBIndex__getKey_2_Callback";
Request openCursor([key_OR_range, String direction]) {
if (!?key_OR_range && !?direction) {
@@ -378,25 +392,25 @@
throw new ArgumentError("Incorrect number or type of arguments");
}
+ @DomName('IDBIndex._openCursor_1')
@DocsEditable
- @DomName('IDBIndex.openCursor_1')
- Request _openCursor_1() native "IDBIndex_openCursor_1_Callback";
+ Request _openCursor_1() native "IDBIndex__openCursor_1_Callback";
+ @DomName('IDBIndex._openCursor_2')
@DocsEditable
- @DomName('IDBIndex.openCursor_2')
- Request _openCursor_2(key_OR_range) native "IDBIndex_openCursor_2_Callback";
+ Request _openCursor_2(key_OR_range) native "IDBIndex__openCursor_2_Callback";
+ @DomName('IDBIndex._openCursor_3')
@DocsEditable
- @DomName('IDBIndex.openCursor_3')
- Request _openCursor_3(key_OR_range, direction) native "IDBIndex_openCursor_3_Callback";
+ Request _openCursor_3(key_OR_range, direction) native "IDBIndex__openCursor_3_Callback";
+ @DomName('IDBIndex._openCursor_4')
@DocsEditable
- @DomName('IDBIndex.openCursor_4')
- Request _openCursor_4(key_OR_range) native "IDBIndex_openCursor_4_Callback";
+ Request _openCursor_4(key_OR_range) native "IDBIndex__openCursor_4_Callback";
+ @DomName('IDBIndex._openCursor_5')
@DocsEditable
- @DomName('IDBIndex.openCursor_5')
- Request _openCursor_5(key_OR_range, direction) native "IDBIndex_openCursor_5_Callback";
+ Request _openCursor_5(key_OR_range, direction) native "IDBIndex__openCursor_5_Callback";
Request openKeyCursor([key_OR_range, String direction]) {
if (!?key_OR_range && !?direction) {
@@ -417,25 +431,25 @@
throw new ArgumentError("Incorrect number or type of arguments");
}
+ @DomName('IDBIndex._openKeyCursor_1')
@DocsEditable
- @DomName('IDBIndex.openKeyCursor_1')
- Request _openKeyCursor_1() native "IDBIndex_openKeyCursor_1_Callback";
+ Request _openKeyCursor_1() native "IDBIndex__openKeyCursor_1_Callback";
+ @DomName('IDBIndex._openKeyCursor_2')
@DocsEditable
- @DomName('IDBIndex.openKeyCursor_2')
- Request _openKeyCursor_2(key_OR_range) native "IDBIndex_openKeyCursor_2_Callback";
+ Request _openKeyCursor_2(key_OR_range) native "IDBIndex__openKeyCursor_2_Callback";
+ @DomName('IDBIndex._openKeyCursor_3')
@DocsEditable
- @DomName('IDBIndex.openKeyCursor_3')
- Request _openKeyCursor_3(key_OR_range, direction) native "IDBIndex_openKeyCursor_3_Callback";
+ Request _openKeyCursor_3(key_OR_range, direction) native "IDBIndex__openKeyCursor_3_Callback";
+ @DomName('IDBIndex._openKeyCursor_4')
@DocsEditable
- @DomName('IDBIndex.openKeyCursor_4')
- Request _openKeyCursor_4(key_OR_range) native "IDBIndex_openKeyCursor_4_Callback";
+ Request _openKeyCursor_4(key_OR_range) native "IDBIndex__openKeyCursor_4_Callback";
+ @DomName('IDBIndex._openKeyCursor_5')
@DocsEditable
- @DomName('IDBIndex.openKeyCursor_5')
- Request _openKeyCursor_5(key_OR_range, direction) native "IDBIndex_openKeyCursor_5_Callback";
+ Request _openKeyCursor_5(key_OR_range, direction) native "IDBIndex__openKeyCursor_5_Callback";
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -456,7 +470,6 @@
// BSD-style license that can be found in the LICENSE file.
-@DocsEditable
@DomName('IDBKeyRange')
class KeyRange extends NativeFieldWrapperClass1 {
@DomName('IDBKeyRange.only')
@@ -479,20 +492,20 @@
KeyRange.internal();
- @DocsEditable
@DomName('IDBKeyRange.lower')
+ @DocsEditable
dynamic get lower native "IDBKeyRange_lower_Getter";
- @DocsEditable
@DomName('IDBKeyRange.lowerOpen')
+ @DocsEditable
bool get lowerOpen native "IDBKeyRange_lowerOpen_Getter";
- @DocsEditable
@DomName('IDBKeyRange.upper')
+ @DocsEditable
dynamic get upper native "IDBKeyRange_upper_Getter";
- @DocsEditable
@DomName('IDBKeyRange.upperOpen')
+ @DocsEditable
bool get upperOpen native "IDBKeyRange_upperOpen_Getter";
static KeyRange bound_(/*IDBKey*/ lower, /*IDBKey*/ upper, [bool lowerOpen, bool upperOpen]) {
@@ -505,17 +518,17 @@
return _bound_3(lower, upper);
}
+ @DomName('IDBKeyRange._bound_1')
@DocsEditable
- @DomName('IDBKeyRange.bound_1')
- static KeyRange _bound_1(lower, upper, lowerOpen, upperOpen) native "IDBKeyRange_bound_1_Callback";
+ static KeyRange _bound_1(lower, upper, lowerOpen, upperOpen) native "IDBKeyRange__bound_1_Callback";
+ @DomName('IDBKeyRange._bound_2')
@DocsEditable
- @DomName('IDBKeyRange.bound_2')
- static KeyRange _bound_2(lower, upper, lowerOpen) native "IDBKeyRange_bound_2_Callback";
+ static KeyRange _bound_2(lower, upper, lowerOpen) native "IDBKeyRange__bound_2_Callback";
+ @DomName('IDBKeyRange._bound_3')
@DocsEditable
- @DomName('IDBKeyRange.bound_3')
- static KeyRange _bound_3(lower, upper) native "IDBKeyRange_bound_3_Callback";
+ static KeyRange _bound_3(lower, upper) native "IDBKeyRange__bound_3_Callback";
static KeyRange lowerBound_(/*IDBKey*/ bound, [bool open]) {
if (?open) {
@@ -524,16 +537,16 @@
return _lowerBound_2(bound);
}
+ @DomName('IDBKeyRange._lowerBound_1')
@DocsEditable
- @DomName('IDBKeyRange.lowerBound_1')
- static KeyRange _lowerBound_1(bound, open) native "IDBKeyRange_lowerBound_1_Callback";
+ static KeyRange _lowerBound_1(bound, open) native "IDBKeyRange__lowerBound_1_Callback";
+ @DomName('IDBKeyRange._lowerBound_2')
@DocsEditable
- @DomName('IDBKeyRange.lowerBound_2')
- static KeyRange _lowerBound_2(bound) native "IDBKeyRange_lowerBound_2_Callback";
+ static KeyRange _lowerBound_2(bound) native "IDBKeyRange__lowerBound_2_Callback";
- @DocsEditable
@DomName('IDBKeyRange.only_')
+ @DocsEditable
static KeyRange only_(/*IDBKey*/ value) native "IDBKeyRange_only__Callback";
static KeyRange upperBound_(/*IDBKey*/ bound, [bool open]) {
@@ -543,13 +556,13 @@
return _upperBound_2(bound);
}
+ @DomName('IDBKeyRange._upperBound_1')
@DocsEditable
- @DomName('IDBKeyRange.upperBound_1')
- static KeyRange _upperBound_1(bound, open) native "IDBKeyRange_upperBound_1_Callback";
+ static KeyRange _upperBound_1(bound, open) native "IDBKeyRange__upperBound_1_Callback";
+ @DomName('IDBKeyRange._upperBound_2')
@DocsEditable
- @DomName('IDBKeyRange.upperBound_2')
- static KeyRange _upperBound_2(bound) native "IDBKeyRange_upperBound_2_Callback";
+ static KeyRange _upperBound_2(bound) native "IDBKeyRange__upperBound_2_Callback";
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -564,24 +577,24 @@
class ObjectStore extends NativeFieldWrapperClass1 {
ObjectStore.internal();
- @DocsEditable
@DomName('IDBObjectStore.autoIncrement')
+ @DocsEditable
bool get autoIncrement native "IDBObjectStore_autoIncrement_Getter";
- @DocsEditable
@DomName('IDBObjectStore.indexNames')
+ @DocsEditable
List<String> get indexNames native "IDBObjectStore_indexNames_Getter";
- @DocsEditable
@DomName('IDBObjectStore.keyPath')
+ @DocsEditable
dynamic get keyPath native "IDBObjectStore_keyPath_Getter";
- @DocsEditable
@DomName('IDBObjectStore.name')
+ @DocsEditable
String get name native "IDBObjectStore_name_Getter";
- @DocsEditable
@DomName('IDBObjectStore.transaction')
+ @DocsEditable
Transaction get transaction native "IDBObjectStore_transaction_Getter";
Request add(Object value, [/*IDBKey*/ key]) {
@@ -591,16 +604,16 @@
return _add_2(value);
}
+ @DomName('IDBObjectStore._add_1')
@DocsEditable
- @DomName('IDBObjectStore.add_1')
- Request _add_1(value, key) native "IDBObjectStore_add_1_Callback";
+ Request _add_1(value, key) native "IDBObjectStore__add_1_Callback";
+ @DomName('IDBObjectStore._add_2')
@DocsEditable
- @DomName('IDBObjectStore.add_2')
- Request _add_2(value) native "IDBObjectStore_add_2_Callback";
+ Request _add_2(value) native "IDBObjectStore__add_2_Callback";
- @DocsEditable
@DomName('IDBObjectStore.clear')
+ @DocsEditable
Request clear() native "IDBObjectStore_clear_Callback";
Request count([key_OR_range]) {
@@ -616,17 +629,17 @@
throw new ArgumentError("Incorrect number or type of arguments");
}
+ @DomName('IDBObjectStore._count_1')
@DocsEditable
- @DomName('IDBObjectStore.count_1')
- Request _count_1() native "IDBObjectStore_count_1_Callback";
+ Request _count_1() native "IDBObjectStore__count_1_Callback";
+ @DomName('IDBObjectStore._count_2')
@DocsEditable
- @DomName('IDBObjectStore.count_2')
- Request _count_2(key_OR_range) native "IDBObjectStore_count_2_Callback";
+ Request _count_2(key_OR_range) native "IDBObjectStore__count_2_Callback";
+ @DomName('IDBObjectStore._count_3')
@DocsEditable
- @DomName('IDBObjectStore.count_3')
- Request _count_3(key_OR_range) native "IDBObjectStore_count_3_Callback";
+ Request _count_3(key_OR_range) native "IDBObjectStore__count_3_Callback";
Index createIndex(String name, keyPath, [Map options]) {
if ((name is String || name == null) && (keyPath is List<String> || keyPath == null) && (options is Map || options == null)) {
@@ -638,13 +651,13 @@
throw new ArgumentError("Incorrect number or type of arguments");
}
+ @DomName('IDBObjectStore._createIndex_1')
@DocsEditable
- @DomName('IDBObjectStore.createIndex_1')
- Index _createIndex_1(name, keyPath, options) native "IDBObjectStore_createIndex_1_Callback";
+ Index _createIndex_1(name, keyPath, options) native "IDBObjectStore__createIndex_1_Callback";
+ @DomName('IDBObjectStore._createIndex_2')
@DocsEditable
- @DomName('IDBObjectStore.createIndex_2')
- Index _createIndex_2(name, keyPath, options) native "IDBObjectStore_createIndex_2_Callback";
+ Index _createIndex_2(name, keyPath, options) native "IDBObjectStore__createIndex_2_Callback";
Request delete(key_OR_keyRange) {
if ((key_OR_keyRange is KeyRange || key_OR_keyRange == null)) {
@@ -656,16 +669,16 @@
throw new ArgumentError("Incorrect number or type of arguments");
}
+ @DomName('IDBObjectStore._delete_1')
@DocsEditable
- @DomName('IDBObjectStore.delete_1')
- Request _delete_1(key_OR_keyRange) native "IDBObjectStore_delete_1_Callback";
+ Request _delete_1(key_OR_keyRange) native "IDBObjectStore__delete_1_Callback";
+ @DomName('IDBObjectStore._delete_2')
@DocsEditable
- @DomName('IDBObjectStore.delete_2')
- Request _delete_2(key_OR_keyRange) native "IDBObjectStore_delete_2_Callback";
+ Request _delete_2(key_OR_keyRange) native "IDBObjectStore__delete_2_Callback";
- @DocsEditable
@DomName('IDBObjectStore.deleteIndex')
+ @DocsEditable
void deleteIndex(String name) native "IDBObjectStore_deleteIndex_Callback";
Request getObject(key) {
@@ -678,16 +691,16 @@
throw new ArgumentError("Incorrect number or type of arguments");
}
+ @DomName('IDBObjectStore._get_1')
@DocsEditable
- @DomName('IDBObjectStore.get_1')
- Request _get_1(key) native "IDBObjectStore_get_1_Callback";
+ Request _get_1(key) native "IDBObjectStore__get_1_Callback";
+ @DomName('IDBObjectStore._get_2')
@DocsEditable
- @DomName('IDBObjectStore.get_2')
- Request _get_2(key) native "IDBObjectStore_get_2_Callback";
+ Request _get_2(key) native "IDBObjectStore__get_2_Callback";
- @DocsEditable
@DomName('IDBObjectStore.index')
+ @DocsEditable
Index index(String name) native "IDBObjectStore_index_Callback";
Request openCursor([key_OR_range, String direction]) {
@@ -709,25 +722,25 @@
throw new ArgumentError("Incorrect number or type of arguments");
}
+ @DomName('IDBObjectStore._openCursor_1')
@DocsEditable
- @DomName('IDBObjectStore.openCursor_1')
- Request _openCursor_1() native "IDBObjectStore_openCursor_1_Callback";
+ Request _openCursor_1() native "IDBObjectStore__openCursor_1_Callback";
+ @DomName('IDBObjectStore._openCursor_2')
@DocsEditable
- @DomName('IDBObjectStore.openCursor_2')
- Request _openCursor_2(key_OR_range) native "IDBObjectStore_openCursor_2_Callback";
+ Request _openCursor_2(key_OR_range) native "IDBObjectStore__openCursor_2_Callback";
+ @DomName('IDBObjectStore._openCursor_3')
@DocsEditable
- @DomName('IDBObjectStore.openCursor_3')
- Request _openCursor_3(key_OR_range, direction) native "IDBObjectStore_openCursor_3_Callback";
+ Request _openCursor_3(key_OR_range, direction) native "IDBObjectStore__openCursor_3_Callback";
+ @DomName('IDBObjectStore._openCursor_4')
@DocsEditable
- @DomName('IDBObjectStore.openCursor_4')
- Request _openCursor_4(key_OR_range) native "IDBObjectStore_openCursor_4_Callback";
+ Request _openCursor_4(key_OR_range) native "IDBObjectStore__openCursor_4_Callback";
+ @DomName('IDBObjectStore._openCursor_5')
@DocsEditable
- @DomName('IDBObjectStore.openCursor_5')
- Request _openCursor_5(key_OR_range, direction) native "IDBObjectStore_openCursor_5_Callback";
+ Request _openCursor_5(key_OR_range, direction) native "IDBObjectStore__openCursor_5_Callback";
Request put(Object value, [/*IDBKey*/ key]) {
if (?key) {
@@ -736,13 +749,13 @@
return _put_2(value);
}
+ @DomName('IDBObjectStore._put_1')
@DocsEditable
- @DomName('IDBObjectStore.put_1')
- Request _put_1(value, key) native "IDBObjectStore_put_1_Callback";
+ Request _put_1(value, key) native "IDBObjectStore__put_1_Callback";
+ @DomName('IDBObjectStore._put_2')
@DocsEditable
- @DomName('IDBObjectStore.put_2')
- Request _put_2(value) native "IDBObjectStore_put_2_Callback";
+ Request _put_2(value) native "IDBObjectStore__put_2_Callback";
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -757,22 +770,32 @@
class OpenDBRequest extends Request implements EventTarget {
OpenDBRequest.internal() : super.internal();
+ @DomName('IDBOpenDBRequest.blocked')
+ @DocsEditable
static const EventStreamProvider<Event> blockedEvent = const EventStreamProvider<Event>('blocked');
+ @DomName('IDBOpenDBRequest.upgradeneeded')
+ @DocsEditable
static const EventStreamProvider<VersionChangeEvent> upgradeNeededEvent = const EventStreamProvider<VersionChangeEvent>('upgradeneeded');
@DocsEditable
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
+ @deprecated
OpenDBRequestEvents get on =>
new OpenDBRequestEvents(this);
+ @DomName('IDBOpenDBRequest.blocked')
+ @DocsEditable
Stream<Event> get onBlocked => blockedEvent.forTarget(this);
+ @DomName('IDBOpenDBRequest.upgradeneeded')
+ @DocsEditable
Stream<VersionChangeEvent> get onUpgradeNeeded => upgradeNeededEvent.forTarget(this);
}
@DocsEditable
+@deprecated
class OpenDBRequestEvents extends RequestEvents {
@DocsEditable
OpenDBRequestEvents(EventTarget _ptr) : super(_ptr);
@@ -795,58 +818,68 @@
class Request extends EventTarget {
Request.internal() : super.internal();
+ @DomName('IDBRequest.error')
+ @DocsEditable
static const EventStreamProvider<Event> errorEvent = const EventStreamProvider<Event>('error');
+ @DomName('IDBRequest.success')
+ @DocsEditable
static const EventStreamProvider<Event> successEvent = const EventStreamProvider<Event>('success');
@DocsEditable
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
+ @deprecated
RequestEvents get on =>
new RequestEvents(this);
- @DocsEditable
@DomName('IDBRequest.error')
+ @DocsEditable
DomError get error native "IDBRequest_error_Getter";
- @DocsEditable
@DomName('IDBRequest.readyState')
+ @DocsEditable
String get readyState native "IDBRequest_readyState_Getter";
- @DocsEditable
@DomName('IDBRequest.result')
+ @DocsEditable
dynamic get result native "IDBRequest_result_Getter";
- @DocsEditable
@DomName('IDBRequest.source')
+ @DocsEditable
dynamic get source native "IDBRequest_source_Getter";
- @DocsEditable
@DomName('IDBRequest.transaction')
+ @DocsEditable
Transaction get transaction native "IDBRequest_transaction_Getter";
- @DocsEditable
@DomName('IDBRequest.webkitErrorMessage')
+ @DocsEditable
String get webkitErrorMessage native "IDBRequest_webkitErrorMessage_Getter";
- @DocsEditable
@DomName('IDBRequest.addEventListener')
+ @DocsEditable
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native "IDBRequest_addEventListener_Callback";
- @DocsEditable
@DomName('IDBRequest.dispatchEvent')
- bool $dom_dispatchEvent(Event evt) native "IDBRequest_dispatchEvent_Callback";
-
@DocsEditable
+ bool dispatchEvent(Event evt) native "IDBRequest_dispatchEvent_Callback";
+
@DomName('IDBRequest.removeEventListener')
+ @DocsEditable
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native "IDBRequest_removeEventListener_Callback";
+ @DomName('IDBRequest.error')
+ @DocsEditable
Stream<Event> get onError => errorEvent.forTarget(this);
+ @DomName('IDBRequest.success')
+ @DocsEditable
Stream<Event> get onSuccess => successEvent.forTarget(this);
}
@DocsEditable
+@deprecated
class RequestEvents extends Events {
@DocsEditable
RequestEvents(EventTarget _ptr) : super(_ptr);
@@ -869,62 +902,76 @@
class Transaction extends EventTarget {
Transaction.internal() : super.internal();
+ @DomName('IDBTransaction.abort')
+ @DocsEditable
static const EventStreamProvider<Event> abortEvent = const EventStreamProvider<Event>('abort');
+ @DomName('IDBTransaction.complete')
+ @DocsEditable
static const EventStreamProvider<Event> completeEvent = const EventStreamProvider<Event>('complete');
+ @DomName('IDBTransaction.error')
+ @DocsEditable
static const EventStreamProvider<Event> errorEvent = const EventStreamProvider<Event>('error');
@DocsEditable
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
+ @deprecated
TransactionEvents get on =>
new TransactionEvents(this);
- @DocsEditable
@DomName('IDBTransaction.db')
+ @DocsEditable
Database get db native "IDBTransaction_db_Getter";
- @DocsEditable
@DomName('IDBTransaction.error')
+ @DocsEditable
DomError get error native "IDBTransaction_error_Getter";
- @DocsEditable
@DomName('IDBTransaction.mode')
+ @DocsEditable
String get mode native "IDBTransaction_mode_Getter";
- @DocsEditable
@DomName('IDBTransaction.webkitErrorMessage')
+ @DocsEditable
String get webkitErrorMessage native "IDBTransaction_webkitErrorMessage_Getter";
- @DocsEditable
@DomName('IDBTransaction.abort')
+ @DocsEditable
void abort() native "IDBTransaction_abort_Callback";
- @DocsEditable
@DomName('IDBTransaction.addEventListener')
+ @DocsEditable
void $dom_addEventListener(String type, EventListener listener, [bool useCapture]) native "IDBTransaction_addEventListener_Callback";
- @DocsEditable
@DomName('IDBTransaction.dispatchEvent')
- bool $dom_dispatchEvent(Event evt) native "IDBTransaction_dispatchEvent_Callback";
-
@DocsEditable
+ bool dispatchEvent(Event evt) native "IDBTransaction_dispatchEvent_Callback";
+
@DomName('IDBTransaction.objectStore')
+ @DocsEditable
ObjectStore objectStore(String name) native "IDBTransaction_objectStore_Callback";
- @DocsEditable
@DomName('IDBTransaction.removeEventListener')
+ @DocsEditable
void $dom_removeEventListener(String type, EventListener listener, [bool useCapture]) native "IDBTransaction_removeEventListener_Callback";
+ @DomName('IDBTransaction.abort')
+ @DocsEditable
Stream<Event> get onAbort => abortEvent.forTarget(this);
+ @DomName('IDBTransaction.complete')
+ @DocsEditable
Stream<Event> get onComplete => completeEvent.forTarget(this);
+ @DomName('IDBTransaction.error')
+ @DocsEditable
Stream<Event> get onError => errorEvent.forTarget(this);
}
@DocsEditable
+@deprecated
class TransactionEvents extends Events {
@DocsEditable
TransactionEvents(EventTarget _ptr) : super(_ptr);
@@ -950,12 +997,12 @@
class UpgradeNeededEvent extends Event {
UpgradeNeededEvent.internal() : super.internal();
- @DocsEditable
@DomName('IDBUpgradeNeededEvent.newVersion')
+ @DocsEditable
int get newVersion native "IDBUpgradeNeededEvent_newVersion_Getter";
- @DocsEditable
@DomName('IDBUpgradeNeededEvent.oldVersion')
+ @DocsEditable
int get oldVersion native "IDBUpgradeNeededEvent_oldVersion_Getter";
}
@@ -971,8 +1018,8 @@
class VersionChangeEvent extends Event {
VersionChangeEvent.internal() : super.internal();
- @DocsEditable
@DomName('IDBVersionChangeEvent.version')
+ @DocsEditable
String get version native "IDBVersionChangeEvent_version_Getter";
}
@@ -988,18 +1035,24 @@
class VersionChangeRequest extends Request implements EventTarget {
VersionChangeRequest.internal() : super.internal();
+ @DomName('IDBVersionChangeRequest.blocked')
+ @DocsEditable
static const EventStreamProvider<Event> blockedEvent = const EventStreamProvider<Event>('blocked');
@DocsEditable
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
+ @deprecated
VersionChangeRequestEvents get on =>
new VersionChangeRequestEvents(this);
+ @DomName('IDBVersionChangeRequest.blocked')
+ @DocsEditable
Stream<Event> get onBlocked => blockedEvent.forTarget(this);
}
@DocsEditable
+@deprecated
class VersionChangeRequestEvents extends RequestEvents {
@DocsEditable
VersionChangeRequestEvents(EventTarget _ptr) : super(_ptr);
diff --git a/sdk/lib/io/file.dart b/sdk/lib/io/file.dart
index e3be26b..53a348c 100644
--- a/sdk/lib/io/file.dart
+++ b/sdk/lib/io/file.dart
@@ -99,16 +99,16 @@
/**
* Get the last-modified time of the file. Returns a
- * [:Future<Date>:] that completes with a [Date] object for the
+ * [:Future<DateTime>:] that completes with a [DateTime] object for the
* modification date.
*/
- Future<Date> lastModified();
+ Future<DateTime> lastModified();
/**
* Get the last-modified time of the file. Throws an exception
* if the file does not exist.
*/
- Date lastModifiedSync();
+ DateTime lastModifiedSync();
/**
* Open the file for random access operations. Returns a
diff --git a/sdk/lib/io/file_impl.dart b/sdk/lib/io/file_impl.dart
index b46a8dc..e47029f 100644
--- a/sdk/lib/io/file_impl.dart
+++ b/sdk/lib/io/file_impl.dart
@@ -485,7 +485,7 @@
return result;
}
- Future<Date> lastModified() {
+ Future<DateTime> lastModified() {
_ensureFileService();
List request = new List.fixedLength(2);
request[0] = _LAST_MODIFIED_REQUEST;
@@ -496,16 +496,16 @@
"Cannot retrieve modification time "
"for file '$_name'");
}
- return new Date.fromMillisecondsSinceEpoch(response);
+ return new DateTime.fromMillisecondsSinceEpoch(response);
});
}
external static _lastModified(String name);
- Date lastModifiedSync() {
+ DateTime lastModifiedSync() {
var ms = _lastModified(name);
throwIfError(ms, "Cannot retrieve modification time for file '$_name'");
- return new Date.fromMillisecondsSinceEpoch(ms);
+ return new DateTime.fromMillisecondsSinceEpoch(ms);
}
external static _open(String name, int mode);
diff --git a/sdk/lib/io/http.dart b/sdk/lib/io/http.dart
index 5b1809f..2862036 100644
--- a/sdk/lib/io/http.dart
+++ b/sdk/lib/io/http.dart
@@ -298,7 +298,7 @@
* Adds a header value. The header named [name] will have the value
* [value] added to its list of values. Some headers are single
* values and for these adding a value will replace the previous
- * value. If the value is of type Date a HTTP date format will be
+ * value. If the value is of type DateTime a HTTP date format will be
* applied. If the value is a [:List:] each element of the list will
* be added separately. For all other types the default [:toString:]
* method will be used.
@@ -343,21 +343,21 @@
/**
* Gets and sets the date. The value of this property will
- * reflect the "Date" header.
+ * reflect the "DateTime" header.
*/
- Date date;
+ DateTime date;
/**
* Gets and sets the expiry date. The value of this property will
* reflect the "Expires" header.
*/
- Date expires;
+ DateTime expires;
/**
* Gets and sets the 'if-modified-since' date. The value of this property will
* reflect the "if-modified-since" header.
*/
- Date ifModifiedSince;
+ DateTime ifModifiedSince;
/**
* Gets and sets the host part of the "Host" header for the
@@ -552,7 +552,7 @@
/**
* Gets and sets the expiry date.
*/
- Date expires;
+ DateTime expires;
/**
* Gets and sets the max age. A value of [:0:] means delete cookie
diff --git a/sdk/lib/io/http_headers.dart b/sdk/lib/io/http_headers.dart
index eb49406..928334d 100644
--- a/sdk/lib/io/http_headers.dart
+++ b/sdk/lib/io/http_headers.dart
@@ -110,7 +110,7 @@
_updateHostHeader();
}
- Date get ifModifiedSince {
+ DateTime get ifModifiedSince {
List<String> values = _headers["if-modified-since"];
if (values != null) {
try {
@@ -122,14 +122,14 @@
return null;
}
- void set ifModifiedSince(Date ifModifiedSince) {
+ void set ifModifiedSince(DateTime ifModifiedSince) {
_checkMutable();
// Format "ifModifiedSince" header with date in Greenwich Mean Time (GMT).
String formatted = _HttpUtils.formatDate(ifModifiedSince.toUtc());
_set("if-modified-since", formatted);
}
- Date get date {
+ DateTime get date {
List<String> values = _headers["date"];
if (values != null) {
try {
@@ -141,14 +141,14 @@
return null;
}
- void set date(Date date) {
+ void set date(DateTime date) {
_checkMutable();
- // Format "Date" header with date in Greenwich Mean Time (GMT).
+ // Format "DateTime" header with date in Greenwich Mean Time (GMT).
String formatted = _HttpUtils.formatDate(date.toUtc());
_set("date", formatted);
}
- Date get expires {
+ DateTime get expires {
List<String> values = _headers["expires"];
if (values != null) {
try {
@@ -160,7 +160,7 @@
return null;
}
- void set expires(Date expires) {
+ void set expires(DateTime expires) {
_checkMutable();
// Format "Expires" header with date in Greenwich Mean Time (GMT).
String formatted = _HttpUtils.formatDate(expires.toUtc());
@@ -199,7 +199,7 @@
_addValue(lowerCaseName, value);
}
} else if (lowerCaseName == "date") {
- if (value is Date) {
+ if (value is DateTime) {
date = value;
} else if (value is String) {
_set("date", value);
@@ -207,7 +207,7 @@
throw new HttpException("Unexpected type for header named $name");
}
} else if (lowerCaseName == "expires") {
- if (value is Date) {
+ if (value is DateTime) {
expires = value;
} else if (value is String) {
_set("expires", value);
@@ -215,7 +215,7 @@
throw new HttpException("Unexpected type for header named $name");
}
} else if (lowerCaseName == "if-modified-since") {
- if (value is Date) {
+ if (value is DateTime) {
ifModifiedSince = value;
} else if (value is String) {
_set("if-modified-since", value);
@@ -257,7 +257,7 @@
values = new List<String>();
_headers[name] = values;
}
- if (value is Date) {
+ if (value is DateTime) {
values.add(_HttpUtils.formatDate(value));
} else {
values.add(value.toString());
@@ -683,7 +683,7 @@
String name;
String value;
- Date expires;
+ DateTime expires;
int maxAge;
String domain;
String path;
diff --git a/sdk/lib/io/http_impl.dart b/sdk/lib/io/http_impl.dart
index c0d315c..993cbee 100644
--- a/sdk/lib/io/http_impl.dart
+++ b/sdk/lib/io/http_impl.dart
@@ -1350,7 +1350,7 @@
}
// Check for redirect loop
if (_connection._redirects != null) {
- Uri redirectUrl = new Uri.fromString(location[0]);
+ Uri redirectUrl = Uri.parse(location[0]);
for (int i = 0; i < _connection._redirects.length; i++) {
if (_connection._redirects[i].location.toString() ==
redirectUrl.toString()) {
@@ -1702,7 +1702,7 @@
void redirect([String method, Uri url]) {
if (method == null) method = _method;
if (url == null) {
- url = new Uri.fromString(_response.headers.value(HttpHeaders.LOCATION));
+ url = Uri.parse(_response.headers.value(HttpHeaders.LOCATION));
}
// Always set the content length to 0 for redirects.
var mutable = _request._headers._mutable;
@@ -1755,7 +1755,7 @@
_socket.onData = _invalidate;
_socket.onClosed = _invalidate;
_socket.onError = (_) => _invalidate();
- _returnTime = new Date.now();
+ _returnTime = new DateTime.now();
_httpClientConnection = null;
}
@@ -1774,7 +1774,7 @@
_socket.close();
}
- Duration _idleTime(Date now) => now.difference(_returnTime);
+ Duration _idleTime(DateTime now) => now.difference(_returnTime);
bool get _fromPool => _returnTime != null;
@@ -1788,7 +1788,7 @@
String _host;
int _port;
Socket _socket;
- Date _returnTime;
+ DateTime _returnTime;
bool _valid = true;
HttpClientConnection _httpClientConnection;
}
@@ -2125,7 +2125,7 @@
// If there is currently no eviction timer start one.
if (_evictionTimer == null) {
void _handleEviction(Timer timer) {
- Date now = new Date.now();
+ DateTime now = new DateTime.now();
List<String> emptyKeys = new List<String>();
_openSockets.forEach(
(String key, Queue<_SocketConnection> connections) {
diff --git a/sdk/lib/io/http_session.dart b/sdk/lib/io/http_session.dart
index 84eb08a..b392297 100644
--- a/sdk/lib/io/http_session.dart
+++ b/sdk/lib/io/http_session.dart
@@ -10,7 +10,7 @@
// the previous and next pointers.
class _HttpSession implements HttpSession {
_HttpSession(_HttpSessionManager this._sessionManager, String this.id)
- : _lastSeen = new Date.now();
+ : _lastSeen = new DateTime.now();
void destroy() {
_destroyed = true;
@@ -21,13 +21,13 @@
// Mark the session as seen. This will reset the timeout and move the node to
// the end of the timeout queue.
void _markSeen() {
- _lastSeen = new Date.now();
+ _lastSeen = new DateTime.now();
_sessionManager._bumpToEnd(this);
}
dynamic data;
- Date get lastSeen => _lastSeen;
+ DateTime get lastSeen => _lastSeen;
final String id;
@@ -37,7 +37,7 @@
// Destroyed marked. Used by the http connection to see if a session is valid.
bool _destroyed = false;
- Date _lastSeen;
+ DateTime _lastSeen;
Function _timeoutCallback;
_HttpSessionManager _sessionManager;
// Pointers in timeout queue.
@@ -138,7 +138,7 @@
void _startTimer() {
assert(_timer == null);
if (_head != null) {
- int seconds = new Date.now().difference(_head.lastSeen).inSeconds;
+ int seconds = new DateTime.now().difference(_head.lastSeen).inSeconds;
_timer = new Timer((_sessionTimeout - seconds) * 1000, _timerTimeout);
}
}
diff --git a/sdk/lib/io/http_utils.dart b/sdk/lib/io/http_utils.dart
index 45ac5a9..a68f08f 100644
--- a/sdk/lib/io/http_utils.dart
+++ b/sdk/lib/io/http_utils.dart
@@ -97,12 +97,12 @@
// | "Sep" | "Oct" | "Nov" | "Dec"
// Format as RFC 1123 date.
- static String formatDate(Date date) {
+ static String formatDate(DateTime date) {
const List wkday = const ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"];
const List month = const ["Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
- Date d = date.toUtc();
+ DateTime d = date.toUtc();
StringBuffer sb = new StringBuffer();
sb.add(wkday[d.weekday - 1]);
sb.add(", ");
@@ -121,7 +121,7 @@
return sb.toString();
}
- static Date parseDate(String date) {
+ static DateTime parseDate(String date) {
final int SP = 32;
const List wkdays = const ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"];
const List weekdays = const ["Monday", "Tuesday", "Wednesday", "Thursday",
@@ -246,10 +246,10 @@
expect("GMT");
}
expectEnd();
- return new Date.utc(year, month + 1, day, hours, minutes, seconds, 0);
+ return new DateTime.utc(year, month + 1, day, hours, minutes, seconds, 0);
}
- static Date parseCookieDate(String date) {
+ static DateTime parseCookieDate(String date) {
const List monthsLowerCase = const ["jan", "feb", "mar", "apr", "may",
"jun", "jul", "aug", "sep", "oct",
"nov", "dec"];
@@ -356,6 +356,6 @@
if (minute > 59) error();
if (second > 59) error();
- return new Date.utc(year, month, dayOfMonth, hour, minute, second, 0);
+ return new DateTime.utc(year, month, dayOfMonth, hour, minute, second, 0);
}
}
diff --git a/sdk/lib/io/io.dart b/sdk/lib/io/io.dart
index 84ecb53..a9fa17a 100644
--- a/sdk/lib/io/io.dart
+++ b/sdk/lib/io/io.dart
@@ -13,6 +13,9 @@
library dart.io;
import 'dart:async';
+import 'dart:collection' show Queue,
+ DoubleLinkedQueue,
+ DoubleLinkedQueueEntry;
import 'dart:crypto';
import 'dart:isolate';
import 'dart:math';
diff --git a/sdk/lib/io/secure_socket.dart b/sdk/lib/io/secure_socket.dart
index 12ac7e0..bf44971 100644
--- a/sdk/lib/io/secure_socket.dart
+++ b/sdk/lib/io/secure_socket.dart
@@ -98,8 +98,8 @@
this.endValidity);
final String subject;
final String issuer;
- final Date startValidity;
- final Date endValidity;
+ final DateTime startValidity;
+ final DateTime endValidity;
}
diff --git a/sdk/lib/io/timer_impl.dart b/sdk/lib/io/timer_impl.dart
index b1e4d42..415c108 100644
--- a/sdk/lib/io/timer_impl.dart
+++ b/sdk/lib/io/timer_impl.dart
@@ -21,7 +21,7 @@
Timer timer = new _Timer._internal();
timer._callback = callback;
timer._milliSeconds = milliSeconds;
- timer._wakeupTime = (new Date.now()).millisecondsSinceEpoch + milliSeconds;
+ timer._wakeupTime = (new DateTime.now()).millisecondsSinceEpoch + milliSeconds;
timer._repeating = repeating;
timer._addTimerToList();
timer._notifyEventHandler();
@@ -123,7 +123,7 @@
void _handleTimeout() {
int currentTime =
- (new Date.now()).millisecondsSinceEpoch + _TIMER_JITTER;
+ (new DateTime.now()).millisecondsSinceEpoch + _TIMER_JITTER;
// Collect all pending timers.
DoubleLinkedQueueEntry<_Timer> entry = _timers.firstEntry();
diff --git a/sdk/lib/io/websocket_impl.dart b/sdk/lib/io/websocket_impl.dart
index 20ea830..d7408b9 100644
--- a/sdk/lib/io/websocket_impl.dart
+++ b/sdk/lib/io/websocket_impl.dart
@@ -766,7 +766,7 @@
class _WebSocket implements WebSocket {
_WebSocket(String url, [protocols]) {
- Uri uri = new Uri.fromString(url);
+ Uri uri = Uri.parse(url);
if (uri.scheme != "ws" && uri.scheme != "wss") {
throw new WebSocketException("Unsupported URL scheme ${uri.scheme}");
}
diff --git a/sdk/lib/isolate/isolate_stream.dart b/sdk/lib/isolate/isolate_stream.dart
index a0a30b0..d72389f 100644
--- a/sdk/lib/isolate/isolate_stream.dart
+++ b/sdk/lib/isolate/isolate_stream.dart
@@ -52,7 +52,7 @@
class IsolateStream extends Stream<dynamic> {
bool _isClosed = false;
final ReceivePort _port;
- StreamController _controller = new StreamController.multiSubscription();
+ StreamController _controller = new StreamController.broadcast();
IsolateStream._fromOriginalReceivePort(this._port) {
_port.receive((message, replyTo) {
@@ -95,10 +95,10 @@
{ void onError(AsyncError error),
void onDone(),
bool unsubscribeOnError}) {
- return _controller.listen(onData,
- onError: onError,
- onDone: onDone,
- unsubscribeOnError: unsubscribeOnError);
+ return _controller.stream.listen(onData,
+ onError: onError,
+ onDone: onDone,
+ unsubscribeOnError: unsubscribeOnError);
}
dynamic _unmangleMessage(var message) {
diff --git a/sdk/lib/svg/dart2js/svg_dart2js.dart b/sdk/lib/svg/dart2js/svg_dart2js.dart
index 28ec51b..ca9734e 100644
--- a/sdk/lib/svg/dart2js/svg_dart2js.dart
+++ b/sdk/lib/svg/dart2js/svg_dart2js.dart
@@ -2,8 +2,11 @@
import 'dart:async';
import 'dart:collection';
+import 'dart:collection-dev';
import 'dart:html';
import 'dart:html_common';
+import 'dart:_js_helper' show Creates, Returns, JavaScriptIndexingBehavior, JSName;
+import 'dart:_foreign_helper' show JS;
// DO NOT EDIT
// Auto-generated dart:svg library.
@@ -11,6 +14,7 @@
+
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
@@ -56,7 +60,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGAElement')
class AElement extends SvgElement implements Transformable, Tests, UriReference, Stylable, ExternalResourcesRequired, LangSpace native "*SVGAElement" {
@@ -64,42 +67,52 @@
@DocsEditable
factory AElement() => _SvgElementFactoryProvider.createSvgElement_tag("a");
- @DocsEditable @DomName('SVGAElement.target')
+ @DomName('SVGAElement.target')
+ @DocsEditable
final AnimatedString target;
// From SVGExternalResourcesRequired
- @DocsEditable @DomName('SVGAElement.externalResourcesRequired')
+ @DomName('SVGAElement.externalResourcesRequired')
+ @DocsEditable
final AnimatedBoolean externalResourcesRequired;
// From SVGLangSpace
- @DocsEditable @DomName('SVGAElement.xmllang')
+ @DomName('SVGAElement.xmllang')
+ @DocsEditable
String xmllang;
- @DocsEditable @DomName('SVGAElement.xmlspace')
+ @DomName('SVGAElement.xmlspace')
+ @DocsEditable
String xmlspace;
// From SVGLocatable
- @DocsEditable @DomName('SVGAElement.farthestViewportElement')
+ @DomName('SVGAElement.farthestViewportElement')
+ @DocsEditable
final SvgElement farthestViewportElement;
- @DocsEditable @DomName('SVGAElement.nearestViewportElement')
+ @DomName('SVGAElement.nearestViewportElement')
+ @DocsEditable
final SvgElement nearestViewportElement;
- @DocsEditable @DomName('SVGAElement.getBBox')
+ @DomName('SVGAElement.getBBox')
+ @DocsEditable
Rect getBBox() native;
@JSName('getCTM')
- @DocsEditable @DomName('SVGAElement.getCTM')
+ @DomName('SVGAElement.getCTM')
+ @DocsEditable
Matrix getCtm() native;
@JSName('getScreenCTM')
- @DocsEditable @DomName('SVGAElement.getScreenCTM')
+ @DomName('SVGAElement.getScreenCTM')
+ @DocsEditable
Matrix getScreenCtm() native;
- @DocsEditable @DomName('SVGAElement.getTransformToElement')
+ @DomName('SVGAElement.getTransformToElement')
+ @DocsEditable
Matrix getTransformToElement(SvgElement element) native;
// From SVGStylable
@@ -110,31 +123,38 @@
// Use implementation from Element.
// final CssStyleDeclaration style;
- @DocsEditable @DomName('SVGAElement.getPresentationAttribute')
+ @DomName('SVGAElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native;
// From SVGTests
- @DocsEditable @DomName('SVGAElement.requiredExtensions')
+ @DomName('SVGAElement.requiredExtensions')
+ @DocsEditable
final StringList requiredExtensions;
- @DocsEditable @DomName('SVGAElement.requiredFeatures')
+ @DomName('SVGAElement.requiredFeatures')
+ @DocsEditable
final StringList requiredFeatures;
- @DocsEditable @DomName('SVGAElement.systemLanguage')
+ @DomName('SVGAElement.systemLanguage')
+ @DocsEditable
final StringList systemLanguage;
- @DocsEditable @DomName('SVGAElement.hasExtension')
+ @DomName('SVGAElement.hasExtension')
+ @DocsEditable
bool hasExtension(String extension) native;
// From SVGTransformable
- @DocsEditable @DomName('SVGAElement.transform')
+ @DomName('SVGAElement.transform')
+ @DocsEditable
final AnimatedTransformList transform;
// From SVGURIReference
- @DocsEditable @DomName('SVGAElement.href')
+ @DomName('SVGAElement.href')
+ @DocsEditable
final AnimatedString href;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -142,7 +162,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGAltGlyphDefElement')
class AltGlyphDefElement extends SvgElement native "*SVGAltGlyphDefElement" {
@@ -152,20 +171,22 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGAltGlyphElement')
class AltGlyphElement extends TextPositioningElement implements UriReference native "*SVGAltGlyphElement" {
- @DocsEditable @DomName('SVGAltGlyphElement.format')
+ @DomName('SVGAltGlyphElement.format')
+ @DocsEditable
String format;
- @DocsEditable @DomName('SVGAltGlyphElement.glyphRef')
+ @DomName('SVGAltGlyphElement.glyphRef')
+ @DocsEditable
String glyphRef;
// From SVGURIReference
- @DocsEditable @DomName('SVGAltGlyphElement.href')
+ @DomName('SVGAltGlyphElement.href')
+ @DocsEditable
final AnimatedString href;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -173,7 +194,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGAltGlyphItemElement')
class AltGlyphItemElement extends SvgElement native "*SVGAltGlyphItemElement" {
@@ -183,7 +203,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGAngle')
class Angle native "*SVGAngle" {
@@ -198,22 +217,28 @@
static const int SVG_ANGLETYPE_UNSPECIFIED = 1;
- @DocsEditable @DomName('SVGAngle.unitType')
+ @DomName('SVGAngle.unitType')
+ @DocsEditable
final int unitType;
- @DocsEditable @DomName('SVGAngle.value')
+ @DomName('SVGAngle.value')
+ @DocsEditable
num value;
- @DocsEditable @DomName('SVGAngle.valueAsString')
+ @DomName('SVGAngle.valueAsString')
+ @DocsEditable
String valueAsString;
- @DocsEditable @DomName('SVGAngle.valueInSpecifiedUnits')
+ @DomName('SVGAngle.valueInSpecifiedUnits')
+ @DocsEditable
num valueInSpecifiedUnits;
- @DocsEditable @DomName('SVGAngle.convertToSpecifiedUnits')
+ @DomName('SVGAngle.convertToSpecifiedUnits')
+ @DocsEditable
void convertToSpecifiedUnits(int unitType) native;
- @DocsEditable @DomName('SVGAngle.newValueSpecifiedUnits')
+ @DomName('SVGAngle.newValueSpecifiedUnits')
+ @DocsEditable
void newValueSpecifiedUnits(int unitType, num valueInSpecifiedUnits) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -221,7 +246,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGAnimateColorElement')
class AnimateColorElement extends AnimationElement native "*SVGAnimateColorElement" {
@@ -234,7 +258,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGAnimateElement')
class AnimateElement extends AnimationElement native "*SVGAnimateElement" {
@@ -247,7 +270,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGAnimateMotionElement')
class AnimateMotionElement extends AnimationElement native "*SVGAnimateMotionElement" {
@@ -260,7 +282,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGAnimateTransformElement')
class AnimateTransformElement extends AnimationElement native "*SVGAnimateTransformElement" {
@@ -273,15 +294,16 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGAnimatedAngle')
class AnimatedAngle native "*SVGAnimatedAngle" {
- @DocsEditable @DomName('SVGAnimatedAngle.animVal')
+ @DomName('SVGAnimatedAngle.animVal')
+ @DocsEditable
final Angle animVal;
- @DocsEditable @DomName('SVGAnimatedAngle.baseVal')
+ @DomName('SVGAnimatedAngle.baseVal')
+ @DocsEditable
final Angle baseVal;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -289,15 +311,16 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGAnimatedBoolean')
class AnimatedBoolean native "*SVGAnimatedBoolean" {
- @DocsEditable @DomName('SVGAnimatedBoolean.animVal')
+ @DomName('SVGAnimatedBoolean.animVal')
+ @DocsEditable
final bool animVal;
- @DocsEditable @DomName('SVGAnimatedBoolean.baseVal')
+ @DomName('SVGAnimatedBoolean.baseVal')
+ @DocsEditable
bool baseVal;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -305,15 +328,16 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGAnimatedEnumeration')
class AnimatedEnumeration native "*SVGAnimatedEnumeration" {
- @DocsEditable @DomName('SVGAnimatedEnumeration.animVal')
+ @DomName('SVGAnimatedEnumeration.animVal')
+ @DocsEditable
final int animVal;
- @DocsEditable @DomName('SVGAnimatedEnumeration.baseVal')
+ @DomName('SVGAnimatedEnumeration.baseVal')
+ @DocsEditable
int baseVal;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -321,15 +345,16 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGAnimatedInteger')
class AnimatedInteger native "*SVGAnimatedInteger" {
- @DocsEditable @DomName('SVGAnimatedInteger.animVal')
+ @DomName('SVGAnimatedInteger.animVal')
+ @DocsEditable
final int animVal;
- @DocsEditable @DomName('SVGAnimatedInteger.baseVal')
+ @DomName('SVGAnimatedInteger.baseVal')
+ @DocsEditable
int baseVal;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -337,15 +362,16 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGAnimatedLength')
class AnimatedLength native "*SVGAnimatedLength" {
- @DocsEditable @DomName('SVGAnimatedLength.animVal')
+ @DomName('SVGAnimatedLength.animVal')
+ @DocsEditable
final Length animVal;
- @DocsEditable @DomName('SVGAnimatedLength.baseVal')
+ @DomName('SVGAnimatedLength.baseVal')
+ @DocsEditable
final Length baseVal;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -353,15 +379,16 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGAnimatedLengthList')
class AnimatedLengthList native "*SVGAnimatedLengthList" {
- @DocsEditable @DomName('SVGAnimatedLengthList.animVal')
+ @DomName('SVGAnimatedLengthList.animVal')
+ @DocsEditable
final LengthList animVal;
- @DocsEditable @DomName('SVGAnimatedLengthList.baseVal')
+ @DomName('SVGAnimatedLengthList.baseVal')
+ @DocsEditable
final LengthList baseVal;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -369,15 +396,16 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGAnimatedNumber')
class AnimatedNumber native "*SVGAnimatedNumber" {
- @DocsEditable @DomName('SVGAnimatedNumber.animVal')
+ @DomName('SVGAnimatedNumber.animVal')
+ @DocsEditable
final num animVal;
- @DocsEditable @DomName('SVGAnimatedNumber.baseVal')
+ @DomName('SVGAnimatedNumber.baseVal')
+ @DocsEditable
num baseVal;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -385,15 +413,16 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGAnimatedNumberList')
class AnimatedNumberList native "*SVGAnimatedNumberList" {
- @DocsEditable @DomName('SVGAnimatedNumberList.animVal')
+ @DomName('SVGAnimatedNumberList.animVal')
+ @DocsEditable
final NumberList animVal;
- @DocsEditable @DomName('SVGAnimatedNumberList.baseVal')
+ @DomName('SVGAnimatedNumberList.baseVal')
+ @DocsEditable
final NumberList baseVal;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -401,15 +430,16 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGAnimatedPreserveAspectRatio')
class AnimatedPreserveAspectRatio native "*SVGAnimatedPreserveAspectRatio" {
- @DocsEditable @DomName('SVGAnimatedPreserveAspectRatio.animVal')
+ @DomName('SVGAnimatedPreserveAspectRatio.animVal')
+ @DocsEditable
final PreserveAspectRatio animVal;
- @DocsEditable @DomName('SVGAnimatedPreserveAspectRatio.baseVal')
+ @DomName('SVGAnimatedPreserveAspectRatio.baseVal')
+ @DocsEditable
final PreserveAspectRatio baseVal;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -417,15 +447,16 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGAnimatedRect')
class AnimatedRect native "*SVGAnimatedRect" {
- @DocsEditable @DomName('SVGAnimatedRect.animVal')
+ @DomName('SVGAnimatedRect.animVal')
+ @DocsEditable
final Rect animVal;
- @DocsEditable @DomName('SVGAnimatedRect.baseVal')
+ @DomName('SVGAnimatedRect.baseVal')
+ @DocsEditable
final Rect baseVal;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -433,15 +464,16 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGAnimatedString')
class AnimatedString native "*SVGAnimatedString" {
- @DocsEditable @DomName('SVGAnimatedString.animVal')
+ @DomName('SVGAnimatedString.animVal')
+ @DocsEditable
final String animVal;
- @DocsEditable @DomName('SVGAnimatedString.baseVal')
+ @DomName('SVGAnimatedString.baseVal')
+ @DocsEditable
String baseVal;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -449,15 +481,16 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGAnimatedTransformList')
class AnimatedTransformList native "*SVGAnimatedTransformList" {
- @DocsEditable @DomName('SVGAnimatedTransformList.animVal')
+ @DomName('SVGAnimatedTransformList.animVal')
+ @DocsEditable
final TransformList animVal;
- @DocsEditable @DomName('SVGAnimatedTransformList.baseVal')
+ @DomName('SVGAnimatedTransformList.baseVal')
+ @DocsEditable
final TransformList baseVal;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -465,7 +498,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGAnimationElement')
class AnimationElement extends SvgElement implements Tests, ElementTimeControl, ExternalResourcesRequired native "*SVGAnimationElement" {
@@ -473,49 +505,62 @@
@DocsEditable
factory AnimationElement() => _SvgElementFactoryProvider.createSvgElement_tag("animation");
- @DocsEditable @DomName('SVGAnimationElement.targetElement')
+ @DomName('SVGAnimationElement.targetElement')
+ @DocsEditable
final SvgElement targetElement;
- @DocsEditable @DomName('SVGAnimationElement.getCurrentTime')
+ @DomName('SVGAnimationElement.getCurrentTime')
+ @DocsEditable
num getCurrentTime() native;
- @DocsEditable @DomName('SVGAnimationElement.getSimpleDuration')
+ @DomName('SVGAnimationElement.getSimpleDuration')
+ @DocsEditable
num getSimpleDuration() native;
- @DocsEditable @DomName('SVGAnimationElement.getStartTime')
+ @DomName('SVGAnimationElement.getStartTime')
+ @DocsEditable
num getStartTime() native;
// From ElementTimeControl
- @DocsEditable @DomName('SVGAnimationElement.beginElement')
+ @DomName('SVGAnimationElement.beginElement')
+ @DocsEditable
void beginElement() native;
- @DocsEditable @DomName('SVGAnimationElement.beginElementAt')
+ @DomName('SVGAnimationElement.beginElementAt')
+ @DocsEditable
void beginElementAt(num offset) native;
- @DocsEditable @DomName('SVGAnimationElement.endElement')
+ @DomName('SVGAnimationElement.endElement')
+ @DocsEditable
void endElement() native;
- @DocsEditable @DomName('SVGAnimationElement.endElementAt')
+ @DomName('SVGAnimationElement.endElementAt')
+ @DocsEditable
void endElementAt(num offset) native;
// From SVGExternalResourcesRequired
- @DocsEditable @DomName('SVGAnimationElement.externalResourcesRequired')
+ @DomName('SVGAnimationElement.externalResourcesRequired')
+ @DocsEditable
final AnimatedBoolean externalResourcesRequired;
// From SVGTests
- @DocsEditable @DomName('SVGAnimationElement.requiredExtensions')
+ @DomName('SVGAnimationElement.requiredExtensions')
+ @DocsEditable
final StringList requiredExtensions;
- @DocsEditable @DomName('SVGAnimationElement.requiredFeatures')
+ @DomName('SVGAnimationElement.requiredFeatures')
+ @DocsEditable
final StringList requiredFeatures;
- @DocsEditable @DomName('SVGAnimationElement.systemLanguage')
+ @DomName('SVGAnimationElement.systemLanguage')
+ @DocsEditable
final StringList systemLanguage;
- @DocsEditable @DomName('SVGAnimationElement.hasExtension')
+ @DomName('SVGAnimationElement.hasExtension')
+ @DocsEditable
bool hasExtension(String extension) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -523,7 +568,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGCircleElement')
class CircleElement extends SvgElement implements Transformable, Tests, Stylable, ExternalResourcesRequired, LangSpace native "*SVGCircleElement" {
@@ -531,48 +575,60 @@
@DocsEditable
factory CircleElement() => _SvgElementFactoryProvider.createSvgElement_tag("circle");
- @DocsEditable @DomName('SVGCircleElement.cx')
+ @DomName('SVGCircleElement.cx')
+ @DocsEditable
final AnimatedLength cx;
- @DocsEditable @DomName('SVGCircleElement.cy')
+ @DomName('SVGCircleElement.cy')
+ @DocsEditable
final AnimatedLength cy;
- @DocsEditable @DomName('SVGCircleElement.r')
+ @DomName('SVGCircleElement.r')
+ @DocsEditable
final AnimatedLength r;
// From SVGExternalResourcesRequired
- @DocsEditable @DomName('SVGCircleElement.externalResourcesRequired')
+ @DomName('SVGCircleElement.externalResourcesRequired')
+ @DocsEditable
final AnimatedBoolean externalResourcesRequired;
// From SVGLangSpace
- @DocsEditable @DomName('SVGCircleElement.xmllang')
+ @DomName('SVGCircleElement.xmllang')
+ @DocsEditable
String xmllang;
- @DocsEditable @DomName('SVGCircleElement.xmlspace')
+ @DomName('SVGCircleElement.xmlspace')
+ @DocsEditable
String xmlspace;
// From SVGLocatable
- @DocsEditable @DomName('SVGCircleElement.farthestViewportElement')
+ @DomName('SVGCircleElement.farthestViewportElement')
+ @DocsEditable
final SvgElement farthestViewportElement;
- @DocsEditable @DomName('SVGCircleElement.nearestViewportElement')
+ @DomName('SVGCircleElement.nearestViewportElement')
+ @DocsEditable
final SvgElement nearestViewportElement;
- @DocsEditable @DomName('SVGCircleElement.getBBox')
+ @DomName('SVGCircleElement.getBBox')
+ @DocsEditable
Rect getBBox() native;
@JSName('getCTM')
- @DocsEditable @DomName('SVGCircleElement.getCTM')
+ @DomName('SVGCircleElement.getCTM')
+ @DocsEditable
Matrix getCtm() native;
@JSName('getScreenCTM')
- @DocsEditable @DomName('SVGCircleElement.getScreenCTM')
+ @DomName('SVGCircleElement.getScreenCTM')
+ @DocsEditable
Matrix getScreenCtm() native;
- @DocsEditable @DomName('SVGCircleElement.getTransformToElement')
+ @DomName('SVGCircleElement.getTransformToElement')
+ @DocsEditable
Matrix getTransformToElement(SvgElement element) native;
// From SVGStylable
@@ -583,26 +639,32 @@
// Use implementation from Element.
// final CssStyleDeclaration style;
- @DocsEditable @DomName('SVGCircleElement.getPresentationAttribute')
+ @DomName('SVGCircleElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native;
// From SVGTests
- @DocsEditable @DomName('SVGCircleElement.requiredExtensions')
+ @DomName('SVGCircleElement.requiredExtensions')
+ @DocsEditable
final StringList requiredExtensions;
- @DocsEditable @DomName('SVGCircleElement.requiredFeatures')
+ @DomName('SVGCircleElement.requiredFeatures')
+ @DocsEditable
final StringList requiredFeatures;
- @DocsEditable @DomName('SVGCircleElement.systemLanguage')
+ @DomName('SVGCircleElement.systemLanguage')
+ @DocsEditable
final StringList systemLanguage;
- @DocsEditable @DomName('SVGCircleElement.hasExtension')
+ @DomName('SVGCircleElement.hasExtension')
+ @DocsEditable
bool hasExtension(String extension) native;
// From SVGTransformable
- @DocsEditable @DomName('SVGCircleElement.transform')
+ @DomName('SVGCircleElement.transform')
+ @DocsEditable
final AnimatedTransformList transform;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -610,7 +672,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGClipPathElement')
class ClipPathElement extends SvgElement implements Transformable, Tests, Stylable, ExternalResourcesRequired, LangSpace native "*SVGClipPathElement" {
@@ -618,42 +679,52 @@
@DocsEditable
factory ClipPathElement() => _SvgElementFactoryProvider.createSvgElement_tag("clipPath");
- @DocsEditable @DomName('SVGClipPathElement.clipPathUnits')
+ @DomName('SVGClipPathElement.clipPathUnits')
+ @DocsEditable
final AnimatedEnumeration clipPathUnits;
// From SVGExternalResourcesRequired
- @DocsEditable @DomName('SVGClipPathElement.externalResourcesRequired')
+ @DomName('SVGClipPathElement.externalResourcesRequired')
+ @DocsEditable
final AnimatedBoolean externalResourcesRequired;
// From SVGLangSpace
- @DocsEditable @DomName('SVGClipPathElement.xmllang')
+ @DomName('SVGClipPathElement.xmllang')
+ @DocsEditable
String xmllang;
- @DocsEditable @DomName('SVGClipPathElement.xmlspace')
+ @DomName('SVGClipPathElement.xmlspace')
+ @DocsEditable
String xmlspace;
// From SVGLocatable
- @DocsEditable @DomName('SVGClipPathElement.farthestViewportElement')
+ @DomName('SVGClipPathElement.farthestViewportElement')
+ @DocsEditable
final SvgElement farthestViewportElement;
- @DocsEditable @DomName('SVGClipPathElement.nearestViewportElement')
+ @DomName('SVGClipPathElement.nearestViewportElement')
+ @DocsEditable
final SvgElement nearestViewportElement;
- @DocsEditable @DomName('SVGClipPathElement.getBBox')
+ @DomName('SVGClipPathElement.getBBox')
+ @DocsEditable
Rect getBBox() native;
@JSName('getCTM')
- @DocsEditable @DomName('SVGClipPathElement.getCTM')
+ @DomName('SVGClipPathElement.getCTM')
+ @DocsEditable
Matrix getCtm() native;
@JSName('getScreenCTM')
- @DocsEditable @DomName('SVGClipPathElement.getScreenCTM')
+ @DomName('SVGClipPathElement.getScreenCTM')
+ @DocsEditable
Matrix getScreenCtm() native;
- @DocsEditable @DomName('SVGClipPathElement.getTransformToElement')
+ @DomName('SVGClipPathElement.getTransformToElement')
+ @DocsEditable
Matrix getTransformToElement(SvgElement element) native;
// From SVGStylable
@@ -664,26 +735,32 @@
// Use implementation from Element.
// final CssStyleDeclaration style;
- @DocsEditable @DomName('SVGClipPathElement.getPresentationAttribute')
+ @DomName('SVGClipPathElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native;
// From SVGTests
- @DocsEditable @DomName('SVGClipPathElement.requiredExtensions')
+ @DomName('SVGClipPathElement.requiredExtensions')
+ @DocsEditable
final StringList requiredExtensions;
- @DocsEditable @DomName('SVGClipPathElement.requiredFeatures')
+ @DomName('SVGClipPathElement.requiredFeatures')
+ @DocsEditable
final StringList requiredFeatures;
- @DocsEditable @DomName('SVGClipPathElement.systemLanguage')
+ @DomName('SVGClipPathElement.systemLanguage')
+ @DocsEditable
final StringList systemLanguage;
- @DocsEditable @DomName('SVGClipPathElement.hasExtension')
+ @DomName('SVGClipPathElement.hasExtension')
+ @DocsEditable
bool hasExtension(String extension) native;
// From SVGTransformable
- @DocsEditable @DomName('SVGClipPathElement.transform')
+ @DomName('SVGClipPathElement.transform')
+ @DocsEditable
final AnimatedTransformList transform;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -691,7 +768,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGColor')
class Color extends CssValue native "*SVGColor" {
@@ -704,21 +780,26 @@
static const int SVG_COLORTYPE_UNKNOWN = 0;
- @DocsEditable @DomName('SVGColor.colorType')
+ @DomName('SVGColor.colorType')
+ @DocsEditable
final int colorType;
- @DocsEditable @DomName('SVGColor.rgbColor')
+ @DomName('SVGColor.rgbColor')
+ @DocsEditable
final RgbColor rgbColor;
- @DocsEditable @DomName('SVGColor.setColor')
+ @DomName('SVGColor.setColor')
+ @DocsEditable
void setColor(int colorType, String rgbColor, String iccColor) native;
@JSName('setRGBColor')
- @DocsEditable @DomName('SVGColor.setRGBColor')
+ @DomName('SVGColor.setRGBColor')
+ @DocsEditable
void setRgbColor(String rgbColor) native;
@JSName('setRGBColorICCColor')
- @DocsEditable @DomName('SVGColor.setRGBColorICCColor')
+ @DomName('SVGColor.setRGBColorICCColor')
+ @DocsEditable
void setRgbColorIccColor(String rgbColor, String iccColor) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -726,7 +807,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGComponentTransferFunctionElement')
class ComponentTransferFunctionElement extends SvgElement native "*SVGComponentTransferFunctionElement" {
@@ -743,25 +823,32 @@
static const int SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN = 0;
- @DocsEditable @DomName('SVGComponentTransferFunctionElement.amplitude')
+ @DomName('SVGComponentTransferFunctionElement.amplitude')
+ @DocsEditable
final AnimatedNumber amplitude;
- @DocsEditable @DomName('SVGComponentTransferFunctionElement.exponent')
+ @DomName('SVGComponentTransferFunctionElement.exponent')
+ @DocsEditable
final AnimatedNumber exponent;
- @DocsEditable @DomName('SVGComponentTransferFunctionElement.intercept')
+ @DomName('SVGComponentTransferFunctionElement.intercept')
+ @DocsEditable
final AnimatedNumber intercept;
- @DocsEditable @DomName('SVGComponentTransferFunctionElement.offset')
+ @DomName('SVGComponentTransferFunctionElement.offset')
+ @DocsEditable
final AnimatedNumber offset;
- @DocsEditable @DomName('SVGComponentTransferFunctionElement.slope')
+ @DomName('SVGComponentTransferFunctionElement.slope')
+ @DocsEditable
final AnimatedNumber slope;
- @DocsEditable @DomName('SVGComponentTransferFunctionElement.tableValues')
+ @DomName('SVGComponentTransferFunctionElement.tableValues')
+ @DocsEditable
final AnimatedNumberList tableValues;
- @DocsEditable @DomName('SVGComponentTransferFunctionElement.type')
+ @DomName('SVGComponentTransferFunctionElement.type')
+ @DocsEditable
final AnimatedEnumeration type;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -769,7 +856,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGCursorElement')
class CursorElement extends SvgElement implements UriReference, Tests, ExternalResourcesRequired native "*SVGCursorElement" {
@@ -777,34 +863,42 @@
@DocsEditable
factory CursorElement() => _SvgElementFactoryProvider.createSvgElement_tag("cursor");
- @DocsEditable @DomName('SVGCursorElement.x')
+ @DomName('SVGCursorElement.x')
+ @DocsEditable
final AnimatedLength x;
- @DocsEditable @DomName('SVGCursorElement.y')
+ @DomName('SVGCursorElement.y')
+ @DocsEditable
final AnimatedLength y;
// From SVGExternalResourcesRequired
- @DocsEditable @DomName('SVGCursorElement.externalResourcesRequired')
+ @DomName('SVGCursorElement.externalResourcesRequired')
+ @DocsEditable
final AnimatedBoolean externalResourcesRequired;
// From SVGTests
- @DocsEditable @DomName('SVGCursorElement.requiredExtensions')
+ @DomName('SVGCursorElement.requiredExtensions')
+ @DocsEditable
final StringList requiredExtensions;
- @DocsEditable @DomName('SVGCursorElement.requiredFeatures')
+ @DomName('SVGCursorElement.requiredFeatures')
+ @DocsEditable
final StringList requiredFeatures;
- @DocsEditable @DomName('SVGCursorElement.systemLanguage')
+ @DomName('SVGCursorElement.systemLanguage')
+ @DocsEditable
final StringList systemLanguage;
- @DocsEditable @DomName('SVGCursorElement.hasExtension')
+ @DomName('SVGCursorElement.hasExtension')
+ @DocsEditable
bool hasExtension(String extension) native;
// From SVGURIReference
- @DocsEditable @DomName('SVGCursorElement.href')
+ @DomName('SVGCursorElement.href')
+ @DocsEditable
final AnimatedString href;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -812,7 +906,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGDefsElement')
class DefsElement extends SvgElement implements Transformable, Tests, Stylable, ExternalResourcesRequired, LangSpace native "*SVGDefsElement" {
@@ -822,37 +915,46 @@
// From SVGExternalResourcesRequired
- @DocsEditable @DomName('SVGDefsElement.externalResourcesRequired')
+ @DomName('SVGDefsElement.externalResourcesRequired')
+ @DocsEditable
final AnimatedBoolean externalResourcesRequired;
// From SVGLangSpace
- @DocsEditable @DomName('SVGDefsElement.xmllang')
+ @DomName('SVGDefsElement.xmllang')
+ @DocsEditable
String xmllang;
- @DocsEditable @DomName('SVGDefsElement.xmlspace')
+ @DomName('SVGDefsElement.xmlspace')
+ @DocsEditable
String xmlspace;
// From SVGLocatable
- @DocsEditable @DomName('SVGDefsElement.farthestViewportElement')
+ @DomName('SVGDefsElement.farthestViewportElement')
+ @DocsEditable
final SvgElement farthestViewportElement;
- @DocsEditable @DomName('SVGDefsElement.nearestViewportElement')
+ @DomName('SVGDefsElement.nearestViewportElement')
+ @DocsEditable
final SvgElement nearestViewportElement;
- @DocsEditable @DomName('SVGDefsElement.getBBox')
+ @DomName('SVGDefsElement.getBBox')
+ @DocsEditable
Rect getBBox() native;
@JSName('getCTM')
- @DocsEditable @DomName('SVGDefsElement.getCTM')
+ @DomName('SVGDefsElement.getCTM')
+ @DocsEditable
Matrix getCtm() native;
@JSName('getScreenCTM')
- @DocsEditable @DomName('SVGDefsElement.getScreenCTM')
+ @DomName('SVGDefsElement.getScreenCTM')
+ @DocsEditable
Matrix getScreenCtm() native;
- @DocsEditable @DomName('SVGDefsElement.getTransformToElement')
+ @DomName('SVGDefsElement.getTransformToElement')
+ @DocsEditable
Matrix getTransformToElement(SvgElement element) native;
// From SVGStylable
@@ -863,26 +965,32 @@
// Use implementation from Element.
// final CssStyleDeclaration style;
- @DocsEditable @DomName('SVGDefsElement.getPresentationAttribute')
+ @DomName('SVGDefsElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native;
// From SVGTests
- @DocsEditable @DomName('SVGDefsElement.requiredExtensions')
+ @DomName('SVGDefsElement.requiredExtensions')
+ @DocsEditable
final StringList requiredExtensions;
- @DocsEditable @DomName('SVGDefsElement.requiredFeatures')
+ @DomName('SVGDefsElement.requiredFeatures')
+ @DocsEditable
final StringList requiredFeatures;
- @DocsEditable @DomName('SVGDefsElement.systemLanguage')
+ @DomName('SVGDefsElement.systemLanguage')
+ @DocsEditable
final StringList systemLanguage;
- @DocsEditable @DomName('SVGDefsElement.hasExtension')
+ @DomName('SVGDefsElement.hasExtension')
+ @DocsEditable
bool hasExtension(String extension) native;
// From SVGTransformable
- @DocsEditable @DomName('SVGDefsElement.transform')
+ @DomName('SVGDefsElement.transform')
+ @DocsEditable
final AnimatedTransformList transform;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -890,7 +998,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGDescElement')
class DescElement extends SvgElement implements Stylable, LangSpace native "*SVGDescElement" {
@@ -900,10 +1007,12 @@
// From SVGLangSpace
- @DocsEditable @DomName('SVGDescElement.xmllang')
+ @DomName('SVGDescElement.xmllang')
+ @DocsEditable
String xmllang;
- @DocsEditable @DomName('SVGDescElement.xmlspace')
+ @DomName('SVGDescElement.xmlspace')
+ @DocsEditable
String xmlspace;
// From SVGStylable
@@ -914,7 +1023,8 @@
// Use implementation from Element.
// final CssStyleDeclaration style;
- @DocsEditable @DomName('SVGDescElement.getPresentationAttribute')
+ @DomName('SVGDescElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -922,203 +1032,373 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGElementInstance')
class ElementInstance extends EventTarget native "*SVGElementInstance" {
+ @DomName('SVGElementInstance.abort')
+ @DocsEditable
static const EventStreamProvider<Event> abortEvent = const EventStreamProvider<Event>('abort');
+ @DomName('SVGElementInstance.beforecopy')
+ @DocsEditable
static const EventStreamProvider<Event> beforeCopyEvent = const EventStreamProvider<Event>('beforecopy');
+ @DomName('SVGElementInstance.beforecut')
+ @DocsEditable
static const EventStreamProvider<Event> beforeCutEvent = const EventStreamProvider<Event>('beforecut');
+ @DomName('SVGElementInstance.beforepaste')
+ @DocsEditable
static const EventStreamProvider<Event> beforePasteEvent = const EventStreamProvider<Event>('beforepaste');
+ @DomName('SVGElementInstance.blur')
+ @DocsEditable
static const EventStreamProvider<Event> blurEvent = const EventStreamProvider<Event>('blur');
+ @DomName('SVGElementInstance.change')
+ @DocsEditable
static const EventStreamProvider<Event> changeEvent = const EventStreamProvider<Event>('change');
+ @DomName('SVGElementInstance.click')
+ @DocsEditable
static const EventStreamProvider<MouseEvent> clickEvent = const EventStreamProvider<MouseEvent>('click');
+ @DomName('SVGElementInstance.contextmenu')
+ @DocsEditable
static const EventStreamProvider<MouseEvent> contextMenuEvent = const EventStreamProvider<MouseEvent>('contextmenu');
+ @DomName('SVGElementInstance.copy')
+ @DocsEditable
static const EventStreamProvider<Event> copyEvent = const EventStreamProvider<Event>('copy');
+ @DomName('SVGElementInstance.cut')
+ @DocsEditable
static const EventStreamProvider<Event> cutEvent = const EventStreamProvider<Event>('cut');
+ @DomName('SVGElementInstance.dblclick')
+ @DocsEditable
static const EventStreamProvider<Event> doubleClickEvent = const EventStreamProvider<Event>('dblclick');
+ @DomName('SVGElementInstance.drag')
+ @DocsEditable
static const EventStreamProvider<MouseEvent> dragEvent = const EventStreamProvider<MouseEvent>('drag');
+ @DomName('SVGElementInstance.dragend')
+ @DocsEditable
static const EventStreamProvider<MouseEvent> dragEndEvent = const EventStreamProvider<MouseEvent>('dragend');
+ @DomName('SVGElementInstance.dragenter')
+ @DocsEditable
static const EventStreamProvider<MouseEvent> dragEnterEvent = const EventStreamProvider<MouseEvent>('dragenter');
+ @DomName('SVGElementInstance.dragleave')
+ @DocsEditable
static const EventStreamProvider<MouseEvent> dragLeaveEvent = const EventStreamProvider<MouseEvent>('dragleave');
+ @DomName('SVGElementInstance.dragover')
+ @DocsEditable
static const EventStreamProvider<MouseEvent> dragOverEvent = const EventStreamProvider<MouseEvent>('dragover');
+ @DomName('SVGElementInstance.dragstart')
+ @DocsEditable
static const EventStreamProvider<MouseEvent> dragStartEvent = const EventStreamProvider<MouseEvent>('dragstart');
+ @DomName('SVGElementInstance.drop')
+ @DocsEditable
static const EventStreamProvider<MouseEvent> dropEvent = const EventStreamProvider<MouseEvent>('drop');
+ @DomName('SVGElementInstance.error')
+ @DocsEditable
static const EventStreamProvider<Event> errorEvent = const EventStreamProvider<Event>('error');
+ @DomName('SVGElementInstance.focus')
+ @DocsEditable
static const EventStreamProvider<Event> focusEvent = const EventStreamProvider<Event>('focus');
+ @DomName('SVGElementInstance.input')
+ @DocsEditable
static const EventStreamProvider<Event> inputEvent = const EventStreamProvider<Event>('input');
+ @DomName('SVGElementInstance.keydown')
+ @DocsEditable
static const EventStreamProvider<KeyboardEvent> keyDownEvent = const EventStreamProvider<KeyboardEvent>('keydown');
+ @DomName('SVGElementInstance.keypress')
+ @DocsEditable
static const EventStreamProvider<KeyboardEvent> keyPressEvent = const EventStreamProvider<KeyboardEvent>('keypress');
+ @DomName('SVGElementInstance.keyup')
+ @DocsEditable
static const EventStreamProvider<KeyboardEvent> keyUpEvent = const EventStreamProvider<KeyboardEvent>('keyup');
+ @DomName('SVGElementInstance.load')
+ @DocsEditable
static const EventStreamProvider<Event> loadEvent = const EventStreamProvider<Event>('load');
+ @DomName('SVGElementInstance.mousedown')
+ @DocsEditable
static const EventStreamProvider<MouseEvent> mouseDownEvent = const EventStreamProvider<MouseEvent>('mousedown');
+ @DomName('SVGElementInstance.mousemove')
+ @DocsEditable
static const EventStreamProvider<MouseEvent> mouseMoveEvent = const EventStreamProvider<MouseEvent>('mousemove');
+ @DomName('SVGElementInstance.mouseout')
+ @DocsEditable
static const EventStreamProvider<MouseEvent> mouseOutEvent = const EventStreamProvider<MouseEvent>('mouseout');
+ @DomName('SVGElementInstance.mouseover')
+ @DocsEditable
static const EventStreamProvider<MouseEvent> mouseOverEvent = const EventStreamProvider<MouseEvent>('mouseover');
+ @DomName('SVGElementInstance.mouseup')
+ @DocsEditable
static const EventStreamProvider<MouseEvent> mouseUpEvent = const EventStreamProvider<MouseEvent>('mouseup');
+ @DomName('SVGElementInstance.mousewheel')
+ @DocsEditable
static const EventStreamProvider<WheelEvent> mouseWheelEvent = const EventStreamProvider<WheelEvent>('mousewheel');
+ @DomName('SVGElementInstance.paste')
+ @DocsEditable
static const EventStreamProvider<Event> pasteEvent = const EventStreamProvider<Event>('paste');
+ @DomName('SVGElementInstance.reset')
+ @DocsEditable
static const EventStreamProvider<Event> resetEvent = const EventStreamProvider<Event>('reset');
+ @DomName('SVGElementInstance.resize')
+ @DocsEditable
static const EventStreamProvider<Event> resizeEvent = const EventStreamProvider<Event>('resize');
+ @DomName('SVGElementInstance.scroll')
+ @DocsEditable
static const EventStreamProvider<Event> scrollEvent = const EventStreamProvider<Event>('scroll');
+ @DomName('SVGElementInstance.search')
+ @DocsEditable
static const EventStreamProvider<Event> searchEvent = const EventStreamProvider<Event>('search');
+ @DomName('SVGElementInstance.select')
+ @DocsEditable
static const EventStreamProvider<Event> selectEvent = const EventStreamProvider<Event>('select');
+ @DomName('SVGElementInstance.selectstart')
+ @DocsEditable
static const EventStreamProvider<Event> selectStartEvent = const EventStreamProvider<Event>('selectstart');
+ @DomName('SVGElementInstance.submit')
+ @DocsEditable
static const EventStreamProvider<Event> submitEvent = const EventStreamProvider<Event>('submit');
+ @DomName('SVGElementInstance.unload')
+ @DocsEditable
static const EventStreamProvider<Event> unloadEvent = const EventStreamProvider<Event>('unload');
@DocsEditable
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
+ @deprecated
ElementInstanceEvents get on =>
new ElementInstanceEvents(this);
- @DocsEditable @DomName('SVGElementInstance.childNodes')
- @Returns('_ElementInstanceList') @Creates('_ElementInstanceList')
+ @DomName('SVGElementInstance.childNodes')
+ @DocsEditable
+ @Returns('_ElementInstanceList')
+ @Creates('_ElementInstanceList')
final List<ElementInstance> childNodes;
- @DocsEditable @DomName('SVGElementInstance.correspondingElement')
+ @DomName('SVGElementInstance.correspondingElement')
+ @DocsEditable
final SvgElement correspondingElement;
- @DocsEditable @DomName('SVGElementInstance.correspondingUseElement')
+ @DomName('SVGElementInstance.correspondingUseElement')
+ @DocsEditable
final UseElement correspondingUseElement;
- @DocsEditable @DomName('SVGElementInstance.firstChild')
+ @DomName('SVGElementInstance.firstChild')
+ @DocsEditable
final ElementInstance firstChild;
- @DocsEditable @DomName('SVGElementInstance.lastChild')
+ @DomName('SVGElementInstance.lastChild')
+ @DocsEditable
final ElementInstance lastChild;
- @DocsEditable @DomName('SVGElementInstance.nextSibling')
+ @DomName('SVGElementInstance.nextSibling')
+ @DocsEditable
final ElementInstance nextSibling;
- @DocsEditable @DomName('SVGElementInstance.parentNode')
+ @DomName('SVGElementInstance.parentNode')
+ @DocsEditable
final ElementInstance parentNode;
- @DocsEditable @DomName('SVGElementInstance.previousSibling')
+ @DomName('SVGElementInstance.previousSibling')
+ @DocsEditable
final ElementInstance previousSibling;
+ @DomName('SVGElementInstance.abort')
+ @DocsEditable
Stream<Event> get onAbort => abortEvent.forTarget(this);
+ @DomName('SVGElementInstance.beforecopy')
+ @DocsEditable
Stream<Event> get onBeforeCopy => beforeCopyEvent.forTarget(this);
+ @DomName('SVGElementInstance.beforecut')
+ @DocsEditable
Stream<Event> get onBeforeCut => beforeCutEvent.forTarget(this);
+ @DomName('SVGElementInstance.beforepaste')
+ @DocsEditable
Stream<Event> get onBeforePaste => beforePasteEvent.forTarget(this);
+ @DomName('SVGElementInstance.blur')
+ @DocsEditable
Stream<Event> get onBlur => blurEvent.forTarget(this);
+ @DomName('SVGElementInstance.change')
+ @DocsEditable
Stream<Event> get onChange => changeEvent.forTarget(this);
+ @DomName('SVGElementInstance.click')
+ @DocsEditable
Stream<MouseEvent> get onClick => clickEvent.forTarget(this);
+ @DomName('SVGElementInstance.contextmenu')
+ @DocsEditable
Stream<MouseEvent> get onContextMenu => contextMenuEvent.forTarget(this);
+ @DomName('SVGElementInstance.copy')
+ @DocsEditable
Stream<Event> get onCopy => copyEvent.forTarget(this);
+ @DomName('SVGElementInstance.cut')
+ @DocsEditable
Stream<Event> get onCut => cutEvent.forTarget(this);
+ @DomName('SVGElementInstance.dblclick')
+ @DocsEditable
Stream<Event> get onDoubleClick => doubleClickEvent.forTarget(this);
+ @DomName('SVGElementInstance.drag')
+ @DocsEditable
Stream<MouseEvent> get onDrag => dragEvent.forTarget(this);
+ @DomName('SVGElementInstance.dragend')
+ @DocsEditable
Stream<MouseEvent> get onDragEnd => dragEndEvent.forTarget(this);
+ @DomName('SVGElementInstance.dragenter')
+ @DocsEditable
Stream<MouseEvent> get onDragEnter => dragEnterEvent.forTarget(this);
+ @DomName('SVGElementInstance.dragleave')
+ @DocsEditable
Stream<MouseEvent> get onDragLeave => dragLeaveEvent.forTarget(this);
+ @DomName('SVGElementInstance.dragover')
+ @DocsEditable
Stream<MouseEvent> get onDragOver => dragOverEvent.forTarget(this);
+ @DomName('SVGElementInstance.dragstart')
+ @DocsEditable
Stream<MouseEvent> get onDragStart => dragStartEvent.forTarget(this);
+ @DomName('SVGElementInstance.drop')
+ @DocsEditable
Stream<MouseEvent> get onDrop => dropEvent.forTarget(this);
+ @DomName('SVGElementInstance.error')
+ @DocsEditable
Stream<Event> get onError => errorEvent.forTarget(this);
+ @DomName('SVGElementInstance.focus')
+ @DocsEditable
Stream<Event> get onFocus => focusEvent.forTarget(this);
+ @DomName('SVGElementInstance.input')
+ @DocsEditable
Stream<Event> get onInput => inputEvent.forTarget(this);
+ @DomName('SVGElementInstance.keydown')
+ @DocsEditable
Stream<KeyboardEvent> get onKeyDown => keyDownEvent.forTarget(this);
+ @DomName('SVGElementInstance.keypress')
+ @DocsEditable
Stream<KeyboardEvent> get onKeyPress => keyPressEvent.forTarget(this);
+ @DomName('SVGElementInstance.keyup')
+ @DocsEditable
Stream<KeyboardEvent> get onKeyUp => keyUpEvent.forTarget(this);
+ @DomName('SVGElementInstance.load')
+ @DocsEditable
Stream<Event> get onLoad => loadEvent.forTarget(this);
+ @DomName('SVGElementInstance.mousedown')
+ @DocsEditable
Stream<MouseEvent> get onMouseDown => mouseDownEvent.forTarget(this);
+ @DomName('SVGElementInstance.mousemove')
+ @DocsEditable
Stream<MouseEvent> get onMouseMove => mouseMoveEvent.forTarget(this);
+ @DomName('SVGElementInstance.mouseout')
+ @DocsEditable
Stream<MouseEvent> get onMouseOut => mouseOutEvent.forTarget(this);
+ @DomName('SVGElementInstance.mouseover')
+ @DocsEditable
Stream<MouseEvent> get onMouseOver => mouseOverEvent.forTarget(this);
+ @DomName('SVGElementInstance.mouseup')
+ @DocsEditable
Stream<MouseEvent> get onMouseUp => mouseUpEvent.forTarget(this);
+ @DomName('SVGElementInstance.mousewheel')
+ @DocsEditable
Stream<WheelEvent> get onMouseWheel => mouseWheelEvent.forTarget(this);
+ @DomName('SVGElementInstance.paste')
+ @DocsEditable
Stream<Event> get onPaste => pasteEvent.forTarget(this);
+ @DomName('SVGElementInstance.reset')
+ @DocsEditable
Stream<Event> get onReset => resetEvent.forTarget(this);
+ @DomName('SVGElementInstance.resize')
+ @DocsEditable
Stream<Event> get onResize => resizeEvent.forTarget(this);
+ @DomName('SVGElementInstance.scroll')
+ @DocsEditable
Stream<Event> get onScroll => scrollEvent.forTarget(this);
+ @DomName('SVGElementInstance.search')
+ @DocsEditable
Stream<Event> get onSearch => searchEvent.forTarget(this);
+ @DomName('SVGElementInstance.select')
+ @DocsEditable
Stream<Event> get onSelect => selectEvent.forTarget(this);
+ @DomName('SVGElementInstance.selectstart')
+ @DocsEditable
Stream<Event> get onSelectStart => selectStartEvent.forTarget(this);
+ @DomName('SVGElementInstance.submit')
+ @DocsEditable
Stream<Event> get onSubmit => submitEvent.forTarget(this);
+ @DomName('SVGElementInstance.unload')
+ @DocsEditable
Stream<Event> get onUnload => unloadEvent.forTarget(this);
}
@DocsEditable
+@deprecated
class ElementInstanceEvents extends Events {
@DocsEditable
ElementInstanceEvents(EventTarget _ptr) : super(_ptr);
@@ -1248,7 +1528,6 @@
// BSD-style license that can be found in the LICENSE file.
-@DocsEditable
@DomName('ElementTimeControl')
abstract class ElementTimeControl {
@@ -1265,7 +1544,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGEllipseElement')
class EllipseElement extends SvgElement implements Transformable, Tests, Stylable, ExternalResourcesRequired, LangSpace native "*SVGEllipseElement" {
@@ -1273,51 +1551,64 @@
@DocsEditable
factory EllipseElement() => _SvgElementFactoryProvider.createSvgElement_tag("ellipse");
- @DocsEditable @DomName('SVGEllipseElement.cx')
+ @DomName('SVGEllipseElement.cx')
+ @DocsEditable
final AnimatedLength cx;
- @DocsEditable @DomName('SVGEllipseElement.cy')
+ @DomName('SVGEllipseElement.cy')
+ @DocsEditable
final AnimatedLength cy;
- @DocsEditable @DomName('SVGEllipseElement.rx')
+ @DomName('SVGEllipseElement.rx')
+ @DocsEditable
final AnimatedLength rx;
- @DocsEditable @DomName('SVGEllipseElement.ry')
+ @DomName('SVGEllipseElement.ry')
+ @DocsEditable
final AnimatedLength ry;
// From SVGExternalResourcesRequired
- @DocsEditable @DomName('SVGEllipseElement.externalResourcesRequired')
+ @DomName('SVGEllipseElement.externalResourcesRequired')
+ @DocsEditable
final AnimatedBoolean externalResourcesRequired;
// From SVGLangSpace
- @DocsEditable @DomName('SVGEllipseElement.xmllang')
+ @DomName('SVGEllipseElement.xmllang')
+ @DocsEditable
String xmllang;
- @DocsEditable @DomName('SVGEllipseElement.xmlspace')
+ @DomName('SVGEllipseElement.xmlspace')
+ @DocsEditable
String xmlspace;
// From SVGLocatable
- @DocsEditable @DomName('SVGEllipseElement.farthestViewportElement')
+ @DomName('SVGEllipseElement.farthestViewportElement')
+ @DocsEditable
final SvgElement farthestViewportElement;
- @DocsEditable @DomName('SVGEllipseElement.nearestViewportElement')
+ @DomName('SVGEllipseElement.nearestViewportElement')
+ @DocsEditable
final SvgElement nearestViewportElement;
- @DocsEditable @DomName('SVGEllipseElement.getBBox')
+ @DomName('SVGEllipseElement.getBBox')
+ @DocsEditable
Rect getBBox() native;
@JSName('getCTM')
- @DocsEditable @DomName('SVGEllipseElement.getCTM')
+ @DomName('SVGEllipseElement.getCTM')
+ @DocsEditable
Matrix getCtm() native;
@JSName('getScreenCTM')
- @DocsEditable @DomName('SVGEllipseElement.getScreenCTM')
+ @DomName('SVGEllipseElement.getScreenCTM')
+ @DocsEditable
Matrix getScreenCtm() native;
- @DocsEditable @DomName('SVGEllipseElement.getTransformToElement')
+ @DomName('SVGEllipseElement.getTransformToElement')
+ @DocsEditable
Matrix getTransformToElement(SvgElement element) native;
// From SVGStylable
@@ -1328,26 +1619,32 @@
// Use implementation from Element.
// final CssStyleDeclaration style;
- @DocsEditable @DomName('SVGEllipseElement.getPresentationAttribute')
+ @DomName('SVGEllipseElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native;
// From SVGTests
- @DocsEditable @DomName('SVGEllipseElement.requiredExtensions')
+ @DomName('SVGEllipseElement.requiredExtensions')
+ @DocsEditable
final StringList requiredExtensions;
- @DocsEditable @DomName('SVGEllipseElement.requiredFeatures')
+ @DomName('SVGEllipseElement.requiredFeatures')
+ @DocsEditable
final StringList requiredFeatures;
- @DocsEditable @DomName('SVGEllipseElement.systemLanguage')
+ @DomName('SVGEllipseElement.systemLanguage')
+ @DocsEditable
final StringList systemLanguage;
- @DocsEditable @DomName('SVGEllipseElement.hasExtension')
+ @DomName('SVGEllipseElement.hasExtension')
+ @DocsEditable
bool hasExtension(String extension) native;
// From SVGTransformable
- @DocsEditable @DomName('SVGEllipseElement.transform')
+ @DomName('SVGEllipseElement.transform')
+ @DocsEditable
final AnimatedTransformList transform;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -1355,7 +1652,6 @@
// BSD-style license that can be found in the LICENSE file.
-@DocsEditable
@DomName('SVGExternalResourcesRequired')
abstract class ExternalResourcesRequired {
@@ -1366,7 +1662,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGFEBlendElement')
class FEBlendElement extends SvgElement implements FilterPrimitiveStandardAttributes native "*SVGFEBlendElement" {
@@ -1383,30 +1678,38 @@
static const int SVG_FEBLEND_MODE_UNKNOWN = 0;
- @DocsEditable @DomName('SVGFEBlendElement.in1')
+ @DomName('SVGFEBlendElement.in1')
+ @DocsEditable
final AnimatedString in1;
- @DocsEditable @DomName('SVGFEBlendElement.in2')
+ @DomName('SVGFEBlendElement.in2')
+ @DocsEditable
final AnimatedString in2;
- @DocsEditable @DomName('SVGFEBlendElement.mode')
+ @DomName('SVGFEBlendElement.mode')
+ @DocsEditable
final AnimatedEnumeration mode;
// From SVGFilterPrimitiveStandardAttributes
- @DocsEditable @DomName('SVGFEBlendElement.height')
+ @DomName('SVGFEBlendElement.height')
+ @DocsEditable
final AnimatedLength height;
- @DocsEditable @DomName('SVGFEBlendElement.result')
+ @DomName('SVGFEBlendElement.result')
+ @DocsEditable
final AnimatedString result;
- @DocsEditable @DomName('SVGFEBlendElement.width')
+ @DomName('SVGFEBlendElement.width')
+ @DocsEditable
final AnimatedLength width;
- @DocsEditable @DomName('SVGFEBlendElement.x')
+ @DomName('SVGFEBlendElement.x')
+ @DocsEditable
final AnimatedLength x;
- @DocsEditable @DomName('SVGFEBlendElement.y')
+ @DomName('SVGFEBlendElement.y')
+ @DocsEditable
final AnimatedLength y;
// From SVGStylable
@@ -1417,7 +1720,8 @@
// Use implementation from Element.
// final CssStyleDeclaration style;
- @DocsEditable @DomName('SVGFEBlendElement.getPresentationAttribute')
+ @DomName('SVGFEBlendElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -1425,7 +1729,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGFEColorMatrixElement')
class FEColorMatrixElement extends SvgElement implements FilterPrimitiveStandardAttributes native "*SVGFEColorMatrixElement" {
@@ -1440,30 +1743,38 @@
static const int SVG_FECOLORMATRIX_TYPE_UNKNOWN = 0;
- @DocsEditable @DomName('SVGFEColorMatrixElement.in1')
+ @DomName('SVGFEColorMatrixElement.in1')
+ @DocsEditable
final AnimatedString in1;
- @DocsEditable @DomName('SVGFEColorMatrixElement.type')
+ @DomName('SVGFEColorMatrixElement.type')
+ @DocsEditable
final AnimatedEnumeration type;
- @DocsEditable @DomName('SVGFEColorMatrixElement.values')
+ @DomName('SVGFEColorMatrixElement.values')
+ @DocsEditable
final AnimatedNumberList values;
// From SVGFilterPrimitiveStandardAttributes
- @DocsEditable @DomName('SVGFEColorMatrixElement.height')
+ @DomName('SVGFEColorMatrixElement.height')
+ @DocsEditable
final AnimatedLength height;
- @DocsEditable @DomName('SVGFEColorMatrixElement.result')
+ @DomName('SVGFEColorMatrixElement.result')
+ @DocsEditable
final AnimatedString result;
- @DocsEditable @DomName('SVGFEColorMatrixElement.width')
+ @DomName('SVGFEColorMatrixElement.width')
+ @DocsEditable
final AnimatedLength width;
- @DocsEditable @DomName('SVGFEColorMatrixElement.x')
+ @DomName('SVGFEColorMatrixElement.x')
+ @DocsEditable
final AnimatedLength x;
- @DocsEditable @DomName('SVGFEColorMatrixElement.y')
+ @DomName('SVGFEColorMatrixElement.y')
+ @DocsEditable
final AnimatedLength y;
// From SVGStylable
@@ -1474,7 +1785,8 @@
// Use implementation from Element.
// final CssStyleDeclaration style;
- @DocsEditable @DomName('SVGFEColorMatrixElement.getPresentationAttribute')
+ @DomName('SVGFEColorMatrixElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -1482,29 +1794,34 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGFEComponentTransferElement')
class FEComponentTransferElement extends SvgElement implements FilterPrimitiveStandardAttributes native "*SVGFEComponentTransferElement" {
- @DocsEditable @DomName('SVGFEComponentTransferElement.in1')
+ @DomName('SVGFEComponentTransferElement.in1')
+ @DocsEditable
final AnimatedString in1;
// From SVGFilterPrimitiveStandardAttributes
- @DocsEditable @DomName('SVGFEComponentTransferElement.height')
+ @DomName('SVGFEComponentTransferElement.height')
+ @DocsEditable
final AnimatedLength height;
- @DocsEditable @DomName('SVGFEComponentTransferElement.result')
+ @DomName('SVGFEComponentTransferElement.result')
+ @DocsEditable
final AnimatedString result;
- @DocsEditable @DomName('SVGFEComponentTransferElement.width')
+ @DomName('SVGFEComponentTransferElement.width')
+ @DocsEditable
final AnimatedLength width;
- @DocsEditable @DomName('SVGFEComponentTransferElement.x')
+ @DomName('SVGFEComponentTransferElement.x')
+ @DocsEditable
final AnimatedLength x;
- @DocsEditable @DomName('SVGFEComponentTransferElement.y')
+ @DomName('SVGFEComponentTransferElement.y')
+ @DocsEditable
final AnimatedLength y;
// From SVGStylable
@@ -1515,7 +1832,8 @@
// Use implementation from Element.
// final CssStyleDeclaration style;
- @DocsEditable @DomName('SVGFEComponentTransferElement.getPresentationAttribute')
+ @DomName('SVGFEComponentTransferElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -1523,7 +1841,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGFECompositeElement')
class FECompositeElement extends SvgElement implements FilterPrimitiveStandardAttributes native "*SVGFECompositeElement" {
@@ -1542,42 +1859,54 @@
static const int SVG_FECOMPOSITE_OPERATOR_XOR = 5;
- @DocsEditable @DomName('SVGFECompositeElement.in1')
+ @DomName('SVGFECompositeElement.in1')
+ @DocsEditable
final AnimatedString in1;
- @DocsEditable @DomName('SVGFECompositeElement.in2')
+ @DomName('SVGFECompositeElement.in2')
+ @DocsEditable
final AnimatedString in2;
- @DocsEditable @DomName('SVGFECompositeElement.k1')
+ @DomName('SVGFECompositeElement.k1')
+ @DocsEditable
final AnimatedNumber k1;
- @DocsEditable @DomName('SVGFECompositeElement.k2')
+ @DomName('SVGFECompositeElement.k2')
+ @DocsEditable
final AnimatedNumber k2;
- @DocsEditable @DomName('SVGFECompositeElement.k3')
+ @DomName('SVGFECompositeElement.k3')
+ @DocsEditable
final AnimatedNumber k3;
- @DocsEditable @DomName('SVGFECompositeElement.k4')
+ @DomName('SVGFECompositeElement.k4')
+ @DocsEditable
final AnimatedNumber k4;
- @DocsEditable @DomName('SVGFECompositeElement.operator')
+ @DomName('SVGFECompositeElement.operator')
+ @DocsEditable
final AnimatedEnumeration operator;
// From SVGFilterPrimitiveStandardAttributes
- @DocsEditable @DomName('SVGFECompositeElement.height')
+ @DomName('SVGFECompositeElement.height')
+ @DocsEditable
final AnimatedLength height;
- @DocsEditable @DomName('SVGFECompositeElement.result')
+ @DomName('SVGFECompositeElement.result')
+ @DocsEditable
final AnimatedString result;
- @DocsEditable @DomName('SVGFECompositeElement.width')
+ @DomName('SVGFECompositeElement.width')
+ @DocsEditable
final AnimatedLength width;
- @DocsEditable @DomName('SVGFECompositeElement.x')
+ @DomName('SVGFECompositeElement.x')
+ @DocsEditable
final AnimatedLength x;
- @DocsEditable @DomName('SVGFECompositeElement.y')
+ @DomName('SVGFECompositeElement.y')
+ @DocsEditable
final AnimatedLength y;
// From SVGStylable
@@ -1588,7 +1917,8 @@
// Use implementation from Element.
// final CssStyleDeclaration style;
- @DocsEditable @DomName('SVGFECompositeElement.getPresentationAttribute')
+ @DomName('SVGFECompositeElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -1596,7 +1926,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGFEConvolveMatrixElement')
class FEConvolveMatrixElement extends SvgElement implements FilterPrimitiveStandardAttributes native "*SVGFEConvolveMatrixElement" {
@@ -1609,57 +1938,74 @@
static const int SVG_EDGEMODE_WRAP = 2;
- @DocsEditable @DomName('SVGFEConvolveMatrixElement.bias')
+ @DomName('SVGFEConvolveMatrixElement.bias')
+ @DocsEditable
final AnimatedNumber bias;
- @DocsEditable @DomName('SVGFEConvolveMatrixElement.divisor')
+ @DomName('SVGFEConvolveMatrixElement.divisor')
+ @DocsEditable
final AnimatedNumber divisor;
- @DocsEditable @DomName('SVGFEConvolveMatrixElement.edgeMode')
+ @DomName('SVGFEConvolveMatrixElement.edgeMode')
+ @DocsEditable
final AnimatedEnumeration edgeMode;
- @DocsEditable @DomName('SVGFEConvolveMatrixElement.in1')
+ @DomName('SVGFEConvolveMatrixElement.in1')
+ @DocsEditable
final AnimatedString in1;
- @DocsEditable @DomName('SVGFEConvolveMatrixElement.kernelMatrix')
+ @DomName('SVGFEConvolveMatrixElement.kernelMatrix')
+ @DocsEditable
final AnimatedNumberList kernelMatrix;
- @DocsEditable @DomName('SVGFEConvolveMatrixElement.kernelUnitLengthX')
+ @DomName('SVGFEConvolveMatrixElement.kernelUnitLengthX')
+ @DocsEditable
final AnimatedNumber kernelUnitLengthX;
- @DocsEditable @DomName('SVGFEConvolveMatrixElement.kernelUnitLengthY')
+ @DomName('SVGFEConvolveMatrixElement.kernelUnitLengthY')
+ @DocsEditable
final AnimatedNumber kernelUnitLengthY;
- @DocsEditable @DomName('SVGFEConvolveMatrixElement.orderX')
+ @DomName('SVGFEConvolveMatrixElement.orderX')
+ @DocsEditable
final AnimatedInteger orderX;
- @DocsEditable @DomName('SVGFEConvolveMatrixElement.orderY')
+ @DomName('SVGFEConvolveMatrixElement.orderY')
+ @DocsEditable
final AnimatedInteger orderY;
- @DocsEditable @DomName('SVGFEConvolveMatrixElement.preserveAlpha')
+ @DomName('SVGFEConvolveMatrixElement.preserveAlpha')
+ @DocsEditable
final AnimatedBoolean preserveAlpha;
- @DocsEditable @DomName('SVGFEConvolveMatrixElement.targetX')
+ @DomName('SVGFEConvolveMatrixElement.targetX')
+ @DocsEditable
final AnimatedInteger targetX;
- @DocsEditable @DomName('SVGFEConvolveMatrixElement.targetY')
+ @DomName('SVGFEConvolveMatrixElement.targetY')
+ @DocsEditable
final AnimatedInteger targetY;
// From SVGFilterPrimitiveStandardAttributes
- @DocsEditable @DomName('SVGFEConvolveMatrixElement.height')
+ @DomName('SVGFEConvolveMatrixElement.height')
+ @DocsEditable
final AnimatedLength height;
- @DocsEditable @DomName('SVGFEConvolveMatrixElement.result')
+ @DomName('SVGFEConvolveMatrixElement.result')
+ @DocsEditable
final AnimatedString result;
- @DocsEditable @DomName('SVGFEConvolveMatrixElement.width')
+ @DomName('SVGFEConvolveMatrixElement.width')
+ @DocsEditable
final AnimatedLength width;
- @DocsEditable @DomName('SVGFEConvolveMatrixElement.x')
+ @DomName('SVGFEConvolveMatrixElement.x')
+ @DocsEditable
final AnimatedLength x;
- @DocsEditable @DomName('SVGFEConvolveMatrixElement.y')
+ @DomName('SVGFEConvolveMatrixElement.y')
+ @DocsEditable
final AnimatedLength y;
// From SVGStylable
@@ -1670,7 +2016,8 @@
// Use implementation from Element.
// final CssStyleDeclaration style;
- @DocsEditable @DomName('SVGFEConvolveMatrixElement.getPresentationAttribute')
+ @DomName('SVGFEConvolveMatrixElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -1678,41 +2025,50 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGFEDiffuseLightingElement')
class FEDiffuseLightingElement extends SvgElement implements FilterPrimitiveStandardAttributes native "*SVGFEDiffuseLightingElement" {
- @DocsEditable @DomName('SVGFEDiffuseLightingElement.diffuseConstant')
+ @DomName('SVGFEDiffuseLightingElement.diffuseConstant')
+ @DocsEditable
final AnimatedNumber diffuseConstant;
- @DocsEditable @DomName('SVGFEDiffuseLightingElement.in1')
+ @DomName('SVGFEDiffuseLightingElement.in1')
+ @DocsEditable
final AnimatedString in1;
- @DocsEditable @DomName('SVGFEDiffuseLightingElement.kernelUnitLengthX')
+ @DomName('SVGFEDiffuseLightingElement.kernelUnitLengthX')
+ @DocsEditable
final AnimatedNumber kernelUnitLengthX;
- @DocsEditable @DomName('SVGFEDiffuseLightingElement.kernelUnitLengthY')
+ @DomName('SVGFEDiffuseLightingElement.kernelUnitLengthY')
+ @DocsEditable
final AnimatedNumber kernelUnitLengthY;
- @DocsEditable @DomName('SVGFEDiffuseLightingElement.surfaceScale')
+ @DomName('SVGFEDiffuseLightingElement.surfaceScale')
+ @DocsEditable
final AnimatedNumber surfaceScale;
// From SVGFilterPrimitiveStandardAttributes
- @DocsEditable @DomName('SVGFEDiffuseLightingElement.height')
+ @DomName('SVGFEDiffuseLightingElement.height')
+ @DocsEditable
final AnimatedLength height;
- @DocsEditable @DomName('SVGFEDiffuseLightingElement.result')
+ @DomName('SVGFEDiffuseLightingElement.result')
+ @DocsEditable
final AnimatedString result;
- @DocsEditable @DomName('SVGFEDiffuseLightingElement.width')
+ @DomName('SVGFEDiffuseLightingElement.width')
+ @DocsEditable
final AnimatedLength width;
- @DocsEditable @DomName('SVGFEDiffuseLightingElement.x')
+ @DomName('SVGFEDiffuseLightingElement.x')
+ @DocsEditable
final AnimatedLength x;
- @DocsEditable @DomName('SVGFEDiffuseLightingElement.y')
+ @DomName('SVGFEDiffuseLightingElement.y')
+ @DocsEditable
final AnimatedLength y;
// From SVGStylable
@@ -1723,7 +2079,8 @@
// Use implementation from Element.
// final CssStyleDeclaration style;
- @DocsEditable @DomName('SVGFEDiffuseLightingElement.getPresentationAttribute')
+ @DomName('SVGFEDiffuseLightingElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -1731,7 +2088,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGFEDisplacementMapElement')
class FEDisplacementMapElement extends SvgElement implements FilterPrimitiveStandardAttributes native "*SVGFEDisplacementMapElement" {
@@ -1746,36 +2102,46 @@
static const int SVG_CHANNEL_UNKNOWN = 0;
- @DocsEditable @DomName('SVGFEDisplacementMapElement.in1')
+ @DomName('SVGFEDisplacementMapElement.in1')
+ @DocsEditable
final AnimatedString in1;
- @DocsEditable @DomName('SVGFEDisplacementMapElement.in2')
+ @DomName('SVGFEDisplacementMapElement.in2')
+ @DocsEditable
final AnimatedString in2;
- @DocsEditable @DomName('SVGFEDisplacementMapElement.scale')
+ @DomName('SVGFEDisplacementMapElement.scale')
+ @DocsEditable
final AnimatedNumber scale;
- @DocsEditable @DomName('SVGFEDisplacementMapElement.xChannelSelector')
+ @DomName('SVGFEDisplacementMapElement.xChannelSelector')
+ @DocsEditable
final AnimatedEnumeration xChannelSelector;
- @DocsEditable @DomName('SVGFEDisplacementMapElement.yChannelSelector')
+ @DomName('SVGFEDisplacementMapElement.yChannelSelector')
+ @DocsEditable
final AnimatedEnumeration yChannelSelector;
// From SVGFilterPrimitiveStandardAttributes
- @DocsEditable @DomName('SVGFEDisplacementMapElement.height')
+ @DomName('SVGFEDisplacementMapElement.height')
+ @DocsEditable
final AnimatedLength height;
- @DocsEditable @DomName('SVGFEDisplacementMapElement.result')
+ @DomName('SVGFEDisplacementMapElement.result')
+ @DocsEditable
final AnimatedString result;
- @DocsEditable @DomName('SVGFEDisplacementMapElement.width')
+ @DomName('SVGFEDisplacementMapElement.width')
+ @DocsEditable
final AnimatedLength width;
- @DocsEditable @DomName('SVGFEDisplacementMapElement.x')
+ @DomName('SVGFEDisplacementMapElement.x')
+ @DocsEditable
final AnimatedLength x;
- @DocsEditable @DomName('SVGFEDisplacementMapElement.y')
+ @DomName('SVGFEDisplacementMapElement.y')
+ @DocsEditable
final AnimatedLength y;
// From SVGStylable
@@ -1786,7 +2152,8 @@
// Use implementation from Element.
// final CssStyleDeclaration style;
- @DocsEditable @DomName('SVGFEDisplacementMapElement.getPresentationAttribute')
+ @DomName('SVGFEDisplacementMapElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -1794,15 +2161,16 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGFEDistantLightElement')
class FEDistantLightElement extends SvgElement native "*SVGFEDistantLightElement" {
- @DocsEditable @DomName('SVGFEDistantLightElement.azimuth')
+ @DomName('SVGFEDistantLightElement.azimuth')
+ @DocsEditable
final AnimatedNumber azimuth;
- @DocsEditable @DomName('SVGFEDistantLightElement.elevation')
+ @DomName('SVGFEDistantLightElement.elevation')
+ @DocsEditable
final AnimatedNumber elevation;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -1810,44 +2178,54 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGFEDropShadowElement')
class FEDropShadowElement extends SvgElement implements FilterPrimitiveStandardAttributes native "*SVGFEDropShadowElement" {
- @DocsEditable @DomName('SVGFEDropShadowElement.dx')
+ @DomName('SVGFEDropShadowElement.dx')
+ @DocsEditable
final AnimatedNumber dx;
- @DocsEditable @DomName('SVGFEDropShadowElement.dy')
+ @DomName('SVGFEDropShadowElement.dy')
+ @DocsEditable
final AnimatedNumber dy;
- @DocsEditable @DomName('SVGFEDropShadowElement.in1')
+ @DomName('SVGFEDropShadowElement.in1')
+ @DocsEditable
final AnimatedString in1;
- @DocsEditable @DomName('SVGFEDropShadowElement.stdDeviationX')
+ @DomName('SVGFEDropShadowElement.stdDeviationX')
+ @DocsEditable
final AnimatedNumber stdDeviationX;
- @DocsEditable @DomName('SVGFEDropShadowElement.stdDeviationY')
+ @DomName('SVGFEDropShadowElement.stdDeviationY')
+ @DocsEditable
final AnimatedNumber stdDeviationY;
- @DocsEditable @DomName('SVGFEDropShadowElement.setStdDeviation')
+ @DomName('SVGFEDropShadowElement.setStdDeviation')
+ @DocsEditable
void setStdDeviation(num stdDeviationX, num stdDeviationY) native;
// From SVGFilterPrimitiveStandardAttributes
- @DocsEditable @DomName('SVGFEDropShadowElement.height')
+ @DomName('SVGFEDropShadowElement.height')
+ @DocsEditable
final AnimatedLength height;
- @DocsEditable @DomName('SVGFEDropShadowElement.result')
+ @DomName('SVGFEDropShadowElement.result')
+ @DocsEditable
final AnimatedString result;
- @DocsEditable @DomName('SVGFEDropShadowElement.width')
+ @DomName('SVGFEDropShadowElement.width')
+ @DocsEditable
final AnimatedLength width;
- @DocsEditable @DomName('SVGFEDropShadowElement.x')
+ @DomName('SVGFEDropShadowElement.x')
+ @DocsEditable
final AnimatedLength x;
- @DocsEditable @DomName('SVGFEDropShadowElement.y')
+ @DomName('SVGFEDropShadowElement.y')
+ @DocsEditable
final AnimatedLength y;
// From SVGStylable
@@ -1858,7 +2236,8 @@
// Use implementation from Element.
// final CssStyleDeclaration style;
- @DocsEditable @DomName('SVGFEDropShadowElement.getPresentationAttribute')
+ @DomName('SVGFEDropShadowElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -1866,26 +2245,30 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGFEFloodElement')
class FEFloodElement extends SvgElement implements FilterPrimitiveStandardAttributes native "*SVGFEFloodElement" {
// From SVGFilterPrimitiveStandardAttributes
- @DocsEditable @DomName('SVGFEFloodElement.height')
+ @DomName('SVGFEFloodElement.height')
+ @DocsEditable
final AnimatedLength height;
- @DocsEditable @DomName('SVGFEFloodElement.result')
+ @DomName('SVGFEFloodElement.result')
+ @DocsEditable
final AnimatedString result;
- @DocsEditable @DomName('SVGFEFloodElement.width')
+ @DomName('SVGFEFloodElement.width')
+ @DocsEditable
final AnimatedLength width;
- @DocsEditable @DomName('SVGFEFloodElement.x')
+ @DomName('SVGFEFloodElement.x')
+ @DocsEditable
final AnimatedLength x;
- @DocsEditable @DomName('SVGFEFloodElement.y')
+ @DomName('SVGFEFloodElement.y')
+ @DocsEditable
final AnimatedLength y;
// From SVGStylable
@@ -1896,7 +2279,8 @@
// Use implementation from Element.
// final CssStyleDeclaration style;
- @DocsEditable @DomName('SVGFEFloodElement.getPresentationAttribute')
+ @DomName('SVGFEFloodElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -1904,7 +2288,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGFEFuncAElement')
class FEFuncAElement extends ComponentTransferFunctionElement native "*SVGFEFuncAElement" {
@@ -1914,7 +2297,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGFEFuncBElement')
class FEFuncBElement extends ComponentTransferFunctionElement native "*SVGFEFuncBElement" {
@@ -1924,7 +2306,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGFEFuncGElement')
class FEFuncGElement extends ComponentTransferFunctionElement native "*SVGFEFuncGElement" {
@@ -1934,7 +2315,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGFEFuncRElement')
class FEFuncRElement extends ComponentTransferFunctionElement native "*SVGFEFuncRElement" {
@@ -1944,38 +2324,46 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGFEGaussianBlurElement')
class FEGaussianBlurElement extends SvgElement implements FilterPrimitiveStandardAttributes native "*SVGFEGaussianBlurElement" {
- @DocsEditable @DomName('SVGFEGaussianBlurElement.in1')
+ @DomName('SVGFEGaussianBlurElement.in1')
+ @DocsEditable
final AnimatedString in1;
- @DocsEditable @DomName('SVGFEGaussianBlurElement.stdDeviationX')
+ @DomName('SVGFEGaussianBlurElement.stdDeviationX')
+ @DocsEditable
final AnimatedNumber stdDeviationX;
- @DocsEditable @DomName('SVGFEGaussianBlurElement.stdDeviationY')
+ @DomName('SVGFEGaussianBlurElement.stdDeviationY')
+ @DocsEditable
final AnimatedNumber stdDeviationY;
- @DocsEditable @DomName('SVGFEGaussianBlurElement.setStdDeviation')
+ @DomName('SVGFEGaussianBlurElement.setStdDeviation')
+ @DocsEditable
void setStdDeviation(num stdDeviationX, num stdDeviationY) native;
// From SVGFilterPrimitiveStandardAttributes
- @DocsEditable @DomName('SVGFEGaussianBlurElement.height')
+ @DomName('SVGFEGaussianBlurElement.height')
+ @DocsEditable
final AnimatedLength height;
- @DocsEditable @DomName('SVGFEGaussianBlurElement.result')
+ @DomName('SVGFEGaussianBlurElement.result')
+ @DocsEditable
final AnimatedString result;
- @DocsEditable @DomName('SVGFEGaussianBlurElement.width')
+ @DomName('SVGFEGaussianBlurElement.width')
+ @DocsEditable
final AnimatedLength width;
- @DocsEditable @DomName('SVGFEGaussianBlurElement.x')
+ @DomName('SVGFEGaussianBlurElement.x')
+ @DocsEditable
final AnimatedLength x;
- @DocsEditable @DomName('SVGFEGaussianBlurElement.y')
+ @DomName('SVGFEGaussianBlurElement.y')
+ @DocsEditable
final AnimatedLength y;
// From SVGStylable
@@ -1986,7 +2374,8 @@
// Use implementation from Element.
// final CssStyleDeclaration style;
- @DocsEditable @DomName('SVGFEGaussianBlurElement.getPresentationAttribute')
+ @DomName('SVGFEGaussianBlurElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -1994,42 +2383,50 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGFEImageElement')
class FEImageElement extends SvgElement implements FilterPrimitiveStandardAttributes, UriReference, ExternalResourcesRequired, LangSpace native "*SVGFEImageElement" {
- @DocsEditable @DomName('SVGFEImageElement.preserveAspectRatio')
+ @DomName('SVGFEImageElement.preserveAspectRatio')
+ @DocsEditable
final AnimatedPreserveAspectRatio preserveAspectRatio;
// From SVGExternalResourcesRequired
- @DocsEditable @DomName('SVGFEImageElement.externalResourcesRequired')
+ @DomName('SVGFEImageElement.externalResourcesRequired')
+ @DocsEditable
final AnimatedBoolean externalResourcesRequired;
// From SVGFilterPrimitiveStandardAttributes
- @DocsEditable @DomName('SVGFEImageElement.height')
+ @DomName('SVGFEImageElement.height')
+ @DocsEditable
final AnimatedLength height;
- @DocsEditable @DomName('SVGFEImageElement.result')
+ @DomName('SVGFEImageElement.result')
+ @DocsEditable
final AnimatedString result;
- @DocsEditable @DomName('SVGFEImageElement.width')
+ @DomName('SVGFEImageElement.width')
+ @DocsEditable
final AnimatedLength width;
- @DocsEditable @DomName('SVGFEImageElement.x')
+ @DomName('SVGFEImageElement.x')
+ @DocsEditable
final AnimatedLength x;
- @DocsEditable @DomName('SVGFEImageElement.y')
+ @DomName('SVGFEImageElement.y')
+ @DocsEditable
final AnimatedLength y;
// From SVGLangSpace
- @DocsEditable @DomName('SVGFEImageElement.xmllang')
+ @DomName('SVGFEImageElement.xmllang')
+ @DocsEditable
String xmllang;
- @DocsEditable @DomName('SVGFEImageElement.xmlspace')
+ @DomName('SVGFEImageElement.xmlspace')
+ @DocsEditable
String xmlspace;
// From SVGStylable
@@ -2040,12 +2437,14 @@
// Use implementation from Element.
// final CssStyleDeclaration style;
- @DocsEditable @DomName('SVGFEImageElement.getPresentationAttribute')
+ @DomName('SVGFEImageElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native;
// From SVGURIReference
- @DocsEditable @DomName('SVGFEImageElement.href')
+ @DomName('SVGFEImageElement.href')
+ @DocsEditable
final AnimatedString href;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -2053,26 +2452,30 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGFEMergeElement')
class FEMergeElement extends SvgElement implements FilterPrimitiveStandardAttributes native "*SVGFEMergeElement" {
// From SVGFilterPrimitiveStandardAttributes
- @DocsEditable @DomName('SVGFEMergeElement.height')
+ @DomName('SVGFEMergeElement.height')
+ @DocsEditable
final AnimatedLength height;
- @DocsEditable @DomName('SVGFEMergeElement.result')
+ @DomName('SVGFEMergeElement.result')
+ @DocsEditable
final AnimatedString result;
- @DocsEditable @DomName('SVGFEMergeElement.width')
+ @DomName('SVGFEMergeElement.width')
+ @DocsEditable
final AnimatedLength width;
- @DocsEditable @DomName('SVGFEMergeElement.x')
+ @DomName('SVGFEMergeElement.x')
+ @DocsEditable
final AnimatedLength x;
- @DocsEditable @DomName('SVGFEMergeElement.y')
+ @DomName('SVGFEMergeElement.y')
+ @DocsEditable
final AnimatedLength y;
// From SVGStylable
@@ -2083,7 +2486,8 @@
// Use implementation from Element.
// final CssStyleDeclaration style;
- @DocsEditable @DomName('SVGFEMergeElement.getPresentationAttribute')
+ @DomName('SVGFEMergeElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -2091,12 +2495,12 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGFEMergeNodeElement')
class FEMergeNodeElement extends SvgElement native "*SVGFEMergeNodeElement" {
- @DocsEditable @DomName('SVGFEMergeNodeElement.in1')
+ @DomName('SVGFEMergeNodeElement.in1')
+ @DocsEditable
final AnimatedString in1;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -2104,7 +2508,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGFEMorphologyElement')
class FEMorphologyElement extends SvgElement implements FilterPrimitiveStandardAttributes native "*SVGFEMorphologyElement" {
@@ -2115,36 +2518,46 @@
static const int SVG_MORPHOLOGY_OPERATOR_UNKNOWN = 0;
- @DocsEditable @DomName('SVGFEMorphologyElement.in1')
+ @DomName('SVGFEMorphologyElement.in1')
+ @DocsEditable
final AnimatedString in1;
- @DocsEditable @DomName('SVGFEMorphologyElement.operator')
+ @DomName('SVGFEMorphologyElement.operator')
+ @DocsEditable
final AnimatedEnumeration operator;
- @DocsEditable @DomName('SVGFEMorphologyElement.radiusX')
+ @DomName('SVGFEMorphologyElement.radiusX')
+ @DocsEditable
final AnimatedNumber radiusX;
- @DocsEditable @DomName('SVGFEMorphologyElement.radiusY')
+ @DomName('SVGFEMorphologyElement.radiusY')
+ @DocsEditable
final AnimatedNumber radiusY;
- @DocsEditable @DomName('SVGFEMorphologyElement.setRadius')
+ @DomName('SVGFEMorphologyElement.setRadius')
+ @DocsEditable
void setRadius(num radiusX, num radiusY) native;
// From SVGFilterPrimitiveStandardAttributes
- @DocsEditable @DomName('SVGFEMorphologyElement.height')
+ @DomName('SVGFEMorphologyElement.height')
+ @DocsEditable
final AnimatedLength height;
- @DocsEditable @DomName('SVGFEMorphologyElement.result')
+ @DomName('SVGFEMorphologyElement.result')
+ @DocsEditable
final AnimatedString result;
- @DocsEditable @DomName('SVGFEMorphologyElement.width')
+ @DomName('SVGFEMorphologyElement.width')
+ @DocsEditable
final AnimatedLength width;
- @DocsEditable @DomName('SVGFEMorphologyElement.x')
+ @DomName('SVGFEMorphologyElement.x')
+ @DocsEditable
final AnimatedLength x;
- @DocsEditable @DomName('SVGFEMorphologyElement.y')
+ @DomName('SVGFEMorphologyElement.y')
+ @DocsEditable
final AnimatedLength y;
// From SVGStylable
@@ -2155,7 +2568,8 @@
// Use implementation from Element.
// final CssStyleDeclaration style;
- @DocsEditable @DomName('SVGFEMorphologyElement.getPresentationAttribute')
+ @DomName('SVGFEMorphologyElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -2163,35 +2577,42 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGFEOffsetElement')
class FEOffsetElement extends SvgElement implements FilterPrimitiveStandardAttributes native "*SVGFEOffsetElement" {
- @DocsEditable @DomName('SVGFEOffsetElement.dx')
+ @DomName('SVGFEOffsetElement.dx')
+ @DocsEditable
final AnimatedNumber dx;
- @DocsEditable @DomName('SVGFEOffsetElement.dy')
+ @DomName('SVGFEOffsetElement.dy')
+ @DocsEditable
final AnimatedNumber dy;
- @DocsEditable @DomName('SVGFEOffsetElement.in1')
+ @DomName('SVGFEOffsetElement.in1')
+ @DocsEditable
final AnimatedString in1;
// From SVGFilterPrimitiveStandardAttributes
- @DocsEditable @DomName('SVGFEOffsetElement.height')
+ @DomName('SVGFEOffsetElement.height')
+ @DocsEditable
final AnimatedLength height;
- @DocsEditable @DomName('SVGFEOffsetElement.result')
+ @DomName('SVGFEOffsetElement.result')
+ @DocsEditable
final AnimatedString result;
- @DocsEditable @DomName('SVGFEOffsetElement.width')
+ @DomName('SVGFEOffsetElement.width')
+ @DocsEditable
final AnimatedLength width;
- @DocsEditable @DomName('SVGFEOffsetElement.x')
+ @DomName('SVGFEOffsetElement.x')
+ @DocsEditable
final AnimatedLength x;
- @DocsEditable @DomName('SVGFEOffsetElement.y')
+ @DomName('SVGFEOffsetElement.y')
+ @DocsEditable
final AnimatedLength y;
// From SVGStylable
@@ -2202,7 +2623,8 @@
// Use implementation from Element.
// final CssStyleDeclaration style;
- @DocsEditable @DomName('SVGFEOffsetElement.getPresentationAttribute')
+ @DomName('SVGFEOffsetElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -2210,18 +2632,20 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGFEPointLightElement')
class FEPointLightElement extends SvgElement native "*SVGFEPointLightElement" {
- @DocsEditable @DomName('SVGFEPointLightElement.x')
+ @DomName('SVGFEPointLightElement.x')
+ @DocsEditable
final AnimatedNumber x;
- @DocsEditable @DomName('SVGFEPointLightElement.y')
+ @DomName('SVGFEPointLightElement.y')
+ @DocsEditable
final AnimatedNumber y;
- @DocsEditable @DomName('SVGFEPointLightElement.z')
+ @DomName('SVGFEPointLightElement.z')
+ @DocsEditable
final AnimatedNumber z;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -2229,38 +2653,46 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGFESpecularLightingElement')
class FESpecularLightingElement extends SvgElement implements FilterPrimitiveStandardAttributes native "*SVGFESpecularLightingElement" {
- @DocsEditable @DomName('SVGFESpecularLightingElement.in1')
+ @DomName('SVGFESpecularLightingElement.in1')
+ @DocsEditable
final AnimatedString in1;
- @DocsEditable @DomName('SVGFESpecularLightingElement.specularConstant')
+ @DomName('SVGFESpecularLightingElement.specularConstant')
+ @DocsEditable
final AnimatedNumber specularConstant;
- @DocsEditable @DomName('SVGFESpecularLightingElement.specularExponent')
+ @DomName('SVGFESpecularLightingElement.specularExponent')
+ @DocsEditable
final AnimatedNumber specularExponent;
- @DocsEditable @DomName('SVGFESpecularLightingElement.surfaceScale')
+ @DomName('SVGFESpecularLightingElement.surfaceScale')
+ @DocsEditable
final AnimatedNumber surfaceScale;
// From SVGFilterPrimitiveStandardAttributes
- @DocsEditable @DomName('SVGFESpecularLightingElement.height')
+ @DomName('SVGFESpecularLightingElement.height')
+ @DocsEditable
final AnimatedLength height;
- @DocsEditable @DomName('SVGFESpecularLightingElement.result')
+ @DomName('SVGFESpecularLightingElement.result')
+ @DocsEditable
final AnimatedString result;
- @DocsEditable @DomName('SVGFESpecularLightingElement.width')
+ @DomName('SVGFESpecularLightingElement.width')
+ @DocsEditable
final AnimatedLength width;
- @DocsEditable @DomName('SVGFESpecularLightingElement.x')
+ @DomName('SVGFESpecularLightingElement.x')
+ @DocsEditable
final AnimatedLength x;
- @DocsEditable @DomName('SVGFESpecularLightingElement.y')
+ @DomName('SVGFESpecularLightingElement.y')
+ @DocsEditable
final AnimatedLength y;
// From SVGStylable
@@ -2271,7 +2703,8 @@
// Use implementation from Element.
// final CssStyleDeclaration style;
- @DocsEditable @DomName('SVGFESpecularLightingElement.getPresentationAttribute')
+ @DomName('SVGFESpecularLightingElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -2279,33 +2712,40 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGFESpotLightElement')
class FESpotLightElement extends SvgElement native "*SVGFESpotLightElement" {
- @DocsEditable @DomName('SVGFESpotLightElement.limitingConeAngle')
+ @DomName('SVGFESpotLightElement.limitingConeAngle')
+ @DocsEditable
final AnimatedNumber limitingConeAngle;
- @DocsEditable @DomName('SVGFESpotLightElement.pointsAtX')
+ @DomName('SVGFESpotLightElement.pointsAtX')
+ @DocsEditable
final AnimatedNumber pointsAtX;
- @DocsEditable @DomName('SVGFESpotLightElement.pointsAtY')
+ @DomName('SVGFESpotLightElement.pointsAtY')
+ @DocsEditable
final AnimatedNumber pointsAtY;
- @DocsEditable @DomName('SVGFESpotLightElement.pointsAtZ')
+ @DomName('SVGFESpotLightElement.pointsAtZ')
+ @DocsEditable
final AnimatedNumber pointsAtZ;
- @DocsEditable @DomName('SVGFESpotLightElement.specularExponent')
+ @DomName('SVGFESpotLightElement.specularExponent')
+ @DocsEditable
final AnimatedNumber specularExponent;
- @DocsEditable @DomName('SVGFESpotLightElement.x')
+ @DomName('SVGFESpotLightElement.x')
+ @DocsEditable
final AnimatedNumber x;
- @DocsEditable @DomName('SVGFESpotLightElement.y')
+ @DomName('SVGFESpotLightElement.y')
+ @DocsEditable
final AnimatedNumber y;
- @DocsEditable @DomName('SVGFESpotLightElement.z')
+ @DomName('SVGFESpotLightElement.z')
+ @DocsEditable
final AnimatedNumber z;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -2313,29 +2753,34 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGFETileElement')
class FETileElement extends SvgElement implements FilterPrimitiveStandardAttributes native "*SVGFETileElement" {
- @DocsEditable @DomName('SVGFETileElement.in1')
+ @DomName('SVGFETileElement.in1')
+ @DocsEditable
final AnimatedString in1;
// From SVGFilterPrimitiveStandardAttributes
- @DocsEditable @DomName('SVGFETileElement.height')
+ @DomName('SVGFETileElement.height')
+ @DocsEditable
final AnimatedLength height;
- @DocsEditable @DomName('SVGFETileElement.result')
+ @DomName('SVGFETileElement.result')
+ @DocsEditable
final AnimatedString result;
- @DocsEditable @DomName('SVGFETileElement.width')
+ @DomName('SVGFETileElement.width')
+ @DocsEditable
final AnimatedLength width;
- @DocsEditable @DomName('SVGFETileElement.x')
+ @DomName('SVGFETileElement.x')
+ @DocsEditable
final AnimatedLength x;
- @DocsEditable @DomName('SVGFETileElement.y')
+ @DomName('SVGFETileElement.y')
+ @DocsEditable
final AnimatedLength y;
// From SVGStylable
@@ -2346,7 +2791,8 @@
// Use implementation from Element.
// final CssStyleDeclaration style;
- @DocsEditable @DomName('SVGFETileElement.getPresentationAttribute')
+ @DomName('SVGFETileElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -2354,7 +2800,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGFETurbulenceElement')
class FETurbulenceElement extends SvgElement implements FilterPrimitiveStandardAttributes native "*SVGFETurbulenceElement" {
@@ -2371,39 +2816,50 @@
static const int SVG_TURBULENCE_TYPE_UNKNOWN = 0;
- @DocsEditable @DomName('SVGFETurbulenceElement.baseFrequencyX')
+ @DomName('SVGFETurbulenceElement.baseFrequencyX')
+ @DocsEditable
final AnimatedNumber baseFrequencyX;
- @DocsEditable @DomName('SVGFETurbulenceElement.baseFrequencyY')
+ @DomName('SVGFETurbulenceElement.baseFrequencyY')
+ @DocsEditable
final AnimatedNumber baseFrequencyY;
- @DocsEditable @DomName('SVGFETurbulenceElement.numOctaves')
+ @DomName('SVGFETurbulenceElement.numOctaves')
+ @DocsEditable
final AnimatedInteger numOctaves;
- @DocsEditable @DomName('SVGFETurbulenceElement.seed')
+ @DomName('SVGFETurbulenceElement.seed')
+ @DocsEditable
final AnimatedNumber seed;
- @DocsEditable @DomName('SVGFETurbulenceElement.stitchTiles')
+ @DomName('SVGFETurbulenceElement.stitchTiles')
+ @DocsEditable
final AnimatedEnumeration stitchTiles;
- @DocsEditable @DomName('SVGFETurbulenceElement.type')
+ @DomName('SVGFETurbulenceElement.type')
+ @DocsEditable
final AnimatedEnumeration type;
// From SVGFilterPrimitiveStandardAttributes
- @DocsEditable @DomName('SVGFETurbulenceElement.height')
+ @DomName('SVGFETurbulenceElement.height')
+ @DocsEditable
final AnimatedLength height;
- @DocsEditable @DomName('SVGFETurbulenceElement.result')
+ @DomName('SVGFETurbulenceElement.result')
+ @DocsEditable
final AnimatedString result;
- @DocsEditable @DomName('SVGFETurbulenceElement.width')
+ @DomName('SVGFETurbulenceElement.width')
+ @DocsEditable
final AnimatedLength width;
- @DocsEditable @DomName('SVGFETurbulenceElement.x')
+ @DomName('SVGFETurbulenceElement.x')
+ @DocsEditable
final AnimatedLength x;
- @DocsEditable @DomName('SVGFETurbulenceElement.y')
+ @DomName('SVGFETurbulenceElement.y')
+ @DocsEditable
final AnimatedLength y;
// From SVGStylable
@@ -2414,7 +2870,8 @@
// Use implementation from Element.
// final CssStyleDeclaration style;
- @DocsEditable @DomName('SVGFETurbulenceElement.getPresentationAttribute')
+ @DomName('SVGFETurbulenceElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -2422,7 +2879,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGFilterElement')
class FilterElement extends SvgElement implements UriReference, ExternalResourcesRequired, Stylable, LangSpace native "*SVGFilterElement" {
@@ -2430,44 +2886,56 @@
@DocsEditable
factory FilterElement() => _SvgElementFactoryProvider.createSvgElement_tag("filter");
- @DocsEditable @DomName('SVGFilterElement.filterResX')
+ @DomName('SVGFilterElement.filterResX')
+ @DocsEditable
final AnimatedInteger filterResX;
- @DocsEditable @DomName('SVGFilterElement.filterResY')
+ @DomName('SVGFilterElement.filterResY')
+ @DocsEditable
final AnimatedInteger filterResY;
- @DocsEditable @DomName('SVGFilterElement.filterUnits')
+ @DomName('SVGFilterElement.filterUnits')
+ @DocsEditable
final AnimatedEnumeration filterUnits;
- @DocsEditable @DomName('SVGFilterElement.height')
+ @DomName('SVGFilterElement.height')
+ @DocsEditable
final AnimatedLength height;
- @DocsEditable @DomName('SVGFilterElement.primitiveUnits')
+ @DomName('SVGFilterElement.primitiveUnits')
+ @DocsEditable
final AnimatedEnumeration primitiveUnits;
- @DocsEditable @DomName('SVGFilterElement.width')
+ @DomName('SVGFilterElement.width')
+ @DocsEditable
final AnimatedLength width;
- @DocsEditable @DomName('SVGFilterElement.x')
+ @DomName('SVGFilterElement.x')
+ @DocsEditable
final AnimatedLength x;
- @DocsEditable @DomName('SVGFilterElement.y')
+ @DomName('SVGFilterElement.y')
+ @DocsEditable
final AnimatedLength y;
- @DocsEditable @DomName('SVGFilterElement.setFilterRes')
+ @DomName('SVGFilterElement.setFilterRes')
+ @DocsEditable
void setFilterRes(int filterResX, int filterResY) native;
// From SVGExternalResourcesRequired
- @DocsEditable @DomName('SVGFilterElement.externalResourcesRequired')
+ @DomName('SVGFilterElement.externalResourcesRequired')
+ @DocsEditable
final AnimatedBoolean externalResourcesRequired;
// From SVGLangSpace
- @DocsEditable @DomName('SVGFilterElement.xmllang')
+ @DomName('SVGFilterElement.xmllang')
+ @DocsEditable
String xmllang;
- @DocsEditable @DomName('SVGFilterElement.xmlspace')
+ @DomName('SVGFilterElement.xmlspace')
+ @DocsEditable
String xmlspace;
// From SVGStylable
@@ -2478,12 +2946,14 @@
// Use implementation from Element.
// final CssStyleDeclaration style;
- @DocsEditable @DomName('SVGFilterElement.getPresentationAttribute')
+ @DomName('SVGFilterElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native;
// From SVGURIReference
- @DocsEditable @DomName('SVGFilterElement.href')
+ @DomName('SVGFilterElement.href')
+ @DocsEditable
final AnimatedString href;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -2491,7 +2961,6 @@
// BSD-style license that can be found in the LICENSE file.
-@DocsEditable
@DomName('SVGFilterPrimitiveStandardAttributes')
abstract class FilterPrimitiveStandardAttributes implements Stylable {
@@ -2518,7 +2987,6 @@
// BSD-style license that can be found in the LICENSE file.
-@DocsEditable
@DomName('SVGFitToViewBox')
abstract class FitToViewBox {
@@ -2531,7 +2999,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGFontElement')
class FontElement extends SvgElement native "*SVGFontElement" {
@@ -2544,7 +3011,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGFontFaceElement')
class FontFaceElement extends SvgElement native "*SVGFontFaceElement" {
@@ -2557,7 +3023,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGFontFaceFormatElement')
class FontFaceFormatElement extends SvgElement native "*SVGFontFaceFormatElement" {
@@ -2570,7 +3035,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGFontFaceNameElement')
class FontFaceNameElement extends SvgElement native "*SVGFontFaceNameElement" {
@@ -2583,7 +3047,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGFontFaceSrcElement')
class FontFaceSrcElement extends SvgElement native "*SVGFontFaceSrcElement" {
@@ -2596,7 +3059,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGFontFaceUriElement')
class FontFaceUriElement extends SvgElement native "*SVGFontFaceUriElement" {
@@ -2609,7 +3071,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGForeignObjectElement')
class ForeignObjectElement extends SvgElement implements Transformable, Tests, Stylable, ExternalResourcesRequired, LangSpace native "*SVGForeignObjectElement" {
@@ -2617,51 +3078,64 @@
@DocsEditable
factory ForeignObjectElement() => _SvgElementFactoryProvider.createSvgElement_tag("foreignObject");
- @DocsEditable @DomName('SVGForeignObjectElement.height')
+ @DomName('SVGForeignObjectElement.height')
+ @DocsEditable
final AnimatedLength height;
- @DocsEditable @DomName('SVGForeignObjectElement.width')
+ @DomName('SVGForeignObjectElement.width')
+ @DocsEditable
final AnimatedLength width;
- @DocsEditable @DomName('SVGForeignObjectElement.x')
+ @DomName('SVGForeignObjectElement.x')
+ @DocsEditable
final AnimatedLength x;
- @DocsEditable @DomName('SVGForeignObjectElement.y')
+ @DomName('SVGForeignObjectElement.y')
+ @DocsEditable
final AnimatedLength y;
// From SVGExternalResourcesRequired
- @DocsEditable @DomName('SVGForeignObjectElement.externalResourcesRequired')
+ @DomName('SVGForeignObjectElement.externalResourcesRequired')
+ @DocsEditable
final AnimatedBoolean externalResourcesRequired;
// From SVGLangSpace
- @DocsEditable @DomName('SVGForeignObjectElement.xmllang')
+ @DomName('SVGForeignObjectElement.xmllang')
+ @DocsEditable
String xmllang;
- @DocsEditable @DomName('SVGForeignObjectElement.xmlspace')
+ @DomName('SVGForeignObjectElement.xmlspace')
+ @DocsEditable
String xmlspace;
// From SVGLocatable
- @DocsEditable @DomName('SVGForeignObjectElement.farthestViewportElement')
+ @DomName('SVGForeignObjectElement.farthestViewportElement')
+ @DocsEditable
final SvgElement farthestViewportElement;
- @DocsEditable @DomName('SVGForeignObjectElement.nearestViewportElement')
+ @DomName('SVGForeignObjectElement.nearestViewportElement')
+ @DocsEditable
final SvgElement nearestViewportElement;
- @DocsEditable @DomName('SVGForeignObjectElement.getBBox')
+ @DomName('SVGForeignObjectElement.getBBox')
+ @DocsEditable
Rect getBBox() native;
@JSName('getCTM')
- @DocsEditable @DomName('SVGForeignObjectElement.getCTM')
+ @DomName('SVGForeignObjectElement.getCTM')
+ @DocsEditable
Matrix getCtm() native;
@JSName('getScreenCTM')
- @DocsEditable @DomName('SVGForeignObjectElement.getScreenCTM')
+ @DomName('SVGForeignObjectElement.getScreenCTM')
+ @DocsEditable
Matrix getScreenCtm() native;
- @DocsEditable @DomName('SVGForeignObjectElement.getTransformToElement')
+ @DomName('SVGForeignObjectElement.getTransformToElement')
+ @DocsEditable
Matrix getTransformToElement(SvgElement element) native;
// From SVGStylable
@@ -2672,26 +3146,32 @@
// Use implementation from Element.
// final CssStyleDeclaration style;
- @DocsEditable @DomName('SVGForeignObjectElement.getPresentationAttribute')
+ @DomName('SVGForeignObjectElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native;
// From SVGTests
- @DocsEditable @DomName('SVGForeignObjectElement.requiredExtensions')
+ @DomName('SVGForeignObjectElement.requiredExtensions')
+ @DocsEditable
final StringList requiredExtensions;
- @DocsEditable @DomName('SVGForeignObjectElement.requiredFeatures')
+ @DomName('SVGForeignObjectElement.requiredFeatures')
+ @DocsEditable
final StringList requiredFeatures;
- @DocsEditable @DomName('SVGForeignObjectElement.systemLanguage')
+ @DomName('SVGForeignObjectElement.systemLanguage')
+ @DocsEditable
final StringList systemLanguage;
- @DocsEditable @DomName('SVGForeignObjectElement.hasExtension')
+ @DomName('SVGForeignObjectElement.hasExtension')
+ @DocsEditable
bool hasExtension(String extension) native;
// From SVGTransformable
- @DocsEditable @DomName('SVGForeignObjectElement.transform')
+ @DomName('SVGForeignObjectElement.transform')
+ @DocsEditable
final AnimatedTransformList transform;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -2699,7 +3179,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGGElement')
class GElement extends SvgElement implements Transformable, Tests, Stylable, ExternalResourcesRequired, LangSpace native "*SVGGElement" {
@@ -2709,37 +3188,46 @@
// From SVGExternalResourcesRequired
- @DocsEditable @DomName('SVGGElement.externalResourcesRequired')
+ @DomName('SVGGElement.externalResourcesRequired')
+ @DocsEditable
final AnimatedBoolean externalResourcesRequired;
// From SVGLangSpace
- @DocsEditable @DomName('SVGGElement.xmllang')
+ @DomName('SVGGElement.xmllang')
+ @DocsEditable
String xmllang;
- @DocsEditable @DomName('SVGGElement.xmlspace')
+ @DomName('SVGGElement.xmlspace')
+ @DocsEditable
String xmlspace;
// From SVGLocatable
- @DocsEditable @DomName('SVGGElement.farthestViewportElement')
+ @DomName('SVGGElement.farthestViewportElement')
+ @DocsEditable
final SvgElement farthestViewportElement;
- @DocsEditable @DomName('SVGGElement.nearestViewportElement')
+ @DomName('SVGGElement.nearestViewportElement')
+ @DocsEditable
final SvgElement nearestViewportElement;
- @DocsEditable @DomName('SVGGElement.getBBox')
+ @DomName('SVGGElement.getBBox')
+ @DocsEditable
Rect getBBox() native;
@JSName('getCTM')
- @DocsEditable @DomName('SVGGElement.getCTM')
+ @DomName('SVGGElement.getCTM')
+ @DocsEditable
Matrix getCtm() native;
@JSName('getScreenCTM')
- @DocsEditable @DomName('SVGGElement.getScreenCTM')
+ @DomName('SVGGElement.getScreenCTM')
+ @DocsEditable
Matrix getScreenCtm() native;
- @DocsEditable @DomName('SVGGElement.getTransformToElement')
+ @DomName('SVGGElement.getTransformToElement')
+ @DocsEditable
Matrix getTransformToElement(SvgElement element) native;
// From SVGStylable
@@ -2750,26 +3238,32 @@
// Use implementation from Element.
// final CssStyleDeclaration style;
- @DocsEditable @DomName('SVGGElement.getPresentationAttribute')
+ @DomName('SVGGElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native;
// From SVGTests
- @DocsEditable @DomName('SVGGElement.requiredExtensions')
+ @DomName('SVGGElement.requiredExtensions')
+ @DocsEditable
final StringList requiredExtensions;
- @DocsEditable @DomName('SVGGElement.requiredFeatures')
+ @DomName('SVGGElement.requiredFeatures')
+ @DocsEditable
final StringList requiredFeatures;
- @DocsEditable @DomName('SVGGElement.systemLanguage')
+ @DomName('SVGGElement.systemLanguage')
+ @DocsEditable
final StringList systemLanguage;
- @DocsEditable @DomName('SVGGElement.hasExtension')
+ @DomName('SVGGElement.hasExtension')
+ @DocsEditable
bool hasExtension(String extension) native;
// From SVGTransformable
- @DocsEditable @DomName('SVGGElement.transform')
+ @DomName('SVGGElement.transform')
+ @DocsEditable
final AnimatedTransformList transform;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -2777,7 +3271,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGGlyphElement')
class GlyphElement extends SvgElement native "*SVGGlyphElement" {
@@ -2790,27 +3283,32 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGGlyphRefElement')
class GlyphRefElement extends SvgElement implements UriReference, Stylable native "*SVGGlyphRefElement" {
- @DocsEditable @DomName('SVGGlyphRefElement.dx')
+ @DomName('SVGGlyphRefElement.dx')
+ @DocsEditable
num dx;
- @DocsEditable @DomName('SVGGlyphRefElement.dy')
+ @DomName('SVGGlyphRefElement.dy')
+ @DocsEditable
num dy;
- @DocsEditable @DomName('SVGGlyphRefElement.format')
+ @DomName('SVGGlyphRefElement.format')
+ @DocsEditable
String format;
- @DocsEditable @DomName('SVGGlyphRefElement.glyphRef')
+ @DomName('SVGGlyphRefElement.glyphRef')
+ @DocsEditable
String glyphRef;
- @DocsEditable @DomName('SVGGlyphRefElement.x')
+ @DomName('SVGGlyphRefElement.x')
+ @DocsEditable
num x;
- @DocsEditable @DomName('SVGGlyphRefElement.y')
+ @DomName('SVGGlyphRefElement.y')
+ @DocsEditable
num y;
// From SVGStylable
@@ -2821,12 +3319,14 @@
// Use implementation from Element.
// final CssStyleDeclaration style;
- @DocsEditable @DomName('SVGGlyphRefElement.getPresentationAttribute')
+ @DomName('SVGGlyphRefElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native;
// From SVGURIReference
- @DocsEditable @DomName('SVGGlyphRefElement.href')
+ @DomName('SVGGlyphRefElement.href')
+ @DocsEditable
final AnimatedString href;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -2834,7 +3334,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGGradientElement')
class GradientElement extends SvgElement implements UriReference, ExternalResourcesRequired, Stylable native "*SVGGradientElement" {
@@ -2847,18 +3346,22 @@
static const int SVG_SPREADMETHOD_UNKNOWN = 0;
- @DocsEditable @DomName('SVGGradientElement.gradientTransform')
+ @DomName('SVGGradientElement.gradientTransform')
+ @DocsEditable
final AnimatedTransformList gradientTransform;
- @DocsEditable @DomName('SVGGradientElement.gradientUnits')
+ @DomName('SVGGradientElement.gradientUnits')
+ @DocsEditable
final AnimatedEnumeration gradientUnits;
- @DocsEditable @DomName('SVGGradientElement.spreadMethod')
+ @DomName('SVGGradientElement.spreadMethod')
+ @DocsEditable
final AnimatedEnumeration spreadMethod;
// From SVGExternalResourcesRequired
- @DocsEditable @DomName('SVGGradientElement.externalResourcesRequired')
+ @DomName('SVGGradientElement.externalResourcesRequired')
+ @DocsEditable
final AnimatedBoolean externalResourcesRequired;
// From SVGStylable
@@ -2869,12 +3372,14 @@
// Use implementation from Element.
// final CssStyleDeclaration style;
- @DocsEditable @DomName('SVGGradientElement.getPresentationAttribute')
+ @DomName('SVGGradientElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native;
// From SVGURIReference
- @DocsEditable @DomName('SVGGradientElement.href')
+ @DomName('SVGGradientElement.href')
+ @DocsEditable
final AnimatedString href;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -2882,7 +3387,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGHKernElement')
class HKernElement extends SvgElement native "*SVGHKernElement" {
@@ -2895,7 +3399,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGImageElement')
class ImageElement extends SvgElement implements Transformable, Tests, UriReference, Stylable, ExternalResourcesRequired, LangSpace native "*SVGImageElement" {
@@ -2903,54 +3406,68 @@
@DocsEditable
factory ImageElement() => _SvgElementFactoryProvider.createSvgElement_tag("image");
- @DocsEditable @DomName('SVGImageElement.height')
+ @DomName('SVGImageElement.height')
+ @DocsEditable
final AnimatedLength height;
- @DocsEditable @DomName('SVGImageElement.preserveAspectRatio')
+ @DomName('SVGImageElement.preserveAspectRatio')
+ @DocsEditable
final AnimatedPreserveAspectRatio preserveAspectRatio;
- @DocsEditable @DomName('SVGImageElement.width')
+ @DomName('SVGImageElement.width')
+ @DocsEditable
final AnimatedLength width;
- @DocsEditable @DomName('SVGImageElement.x')
+ @DomName('SVGImageElement.x')
+ @DocsEditable
final AnimatedLength x;
- @DocsEditable @DomName('SVGImageElement.y')
+ @DomName('SVGImageElement.y')
+ @DocsEditable
final AnimatedLength y;
// From SVGExternalResourcesRequired
- @DocsEditable @DomName('SVGImageElement.externalResourcesRequired')
+ @DomName('SVGImageElement.externalResourcesRequired')
+ @DocsEditable
final AnimatedBoolean externalResourcesRequired;
// From SVGLangSpace
- @DocsEditable @DomName('SVGImageElement.xmllang')
+ @DomName('SVGImageElement.xmllang')
+ @DocsEditable
String xmllang;
- @DocsEditable @DomName('SVGImageElement.xmlspace')
+ @DomName('SVGImageElement.xmlspace')
+ @DocsEditable
String xmlspace;
// From SVGLocatable
- @DocsEditable @DomName('SVGImageElement.farthestViewportElement')
+ @DomName('SVGImageElement.farthestViewportElement')
+ @DocsEditable
final SvgElement farthestViewportElement;
- @DocsEditable @DomName('SVGImageElement.nearestViewportElement')
+ @DomName('SVGImageElement.nearestViewportElement')
+ @DocsEditable
final SvgElement nearestViewportElement;
- @DocsEditable @DomName('SVGImageElement.getBBox')
+ @DomName('SVGImageElement.getBBox')
+ @DocsEditable
Rect getBBox() native;
@JSName('getCTM')
- @DocsEditable @DomName('SVGImageElement.getCTM')
+ @DomName('SVGImageElement.getCTM')
+ @DocsEditable
Matrix getCtm() native;
@JSName('getScreenCTM')
- @DocsEditable @DomName('SVGImageElement.getScreenCTM')
+ @DomName('SVGImageElement.getScreenCTM')
+ @DocsEditable
Matrix getScreenCtm() native;
- @DocsEditable @DomName('SVGImageElement.getTransformToElement')
+ @DomName('SVGImageElement.getTransformToElement')
+ @DocsEditable
Matrix getTransformToElement(SvgElement element) native;
// From SVGStylable
@@ -2961,31 +3478,38 @@
// Use implementation from Element.
// final CssStyleDeclaration style;
- @DocsEditable @DomName('SVGImageElement.getPresentationAttribute')
+ @DomName('SVGImageElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native;
// From SVGTests
- @DocsEditable @DomName('SVGImageElement.requiredExtensions')
+ @DomName('SVGImageElement.requiredExtensions')
+ @DocsEditable
final StringList requiredExtensions;
- @DocsEditable @DomName('SVGImageElement.requiredFeatures')
+ @DomName('SVGImageElement.requiredFeatures')
+ @DocsEditable
final StringList requiredFeatures;
- @DocsEditable @DomName('SVGImageElement.systemLanguage')
+ @DomName('SVGImageElement.systemLanguage')
+ @DocsEditable
final StringList systemLanguage;
- @DocsEditable @DomName('SVGImageElement.hasExtension')
+ @DomName('SVGImageElement.hasExtension')
+ @DocsEditable
bool hasExtension(String extension) native;
// From SVGTransformable
- @DocsEditable @DomName('SVGImageElement.transform')
+ @DomName('SVGImageElement.transform')
+ @DocsEditable
final AnimatedTransformList transform;
// From SVGURIReference
- @DocsEditable @DomName('SVGImageElement.href')
+ @DomName('SVGImageElement.href')
+ @DocsEditable
final AnimatedString href;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -2993,7 +3517,6 @@
// BSD-style license that can be found in the LICENSE file.
-@DocsEditable
@DomName('SVGLangSpace')
abstract class LangSpace {
@@ -3006,7 +3529,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGLength')
class Length native "*SVGLength" {
@@ -3033,22 +3555,28 @@
static const int SVG_LENGTHTYPE_UNKNOWN = 0;
- @DocsEditable @DomName('SVGLength.unitType')
+ @DomName('SVGLength.unitType')
+ @DocsEditable
final int unitType;
- @DocsEditable @DomName('SVGLength.value')
+ @DomName('SVGLength.value')
+ @DocsEditable
num value;
- @DocsEditable @DomName('SVGLength.valueAsString')
+ @DomName('SVGLength.valueAsString')
+ @DocsEditable
String valueAsString;
- @DocsEditable @DomName('SVGLength.valueInSpecifiedUnits')
+ @DomName('SVGLength.valueInSpecifiedUnits')
+ @DocsEditable
num valueInSpecifiedUnits;
- @DocsEditable @DomName('SVGLength.convertToSpecifiedUnits')
+ @DomName('SVGLength.convertToSpecifiedUnits')
+ @DocsEditable
void convertToSpecifiedUnits(int unitType) native;
- @DocsEditable @DomName('SVGLength.newValueSpecifiedUnits')
+ @DomName('SVGLength.newValueSpecifiedUnits')
+ @DocsEditable
void newValueSpecifiedUnits(int unitType, num valueInSpecifiedUnits) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -3056,12 +3584,12 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGLengthList')
class LengthList implements JavaScriptIndexingBehavior, List<Length> native "*SVGLengthList" {
- @DocsEditable @DomName('SVGLengthList.numberOfItems')
+ @DomName('SVGLengthList.numberOfItems')
+ @DocsEditable
final int numberOfItems;
Length operator[](int index) => JS("Length", "#[#]", this, index);
@@ -3091,11 +3619,13 @@
void forEach(void f(Length element)) => IterableMixinWorkaround.forEach(this, f);
- String join([String separator]) => IterableMixinWorkaround.joinList(this, separator);
+ String join([String separator]) =>
+ IterableMixinWorkaround.joinList(this, separator);
List mappedBy(f(Length element)) => IterableMixinWorkaround.mappedByList(this, f);
- Iterable<Length> where(bool f(Length element)) => IterableMixinWorkaround.where(this, f);
+ Iterable<Length> where(bool f(Length element)) =>
+ IterableMixinWorkaround.where(this, f);
bool every(bool f(Length element)) => IterableMixinWorkaround.every(this, f);
@@ -3155,6 +3685,9 @@
// clear() defined by IDL.
+ List<Length> get reversed =>
+ new ReversedListView<Length>(this, 0, null);
+
void sort([int compare(Length a, Length b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -3183,9 +3716,11 @@
throw new StateError("More than one element");
}
- Length min([int compare(Length a, Length b)]) => IterableMixinWorkaround.min(this, compare);
+ Length min([int compare(Length a, Length b)]) =>
+ IterableMixinWorkaround.min(this, compare);
- Length max([int compare(Length a, Length b)]) => IterableMixinWorkaround.max(this, compare);
+ Length max([int compare(Length a, Length b)]) =>
+ IterableMixinWorkaround.max(this, compare);
Length removeAt(int pos) {
throw new UnsupportedError("Cannot remove from immutable List.");
@@ -3232,25 +3767,32 @@
// -- end List<Length> mixins.
- @DocsEditable @DomName('SVGLengthList.appendItem')
+ @DomName('SVGLengthList.appendItem')
+ @DocsEditable
Length appendItem(Length item) native;
- @DocsEditable @DomName('SVGLengthList.clear')
+ @DomName('SVGLengthList.clear')
+ @DocsEditable
void clear() native;
- @DocsEditable @DomName('SVGLengthList.getItem')
+ @DomName('SVGLengthList.getItem')
+ @DocsEditable
Length getItem(int index) native;
- @DocsEditable @DomName('SVGLengthList.initialize')
+ @DomName('SVGLengthList.initialize')
+ @DocsEditable
Length initialize(Length item) native;
- @DocsEditable @DomName('SVGLengthList.insertItemBefore')
+ @DomName('SVGLengthList.insertItemBefore')
+ @DocsEditable
Length insertItemBefore(Length item, int index) native;
- @DocsEditable @DomName('SVGLengthList.removeItem')
+ @DomName('SVGLengthList.removeItem')
+ @DocsEditable
Length removeItem(int index) native;
- @DocsEditable @DomName('SVGLengthList.replaceItem')
+ @DomName('SVGLengthList.replaceItem')
+ @DocsEditable
Length replaceItem(Length item, int index) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -3258,7 +3800,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGLineElement')
class LineElement extends SvgElement implements Transformable, Tests, Stylable, ExternalResourcesRequired, LangSpace native "*SVGLineElement" {
@@ -3266,51 +3807,64 @@
@DocsEditable
factory LineElement() => _SvgElementFactoryProvider.createSvgElement_tag("line");
- @DocsEditable @DomName('SVGLineElement.x1')
+ @DomName('SVGLineElement.x1')
+ @DocsEditable
final AnimatedLength x1;
- @DocsEditable @DomName('SVGLineElement.x2')
+ @DomName('SVGLineElement.x2')
+ @DocsEditable
final AnimatedLength x2;
- @DocsEditable @DomName('SVGLineElement.y1')
+ @DomName('SVGLineElement.y1')
+ @DocsEditable
final AnimatedLength y1;
- @DocsEditable @DomName('SVGLineElement.y2')
+ @DomName('SVGLineElement.y2')
+ @DocsEditable
final AnimatedLength y2;
// From SVGExternalResourcesRequired
- @DocsEditable @DomName('SVGLineElement.externalResourcesRequired')
+ @DomName('SVGLineElement.externalResourcesRequired')
+ @DocsEditable
final AnimatedBoolean externalResourcesRequired;
// From SVGLangSpace
- @DocsEditable @DomName('SVGLineElement.xmllang')
+ @DomName('SVGLineElement.xmllang')
+ @DocsEditable
String xmllang;
- @DocsEditable @DomName('SVGLineElement.xmlspace')
+ @DomName('SVGLineElement.xmlspace')
+ @DocsEditable
String xmlspace;
// From SVGLocatable
- @DocsEditable @DomName('SVGLineElement.farthestViewportElement')
+ @DomName('SVGLineElement.farthestViewportElement')
+ @DocsEditable
final SvgElement farthestViewportElement;
- @DocsEditable @DomName('SVGLineElement.nearestViewportElement')
+ @DomName('SVGLineElement.nearestViewportElement')
+ @DocsEditable
final SvgElement nearestViewportElement;
- @DocsEditable @DomName('SVGLineElement.getBBox')
+ @DomName('SVGLineElement.getBBox')
+ @DocsEditable
Rect getBBox() native;
@JSName('getCTM')
- @DocsEditable @DomName('SVGLineElement.getCTM')
+ @DomName('SVGLineElement.getCTM')
+ @DocsEditable
Matrix getCtm() native;
@JSName('getScreenCTM')
- @DocsEditable @DomName('SVGLineElement.getScreenCTM')
+ @DomName('SVGLineElement.getScreenCTM')
+ @DocsEditable
Matrix getScreenCtm() native;
- @DocsEditable @DomName('SVGLineElement.getTransformToElement')
+ @DomName('SVGLineElement.getTransformToElement')
+ @DocsEditable
Matrix getTransformToElement(SvgElement element) native;
// From SVGStylable
@@ -3321,26 +3875,32 @@
// Use implementation from Element.
// final CssStyleDeclaration style;
- @DocsEditable @DomName('SVGLineElement.getPresentationAttribute')
+ @DomName('SVGLineElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native;
// From SVGTests
- @DocsEditable @DomName('SVGLineElement.requiredExtensions')
+ @DomName('SVGLineElement.requiredExtensions')
+ @DocsEditable
final StringList requiredExtensions;
- @DocsEditable @DomName('SVGLineElement.requiredFeatures')
+ @DomName('SVGLineElement.requiredFeatures')
+ @DocsEditable
final StringList requiredFeatures;
- @DocsEditable @DomName('SVGLineElement.systemLanguage')
+ @DomName('SVGLineElement.systemLanguage')
+ @DocsEditable
final StringList systemLanguage;
- @DocsEditable @DomName('SVGLineElement.hasExtension')
+ @DomName('SVGLineElement.hasExtension')
+ @DocsEditable
bool hasExtension(String extension) native;
// From SVGTransformable
- @DocsEditable @DomName('SVGLineElement.transform')
+ @DomName('SVGLineElement.transform')
+ @DocsEditable
final AnimatedTransformList transform;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -3348,7 +3908,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGLinearGradientElement')
class LinearGradientElement extends GradientElement native "*SVGLinearGradientElement" {
@@ -3356,16 +3915,20 @@
@DocsEditable
factory LinearGradientElement() => _SvgElementFactoryProvider.createSvgElement_tag("linearGradient");
- @DocsEditable @DomName('SVGLinearGradientElement.x1')
+ @DomName('SVGLinearGradientElement.x1')
+ @DocsEditable
final AnimatedLength x1;
- @DocsEditable @DomName('SVGLinearGradientElement.x2')
+ @DomName('SVGLinearGradientElement.x2')
+ @DocsEditable
final AnimatedLength x2;
- @DocsEditable @DomName('SVGLinearGradientElement.y1')
+ @DomName('SVGLinearGradientElement.y1')
+ @DocsEditable
final AnimatedLength y1;
- @DocsEditable @DomName('SVGLinearGradientElement.y2')
+ @DomName('SVGLinearGradientElement.y2')
+ @DocsEditable
final AnimatedLength y2;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -3373,7 +3936,6 @@
// BSD-style license that can be found in the LICENSE file.
-@DocsEditable
@DomName('SVGLocatable')
abstract class Locatable {
@@ -3394,7 +3956,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGMPathElement')
class MPathElement extends SvgElement implements UriReference, ExternalResourcesRequired native "*SVGMPathElement" {
@@ -3404,12 +3965,14 @@
// From SVGExternalResourcesRequired
- @DocsEditable @DomName('SVGMPathElement.externalResourcesRequired')
+ @DomName('SVGMPathElement.externalResourcesRequired')
+ @DocsEditable
final AnimatedBoolean externalResourcesRequired;
// From SVGURIReference
- @DocsEditable @DomName('SVGMPathElement.href')
+ @DomName('SVGMPathElement.href')
+ @DocsEditable
final AnimatedString href;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -3417,7 +3980,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGMarkerElement')
class MarkerElement extends SvgElement implements FitToViewBox, ExternalResourcesRequired, Stylable, LangSpace native "*SVGMarkerElement" {
@@ -3437,52 +3999,66 @@
static const int SVG_MARKER_ORIENT_UNKNOWN = 0;
- @DocsEditable @DomName('SVGMarkerElement.markerHeight')
+ @DomName('SVGMarkerElement.markerHeight')
+ @DocsEditable
final AnimatedLength markerHeight;
- @DocsEditable @DomName('SVGMarkerElement.markerUnits')
+ @DomName('SVGMarkerElement.markerUnits')
+ @DocsEditable
final AnimatedEnumeration markerUnits;
- @DocsEditable @DomName('SVGMarkerElement.markerWidth')
+ @DomName('SVGMarkerElement.markerWidth')
+ @DocsEditable
final AnimatedLength markerWidth;
- @DocsEditable @DomName('SVGMarkerElement.orientAngle')
+ @DomName('SVGMarkerElement.orientAngle')
+ @DocsEditable
final AnimatedAngle orientAngle;
- @DocsEditable @DomName('SVGMarkerElement.orientType')
+ @DomName('SVGMarkerElement.orientType')
+ @DocsEditable
final AnimatedEnumeration orientType;
- @DocsEditable @DomName('SVGMarkerElement.refX')
+ @DomName('SVGMarkerElement.refX')
+ @DocsEditable
final AnimatedLength refX;
- @DocsEditable @DomName('SVGMarkerElement.refY')
+ @DomName('SVGMarkerElement.refY')
+ @DocsEditable
final AnimatedLength refY;
- @DocsEditable @DomName('SVGMarkerElement.setOrientToAngle')
+ @DomName('SVGMarkerElement.setOrientToAngle')
+ @DocsEditable
void setOrientToAngle(Angle angle) native;
- @DocsEditable @DomName('SVGMarkerElement.setOrientToAuto')
+ @DomName('SVGMarkerElement.setOrientToAuto')
+ @DocsEditable
void setOrientToAuto() native;
// From SVGExternalResourcesRequired
- @DocsEditable @DomName('SVGMarkerElement.externalResourcesRequired')
+ @DomName('SVGMarkerElement.externalResourcesRequired')
+ @DocsEditable
final AnimatedBoolean externalResourcesRequired;
// From SVGFitToViewBox
- @DocsEditable @DomName('SVGMarkerElement.preserveAspectRatio')
+ @DomName('SVGMarkerElement.preserveAspectRatio')
+ @DocsEditable
final AnimatedPreserveAspectRatio preserveAspectRatio;
- @DocsEditable @DomName('SVGMarkerElement.viewBox')
+ @DomName('SVGMarkerElement.viewBox')
+ @DocsEditable
final AnimatedRect viewBox;
// From SVGLangSpace
- @DocsEditable @DomName('SVGMarkerElement.xmllang')
+ @DomName('SVGMarkerElement.xmllang')
+ @DocsEditable
String xmllang;
- @DocsEditable @DomName('SVGMarkerElement.xmlspace')
+ @DomName('SVGMarkerElement.xmlspace')
+ @DocsEditable
String xmlspace;
// From SVGStylable
@@ -3493,7 +4069,8 @@
// Use implementation from Element.
// final CssStyleDeclaration style;
- @DocsEditable @DomName('SVGMarkerElement.getPresentationAttribute')
+ @DomName('SVGMarkerElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -3501,7 +4078,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGMaskElement')
class MaskElement extends SvgElement implements Tests, Stylable, ExternalResourcesRequired, LangSpace native "*SVGMaskElement" {
@@ -3509,35 +4085,44 @@
@DocsEditable
factory MaskElement() => _SvgElementFactoryProvider.createSvgElement_tag("mask");
- @DocsEditable @DomName('SVGMaskElement.height')
+ @DomName('SVGMaskElement.height')
+ @DocsEditable
final AnimatedLength height;
- @DocsEditable @DomName('SVGMaskElement.maskContentUnits')
+ @DomName('SVGMaskElement.maskContentUnits')
+ @DocsEditable
final AnimatedEnumeration maskContentUnits;
- @DocsEditable @DomName('SVGMaskElement.maskUnits')
+ @DomName('SVGMaskElement.maskUnits')
+ @DocsEditable
final AnimatedEnumeration maskUnits;
- @DocsEditable @DomName('SVGMaskElement.width')
+ @DomName('SVGMaskElement.width')
+ @DocsEditable
final AnimatedLength width;
- @DocsEditable @DomName('SVGMaskElement.x')
+ @DomName('SVGMaskElement.x')
+ @DocsEditable
final AnimatedLength x;
- @DocsEditable @DomName('SVGMaskElement.y')
+ @DomName('SVGMaskElement.y')
+ @DocsEditable
final AnimatedLength y;
// From SVGExternalResourcesRequired
- @DocsEditable @DomName('SVGMaskElement.externalResourcesRequired')
+ @DomName('SVGMaskElement.externalResourcesRequired')
+ @DocsEditable
final AnimatedBoolean externalResourcesRequired;
// From SVGLangSpace
- @DocsEditable @DomName('SVGMaskElement.xmllang')
+ @DomName('SVGMaskElement.xmllang')
+ @DocsEditable
String xmllang;
- @DocsEditable @DomName('SVGMaskElement.xmlspace')
+ @DomName('SVGMaskElement.xmlspace')
+ @DocsEditable
String xmlspace;
// From SVGStylable
@@ -3548,21 +4133,26 @@
// Use implementation from Element.
// final CssStyleDeclaration style;
- @DocsEditable @DomName('SVGMaskElement.getPresentationAttribute')
+ @DomName('SVGMaskElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native;
// From SVGTests
- @DocsEditable @DomName('SVGMaskElement.requiredExtensions')
+ @DomName('SVGMaskElement.requiredExtensions')
+ @DocsEditable
final StringList requiredExtensions;
- @DocsEditable @DomName('SVGMaskElement.requiredFeatures')
+ @DomName('SVGMaskElement.requiredFeatures')
+ @DocsEditable
final StringList requiredFeatures;
- @DocsEditable @DomName('SVGMaskElement.systemLanguage')
+ @DomName('SVGMaskElement.systemLanguage')
+ @DocsEditable
final StringList systemLanguage;
- @DocsEditable @DomName('SVGMaskElement.hasExtension')
+ @DomName('SVGMaskElement.hasExtension')
+ @DocsEditable
bool hasExtension(String extension) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -3570,60 +4160,76 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGMatrix')
class Matrix native "*SVGMatrix" {
- @DocsEditable @DomName('SVGMatrix.a')
+ @DomName('SVGMatrix.a')
+ @DocsEditable
num a;
- @DocsEditable @DomName('SVGMatrix.b')
+ @DomName('SVGMatrix.b')
+ @DocsEditable
num b;
- @DocsEditable @DomName('SVGMatrix.c')
+ @DomName('SVGMatrix.c')
+ @DocsEditable
num c;
- @DocsEditable @DomName('SVGMatrix.d')
+ @DomName('SVGMatrix.d')
+ @DocsEditable
num d;
- @DocsEditable @DomName('SVGMatrix.e')
+ @DomName('SVGMatrix.e')
+ @DocsEditable
num e;
- @DocsEditable @DomName('SVGMatrix.f')
+ @DomName('SVGMatrix.f')
+ @DocsEditable
num f;
- @DocsEditable @DomName('SVGMatrix.flipX')
+ @DomName('SVGMatrix.flipX')
+ @DocsEditable
Matrix flipX() native;
- @DocsEditable @DomName('SVGMatrix.flipY')
+ @DomName('SVGMatrix.flipY')
+ @DocsEditable
Matrix flipY() native;
- @DocsEditable @DomName('SVGMatrix.inverse')
+ @DomName('SVGMatrix.inverse')
+ @DocsEditable
Matrix inverse() native;
- @DocsEditable @DomName('SVGMatrix.multiply')
+ @DomName('SVGMatrix.multiply')
+ @DocsEditable
Matrix multiply(Matrix secondMatrix) native;
- @DocsEditable @DomName('SVGMatrix.rotate')
+ @DomName('SVGMatrix.rotate')
+ @DocsEditable
Matrix rotate(num angle) native;
- @DocsEditable @DomName('SVGMatrix.rotateFromVector')
+ @DomName('SVGMatrix.rotateFromVector')
+ @DocsEditable
Matrix rotateFromVector(num x, num y) native;
- @DocsEditable @DomName('SVGMatrix.scale')
+ @DomName('SVGMatrix.scale')
+ @DocsEditable
Matrix scale(num scaleFactor) native;
- @DocsEditable @DomName('SVGMatrix.scaleNonUniform')
+ @DomName('SVGMatrix.scaleNonUniform')
+ @DocsEditable
Matrix scaleNonUniform(num scaleFactorX, num scaleFactorY) native;
- @DocsEditable @DomName('SVGMatrix.skewX')
+ @DomName('SVGMatrix.skewX')
+ @DocsEditable
Matrix skewX(num angle) native;
- @DocsEditable @DomName('SVGMatrix.skewY')
+ @DomName('SVGMatrix.skewY')
+ @DocsEditable
Matrix skewY(num angle) native;
- @DocsEditable @DomName('SVGMatrix.translate')
+ @DomName('SVGMatrix.translate')
+ @DocsEditable
Matrix translate(num x, num y) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -3631,7 +4237,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGMetadataElement')
class MetadataElement extends SvgElement native "*SVGMetadataElement" {
@@ -3641,7 +4246,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGMissingGlyphElement')
class MissingGlyphElement extends SvgElement native "*SVGMissingGlyphElement" {
@@ -3651,12 +4255,12 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGNumber')
class Number native "*SVGNumber" {
- @DocsEditable @DomName('SVGNumber.value')
+ @DomName('SVGNumber.value')
+ @DocsEditable
num value;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -3664,12 +4268,12 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGNumberList')
class NumberList implements JavaScriptIndexingBehavior, List<Number> native "*SVGNumberList" {
- @DocsEditable @DomName('SVGNumberList.numberOfItems')
+ @DomName('SVGNumberList.numberOfItems')
+ @DocsEditable
final int numberOfItems;
Number operator[](int index) => JS("Number", "#[#]", this, index);
@@ -3699,11 +4303,13 @@
void forEach(void f(Number element)) => IterableMixinWorkaround.forEach(this, f);
- String join([String separator]) => IterableMixinWorkaround.joinList(this, separator);
+ String join([String separator]) =>
+ IterableMixinWorkaround.joinList(this, separator);
List mappedBy(f(Number element)) => IterableMixinWorkaround.mappedByList(this, f);
- Iterable<Number> where(bool f(Number element)) => IterableMixinWorkaround.where(this, f);
+ Iterable<Number> where(bool f(Number element)) =>
+ IterableMixinWorkaround.where(this, f);
bool every(bool f(Number element)) => IterableMixinWorkaround.every(this, f);
@@ -3763,6 +4369,9 @@
// clear() defined by IDL.
+ List<Number> get reversed =>
+ new ReversedListView<Number>(this, 0, null);
+
void sort([int compare(Number a, Number b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -3791,9 +4400,11 @@
throw new StateError("More than one element");
}
- Number min([int compare(Number a, Number b)]) => IterableMixinWorkaround.min(this, compare);
+ Number min([int compare(Number a, Number b)]) =>
+ IterableMixinWorkaround.min(this, compare);
- Number max([int compare(Number a, Number b)]) => IterableMixinWorkaround.max(this, compare);
+ Number max([int compare(Number a, Number b)]) =>
+ IterableMixinWorkaround.max(this, compare);
Number removeAt(int pos) {
throw new UnsupportedError("Cannot remove from immutable List.");
@@ -3840,25 +4451,32 @@
// -- end List<Number> mixins.
- @DocsEditable @DomName('SVGNumberList.appendItem')
+ @DomName('SVGNumberList.appendItem')
+ @DocsEditable
Number appendItem(Number item) native;
- @DocsEditable @DomName('SVGNumberList.clear')
+ @DomName('SVGNumberList.clear')
+ @DocsEditable
void clear() native;
- @DocsEditable @DomName('SVGNumberList.getItem')
+ @DomName('SVGNumberList.getItem')
+ @DocsEditable
Number getItem(int index) native;
- @DocsEditable @DomName('SVGNumberList.initialize')
+ @DomName('SVGNumberList.initialize')
+ @DocsEditable
Number initialize(Number item) native;
- @DocsEditable @DomName('SVGNumberList.insertItemBefore')
+ @DomName('SVGNumberList.insertItemBefore')
+ @DocsEditable
Number insertItemBefore(Number item, int index) native;
- @DocsEditable @DomName('SVGNumberList.removeItem')
+ @DomName('SVGNumberList.removeItem')
+ @DocsEditable
Number removeItem(int index) native;
- @DocsEditable @DomName('SVGNumberList.replaceItem')
+ @DomName('SVGNumberList.replaceItem')
+ @DocsEditable
Number replaceItem(Number item, int index) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -3866,7 +4484,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGPaint')
class Paint extends Color native "*SVGPaint" {
@@ -3891,16 +4508,20 @@
static const int SVG_PAINTTYPE_URI_RGBCOLOR_ICCCOLOR = 106;
- @DocsEditable @DomName('SVGPaint.paintType')
+ @DomName('SVGPaint.paintType')
+ @DocsEditable
final int paintType;
- @DocsEditable @DomName('SVGPaint.uri')
+ @DomName('SVGPaint.uri')
+ @DocsEditable
final String uri;
- @DocsEditable @DomName('SVGPaint.setPaint')
+ @DomName('SVGPaint.setPaint')
+ @DocsEditable
void setPaint(int paintType, String uri, String rgbColor, String iccColor) native;
- @DocsEditable @DomName('SVGPaint.setUri')
+ @DomName('SVGPaint.setUri')
+ @DocsEditable
void setUri(String uri) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -3908,7 +4529,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGPathElement')
class PathElement extends SvgElement implements Transformable, Tests, Stylable, ExternalResourcesRequired, LangSpace native "*SVGPathElement" {
@@ -3916,139 +4536,175 @@
@DocsEditable
factory PathElement() => _SvgElementFactoryProvider.createSvgElement_tag("path");
- @DocsEditable @DomName('SVGPathElement.animatedNormalizedPathSegList')
+ @DomName('SVGPathElement.animatedNormalizedPathSegList')
+ @DocsEditable
final PathSegList animatedNormalizedPathSegList;
- @DocsEditable @DomName('SVGPathElement.animatedPathSegList')
+ @DomName('SVGPathElement.animatedPathSegList')
+ @DocsEditable
final PathSegList animatedPathSegList;
- @DocsEditable @DomName('SVGPathElement.normalizedPathSegList')
+ @DomName('SVGPathElement.normalizedPathSegList')
+ @DocsEditable
final PathSegList normalizedPathSegList;
- @DocsEditable @DomName('SVGPathElement.pathLength')
+ @DomName('SVGPathElement.pathLength')
+ @DocsEditable
final AnimatedNumber pathLength;
- @DocsEditable @DomName('SVGPathElement.pathSegList')
+ @DomName('SVGPathElement.pathSegList')
+ @DocsEditable
final PathSegList pathSegList;
@JSName('createSVGPathSegArcAbs')
- @DocsEditable @DomName('SVGPathElement.createSVGPathSegArcAbs')
+ @DomName('SVGPathElement.createSVGPathSegArcAbs')
+ @DocsEditable
PathSegArcAbs createSvgPathSegArcAbs(num x, num y, num r1, num r2, num angle, bool largeArcFlag, bool sweepFlag) native;
@JSName('createSVGPathSegArcRel')
- @DocsEditable @DomName('SVGPathElement.createSVGPathSegArcRel')
+ @DomName('SVGPathElement.createSVGPathSegArcRel')
+ @DocsEditable
PathSegArcRel createSvgPathSegArcRel(num x, num y, num r1, num r2, num angle, bool largeArcFlag, bool sweepFlag) native;
@JSName('createSVGPathSegClosePath')
- @DocsEditable @DomName('SVGPathElement.createSVGPathSegClosePath')
+ @DomName('SVGPathElement.createSVGPathSegClosePath')
+ @DocsEditable
PathSegClosePath createSvgPathSegClosePath() native;
@JSName('createSVGPathSegCurvetoCubicAbs')
- @DocsEditable @DomName('SVGPathElement.createSVGPathSegCurvetoCubicAbs')
+ @DomName('SVGPathElement.createSVGPathSegCurvetoCubicAbs')
+ @DocsEditable
PathSegCurvetoCubicAbs createSvgPathSegCurvetoCubicAbs(num x, num y, num x1, num y1, num x2, num y2) native;
@JSName('createSVGPathSegCurvetoCubicRel')
- @DocsEditable @DomName('SVGPathElement.createSVGPathSegCurvetoCubicRel')
+ @DomName('SVGPathElement.createSVGPathSegCurvetoCubicRel')
+ @DocsEditable
PathSegCurvetoCubicRel createSvgPathSegCurvetoCubicRel(num x, num y, num x1, num y1, num x2, num y2) native;
@JSName('createSVGPathSegCurvetoCubicSmoothAbs')
- @DocsEditable @DomName('SVGPathElement.createSVGPathSegCurvetoCubicSmoothAbs')
+ @DomName('SVGPathElement.createSVGPathSegCurvetoCubicSmoothAbs')
+ @DocsEditable
PathSegCurvetoCubicSmoothAbs createSvgPathSegCurvetoCubicSmoothAbs(num x, num y, num x2, num y2) native;
@JSName('createSVGPathSegCurvetoCubicSmoothRel')
- @DocsEditable @DomName('SVGPathElement.createSVGPathSegCurvetoCubicSmoothRel')
+ @DomName('SVGPathElement.createSVGPathSegCurvetoCubicSmoothRel')
+ @DocsEditable
PathSegCurvetoCubicSmoothRel createSvgPathSegCurvetoCubicSmoothRel(num x, num y, num x2, num y2) native;
@JSName('createSVGPathSegCurvetoQuadraticAbs')
- @DocsEditable @DomName('SVGPathElement.createSVGPathSegCurvetoQuadraticAbs')
+ @DomName('SVGPathElement.createSVGPathSegCurvetoQuadraticAbs')
+ @DocsEditable
PathSegCurvetoQuadraticAbs createSvgPathSegCurvetoQuadraticAbs(num x, num y, num x1, num y1) native;
@JSName('createSVGPathSegCurvetoQuadraticRel')
- @DocsEditable @DomName('SVGPathElement.createSVGPathSegCurvetoQuadraticRel')
+ @DomName('SVGPathElement.createSVGPathSegCurvetoQuadraticRel')
+ @DocsEditable
PathSegCurvetoQuadraticRel createSvgPathSegCurvetoQuadraticRel(num x, num y, num x1, num y1) native;
@JSName('createSVGPathSegCurvetoQuadraticSmoothAbs')
- @DocsEditable @DomName('SVGPathElement.createSVGPathSegCurvetoQuadraticSmoothAbs')
+ @DomName('SVGPathElement.createSVGPathSegCurvetoQuadraticSmoothAbs')
+ @DocsEditable
PathSegCurvetoQuadraticSmoothAbs createSvgPathSegCurvetoQuadraticSmoothAbs(num x, num y) native;
@JSName('createSVGPathSegCurvetoQuadraticSmoothRel')
- @DocsEditable @DomName('SVGPathElement.createSVGPathSegCurvetoQuadraticSmoothRel')
+ @DomName('SVGPathElement.createSVGPathSegCurvetoQuadraticSmoothRel')
+ @DocsEditable
PathSegCurvetoQuadraticSmoothRel createSvgPathSegCurvetoQuadraticSmoothRel(num x, num y) native;
@JSName('createSVGPathSegLinetoAbs')
- @DocsEditable @DomName('SVGPathElement.createSVGPathSegLinetoAbs')
+ @DomName('SVGPathElement.createSVGPathSegLinetoAbs')
+ @DocsEditable
PathSegLinetoAbs createSvgPathSegLinetoAbs(num x, num y) native;
@JSName('createSVGPathSegLinetoHorizontalAbs')
- @DocsEditable @DomName('SVGPathElement.createSVGPathSegLinetoHorizontalAbs')
+ @DomName('SVGPathElement.createSVGPathSegLinetoHorizontalAbs')
+ @DocsEditable
PathSegLinetoHorizontalAbs createSvgPathSegLinetoHorizontalAbs(num x) native;
@JSName('createSVGPathSegLinetoHorizontalRel')
- @DocsEditable @DomName('SVGPathElement.createSVGPathSegLinetoHorizontalRel')
+ @DomName('SVGPathElement.createSVGPathSegLinetoHorizontalRel')
+ @DocsEditable
PathSegLinetoHorizontalRel createSvgPathSegLinetoHorizontalRel(num x) native;
@JSName('createSVGPathSegLinetoRel')
- @DocsEditable @DomName('SVGPathElement.createSVGPathSegLinetoRel')
+ @DomName('SVGPathElement.createSVGPathSegLinetoRel')
+ @DocsEditable
PathSegLinetoRel createSvgPathSegLinetoRel(num x, num y) native;
@JSName('createSVGPathSegLinetoVerticalAbs')
- @DocsEditable @DomName('SVGPathElement.createSVGPathSegLinetoVerticalAbs')
+ @DomName('SVGPathElement.createSVGPathSegLinetoVerticalAbs')
+ @DocsEditable
PathSegLinetoVerticalAbs createSvgPathSegLinetoVerticalAbs(num y) native;
@JSName('createSVGPathSegLinetoVerticalRel')
- @DocsEditable @DomName('SVGPathElement.createSVGPathSegLinetoVerticalRel')
+ @DomName('SVGPathElement.createSVGPathSegLinetoVerticalRel')
+ @DocsEditable
PathSegLinetoVerticalRel createSvgPathSegLinetoVerticalRel(num y) native;
@JSName('createSVGPathSegMovetoAbs')
- @DocsEditable @DomName('SVGPathElement.createSVGPathSegMovetoAbs')
+ @DomName('SVGPathElement.createSVGPathSegMovetoAbs')
+ @DocsEditable
PathSegMovetoAbs createSvgPathSegMovetoAbs(num x, num y) native;
@JSName('createSVGPathSegMovetoRel')
- @DocsEditable @DomName('SVGPathElement.createSVGPathSegMovetoRel')
+ @DomName('SVGPathElement.createSVGPathSegMovetoRel')
+ @DocsEditable
PathSegMovetoRel createSvgPathSegMovetoRel(num x, num y) native;
- @DocsEditable @DomName('SVGPathElement.getPathSegAtLength')
+ @DomName('SVGPathElement.getPathSegAtLength')
+ @DocsEditable
int getPathSegAtLength(num distance) native;
- @DocsEditable @DomName('SVGPathElement.getPointAtLength')
+ @DomName('SVGPathElement.getPointAtLength')
+ @DocsEditable
Point getPointAtLength(num distance) native;
- @DocsEditable @DomName('SVGPathElement.getTotalLength')
+ @DomName('SVGPathElement.getTotalLength')
+ @DocsEditable
num getTotalLength() native;
// From SVGExternalResourcesRequired
- @DocsEditable @DomName('SVGPathElement.externalResourcesRequired')
+ @DomName('SVGPathElement.externalResourcesRequired')
+ @DocsEditable
final AnimatedBoolean externalResourcesRequired;
// From SVGLangSpace
- @DocsEditable @DomName('SVGPathElement.xmllang')
+ @DomName('SVGPathElement.xmllang')
+ @DocsEditable
String xmllang;
- @DocsEditable @DomName('SVGPathElement.xmlspace')
+ @DomName('SVGPathElement.xmlspace')
+ @DocsEditable
String xmlspace;
// From SVGLocatable
- @DocsEditable @DomName('SVGPathElement.farthestViewportElement')
+ @DomName('SVGPathElement.farthestViewportElement')
+ @DocsEditable
final SvgElement farthestViewportElement;
- @DocsEditable @DomName('SVGPathElement.nearestViewportElement')
+ @DomName('SVGPathElement.nearestViewportElement')
+ @DocsEditable
final SvgElement nearestViewportElement;
- @DocsEditable @DomName('SVGPathElement.getBBox')
+ @DomName('SVGPathElement.getBBox')
+ @DocsEditable
Rect getBBox() native;
@JSName('getCTM')
- @DocsEditable @DomName('SVGPathElement.getCTM')
+ @DomName('SVGPathElement.getCTM')
+ @DocsEditable
Matrix getCtm() native;
@JSName('getScreenCTM')
- @DocsEditable @DomName('SVGPathElement.getScreenCTM')
+ @DomName('SVGPathElement.getScreenCTM')
+ @DocsEditable
Matrix getScreenCtm() native;
- @DocsEditable @DomName('SVGPathElement.getTransformToElement')
+ @DomName('SVGPathElement.getTransformToElement')
+ @DocsEditable
Matrix getTransformToElement(SvgElement element) native;
// From SVGStylable
@@ -4059,26 +4715,32 @@
// Use implementation from Element.
// final CssStyleDeclaration style;
- @DocsEditable @DomName('SVGPathElement.getPresentationAttribute')
+ @DomName('SVGPathElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native;
// From SVGTests
- @DocsEditable @DomName('SVGPathElement.requiredExtensions')
+ @DomName('SVGPathElement.requiredExtensions')
+ @DocsEditable
final StringList requiredExtensions;
- @DocsEditable @DomName('SVGPathElement.requiredFeatures')
+ @DomName('SVGPathElement.requiredFeatures')
+ @DocsEditable
final StringList requiredFeatures;
- @DocsEditable @DomName('SVGPathElement.systemLanguage')
+ @DomName('SVGPathElement.systemLanguage')
+ @DocsEditable
final StringList systemLanguage;
- @DocsEditable @DomName('SVGPathElement.hasExtension')
+ @DomName('SVGPathElement.hasExtension')
+ @DocsEditable
bool hasExtension(String extension) native;
// From SVGTransformable
- @DocsEditable @DomName('SVGPathElement.transform')
+ @DomName('SVGPathElement.transform')
+ @DocsEditable
final AnimatedTransformList transform;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -4086,7 +4748,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGPathSeg')
class PathSeg native "*SVGPathSeg" {
@@ -4131,10 +4792,12 @@
static const int PATHSEG_UNKNOWN = 0;
- @DocsEditable @DomName('SVGPathSeg.pathSegType')
+ @DomName('SVGPathSeg.pathSegType')
+ @DocsEditable
final int pathSegType;
- @DocsEditable @DomName('SVGPathSeg.pathSegTypeAsLetter')
+ @DomName('SVGPathSeg.pathSegTypeAsLetter')
+ @DocsEditable
final String pathSegTypeAsLetter;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -4142,30 +4805,36 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGPathSegArcAbs')
class PathSegArcAbs extends PathSeg native "*SVGPathSegArcAbs" {
- @DocsEditable @DomName('SVGPathSegArcAbs.angle')
+ @DomName('SVGPathSegArcAbs.angle')
+ @DocsEditable
num angle;
- @DocsEditable @DomName('SVGPathSegArcAbs.largeArcFlag')
+ @DomName('SVGPathSegArcAbs.largeArcFlag')
+ @DocsEditable
bool largeArcFlag;
- @DocsEditable @DomName('SVGPathSegArcAbs.r1')
+ @DomName('SVGPathSegArcAbs.r1')
+ @DocsEditable
num r1;
- @DocsEditable @DomName('SVGPathSegArcAbs.r2')
+ @DomName('SVGPathSegArcAbs.r2')
+ @DocsEditable
num r2;
- @DocsEditable @DomName('SVGPathSegArcAbs.sweepFlag')
+ @DomName('SVGPathSegArcAbs.sweepFlag')
+ @DocsEditable
bool sweepFlag;
- @DocsEditable @DomName('SVGPathSegArcAbs.x')
+ @DomName('SVGPathSegArcAbs.x')
+ @DocsEditable
num x;
- @DocsEditable @DomName('SVGPathSegArcAbs.y')
+ @DomName('SVGPathSegArcAbs.y')
+ @DocsEditable
num y;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -4173,30 +4842,36 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGPathSegArcRel')
class PathSegArcRel extends PathSeg native "*SVGPathSegArcRel" {
- @DocsEditable @DomName('SVGPathSegArcRel.angle')
+ @DomName('SVGPathSegArcRel.angle')
+ @DocsEditable
num angle;
- @DocsEditable @DomName('SVGPathSegArcRel.largeArcFlag')
+ @DomName('SVGPathSegArcRel.largeArcFlag')
+ @DocsEditable
bool largeArcFlag;
- @DocsEditable @DomName('SVGPathSegArcRel.r1')
+ @DomName('SVGPathSegArcRel.r1')
+ @DocsEditable
num r1;
- @DocsEditable @DomName('SVGPathSegArcRel.r2')
+ @DomName('SVGPathSegArcRel.r2')
+ @DocsEditable
num r2;
- @DocsEditable @DomName('SVGPathSegArcRel.sweepFlag')
+ @DomName('SVGPathSegArcRel.sweepFlag')
+ @DocsEditable
bool sweepFlag;
- @DocsEditable @DomName('SVGPathSegArcRel.x')
+ @DomName('SVGPathSegArcRel.x')
+ @DocsEditable
num x;
- @DocsEditable @DomName('SVGPathSegArcRel.y')
+ @DomName('SVGPathSegArcRel.y')
+ @DocsEditable
num y;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -4204,7 +4879,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGPathSegClosePath')
class PathSegClosePath extends PathSeg native "*SVGPathSegClosePath" {
@@ -4214,27 +4888,32 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGPathSegCurvetoCubicAbs')
class PathSegCurvetoCubicAbs extends PathSeg native "*SVGPathSegCurvetoCubicAbs" {
- @DocsEditable @DomName('SVGPathSegCurvetoCubicAbs.x')
+ @DomName('SVGPathSegCurvetoCubicAbs.x')
+ @DocsEditable
num x;
- @DocsEditable @DomName('SVGPathSegCurvetoCubicAbs.x1')
+ @DomName('SVGPathSegCurvetoCubicAbs.x1')
+ @DocsEditable
num x1;
- @DocsEditable @DomName('SVGPathSegCurvetoCubicAbs.x2')
+ @DomName('SVGPathSegCurvetoCubicAbs.x2')
+ @DocsEditable
num x2;
- @DocsEditable @DomName('SVGPathSegCurvetoCubicAbs.y')
+ @DomName('SVGPathSegCurvetoCubicAbs.y')
+ @DocsEditable
num y;
- @DocsEditable @DomName('SVGPathSegCurvetoCubicAbs.y1')
+ @DomName('SVGPathSegCurvetoCubicAbs.y1')
+ @DocsEditable
num y1;
- @DocsEditable @DomName('SVGPathSegCurvetoCubicAbs.y2')
+ @DomName('SVGPathSegCurvetoCubicAbs.y2')
+ @DocsEditable
num y2;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -4242,27 +4921,32 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGPathSegCurvetoCubicRel')
class PathSegCurvetoCubicRel extends PathSeg native "*SVGPathSegCurvetoCubicRel" {
- @DocsEditable @DomName('SVGPathSegCurvetoCubicRel.x')
+ @DomName('SVGPathSegCurvetoCubicRel.x')
+ @DocsEditable
num x;
- @DocsEditable @DomName('SVGPathSegCurvetoCubicRel.x1')
+ @DomName('SVGPathSegCurvetoCubicRel.x1')
+ @DocsEditable
num x1;
- @DocsEditable @DomName('SVGPathSegCurvetoCubicRel.x2')
+ @DomName('SVGPathSegCurvetoCubicRel.x2')
+ @DocsEditable
num x2;
- @DocsEditable @DomName('SVGPathSegCurvetoCubicRel.y')
+ @DomName('SVGPathSegCurvetoCubicRel.y')
+ @DocsEditable
num y;
- @DocsEditable @DomName('SVGPathSegCurvetoCubicRel.y1')
+ @DomName('SVGPathSegCurvetoCubicRel.y1')
+ @DocsEditable
num y1;
- @DocsEditable @DomName('SVGPathSegCurvetoCubicRel.y2')
+ @DomName('SVGPathSegCurvetoCubicRel.y2')
+ @DocsEditable
num y2;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -4270,21 +4954,24 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGPathSegCurvetoCubicSmoothAbs')
class PathSegCurvetoCubicSmoothAbs extends PathSeg native "*SVGPathSegCurvetoCubicSmoothAbs" {
- @DocsEditable @DomName('SVGPathSegCurvetoCubicSmoothAbs.x')
+ @DomName('SVGPathSegCurvetoCubicSmoothAbs.x')
+ @DocsEditable
num x;
- @DocsEditable @DomName('SVGPathSegCurvetoCubicSmoothAbs.x2')
+ @DomName('SVGPathSegCurvetoCubicSmoothAbs.x2')
+ @DocsEditable
num x2;
- @DocsEditable @DomName('SVGPathSegCurvetoCubicSmoothAbs.y')
+ @DomName('SVGPathSegCurvetoCubicSmoothAbs.y')
+ @DocsEditable
num y;
- @DocsEditable @DomName('SVGPathSegCurvetoCubicSmoothAbs.y2')
+ @DomName('SVGPathSegCurvetoCubicSmoothAbs.y2')
+ @DocsEditable
num y2;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -4292,21 +4979,24 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGPathSegCurvetoCubicSmoothRel')
class PathSegCurvetoCubicSmoothRel extends PathSeg native "*SVGPathSegCurvetoCubicSmoothRel" {
- @DocsEditable @DomName('SVGPathSegCurvetoCubicSmoothRel.x')
+ @DomName('SVGPathSegCurvetoCubicSmoothRel.x')
+ @DocsEditable
num x;
- @DocsEditable @DomName('SVGPathSegCurvetoCubicSmoothRel.x2')
+ @DomName('SVGPathSegCurvetoCubicSmoothRel.x2')
+ @DocsEditable
num x2;
- @DocsEditable @DomName('SVGPathSegCurvetoCubicSmoothRel.y')
+ @DomName('SVGPathSegCurvetoCubicSmoothRel.y')
+ @DocsEditable
num y;
- @DocsEditable @DomName('SVGPathSegCurvetoCubicSmoothRel.y2')
+ @DomName('SVGPathSegCurvetoCubicSmoothRel.y2')
+ @DocsEditable
num y2;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -4314,21 +5004,24 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGPathSegCurvetoQuadraticAbs')
class PathSegCurvetoQuadraticAbs extends PathSeg native "*SVGPathSegCurvetoQuadraticAbs" {
- @DocsEditable @DomName('SVGPathSegCurvetoQuadraticAbs.x')
+ @DomName('SVGPathSegCurvetoQuadraticAbs.x')
+ @DocsEditable
num x;
- @DocsEditable @DomName('SVGPathSegCurvetoQuadraticAbs.x1')
+ @DomName('SVGPathSegCurvetoQuadraticAbs.x1')
+ @DocsEditable
num x1;
- @DocsEditable @DomName('SVGPathSegCurvetoQuadraticAbs.y')
+ @DomName('SVGPathSegCurvetoQuadraticAbs.y')
+ @DocsEditable
num y;
- @DocsEditable @DomName('SVGPathSegCurvetoQuadraticAbs.y1')
+ @DomName('SVGPathSegCurvetoQuadraticAbs.y1')
+ @DocsEditable
num y1;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -4336,21 +5029,24 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGPathSegCurvetoQuadraticRel')
class PathSegCurvetoQuadraticRel extends PathSeg native "*SVGPathSegCurvetoQuadraticRel" {
- @DocsEditable @DomName('SVGPathSegCurvetoQuadraticRel.x')
+ @DomName('SVGPathSegCurvetoQuadraticRel.x')
+ @DocsEditable
num x;
- @DocsEditable @DomName('SVGPathSegCurvetoQuadraticRel.x1')
+ @DomName('SVGPathSegCurvetoQuadraticRel.x1')
+ @DocsEditable
num x1;
- @DocsEditable @DomName('SVGPathSegCurvetoQuadraticRel.y')
+ @DomName('SVGPathSegCurvetoQuadraticRel.y')
+ @DocsEditable
num y;
- @DocsEditable @DomName('SVGPathSegCurvetoQuadraticRel.y1')
+ @DomName('SVGPathSegCurvetoQuadraticRel.y1')
+ @DocsEditable
num y1;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -4358,15 +5054,16 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGPathSegCurvetoQuadraticSmoothAbs')
class PathSegCurvetoQuadraticSmoothAbs extends PathSeg native "*SVGPathSegCurvetoQuadraticSmoothAbs" {
- @DocsEditable @DomName('SVGPathSegCurvetoQuadraticSmoothAbs.x')
+ @DomName('SVGPathSegCurvetoQuadraticSmoothAbs.x')
+ @DocsEditable
num x;
- @DocsEditable @DomName('SVGPathSegCurvetoQuadraticSmoothAbs.y')
+ @DomName('SVGPathSegCurvetoQuadraticSmoothAbs.y')
+ @DocsEditable
num y;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -4374,15 +5071,16 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGPathSegCurvetoQuadraticSmoothRel')
class PathSegCurvetoQuadraticSmoothRel extends PathSeg native "*SVGPathSegCurvetoQuadraticSmoothRel" {
- @DocsEditable @DomName('SVGPathSegCurvetoQuadraticSmoothRel.x')
+ @DomName('SVGPathSegCurvetoQuadraticSmoothRel.x')
+ @DocsEditable
num x;
- @DocsEditable @DomName('SVGPathSegCurvetoQuadraticSmoothRel.y')
+ @DomName('SVGPathSegCurvetoQuadraticSmoothRel.y')
+ @DocsEditable
num y;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -4390,15 +5088,16 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGPathSegLinetoAbs')
class PathSegLinetoAbs extends PathSeg native "*SVGPathSegLinetoAbs" {
- @DocsEditable @DomName('SVGPathSegLinetoAbs.x')
+ @DomName('SVGPathSegLinetoAbs.x')
+ @DocsEditable
num x;
- @DocsEditable @DomName('SVGPathSegLinetoAbs.y')
+ @DomName('SVGPathSegLinetoAbs.y')
+ @DocsEditable
num y;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -4406,12 +5105,12 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGPathSegLinetoHorizontalAbs')
class PathSegLinetoHorizontalAbs extends PathSeg native "*SVGPathSegLinetoHorizontalAbs" {
- @DocsEditable @DomName('SVGPathSegLinetoHorizontalAbs.x')
+ @DomName('SVGPathSegLinetoHorizontalAbs.x')
+ @DocsEditable
num x;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -4419,12 +5118,12 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGPathSegLinetoHorizontalRel')
class PathSegLinetoHorizontalRel extends PathSeg native "*SVGPathSegLinetoHorizontalRel" {
- @DocsEditable @DomName('SVGPathSegLinetoHorizontalRel.x')
+ @DomName('SVGPathSegLinetoHorizontalRel.x')
+ @DocsEditable
num x;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -4432,15 +5131,16 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGPathSegLinetoRel')
class PathSegLinetoRel extends PathSeg native "*SVGPathSegLinetoRel" {
- @DocsEditable @DomName('SVGPathSegLinetoRel.x')
+ @DomName('SVGPathSegLinetoRel.x')
+ @DocsEditable
num x;
- @DocsEditable @DomName('SVGPathSegLinetoRel.y')
+ @DomName('SVGPathSegLinetoRel.y')
+ @DocsEditable
num y;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -4448,12 +5148,12 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGPathSegLinetoVerticalAbs')
class PathSegLinetoVerticalAbs extends PathSeg native "*SVGPathSegLinetoVerticalAbs" {
- @DocsEditable @DomName('SVGPathSegLinetoVerticalAbs.y')
+ @DomName('SVGPathSegLinetoVerticalAbs.y')
+ @DocsEditable
num y;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -4461,12 +5161,12 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGPathSegLinetoVerticalRel')
class PathSegLinetoVerticalRel extends PathSeg native "*SVGPathSegLinetoVerticalRel" {
- @DocsEditable @DomName('SVGPathSegLinetoVerticalRel.y')
+ @DomName('SVGPathSegLinetoVerticalRel.y')
+ @DocsEditable
num y;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -4474,12 +5174,12 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGPathSegList')
class PathSegList implements JavaScriptIndexingBehavior, List<PathSeg> native "*SVGPathSegList" {
- @DocsEditable @DomName('SVGPathSegList.numberOfItems')
+ @DomName('SVGPathSegList.numberOfItems')
+ @DocsEditable
final int numberOfItems;
PathSeg operator[](int index) => JS("PathSeg", "#[#]", this, index);
@@ -4509,11 +5209,13 @@
void forEach(void f(PathSeg element)) => IterableMixinWorkaround.forEach(this, f);
- String join([String separator]) => IterableMixinWorkaround.joinList(this, separator);
+ String join([String separator]) =>
+ IterableMixinWorkaround.joinList(this, separator);
List mappedBy(f(PathSeg element)) => IterableMixinWorkaround.mappedByList(this, f);
- Iterable<PathSeg> where(bool f(PathSeg element)) => IterableMixinWorkaround.where(this, f);
+ Iterable<PathSeg> where(bool f(PathSeg element)) =>
+ IterableMixinWorkaround.where(this, f);
bool every(bool f(PathSeg element)) => IterableMixinWorkaround.every(this, f);
@@ -4573,6 +5275,9 @@
// clear() defined by IDL.
+ List<PathSeg> get reversed =>
+ new ReversedListView<PathSeg>(this, 0, null);
+
void sort([int compare(PathSeg a, PathSeg b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -4601,9 +5306,11 @@
throw new StateError("More than one element");
}
- PathSeg min([int compare(PathSeg a, PathSeg b)]) => IterableMixinWorkaround.min(this, compare);
+ PathSeg min([int compare(PathSeg a, PathSeg b)]) =>
+ IterableMixinWorkaround.min(this, compare);
- PathSeg max([int compare(PathSeg a, PathSeg b)]) => IterableMixinWorkaround.max(this, compare);
+ PathSeg max([int compare(PathSeg a, PathSeg b)]) =>
+ IterableMixinWorkaround.max(this, compare);
PathSeg removeAt(int pos) {
throw new UnsupportedError("Cannot remove from immutable List.");
@@ -4650,25 +5357,32 @@
// -- end List<PathSeg> mixins.
- @DocsEditable @DomName('SVGPathSegList.appendItem')
+ @DomName('SVGPathSegList.appendItem')
+ @DocsEditable
PathSeg appendItem(PathSeg newItem) native;
- @DocsEditable @DomName('SVGPathSegList.clear')
+ @DomName('SVGPathSegList.clear')
+ @DocsEditable
void clear() native;
- @DocsEditable @DomName('SVGPathSegList.getItem')
+ @DomName('SVGPathSegList.getItem')
+ @DocsEditable
PathSeg getItem(int index) native;
- @DocsEditable @DomName('SVGPathSegList.initialize')
+ @DomName('SVGPathSegList.initialize')
+ @DocsEditable
PathSeg initialize(PathSeg newItem) native;
- @DocsEditable @DomName('SVGPathSegList.insertItemBefore')
+ @DomName('SVGPathSegList.insertItemBefore')
+ @DocsEditable
PathSeg insertItemBefore(PathSeg newItem, int index) native;
- @DocsEditable @DomName('SVGPathSegList.removeItem')
+ @DomName('SVGPathSegList.removeItem')
+ @DocsEditable
PathSeg removeItem(int index) native;
- @DocsEditable @DomName('SVGPathSegList.replaceItem')
+ @DomName('SVGPathSegList.replaceItem')
+ @DocsEditable
PathSeg replaceItem(PathSeg newItem, int index) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -4676,15 +5390,16 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGPathSegMovetoAbs')
class PathSegMovetoAbs extends PathSeg native "*SVGPathSegMovetoAbs" {
- @DocsEditable @DomName('SVGPathSegMovetoAbs.x')
+ @DomName('SVGPathSegMovetoAbs.x')
+ @DocsEditable
num x;
- @DocsEditable @DomName('SVGPathSegMovetoAbs.y')
+ @DomName('SVGPathSegMovetoAbs.y')
+ @DocsEditable
num y;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -4692,15 +5407,16 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGPathSegMovetoRel')
class PathSegMovetoRel extends PathSeg native "*SVGPathSegMovetoRel" {
- @DocsEditable @DomName('SVGPathSegMovetoRel.x')
+ @DomName('SVGPathSegMovetoRel.x')
+ @DocsEditable
num x;
- @DocsEditable @DomName('SVGPathSegMovetoRel.y')
+ @DomName('SVGPathSegMovetoRel.y')
+ @DocsEditable
num y;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -4708,7 +5424,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGPatternElement')
class PatternElement extends SvgElement implements FitToViewBox, Tests, UriReference, Stylable, ExternalResourcesRequired, LangSpace native "*SVGPatternElement" {
@@ -4716,46 +5431,58 @@
@DocsEditable
factory PatternElement() => _SvgElementFactoryProvider.createSvgElement_tag("pattern");
- @DocsEditable @DomName('SVGPatternElement.height')
+ @DomName('SVGPatternElement.height')
+ @DocsEditable
final AnimatedLength height;
- @DocsEditable @DomName('SVGPatternElement.patternContentUnits')
+ @DomName('SVGPatternElement.patternContentUnits')
+ @DocsEditable
final AnimatedEnumeration patternContentUnits;
- @DocsEditable @DomName('SVGPatternElement.patternTransform')
+ @DomName('SVGPatternElement.patternTransform')
+ @DocsEditable
final AnimatedTransformList patternTransform;
- @DocsEditable @DomName('SVGPatternElement.patternUnits')
+ @DomName('SVGPatternElement.patternUnits')
+ @DocsEditable
final AnimatedEnumeration patternUnits;
- @DocsEditable @DomName('SVGPatternElement.width')
+ @DomName('SVGPatternElement.width')
+ @DocsEditable
final AnimatedLength width;
- @DocsEditable @DomName('SVGPatternElement.x')
+ @DomName('SVGPatternElement.x')
+ @DocsEditable
final AnimatedLength x;
- @DocsEditable @DomName('SVGPatternElement.y')
+ @DomName('SVGPatternElement.y')
+ @DocsEditable
final AnimatedLength y;
// From SVGExternalResourcesRequired
- @DocsEditable @DomName('SVGPatternElement.externalResourcesRequired')
+ @DomName('SVGPatternElement.externalResourcesRequired')
+ @DocsEditable
final AnimatedBoolean externalResourcesRequired;
// From SVGFitToViewBox
- @DocsEditable @DomName('SVGPatternElement.preserveAspectRatio')
+ @DomName('SVGPatternElement.preserveAspectRatio')
+ @DocsEditable
final AnimatedPreserveAspectRatio preserveAspectRatio;
- @DocsEditable @DomName('SVGPatternElement.viewBox')
+ @DomName('SVGPatternElement.viewBox')
+ @DocsEditable
final AnimatedRect viewBox;
// From SVGLangSpace
- @DocsEditable @DomName('SVGPatternElement.xmllang')
+ @DomName('SVGPatternElement.xmllang')
+ @DocsEditable
String xmllang;
- @DocsEditable @DomName('SVGPatternElement.xmlspace')
+ @DomName('SVGPatternElement.xmlspace')
+ @DocsEditable
String xmlspace;
// From SVGStylable
@@ -4766,26 +5493,32 @@
// Use implementation from Element.
// final CssStyleDeclaration style;
- @DocsEditable @DomName('SVGPatternElement.getPresentationAttribute')
+ @DomName('SVGPatternElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native;
// From SVGTests
- @DocsEditable @DomName('SVGPatternElement.requiredExtensions')
+ @DomName('SVGPatternElement.requiredExtensions')
+ @DocsEditable
final StringList requiredExtensions;
- @DocsEditable @DomName('SVGPatternElement.requiredFeatures')
+ @DomName('SVGPatternElement.requiredFeatures')
+ @DocsEditable
final StringList requiredFeatures;
- @DocsEditable @DomName('SVGPatternElement.systemLanguage')
+ @DomName('SVGPatternElement.systemLanguage')
+ @DocsEditable
final StringList systemLanguage;
- @DocsEditable @DomName('SVGPatternElement.hasExtension')
+ @DomName('SVGPatternElement.hasExtension')
+ @DocsEditable
bool hasExtension(String extension) native;
// From SVGURIReference
- @DocsEditable @DomName('SVGPatternElement.href')
+ @DomName('SVGPatternElement.href')
+ @DocsEditable
final AnimatedString href;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -4793,18 +5526,20 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGPoint')
class Point native "*SVGPoint" {
- @DocsEditable @DomName('SVGPoint.x')
+ @DomName('SVGPoint.x')
+ @DocsEditable
num x;
- @DocsEditable @DomName('SVGPoint.y')
+ @DomName('SVGPoint.y')
+ @DocsEditable
num y;
- @DocsEditable @DomName('SVGPoint.matrixTransform')
+ @DomName('SVGPoint.matrixTransform')
+ @DocsEditable
Point matrixTransform(Matrix matrix) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -4812,33 +5547,40 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGPointList')
class PointList native "*SVGPointList" {
- @DocsEditable @DomName('SVGPointList.numberOfItems')
+ @DomName('SVGPointList.numberOfItems')
+ @DocsEditable
final int numberOfItems;
- @DocsEditable @DomName('SVGPointList.appendItem')
+ @DomName('SVGPointList.appendItem')
+ @DocsEditable
Point appendItem(Point item) native;
- @DocsEditable @DomName('SVGPointList.clear')
+ @DomName('SVGPointList.clear')
+ @DocsEditable
void clear() native;
- @DocsEditable @DomName('SVGPointList.getItem')
+ @DomName('SVGPointList.getItem')
+ @DocsEditable
Point getItem(int index) native;
- @DocsEditable @DomName('SVGPointList.initialize')
+ @DomName('SVGPointList.initialize')
+ @DocsEditable
Point initialize(Point item) native;
- @DocsEditable @DomName('SVGPointList.insertItemBefore')
+ @DomName('SVGPointList.insertItemBefore')
+ @DocsEditable
Point insertItemBefore(Point item, int index) native;
- @DocsEditable @DomName('SVGPointList.removeItem')
+ @DomName('SVGPointList.removeItem')
+ @DocsEditable
Point removeItem(int index) native;
- @DocsEditable @DomName('SVGPointList.replaceItem')
+ @DomName('SVGPointList.replaceItem')
+ @DocsEditable
Point replaceItem(Point item, int index) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -4846,7 +5588,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGPolygonElement')
class PolygonElement extends SvgElement implements Transformable, Tests, Stylable, ExternalResourcesRequired, LangSpace native "*SVGPolygonElement" {
@@ -4854,45 +5595,56 @@
@DocsEditable
factory PolygonElement() => _SvgElementFactoryProvider.createSvgElement_tag("polygon");
- @DocsEditable @DomName('SVGPolygonElement.animatedPoints')
+ @DomName('SVGPolygonElement.animatedPoints')
+ @DocsEditable
final PointList animatedPoints;
- @DocsEditable @DomName('SVGPolygonElement.points')
+ @DomName('SVGPolygonElement.points')
+ @DocsEditable
final PointList points;
// From SVGExternalResourcesRequired
- @DocsEditable @DomName('SVGPolygonElement.externalResourcesRequired')
+ @DomName('SVGPolygonElement.externalResourcesRequired')
+ @DocsEditable
final AnimatedBoolean externalResourcesRequired;
// From SVGLangSpace
- @DocsEditable @DomName('SVGPolygonElement.xmllang')
+ @DomName('SVGPolygonElement.xmllang')
+ @DocsEditable
String xmllang;
- @DocsEditable @DomName('SVGPolygonElement.xmlspace')
+ @DomName('SVGPolygonElement.xmlspace')
+ @DocsEditable
String xmlspace;
// From SVGLocatable
- @DocsEditable @DomName('SVGPolygonElement.farthestViewportElement')
+ @DomName('SVGPolygonElement.farthestViewportElement')
+ @DocsEditable
final SvgElement farthestViewportElement;
- @DocsEditable @DomName('SVGPolygonElement.nearestViewportElement')
+ @DomName('SVGPolygonElement.nearestViewportElement')
+ @DocsEditable
final SvgElement nearestViewportElement;
- @DocsEditable @DomName('SVGPolygonElement.getBBox')
+ @DomName('SVGPolygonElement.getBBox')
+ @DocsEditable
Rect getBBox() native;
@JSName('getCTM')
- @DocsEditable @DomName('SVGPolygonElement.getCTM')
+ @DomName('SVGPolygonElement.getCTM')
+ @DocsEditable
Matrix getCtm() native;
@JSName('getScreenCTM')
- @DocsEditable @DomName('SVGPolygonElement.getScreenCTM')
+ @DomName('SVGPolygonElement.getScreenCTM')
+ @DocsEditable
Matrix getScreenCtm() native;
- @DocsEditable @DomName('SVGPolygonElement.getTransformToElement')
+ @DomName('SVGPolygonElement.getTransformToElement')
+ @DocsEditable
Matrix getTransformToElement(SvgElement element) native;
// From SVGStylable
@@ -4903,26 +5655,32 @@
// Use implementation from Element.
// final CssStyleDeclaration style;
- @DocsEditable @DomName('SVGPolygonElement.getPresentationAttribute')
+ @DomName('SVGPolygonElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native;
// From SVGTests
- @DocsEditable @DomName('SVGPolygonElement.requiredExtensions')
+ @DomName('SVGPolygonElement.requiredExtensions')
+ @DocsEditable
final StringList requiredExtensions;
- @DocsEditable @DomName('SVGPolygonElement.requiredFeatures')
+ @DomName('SVGPolygonElement.requiredFeatures')
+ @DocsEditable
final StringList requiredFeatures;
- @DocsEditable @DomName('SVGPolygonElement.systemLanguage')
+ @DomName('SVGPolygonElement.systemLanguage')
+ @DocsEditable
final StringList systemLanguage;
- @DocsEditable @DomName('SVGPolygonElement.hasExtension')
+ @DomName('SVGPolygonElement.hasExtension')
+ @DocsEditable
bool hasExtension(String extension) native;
// From SVGTransformable
- @DocsEditable @DomName('SVGPolygonElement.transform')
+ @DomName('SVGPolygonElement.transform')
+ @DocsEditable
final AnimatedTransformList transform;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -4930,7 +5688,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGPolylineElement')
class PolylineElement extends SvgElement implements Transformable, Tests, Stylable, ExternalResourcesRequired, LangSpace native "*SVGPolylineElement" {
@@ -4938,45 +5695,56 @@
@DocsEditable
factory PolylineElement() => _SvgElementFactoryProvider.createSvgElement_tag("polyline");
- @DocsEditable @DomName('SVGPolylineElement.animatedPoints')
+ @DomName('SVGPolylineElement.animatedPoints')
+ @DocsEditable
final PointList animatedPoints;
- @DocsEditable @DomName('SVGPolylineElement.points')
+ @DomName('SVGPolylineElement.points')
+ @DocsEditable
final PointList points;
// From SVGExternalResourcesRequired
- @DocsEditable @DomName('SVGPolylineElement.externalResourcesRequired')
+ @DomName('SVGPolylineElement.externalResourcesRequired')
+ @DocsEditable
final AnimatedBoolean externalResourcesRequired;
// From SVGLangSpace
- @DocsEditable @DomName('SVGPolylineElement.xmllang')
+ @DomName('SVGPolylineElement.xmllang')
+ @DocsEditable
String xmllang;
- @DocsEditable @DomName('SVGPolylineElement.xmlspace')
+ @DomName('SVGPolylineElement.xmlspace')
+ @DocsEditable
String xmlspace;
// From SVGLocatable
- @DocsEditable @DomName('SVGPolylineElement.farthestViewportElement')
+ @DomName('SVGPolylineElement.farthestViewportElement')
+ @DocsEditable
final SvgElement farthestViewportElement;
- @DocsEditable @DomName('SVGPolylineElement.nearestViewportElement')
+ @DomName('SVGPolylineElement.nearestViewportElement')
+ @DocsEditable
final SvgElement nearestViewportElement;
- @DocsEditable @DomName('SVGPolylineElement.getBBox')
+ @DomName('SVGPolylineElement.getBBox')
+ @DocsEditable
Rect getBBox() native;
@JSName('getCTM')
- @DocsEditable @DomName('SVGPolylineElement.getCTM')
+ @DomName('SVGPolylineElement.getCTM')
+ @DocsEditable
Matrix getCtm() native;
@JSName('getScreenCTM')
- @DocsEditable @DomName('SVGPolylineElement.getScreenCTM')
+ @DomName('SVGPolylineElement.getScreenCTM')
+ @DocsEditable
Matrix getScreenCtm() native;
- @DocsEditable @DomName('SVGPolylineElement.getTransformToElement')
+ @DomName('SVGPolylineElement.getTransformToElement')
+ @DocsEditable
Matrix getTransformToElement(SvgElement element) native;
// From SVGStylable
@@ -4987,26 +5755,32 @@
// Use implementation from Element.
// final CssStyleDeclaration style;
- @DocsEditable @DomName('SVGPolylineElement.getPresentationAttribute')
+ @DomName('SVGPolylineElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native;
// From SVGTests
- @DocsEditable @DomName('SVGPolylineElement.requiredExtensions')
+ @DomName('SVGPolylineElement.requiredExtensions')
+ @DocsEditable
final StringList requiredExtensions;
- @DocsEditable @DomName('SVGPolylineElement.requiredFeatures')
+ @DomName('SVGPolylineElement.requiredFeatures')
+ @DocsEditable
final StringList requiredFeatures;
- @DocsEditable @DomName('SVGPolylineElement.systemLanguage')
+ @DomName('SVGPolylineElement.systemLanguage')
+ @DocsEditable
final StringList systemLanguage;
- @DocsEditable @DomName('SVGPolylineElement.hasExtension')
+ @DomName('SVGPolylineElement.hasExtension')
+ @DocsEditable
bool hasExtension(String extension) native;
// From SVGTransformable
- @DocsEditable @DomName('SVGPolylineElement.transform')
+ @DomName('SVGPolylineElement.transform')
+ @DocsEditable
final AnimatedTransformList transform;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -5014,7 +5788,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGPreserveAspectRatio')
class PreserveAspectRatio native "*SVGPreserveAspectRatio" {
@@ -5047,10 +5820,12 @@
static const int SVG_PRESERVEASPECTRATIO_XMINYMIN = 2;
- @DocsEditable @DomName('SVGPreserveAspectRatio.align')
+ @DomName('SVGPreserveAspectRatio.align')
+ @DocsEditable
int align;
- @DocsEditable @DomName('SVGPreserveAspectRatio.meetOrSlice')
+ @DomName('SVGPreserveAspectRatio.meetOrSlice')
+ @DocsEditable
int meetOrSlice;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -5058,7 +5833,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGRadialGradientElement')
class RadialGradientElement extends GradientElement native "*SVGRadialGradientElement" {
@@ -5066,22 +5840,28 @@
@DocsEditable
factory RadialGradientElement() => _SvgElementFactoryProvider.createSvgElement_tag("radialGradient");
- @DocsEditable @DomName('SVGRadialGradientElement.cx')
+ @DomName('SVGRadialGradientElement.cx')
+ @DocsEditable
final AnimatedLength cx;
- @DocsEditable @DomName('SVGRadialGradientElement.cy')
+ @DomName('SVGRadialGradientElement.cy')
+ @DocsEditable
final AnimatedLength cy;
- @DocsEditable @DomName('SVGRadialGradientElement.fr')
+ @DomName('SVGRadialGradientElement.fr')
+ @DocsEditable
final AnimatedLength fr;
- @DocsEditable @DomName('SVGRadialGradientElement.fx')
+ @DomName('SVGRadialGradientElement.fx')
+ @DocsEditable
final AnimatedLength fx;
- @DocsEditable @DomName('SVGRadialGradientElement.fy')
+ @DomName('SVGRadialGradientElement.fy')
+ @DocsEditable
final AnimatedLength fy;
- @DocsEditable @DomName('SVGRadialGradientElement.r')
+ @DomName('SVGRadialGradientElement.r')
+ @DocsEditable
final AnimatedLength r;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -5089,21 +5869,24 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGRect')
class Rect native "*SVGRect" {
- @DocsEditable @DomName('SVGRect.height')
+ @DomName('SVGRect.height')
+ @DocsEditable
num height;
- @DocsEditable @DomName('SVGRect.width')
+ @DomName('SVGRect.width')
+ @DocsEditable
num width;
- @DocsEditable @DomName('SVGRect.x')
+ @DomName('SVGRect.x')
+ @DocsEditable
num x;
- @DocsEditable @DomName('SVGRect.y')
+ @DomName('SVGRect.y')
+ @DocsEditable
num y;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -5111,7 +5894,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGRectElement')
class RectElement extends SvgElement implements Transformable, Tests, Stylable, ExternalResourcesRequired, LangSpace native "*SVGRectElement" {
@@ -5119,57 +5901,72 @@
@DocsEditable
factory RectElement() => _SvgElementFactoryProvider.createSvgElement_tag("rect");
- @DocsEditable @DomName('SVGRectElement.height')
+ @DomName('SVGRectElement.height')
+ @DocsEditable
final AnimatedLength height;
- @DocsEditable @DomName('SVGRectElement.rx')
+ @DomName('SVGRectElement.rx')
+ @DocsEditable
final AnimatedLength rx;
- @DocsEditable @DomName('SVGRectElement.ry')
+ @DomName('SVGRectElement.ry')
+ @DocsEditable
final AnimatedLength ry;
- @DocsEditable @DomName('SVGRectElement.width')
+ @DomName('SVGRectElement.width')
+ @DocsEditable
final AnimatedLength width;
- @DocsEditable @DomName('SVGRectElement.x')
+ @DomName('SVGRectElement.x')
+ @DocsEditable
final AnimatedLength x;
- @DocsEditable @DomName('SVGRectElement.y')
+ @DomName('SVGRectElement.y')
+ @DocsEditable
final AnimatedLength y;
// From SVGExternalResourcesRequired
- @DocsEditable @DomName('SVGRectElement.externalResourcesRequired')
+ @DomName('SVGRectElement.externalResourcesRequired')
+ @DocsEditable
final AnimatedBoolean externalResourcesRequired;
// From SVGLangSpace
- @DocsEditable @DomName('SVGRectElement.xmllang')
+ @DomName('SVGRectElement.xmllang')
+ @DocsEditable
String xmllang;
- @DocsEditable @DomName('SVGRectElement.xmlspace')
+ @DomName('SVGRectElement.xmlspace')
+ @DocsEditable
String xmlspace;
// From SVGLocatable
- @DocsEditable @DomName('SVGRectElement.farthestViewportElement')
+ @DomName('SVGRectElement.farthestViewportElement')
+ @DocsEditable
final SvgElement farthestViewportElement;
- @DocsEditable @DomName('SVGRectElement.nearestViewportElement')
+ @DomName('SVGRectElement.nearestViewportElement')
+ @DocsEditable
final SvgElement nearestViewportElement;
- @DocsEditable @DomName('SVGRectElement.getBBox')
+ @DomName('SVGRectElement.getBBox')
+ @DocsEditable
Rect getBBox() native;
@JSName('getCTM')
- @DocsEditable @DomName('SVGRectElement.getCTM')
+ @DomName('SVGRectElement.getCTM')
+ @DocsEditable
Matrix getCtm() native;
@JSName('getScreenCTM')
- @DocsEditable @DomName('SVGRectElement.getScreenCTM')
+ @DomName('SVGRectElement.getScreenCTM')
+ @DocsEditable
Matrix getScreenCtm() native;
- @DocsEditable @DomName('SVGRectElement.getTransformToElement')
+ @DomName('SVGRectElement.getTransformToElement')
+ @DocsEditable
Matrix getTransformToElement(SvgElement element) native;
// From SVGStylable
@@ -5180,26 +5977,32 @@
// Use implementation from Element.
// final CssStyleDeclaration style;
- @DocsEditable @DomName('SVGRectElement.getPresentationAttribute')
+ @DomName('SVGRectElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native;
// From SVGTests
- @DocsEditable @DomName('SVGRectElement.requiredExtensions')
+ @DomName('SVGRectElement.requiredExtensions')
+ @DocsEditable
final StringList requiredExtensions;
- @DocsEditable @DomName('SVGRectElement.requiredFeatures')
+ @DomName('SVGRectElement.requiredFeatures')
+ @DocsEditable
final StringList requiredFeatures;
- @DocsEditable @DomName('SVGRectElement.systemLanguage')
+ @DomName('SVGRectElement.systemLanguage')
+ @DocsEditable
final StringList systemLanguage;
- @DocsEditable @DomName('SVGRectElement.hasExtension')
+ @DomName('SVGRectElement.hasExtension')
+ @DocsEditable
bool hasExtension(String extension) native;
// From SVGTransformable
- @DocsEditable @DomName('SVGRectElement.transform')
+ @DomName('SVGRectElement.transform')
+ @DocsEditable
final AnimatedTransformList transform;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -5207,7 +6010,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGRenderingIntent')
class RenderingIntent native "*SVGRenderingIntent" {
@@ -5229,7 +6031,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGScriptElement')
class ScriptElement extends SvgElement implements UriReference, ExternalResourcesRequired native "*SVGScriptElement" {
@@ -5237,17 +6038,20 @@
@DocsEditable
factory ScriptElement() => _SvgElementFactoryProvider.createSvgElement_tag("script");
- @DocsEditable @DomName('SVGScriptElement.type')
+ @DomName('SVGScriptElement.type')
+ @DocsEditable
String type;
// From SVGExternalResourcesRequired
- @DocsEditable @DomName('SVGScriptElement.externalResourcesRequired')
+ @DomName('SVGScriptElement.externalResourcesRequired')
+ @DocsEditable
final AnimatedBoolean externalResourcesRequired;
// From SVGURIReference
- @DocsEditable @DomName('SVGScriptElement.href')
+ @DomName('SVGScriptElement.href')
+ @DocsEditable
final AnimatedString href;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -5255,7 +6059,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGSetElement')
class SetElement extends AnimationElement native "*SVGSetElement" {
@@ -5268,7 +6071,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGStopElement')
class StopElement extends SvgElement implements Stylable native "*SVGStopElement" {
@@ -5276,7 +6078,8 @@
@DocsEditable
factory StopElement() => _SvgElementFactoryProvider.createSvgElement_tag("stop");
- @DocsEditable @DomName('SVGStopElement.offset')
+ @DomName('SVGStopElement.offset')
+ @DocsEditable
final AnimatedNumber offset;
// From SVGStylable
@@ -5287,7 +6090,8 @@
// Use implementation from Element.
// final CssStyleDeclaration style;
- @DocsEditable @DomName('SVGStopElement.getPresentationAttribute')
+ @DomName('SVGStopElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -5295,12 +6099,12 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGStringList')
class StringList implements JavaScriptIndexingBehavior, List<String> native "*SVGStringList" {
- @DocsEditable @DomName('SVGStringList.numberOfItems')
+ @DomName('SVGStringList.numberOfItems')
+ @DocsEditable
final int numberOfItems;
String operator[](int index) => JS("String", "#[#]", this, index);
@@ -5330,11 +6134,13 @@
void forEach(void f(String element)) => IterableMixinWorkaround.forEach(this, f);
- String join([String separator]) => IterableMixinWorkaround.joinList(this, separator);
+ String join([String separator]) =>
+ IterableMixinWorkaround.joinList(this, separator);
List mappedBy(f(String element)) => IterableMixinWorkaround.mappedByList(this, f);
- Iterable<String> where(bool f(String element)) => IterableMixinWorkaround.where(this, f);
+ Iterable<String> where(bool f(String element)) =>
+ IterableMixinWorkaround.where(this, f);
bool every(bool f(String element)) => IterableMixinWorkaround.every(this, f);
@@ -5394,6 +6200,9 @@
// clear() defined by IDL.
+ List<String> get reversed =>
+ new ReversedListView<String>(this, 0, null);
+
void sort([int compare(String a, String b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -5422,9 +6231,11 @@
throw new StateError("More than one element");
}
- String min([int compare(String a, String b)]) => IterableMixinWorkaround.min(this, compare);
+ String min([int compare(String a, String b)]) =>
+ IterableMixinWorkaround.min(this, compare);
- String max([int compare(String a, String b)]) => IterableMixinWorkaround.max(this, compare);
+ String max([int compare(String a, String b)]) =>
+ IterableMixinWorkaround.max(this, compare);
String removeAt(int pos) {
throw new UnsupportedError("Cannot remove from immutable List.");
@@ -5471,25 +6282,32 @@
// -- end List<String> mixins.
- @DocsEditable @DomName('SVGStringList.appendItem')
+ @DomName('SVGStringList.appendItem')
+ @DocsEditable
String appendItem(String item) native;
- @DocsEditable @DomName('SVGStringList.clear')
+ @DomName('SVGStringList.clear')
+ @DocsEditable
void clear() native;
- @DocsEditable @DomName('SVGStringList.getItem')
+ @DomName('SVGStringList.getItem')
+ @DocsEditable
String getItem(int index) native;
- @DocsEditable @DomName('SVGStringList.initialize')
+ @DomName('SVGStringList.initialize')
+ @DocsEditable
String initialize(String item) native;
- @DocsEditable @DomName('SVGStringList.insertItemBefore')
+ @DomName('SVGStringList.insertItemBefore')
+ @DocsEditable
String insertItemBefore(String item, int index) native;
- @DocsEditable @DomName('SVGStringList.removeItem')
+ @DomName('SVGStringList.removeItem')
+ @DocsEditable
String removeItem(int index) native;
- @DocsEditable @DomName('SVGStringList.replaceItem')
+ @DomName('SVGStringList.replaceItem')
+ @DocsEditable
String replaceItem(String item, int index) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -5497,7 +6315,6 @@
// BSD-style license that can be found in the LICENSE file.
-@DocsEditable
@DomName('SVGStylable')
abstract class Stylable {
@@ -5512,7 +6329,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGStyleElement')
class StyleElement extends SvgElement implements LangSpace native "*SVGStyleElement" {
@@ -5520,10 +6336,12 @@
@DocsEditable
factory StyleElement() => _SvgElementFactoryProvider.createSvgElement_tag("style");
- @DocsEditable @DomName('SVGStyleElement.disabled')
+ @DomName('SVGStyleElement.disabled')
+ @DocsEditable
bool disabled;
- @DocsEditable @DomName('SVGStyleElement.media')
+ @DomName('SVGStyleElement.media')
+ @DocsEditable
String media;
// Shadowing definition.
@@ -5533,15 +6351,18 @@
JS("void", "#.title = #", this, value);
}
- @DocsEditable @DomName('SVGStyleElement.type')
+ @DomName('SVGStyleElement.type')
+ @DocsEditable
String type;
// From SVGLangSpace
- @DocsEditable @DomName('SVGStyleElement.xmllang')
+ @DomName('SVGStyleElement.xmllang')
+ @DocsEditable
String xmllang;
- @DocsEditable @DomName('SVGStyleElement.xmlspace')
+ @DomName('SVGStyleElement.xmlspace')
+ @DocsEditable
String xmlspace;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -5549,16 +6370,17 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGDocument')
class SvgDocument extends Document native "*SVGDocument" {
- @DocsEditable @DomName('SVGDocument.rootElement')
+ @DomName('SVGDocument.rootElement')
+ @DocsEditable
final SvgSvgElement rootElement;
@JSName('createEvent')
- @DocsEditable @DomName('SVGDocument.createEvent')
+ @DomName('SVGDocument.createEvent')
+ @DocsEditable
Event $dom_createEvent(String eventType) native;
}
// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
@@ -5593,7 +6415,6 @@
}
}
-@DocsEditable
@DomName('SVGElement')
class SvgElement extends Element native "*SVGElement" {
factory SvgElement.tag(String tag) =>
@@ -5684,13 +6505,16 @@
}
@JSName('ownerSVGElement')
- @DocsEditable @DomName('SVGElement.ownerSVGElement')
+ @DomName('SVGElement.ownerSVGElement')
+ @DocsEditable
final SvgSvgElement ownerSvgElement;
- @DocsEditable @DomName('SVGElement.viewportElement')
+ @DomName('SVGElement.viewportElement')
+ @DocsEditable
final SvgElement viewportElement;
- @DocsEditable @DomName('SVGElement.xmlbase')
+ @DomName('SVGElement.xmlbase')
+ @DocsEditable
String xmlbase;
}
@@ -5699,7 +6523,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGException')
class SvgException native "*SVGException" {
@@ -5710,16 +6533,20 @@
static const int SVG_WRONG_TYPE_ERR = 0;
- @DocsEditable @DomName('SVGException.code')
+ @DomName('SVGException.code')
+ @DocsEditable
final int code;
- @DocsEditable @DomName('SVGException.message')
+ @DomName('SVGException.message')
+ @DocsEditable
final String message;
- @DocsEditable @DomName('SVGException.name')
+ @DomName('SVGException.name')
+ @DocsEditable
final String name;
- @DocsEditable @DomName('SVGException.toString')
+ @DomName('SVGException.toString')
+ @DocsEditable
String toString() native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -5727,177 +6554,227 @@
// BSD-style license that can be found in the LICENSE file.
-@DocsEditable
@DomName('SVGSVGElement')
class SvgSvgElement extends SvgElement implements FitToViewBox, Tests, Stylable, Locatable, ExternalResourcesRequired, ZoomAndPan, LangSpace native "*SVGSVGElement" {
factory SvgSvgElement() => _SvgSvgElementFactoryProvider.createSvgSvgElement();
- @DocsEditable @DomName('SVGSVGElement.contentScriptType')
+ @DomName('SVGSVGElement.contentScriptType')
+ @DocsEditable
String contentScriptType;
- @DocsEditable @DomName('SVGSVGElement.contentStyleType')
+ @DomName('SVGSVGElement.contentStyleType')
+ @DocsEditable
String contentStyleType;
- @DocsEditable @DomName('SVGSVGElement.currentScale')
+ @DomName('SVGSVGElement.currentScale')
+ @DocsEditable
num currentScale;
- @DocsEditable @DomName('SVGSVGElement.currentTranslate')
+ @DomName('SVGSVGElement.currentTranslate')
+ @DocsEditable
final Point currentTranslate;
- @DocsEditable @DomName('SVGSVGElement.currentView')
+ @DomName('SVGSVGElement.currentView')
+ @DocsEditable
final ViewSpec currentView;
- @DocsEditable @DomName('SVGSVGElement.height')
+ @DomName('SVGSVGElement.height')
+ @DocsEditable
final AnimatedLength height;
- @DocsEditable @DomName('SVGSVGElement.pixelUnitToMillimeterX')
+ @DomName('SVGSVGElement.pixelUnitToMillimeterX')
+ @DocsEditable
final num pixelUnitToMillimeterX;
- @DocsEditable @DomName('SVGSVGElement.pixelUnitToMillimeterY')
+ @DomName('SVGSVGElement.pixelUnitToMillimeterY')
+ @DocsEditable
final num pixelUnitToMillimeterY;
- @DocsEditable @DomName('SVGSVGElement.screenPixelToMillimeterX')
+ @DomName('SVGSVGElement.screenPixelToMillimeterX')
+ @DocsEditable
final num screenPixelToMillimeterX;
- @DocsEditable @DomName('SVGSVGElement.screenPixelToMillimeterY')
+ @DomName('SVGSVGElement.screenPixelToMillimeterY')
+ @DocsEditable
final num screenPixelToMillimeterY;
- @DocsEditable @DomName('SVGSVGElement.useCurrentView')
+ @DomName('SVGSVGElement.useCurrentView')
+ @DocsEditable
final bool useCurrentView;
- @DocsEditable @DomName('SVGSVGElement.viewport')
+ @DomName('SVGSVGElement.viewport')
+ @DocsEditable
final Rect viewport;
- @DocsEditable @DomName('SVGSVGElement.width')
+ @DomName('SVGSVGElement.width')
+ @DocsEditable
final AnimatedLength width;
- @DocsEditable @DomName('SVGSVGElement.x')
+ @DomName('SVGSVGElement.x')
+ @DocsEditable
final AnimatedLength x;
- @DocsEditable @DomName('SVGSVGElement.y')
+ @DomName('SVGSVGElement.y')
+ @DocsEditable
final AnimatedLength y;
- @DocsEditable @DomName('SVGSVGElement.animationsPaused')
+ @DomName('SVGSVGElement.animationsPaused')
+ @DocsEditable
bool animationsPaused() native;
- @DocsEditable @DomName('SVGSVGElement.checkEnclosure')
+ @DomName('SVGSVGElement.checkEnclosure')
+ @DocsEditable
bool checkEnclosure(SvgElement element, Rect rect) native;
- @DocsEditable @DomName('SVGSVGElement.checkIntersection')
+ @DomName('SVGSVGElement.checkIntersection')
+ @DocsEditable
bool checkIntersection(SvgElement element, Rect rect) native;
@JSName('createSVGAngle')
- @DocsEditable @DomName('SVGSVGElement.createSVGAngle')
+ @DomName('SVGSVGElement.createSVGAngle')
+ @DocsEditable
Angle createSvgAngle() native;
@JSName('createSVGLength')
- @DocsEditable @DomName('SVGSVGElement.createSVGLength')
+ @DomName('SVGSVGElement.createSVGLength')
+ @DocsEditable
Length createSvgLength() native;
@JSName('createSVGMatrix')
- @DocsEditable @DomName('SVGSVGElement.createSVGMatrix')
+ @DomName('SVGSVGElement.createSVGMatrix')
+ @DocsEditable
Matrix createSvgMatrix() native;
@JSName('createSVGNumber')
- @DocsEditable @DomName('SVGSVGElement.createSVGNumber')
+ @DomName('SVGSVGElement.createSVGNumber')
+ @DocsEditable
Number createSvgNumber() native;
@JSName('createSVGPoint')
- @DocsEditable @DomName('SVGSVGElement.createSVGPoint')
+ @DomName('SVGSVGElement.createSVGPoint')
+ @DocsEditable
Point createSvgPoint() native;
@JSName('createSVGRect')
- @DocsEditable @DomName('SVGSVGElement.createSVGRect')
+ @DomName('SVGSVGElement.createSVGRect')
+ @DocsEditable
Rect createSvgRect() native;
@JSName('createSVGTransform')
- @DocsEditable @DomName('SVGSVGElement.createSVGTransform')
+ @DomName('SVGSVGElement.createSVGTransform')
+ @DocsEditable
Transform createSvgTransform() native;
@JSName('createSVGTransformFromMatrix')
- @DocsEditable @DomName('SVGSVGElement.createSVGTransformFromMatrix')
+ @DomName('SVGSVGElement.createSVGTransformFromMatrix')
+ @DocsEditable
Transform createSvgTransformFromMatrix(Matrix matrix) native;
- @DocsEditable @DomName('SVGSVGElement.deselectAll')
+ @DomName('SVGSVGElement.deselectAll')
+ @DocsEditable
void deselectAll() native;
- @DocsEditable @DomName('SVGSVGElement.forceRedraw')
+ @DomName('SVGSVGElement.forceRedraw')
+ @DocsEditable
void forceRedraw() native;
- @DocsEditable @DomName('SVGSVGElement.getCurrentTime')
+ @DomName('SVGSVGElement.getCurrentTime')
+ @DocsEditable
num getCurrentTime() native;
- @DocsEditable @DomName('SVGSVGElement.getElementById')
+ @DomName('SVGSVGElement.getElementById')
+ @DocsEditable
Element getElementById(String elementId) native;
- @DocsEditable @DomName('SVGSVGElement.getEnclosureList')
- @Returns('NodeList') @Creates('NodeList')
+ @DomName('SVGSVGElement.getEnclosureList')
+ @DocsEditable
+ @Returns('NodeList')
+ @Creates('NodeList')
List<Node> getEnclosureList(Rect rect, SvgElement referenceElement) native;
- @DocsEditable @DomName('SVGSVGElement.getIntersectionList')
- @Returns('NodeList') @Creates('NodeList')
+ @DomName('SVGSVGElement.getIntersectionList')
+ @DocsEditable
+ @Returns('NodeList')
+ @Creates('NodeList')
List<Node> getIntersectionList(Rect rect, SvgElement referenceElement) native;
- @DocsEditable @DomName('SVGSVGElement.pauseAnimations')
+ @DomName('SVGSVGElement.pauseAnimations')
+ @DocsEditable
void pauseAnimations() native;
- @DocsEditable @DomName('SVGSVGElement.setCurrentTime')
+ @DomName('SVGSVGElement.setCurrentTime')
+ @DocsEditable
void setCurrentTime(num seconds) native;
- @DocsEditable @DomName('SVGSVGElement.suspendRedraw')
+ @DomName('SVGSVGElement.suspendRedraw')
+ @DocsEditable
int suspendRedraw(int maxWaitMilliseconds) native;
- @DocsEditable @DomName('SVGSVGElement.unpauseAnimations')
+ @DomName('SVGSVGElement.unpauseAnimations')
+ @DocsEditable
void unpauseAnimations() native;
- @DocsEditable @DomName('SVGSVGElement.unsuspendRedraw')
+ @DomName('SVGSVGElement.unsuspendRedraw')
+ @DocsEditable
void unsuspendRedraw(int suspendHandleId) native;
- @DocsEditable @DomName('SVGSVGElement.unsuspendRedrawAll')
+ @DomName('SVGSVGElement.unsuspendRedrawAll')
+ @DocsEditable
void unsuspendRedrawAll() native;
// From SVGExternalResourcesRequired
- @DocsEditable @DomName('SVGSVGElement.externalResourcesRequired')
+ @DomName('SVGSVGElement.externalResourcesRequired')
+ @DocsEditable
final AnimatedBoolean externalResourcesRequired;
// From SVGFitToViewBox
- @DocsEditable @DomName('SVGSVGElement.preserveAspectRatio')
+ @DomName('SVGSVGElement.preserveAspectRatio')
+ @DocsEditable
final AnimatedPreserveAspectRatio preserveAspectRatio;
- @DocsEditable @DomName('SVGSVGElement.viewBox')
+ @DomName('SVGSVGElement.viewBox')
+ @DocsEditable
final AnimatedRect viewBox;
// From SVGLangSpace
- @DocsEditable @DomName('SVGSVGElement.xmllang')
+ @DomName('SVGSVGElement.xmllang')
+ @DocsEditable
String xmllang;
- @DocsEditable @DomName('SVGSVGElement.xmlspace')
+ @DomName('SVGSVGElement.xmlspace')
+ @DocsEditable
String xmlspace;
// From SVGLocatable
- @DocsEditable @DomName('SVGSVGElement.farthestViewportElement')
+ @DomName('SVGSVGElement.farthestViewportElement')
+ @DocsEditable
final SvgElement farthestViewportElement;
- @DocsEditable @DomName('SVGSVGElement.nearestViewportElement')
+ @DomName('SVGSVGElement.nearestViewportElement')
+ @DocsEditable
final SvgElement nearestViewportElement;
- @DocsEditable @DomName('SVGSVGElement.getBBox')
+ @DomName('SVGSVGElement.getBBox')
+ @DocsEditable
Rect getBBox() native;
@JSName('getCTM')
- @DocsEditable @DomName('SVGSVGElement.getCTM')
+ @DomName('SVGSVGElement.getCTM')
+ @DocsEditable
Matrix getCtm() native;
@JSName('getScreenCTM')
- @DocsEditable @DomName('SVGSVGElement.getScreenCTM')
+ @DomName('SVGSVGElement.getScreenCTM')
+ @DocsEditable
Matrix getScreenCtm() native;
- @DocsEditable @DomName('SVGSVGElement.getTransformToElement')
+ @DomName('SVGSVGElement.getTransformToElement')
+ @DocsEditable
Matrix getTransformToElement(SvgElement element) native;
// From SVGStylable
@@ -5908,26 +6785,32 @@
// Use implementation from Element.
// final CssStyleDeclaration style;
- @DocsEditable @DomName('SVGSVGElement.getPresentationAttribute')
+ @DomName('SVGSVGElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native;
// From SVGTests
- @DocsEditable @DomName('SVGSVGElement.requiredExtensions')
+ @DomName('SVGSVGElement.requiredExtensions')
+ @DocsEditable
final StringList requiredExtensions;
- @DocsEditable @DomName('SVGSVGElement.requiredFeatures')
+ @DomName('SVGSVGElement.requiredFeatures')
+ @DocsEditable
final StringList requiredFeatures;
- @DocsEditable @DomName('SVGSVGElement.systemLanguage')
+ @DomName('SVGSVGElement.systemLanguage')
+ @DocsEditable
final StringList systemLanguage;
- @DocsEditable @DomName('SVGSVGElement.hasExtension')
+ @DomName('SVGSVGElement.hasExtension')
+ @DocsEditable
bool hasExtension(String extension) native;
// From SVGZoomAndPan
- @DocsEditable @DomName('SVGSVGElement.zoomAndPan')
+ @DomName('SVGSVGElement.zoomAndPan')
+ @DocsEditable
int zoomAndPan;
}
@@ -5936,7 +6819,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGSwitchElement')
class SwitchElement extends SvgElement implements Transformable, Tests, Stylable, ExternalResourcesRequired, LangSpace native "*SVGSwitchElement" {
@@ -5946,37 +6828,46 @@
// From SVGExternalResourcesRequired
- @DocsEditable @DomName('SVGSwitchElement.externalResourcesRequired')
+ @DomName('SVGSwitchElement.externalResourcesRequired')
+ @DocsEditable
final AnimatedBoolean externalResourcesRequired;
// From SVGLangSpace
- @DocsEditable @DomName('SVGSwitchElement.xmllang')
+ @DomName('SVGSwitchElement.xmllang')
+ @DocsEditable
String xmllang;
- @DocsEditable @DomName('SVGSwitchElement.xmlspace')
+ @DomName('SVGSwitchElement.xmlspace')
+ @DocsEditable
String xmlspace;
// From SVGLocatable
- @DocsEditable @DomName('SVGSwitchElement.farthestViewportElement')
+ @DomName('SVGSwitchElement.farthestViewportElement')
+ @DocsEditable
final SvgElement farthestViewportElement;
- @DocsEditable @DomName('SVGSwitchElement.nearestViewportElement')
+ @DomName('SVGSwitchElement.nearestViewportElement')
+ @DocsEditable
final SvgElement nearestViewportElement;
- @DocsEditable @DomName('SVGSwitchElement.getBBox')
+ @DomName('SVGSwitchElement.getBBox')
+ @DocsEditable
Rect getBBox() native;
@JSName('getCTM')
- @DocsEditable @DomName('SVGSwitchElement.getCTM')
+ @DomName('SVGSwitchElement.getCTM')
+ @DocsEditable
Matrix getCtm() native;
@JSName('getScreenCTM')
- @DocsEditable @DomName('SVGSwitchElement.getScreenCTM')
+ @DomName('SVGSwitchElement.getScreenCTM')
+ @DocsEditable
Matrix getScreenCtm() native;
- @DocsEditable @DomName('SVGSwitchElement.getTransformToElement')
+ @DomName('SVGSwitchElement.getTransformToElement')
+ @DocsEditable
Matrix getTransformToElement(SvgElement element) native;
// From SVGStylable
@@ -5987,26 +6878,32 @@
// Use implementation from Element.
// final CssStyleDeclaration style;
- @DocsEditable @DomName('SVGSwitchElement.getPresentationAttribute')
+ @DomName('SVGSwitchElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native;
// From SVGTests
- @DocsEditable @DomName('SVGSwitchElement.requiredExtensions')
+ @DomName('SVGSwitchElement.requiredExtensions')
+ @DocsEditable
final StringList requiredExtensions;
- @DocsEditable @DomName('SVGSwitchElement.requiredFeatures')
+ @DomName('SVGSwitchElement.requiredFeatures')
+ @DocsEditable
final StringList requiredFeatures;
- @DocsEditable @DomName('SVGSwitchElement.systemLanguage')
+ @DomName('SVGSwitchElement.systemLanguage')
+ @DocsEditable
final StringList systemLanguage;
- @DocsEditable @DomName('SVGSwitchElement.hasExtension')
+ @DomName('SVGSwitchElement.hasExtension')
+ @DocsEditable
bool hasExtension(String extension) native;
// From SVGTransformable
- @DocsEditable @DomName('SVGSwitchElement.transform')
+ @DomName('SVGSwitchElement.transform')
+ @DocsEditable
final AnimatedTransformList transform;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -6014,7 +6911,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGSymbolElement')
class SymbolElement extends SvgElement implements FitToViewBox, ExternalResourcesRequired, Stylable, LangSpace native "*SVGSymbolElement" {
@@ -6024,23 +6920,28 @@
// From SVGExternalResourcesRequired
- @DocsEditable @DomName('SVGSymbolElement.externalResourcesRequired')
+ @DomName('SVGSymbolElement.externalResourcesRequired')
+ @DocsEditable
final AnimatedBoolean externalResourcesRequired;
// From SVGFitToViewBox
- @DocsEditable @DomName('SVGSymbolElement.preserveAspectRatio')
+ @DomName('SVGSymbolElement.preserveAspectRatio')
+ @DocsEditable
final AnimatedPreserveAspectRatio preserveAspectRatio;
- @DocsEditable @DomName('SVGSymbolElement.viewBox')
+ @DomName('SVGSymbolElement.viewBox')
+ @DocsEditable
final AnimatedRect viewBox;
// From SVGLangSpace
- @DocsEditable @DomName('SVGSymbolElement.xmllang')
+ @DomName('SVGSymbolElement.xmllang')
+ @DocsEditable
String xmllang;
- @DocsEditable @DomName('SVGSymbolElement.xmlspace')
+ @DomName('SVGSymbolElement.xmlspace')
+ @DocsEditable
String xmlspace;
// From SVGStylable
@@ -6051,7 +6952,8 @@
// Use implementation from Element.
// final CssStyleDeclaration style;
- @DocsEditable @DomName('SVGSymbolElement.getPresentationAttribute')
+ @DomName('SVGSymbolElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -6059,7 +6961,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGTRefElement')
class TRefElement extends TextPositioningElement implements UriReference native "*SVGTRefElement" {
@@ -6069,7 +6970,8 @@
// From SVGURIReference
- @DocsEditable @DomName('SVGTRefElement.href')
+ @DomName('SVGTRefElement.href')
+ @DocsEditable
final AnimatedString href;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -6077,7 +6979,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGTSpanElement')
class TSpanElement extends TextPositioningElement native "*SVGTSpanElement" {
@@ -6090,7 +6991,6 @@
// BSD-style license that can be found in the LICENSE file.
-@DocsEditable
@DomName('SVGTests')
abstract class Tests {
@@ -6107,7 +7007,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGTextContentElement')
class TextContentElement extends SvgElement implements Tests, Stylable, ExternalResourcesRequired, LangSpace native "*SVGTextContentElement" {
@@ -6118,50 +7017,64 @@
static const int LENGTHADJUST_UNKNOWN = 0;
- @DocsEditable @DomName('SVGTextContentElement.lengthAdjust')
+ @DomName('SVGTextContentElement.lengthAdjust')
+ @DocsEditable
final AnimatedEnumeration lengthAdjust;
- @DocsEditable @DomName('SVGTextContentElement.textLength')
+ @DomName('SVGTextContentElement.textLength')
+ @DocsEditable
final AnimatedLength textLength;
- @DocsEditable @DomName('SVGTextContentElement.getCharNumAtPosition')
+ @DomName('SVGTextContentElement.getCharNumAtPosition')
+ @DocsEditable
int getCharNumAtPosition(Point point) native;
- @DocsEditable @DomName('SVGTextContentElement.getComputedTextLength')
+ @DomName('SVGTextContentElement.getComputedTextLength')
+ @DocsEditable
num getComputedTextLength() native;
- @DocsEditable @DomName('SVGTextContentElement.getEndPositionOfChar')
+ @DomName('SVGTextContentElement.getEndPositionOfChar')
+ @DocsEditable
Point getEndPositionOfChar(int offset) native;
- @DocsEditable @DomName('SVGTextContentElement.getExtentOfChar')
+ @DomName('SVGTextContentElement.getExtentOfChar')
+ @DocsEditable
Rect getExtentOfChar(int offset) native;
- @DocsEditable @DomName('SVGTextContentElement.getNumberOfChars')
+ @DomName('SVGTextContentElement.getNumberOfChars')
+ @DocsEditable
int getNumberOfChars() native;
- @DocsEditable @DomName('SVGTextContentElement.getRotationOfChar')
+ @DomName('SVGTextContentElement.getRotationOfChar')
+ @DocsEditable
num getRotationOfChar(int offset) native;
- @DocsEditable @DomName('SVGTextContentElement.getStartPositionOfChar')
+ @DomName('SVGTextContentElement.getStartPositionOfChar')
+ @DocsEditable
Point getStartPositionOfChar(int offset) native;
- @DocsEditable @DomName('SVGTextContentElement.getSubStringLength')
+ @DomName('SVGTextContentElement.getSubStringLength')
+ @DocsEditable
num getSubStringLength(int offset, int length) native;
- @DocsEditable @DomName('SVGTextContentElement.selectSubString')
+ @DomName('SVGTextContentElement.selectSubString')
+ @DocsEditable
void selectSubString(int offset, int length) native;
// From SVGExternalResourcesRequired
- @DocsEditable @DomName('SVGTextContentElement.externalResourcesRequired')
+ @DomName('SVGTextContentElement.externalResourcesRequired')
+ @DocsEditable
final AnimatedBoolean externalResourcesRequired;
// From SVGLangSpace
- @DocsEditable @DomName('SVGTextContentElement.xmllang')
+ @DomName('SVGTextContentElement.xmllang')
+ @DocsEditable
String xmllang;
- @DocsEditable @DomName('SVGTextContentElement.xmlspace')
+ @DomName('SVGTextContentElement.xmlspace')
+ @DocsEditable
String xmlspace;
// From SVGStylable
@@ -6172,21 +7085,26 @@
// Use implementation from Element.
// final CssStyleDeclaration style;
- @DocsEditable @DomName('SVGTextContentElement.getPresentationAttribute')
+ @DomName('SVGTextContentElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native;
// From SVGTests
- @DocsEditable @DomName('SVGTextContentElement.requiredExtensions')
+ @DomName('SVGTextContentElement.requiredExtensions')
+ @DocsEditable
final StringList requiredExtensions;
- @DocsEditable @DomName('SVGTextContentElement.requiredFeatures')
+ @DomName('SVGTextContentElement.requiredFeatures')
+ @DocsEditable
final StringList requiredFeatures;
- @DocsEditable @DomName('SVGTextContentElement.systemLanguage')
+ @DomName('SVGTextContentElement.systemLanguage')
+ @DocsEditable
final StringList systemLanguage;
- @DocsEditable @DomName('SVGTextContentElement.hasExtension')
+ @DomName('SVGTextContentElement.hasExtension')
+ @DocsEditable
bool hasExtension(String extension) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -6194,7 +7112,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGTextElement')
class TextElement extends TextPositioningElement implements Transformable native "*SVGTextElement" {
@@ -6204,29 +7121,36 @@
// From SVGLocatable
- @DocsEditable @DomName('SVGTextElement.farthestViewportElement')
+ @DomName('SVGTextElement.farthestViewportElement')
+ @DocsEditable
final SvgElement farthestViewportElement;
- @DocsEditable @DomName('SVGTextElement.nearestViewportElement')
+ @DomName('SVGTextElement.nearestViewportElement')
+ @DocsEditable
final SvgElement nearestViewportElement;
- @DocsEditable @DomName('SVGTextElement.getBBox')
+ @DomName('SVGTextElement.getBBox')
+ @DocsEditable
Rect getBBox() native;
@JSName('getCTM')
- @DocsEditable @DomName('SVGTextElement.getCTM')
+ @DomName('SVGTextElement.getCTM')
+ @DocsEditable
Matrix getCtm() native;
@JSName('getScreenCTM')
- @DocsEditable @DomName('SVGTextElement.getScreenCTM')
+ @DomName('SVGTextElement.getScreenCTM')
+ @DocsEditable
Matrix getScreenCtm() native;
- @DocsEditable @DomName('SVGTextElement.getTransformToElement')
+ @DomName('SVGTextElement.getTransformToElement')
+ @DocsEditable
Matrix getTransformToElement(SvgElement element) native;
// From SVGTransformable
- @DocsEditable @DomName('SVGTextElement.transform')
+ @DomName('SVGTextElement.transform')
+ @DocsEditable
final AnimatedTransformList transform;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -6234,7 +7158,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGTextPathElement')
class TextPathElement extends TextContentElement implements UriReference native "*SVGTextPathElement" {
@@ -6251,18 +7174,22 @@
static const int TEXTPATH_SPACINGTYPE_UNKNOWN = 0;
- @DocsEditable @DomName('SVGTextPathElement.method')
+ @DomName('SVGTextPathElement.method')
+ @DocsEditable
final AnimatedEnumeration method;
- @DocsEditable @DomName('SVGTextPathElement.spacing')
+ @DomName('SVGTextPathElement.spacing')
+ @DocsEditable
final AnimatedEnumeration spacing;
- @DocsEditable @DomName('SVGTextPathElement.startOffset')
+ @DomName('SVGTextPathElement.startOffset')
+ @DocsEditable
final AnimatedLength startOffset;
// From SVGURIReference
- @DocsEditable @DomName('SVGTextPathElement.href')
+ @DomName('SVGTextPathElement.href')
+ @DocsEditable
final AnimatedString href;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -6270,24 +7197,28 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGTextPositioningElement')
class TextPositioningElement extends TextContentElement native "*SVGTextPositioningElement" {
- @DocsEditable @DomName('SVGTextPositioningElement.dx')
+ @DomName('SVGTextPositioningElement.dx')
+ @DocsEditable
final AnimatedLengthList dx;
- @DocsEditable @DomName('SVGTextPositioningElement.dy')
+ @DomName('SVGTextPositioningElement.dy')
+ @DocsEditable
final AnimatedLengthList dy;
- @DocsEditable @DomName('SVGTextPositioningElement.rotate')
+ @DomName('SVGTextPositioningElement.rotate')
+ @DocsEditable
final AnimatedNumberList rotate;
- @DocsEditable @DomName('SVGTextPositioningElement.x')
+ @DomName('SVGTextPositioningElement.x')
+ @DocsEditable
final AnimatedLengthList x;
- @DocsEditable @DomName('SVGTextPositioningElement.y')
+ @DomName('SVGTextPositioningElement.y')
+ @DocsEditable
final AnimatedLengthList y;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -6295,7 +7226,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGTitleElement')
class TitleElement extends SvgElement implements Stylable, LangSpace native "*SVGTitleElement" {
@@ -6305,10 +7235,12 @@
// From SVGLangSpace
- @DocsEditable @DomName('SVGTitleElement.xmllang')
+ @DomName('SVGTitleElement.xmllang')
+ @DocsEditable
String xmllang;
- @DocsEditable @DomName('SVGTitleElement.xmlspace')
+ @DomName('SVGTitleElement.xmlspace')
+ @DocsEditable
String xmlspace;
// From SVGStylable
@@ -6319,7 +7251,8 @@
// Use implementation from Element.
// final CssStyleDeclaration style;
- @DocsEditable @DomName('SVGTitleElement.getPresentationAttribute')
+ @DomName('SVGTitleElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -6327,7 +7260,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGTransform')
class Transform native "*SVGTransform" {
@@ -6346,31 +7278,40 @@
static const int SVG_TRANSFORM_UNKNOWN = 0;
- @DocsEditable @DomName('SVGTransform.angle')
+ @DomName('SVGTransform.angle')
+ @DocsEditable
final num angle;
- @DocsEditable @DomName('SVGTransform.matrix')
+ @DomName('SVGTransform.matrix')
+ @DocsEditable
final Matrix matrix;
- @DocsEditable @DomName('SVGTransform.type')
+ @DomName('SVGTransform.type')
+ @DocsEditable
final int type;
- @DocsEditable @DomName('SVGTransform.setMatrix')
+ @DomName('SVGTransform.setMatrix')
+ @DocsEditable
void setMatrix(Matrix matrix) native;
- @DocsEditable @DomName('SVGTransform.setRotate')
+ @DomName('SVGTransform.setRotate')
+ @DocsEditable
void setRotate(num angle, num cx, num cy) native;
- @DocsEditable @DomName('SVGTransform.setScale')
+ @DomName('SVGTransform.setScale')
+ @DocsEditable
void setScale(num sx, num sy) native;
- @DocsEditable @DomName('SVGTransform.setSkewX')
+ @DomName('SVGTransform.setSkewX')
+ @DocsEditable
void setSkewX(num angle) native;
- @DocsEditable @DomName('SVGTransform.setSkewY')
+ @DomName('SVGTransform.setSkewY')
+ @DocsEditable
void setSkewY(num angle) native;
- @DocsEditable @DomName('SVGTransform.setTranslate')
+ @DomName('SVGTransform.setTranslate')
+ @DocsEditable
void setTranslate(num tx, num ty) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -6378,12 +7319,12 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGTransformList')
class TransformList implements List<Transform>, JavaScriptIndexingBehavior native "*SVGTransformList" {
- @DocsEditable @DomName('SVGTransformList.numberOfItems')
+ @DomName('SVGTransformList.numberOfItems')
+ @DocsEditable
final int numberOfItems;
Transform operator[](int index) => JS("Transform", "#[#]", this, index);
@@ -6413,11 +7354,13 @@
void forEach(void f(Transform element)) => IterableMixinWorkaround.forEach(this, f);
- String join([String separator]) => IterableMixinWorkaround.joinList(this, separator);
+ String join([String separator]) =>
+ IterableMixinWorkaround.joinList(this, separator);
List mappedBy(f(Transform element)) => IterableMixinWorkaround.mappedByList(this, f);
- Iterable<Transform> where(bool f(Transform element)) => IterableMixinWorkaround.where(this, f);
+ Iterable<Transform> where(bool f(Transform element)) =>
+ IterableMixinWorkaround.where(this, f);
bool every(bool f(Transform element)) => IterableMixinWorkaround.every(this, f);
@@ -6477,6 +7420,9 @@
// clear() defined by IDL.
+ List<Transform> get reversed =>
+ new ReversedListView<Transform>(this, 0, null);
+
void sort([int compare(Transform a, Transform b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -6505,9 +7451,11 @@
throw new StateError("More than one element");
}
- Transform min([int compare(Transform a, Transform b)]) => IterableMixinWorkaround.min(this, compare);
+ Transform min([int compare(Transform a, Transform b)]) =>
+ IterableMixinWorkaround.min(this, compare);
- Transform max([int compare(Transform a, Transform b)]) => IterableMixinWorkaround.max(this, compare);
+ Transform max([int compare(Transform a, Transform b)]) =>
+ IterableMixinWorkaround.max(this, compare);
Transform removeAt(int pos) {
throw new UnsupportedError("Cannot remove from immutable List.");
@@ -6554,32 +7502,41 @@
// -- end List<Transform> mixins.
- @DocsEditable @DomName('SVGTransformList.appendItem')
+ @DomName('SVGTransformList.appendItem')
+ @DocsEditable
Transform appendItem(Transform item) native;
- @DocsEditable @DomName('SVGTransformList.clear')
+ @DomName('SVGTransformList.clear')
+ @DocsEditable
void clear() native;
- @DocsEditable @DomName('SVGTransformList.consolidate')
+ @DomName('SVGTransformList.consolidate')
+ @DocsEditable
Transform consolidate() native;
@JSName('createSVGTransformFromMatrix')
- @DocsEditable @DomName('SVGTransformList.createSVGTransformFromMatrix')
+ @DomName('SVGTransformList.createSVGTransformFromMatrix')
+ @DocsEditable
Transform createSvgTransformFromMatrix(Matrix matrix) native;
- @DocsEditable @DomName('SVGTransformList.getItem')
+ @DomName('SVGTransformList.getItem')
+ @DocsEditable
Transform getItem(int index) native;
- @DocsEditable @DomName('SVGTransformList.initialize')
+ @DomName('SVGTransformList.initialize')
+ @DocsEditable
Transform initialize(Transform item) native;
- @DocsEditable @DomName('SVGTransformList.insertItemBefore')
+ @DomName('SVGTransformList.insertItemBefore')
+ @DocsEditable
Transform insertItemBefore(Transform item, int index) native;
- @DocsEditable @DomName('SVGTransformList.removeItem')
+ @DomName('SVGTransformList.removeItem')
+ @DocsEditable
Transform removeItem(int index) native;
- @DocsEditable @DomName('SVGTransformList.replaceItem')
+ @DomName('SVGTransformList.replaceItem')
+ @DocsEditable
Transform replaceItem(Transform item, int index) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -6587,7 +7544,6 @@
// BSD-style license that can be found in the LICENSE file.
-@DocsEditable
@DomName('SVGTransformable')
abstract class Transformable implements Locatable {
@@ -6612,7 +7568,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGUnitTypes')
class UnitTypes native "*SVGUnitTypes" {
@@ -6628,7 +7583,6 @@
// BSD-style license that can be found in the LICENSE file.
-@DocsEditable
@DomName('SVGURIReference')
abstract class UriReference {
@@ -6639,7 +7593,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGUseElement')
class UseElement extends SvgElement implements Transformable, Tests, UriReference, Stylable, ExternalResourcesRequired, LangSpace native "*SVGUseElement" {
@@ -6647,57 +7600,72 @@
@DocsEditable
factory UseElement() => _SvgElementFactoryProvider.createSvgElement_tag("use");
- @DocsEditable @DomName('SVGUseElement.animatedInstanceRoot')
+ @DomName('SVGUseElement.animatedInstanceRoot')
+ @DocsEditable
final ElementInstance animatedInstanceRoot;
- @DocsEditable @DomName('SVGUseElement.height')
+ @DomName('SVGUseElement.height')
+ @DocsEditable
final AnimatedLength height;
- @DocsEditable @DomName('SVGUseElement.instanceRoot')
+ @DomName('SVGUseElement.instanceRoot')
+ @DocsEditable
final ElementInstance instanceRoot;
- @DocsEditable @DomName('SVGUseElement.width')
+ @DomName('SVGUseElement.width')
+ @DocsEditable
final AnimatedLength width;
- @DocsEditable @DomName('SVGUseElement.x')
+ @DomName('SVGUseElement.x')
+ @DocsEditable
final AnimatedLength x;
- @DocsEditable @DomName('SVGUseElement.y')
+ @DomName('SVGUseElement.y')
+ @DocsEditable
final AnimatedLength y;
// From SVGExternalResourcesRequired
- @DocsEditable @DomName('SVGUseElement.externalResourcesRequired')
+ @DomName('SVGUseElement.externalResourcesRequired')
+ @DocsEditable
final AnimatedBoolean externalResourcesRequired;
// From SVGLangSpace
- @DocsEditable @DomName('SVGUseElement.xmllang')
+ @DomName('SVGUseElement.xmllang')
+ @DocsEditable
String xmllang;
- @DocsEditable @DomName('SVGUseElement.xmlspace')
+ @DomName('SVGUseElement.xmlspace')
+ @DocsEditable
String xmlspace;
// From SVGLocatable
- @DocsEditable @DomName('SVGUseElement.farthestViewportElement')
+ @DomName('SVGUseElement.farthestViewportElement')
+ @DocsEditable
final SvgElement farthestViewportElement;
- @DocsEditable @DomName('SVGUseElement.nearestViewportElement')
+ @DomName('SVGUseElement.nearestViewportElement')
+ @DocsEditable
final SvgElement nearestViewportElement;
- @DocsEditable @DomName('SVGUseElement.getBBox')
+ @DomName('SVGUseElement.getBBox')
+ @DocsEditable
Rect getBBox() native;
@JSName('getCTM')
- @DocsEditable @DomName('SVGUseElement.getCTM')
+ @DomName('SVGUseElement.getCTM')
+ @DocsEditable
Matrix getCtm() native;
@JSName('getScreenCTM')
- @DocsEditable @DomName('SVGUseElement.getScreenCTM')
+ @DomName('SVGUseElement.getScreenCTM')
+ @DocsEditable
Matrix getScreenCtm() native;
- @DocsEditable @DomName('SVGUseElement.getTransformToElement')
+ @DomName('SVGUseElement.getTransformToElement')
+ @DocsEditable
Matrix getTransformToElement(SvgElement element) native;
// From SVGStylable
@@ -6708,31 +7676,38 @@
// Use implementation from Element.
// final CssStyleDeclaration style;
- @DocsEditable @DomName('SVGUseElement.getPresentationAttribute')
+ @DomName('SVGUseElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native;
// From SVGTests
- @DocsEditable @DomName('SVGUseElement.requiredExtensions')
+ @DomName('SVGUseElement.requiredExtensions')
+ @DocsEditable
final StringList requiredExtensions;
- @DocsEditable @DomName('SVGUseElement.requiredFeatures')
+ @DomName('SVGUseElement.requiredFeatures')
+ @DocsEditable
final StringList requiredFeatures;
- @DocsEditable @DomName('SVGUseElement.systemLanguage')
+ @DomName('SVGUseElement.systemLanguage')
+ @DocsEditable
final StringList systemLanguage;
- @DocsEditable @DomName('SVGUseElement.hasExtension')
+ @DomName('SVGUseElement.hasExtension')
+ @DocsEditable
bool hasExtension(String extension) native;
// From SVGTransformable
- @DocsEditable @DomName('SVGUseElement.transform')
+ @DomName('SVGUseElement.transform')
+ @DocsEditable
final AnimatedTransformList transform;
// From SVGURIReference
- @DocsEditable @DomName('SVGUseElement.href')
+ @DomName('SVGUseElement.href')
+ @DocsEditable
final AnimatedString href;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -6740,7 +7715,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGVKernElement')
class VKernElement extends SvgElement native "*SVGVKernElement" {
@@ -6753,7 +7727,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGViewElement')
class ViewElement extends SvgElement implements FitToViewBox, ExternalResourcesRequired, ZoomAndPan native "*SVGViewElement" {
@@ -6761,25 +7734,30 @@
@DocsEditable
factory ViewElement() => _SvgElementFactoryProvider.createSvgElement_tag("view");
- @DocsEditable @DomName('SVGViewElement.viewTarget')
+ @DomName('SVGViewElement.viewTarget')
+ @DocsEditable
final StringList viewTarget;
// From SVGExternalResourcesRequired
- @DocsEditable @DomName('SVGViewElement.externalResourcesRequired')
+ @DomName('SVGViewElement.externalResourcesRequired')
+ @DocsEditable
final AnimatedBoolean externalResourcesRequired;
// From SVGFitToViewBox
- @DocsEditable @DomName('SVGViewElement.preserveAspectRatio')
+ @DomName('SVGViewElement.preserveAspectRatio')
+ @DocsEditable
final AnimatedPreserveAspectRatio preserveAspectRatio;
- @DocsEditable @DomName('SVGViewElement.viewBox')
+ @DomName('SVGViewElement.viewBox')
+ @DocsEditable
final AnimatedRect viewBox;
// From SVGZoomAndPan
- @DocsEditable @DomName('SVGViewElement.zoomAndPan')
+ @DomName('SVGViewElement.zoomAndPan')
+ @DocsEditable
int zoomAndPan;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -6787,36 +7765,44 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGViewSpec')
class ViewSpec native "*SVGViewSpec" {
- @DocsEditable @DomName('SVGViewSpec.preserveAspectRatio')
+ @DomName('SVGViewSpec.preserveAspectRatio')
+ @DocsEditable
final AnimatedPreserveAspectRatio preserveAspectRatio;
- @DocsEditable @DomName('SVGViewSpec.preserveAspectRatioString')
+ @DomName('SVGViewSpec.preserveAspectRatioString')
+ @DocsEditable
final String preserveAspectRatioString;
- @DocsEditable @DomName('SVGViewSpec.transform')
+ @DomName('SVGViewSpec.transform')
+ @DocsEditable
final TransformList transform;
- @DocsEditable @DomName('SVGViewSpec.transformString')
+ @DomName('SVGViewSpec.transformString')
+ @DocsEditable
final String transformString;
- @DocsEditable @DomName('SVGViewSpec.viewBox')
+ @DomName('SVGViewSpec.viewBox')
+ @DocsEditable
final AnimatedRect viewBox;
- @DocsEditable @DomName('SVGViewSpec.viewBoxString')
+ @DomName('SVGViewSpec.viewBoxString')
+ @DocsEditable
final String viewBoxString;
- @DocsEditable @DomName('SVGViewSpec.viewTarget')
+ @DomName('SVGViewSpec.viewTarget')
+ @DocsEditable
final SvgElement viewTarget;
- @DocsEditable @DomName('SVGViewSpec.viewTargetString')
+ @DomName('SVGViewSpec.viewTargetString')
+ @DocsEditable
final String viewTargetString;
- @DocsEditable @DomName('SVGViewSpec.zoomAndPan')
+ @DomName('SVGViewSpec.zoomAndPan')
+ @DocsEditable
int zoomAndPan;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -6824,7 +7810,6 @@
// BSD-style license that can be found in the LICENSE file.
-@DocsEditable
@DomName('SVGZoomAndPan')
abstract class ZoomAndPan {
@@ -6841,24 +7826,28 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGZoomEvent')
class ZoomEvent extends UIEvent native "*SVGZoomEvent" {
- @DocsEditable @DomName('SVGZoomEvent.newScale')
+ @DomName('SVGZoomEvent.newScale')
+ @DocsEditable
final num newScale;
- @DocsEditable @DomName('SVGZoomEvent.newTranslate')
+ @DomName('SVGZoomEvent.newTranslate')
+ @DocsEditable
final Point newTranslate;
- @DocsEditable @DomName('SVGZoomEvent.previousScale')
+ @DomName('SVGZoomEvent.previousScale')
+ @DocsEditable
final num previousScale;
- @DocsEditable @DomName('SVGZoomEvent.previousTranslate')
+ @DomName('SVGZoomEvent.previousTranslate')
+ @DocsEditable
final Point previousTranslate;
- @DocsEditable @DomName('SVGZoomEvent.zoomRectScreen')
+ @DomName('SVGZoomEvent.zoomRectScreen')
+ @DocsEditable
final Rect zoomRectScreen;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -6866,12 +7855,12 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('SVGElementInstanceList')
class _ElementInstanceList implements JavaScriptIndexingBehavior, List<ElementInstance> native "*SVGElementInstanceList" {
- @DocsEditable @DomName('SVGElementInstanceList.length')
+ @DomName('SVGElementInstanceList.length')
+ @DocsEditable
int get length => JS("int", "#.length", this);
ElementInstance operator[](int index) => JS("ElementInstance", "#[#]", this, index);
@@ -6899,11 +7888,13 @@
void forEach(void f(ElementInstance element)) => IterableMixinWorkaround.forEach(this, f);
- String join([String separator]) => IterableMixinWorkaround.joinList(this, separator);
+ String join([String separator]) =>
+ IterableMixinWorkaround.joinList(this, separator);
List mappedBy(f(ElementInstance element)) => IterableMixinWorkaround.mappedByList(this, f);
- Iterable<ElementInstance> where(bool f(ElementInstance element)) => IterableMixinWorkaround.where(this, f);
+ Iterable<ElementInstance> where(bool f(ElementInstance element)) =>
+ IterableMixinWorkaround.where(this, f);
bool every(bool f(ElementInstance element)) => IterableMixinWorkaround.every(this, f);
@@ -6965,6 +7956,9 @@
throw new UnsupportedError("Cannot clear immutable List.");
}
+ List<ElementInstance> get reversed =>
+ new ReversedListView<ElementInstance>(this, 0, null);
+
void sort([int compare(ElementInstance a, ElementInstance b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -6993,9 +7987,11 @@
throw new StateError("More than one element");
}
- ElementInstance min([int compare(ElementInstance a, ElementInstance b)]) => IterableMixinWorkaround.min(this, compare);
+ ElementInstance min([int compare(ElementInstance a, ElementInstance b)]) =>
+ IterableMixinWorkaround.min(this, compare);
- ElementInstance max([int compare(ElementInstance a, ElementInstance b)]) => IterableMixinWorkaround.max(this, compare);
+ ElementInstance max([int compare(ElementInstance a, ElementInstance b)]) =>
+ IterableMixinWorkaround.max(this, compare);
ElementInstance removeAt(int pos) {
throw new UnsupportedError("Cannot remove from immutable List.");
@@ -7042,6 +8038,7 @@
// -- end List<ElementInstance> mixins.
- @DocsEditable @DomName('SVGElementInstanceList.item')
+ @DomName('SVGElementInstanceList.item')
+ @DocsEditable
ElementInstance item(int index) native;
}
diff --git a/sdk/lib/svg/dartium/svg_dartium.dart b/sdk/lib/svg/dartium/svg_dartium.dart
index ee8eb12..8463359 100644
--- a/sdk/lib/svg/dartium/svg_dartium.dart
+++ b/sdk/lib/svg/dartium/svg_dartium.dart
@@ -2,6 +2,7 @@
import 'dart:async';
import 'dart:collection';
+import 'dart:collection-dev';
import 'dart:html';
import 'dart:html_common';
import 'dart:nativewrappers';
@@ -67,88 +68,88 @@
@DocsEditable
factory AElement() => _SvgElementFactoryProvider.createSvgElement_tag("a");
- @DocsEditable
@DomName('SVGAElement.target')
+ @DocsEditable
AnimatedString get target native "SVGAElement_target_Getter";
- @DocsEditable
@DomName('SVGAElement.externalResourcesRequired')
+ @DocsEditable
AnimatedBoolean get externalResourcesRequired native "SVGAElement_externalResourcesRequired_Getter";
- @DocsEditable
@DomName('SVGAElement.xmllang')
+ @DocsEditable
String get xmllang native "SVGAElement_xmllang_Getter";
- @DocsEditable
@DomName('SVGAElement.xmllang')
+ @DocsEditable
void set xmllang(String value) native "SVGAElement_xmllang_Setter";
- @DocsEditable
@DomName('SVGAElement.xmlspace')
+ @DocsEditable
String get xmlspace native "SVGAElement_xmlspace_Getter";
- @DocsEditable
@DomName('SVGAElement.xmlspace')
+ @DocsEditable
void set xmlspace(String value) native "SVGAElement_xmlspace_Setter";
- @DocsEditable
@DomName('SVGAElement.farthestViewportElement')
+ @DocsEditable
SvgElement get farthestViewportElement native "SVGAElement_farthestViewportElement_Getter";
- @DocsEditable
@DomName('SVGAElement.nearestViewportElement')
+ @DocsEditable
SvgElement get nearestViewportElement native "SVGAElement_nearestViewportElement_Getter";
- @DocsEditable
@DomName('SVGAElement.getBBox')
+ @DocsEditable
Rect getBBox() native "SVGAElement_getBBox_Callback";
- @DocsEditable
@DomName('SVGAElement.getCTM')
+ @DocsEditable
Matrix getCtm() native "SVGAElement_getCTM_Callback";
- @DocsEditable
@DomName('SVGAElement.getScreenCTM')
+ @DocsEditable
Matrix getScreenCtm() native "SVGAElement_getScreenCTM_Callback";
- @DocsEditable
@DomName('SVGAElement.getTransformToElement')
+ @DocsEditable
Matrix getTransformToElement(SvgElement element) native "SVGAElement_getTransformToElement_Callback";
- @DocsEditable
@DomName('SVGAElement.className')
+ @DocsEditable
AnimatedString get $dom_svgClassName native "SVGAElement_className_Getter";
- @DocsEditable
@DomName('SVGAElement.style')
+ @DocsEditable
CssStyleDeclaration get style native "SVGAElement_style_Getter";
- @DocsEditable
@DomName('SVGAElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native "SVGAElement_getPresentationAttribute_Callback";
- @DocsEditable
@DomName('SVGAElement.requiredExtensions')
+ @DocsEditable
StringList get requiredExtensions native "SVGAElement_requiredExtensions_Getter";
- @DocsEditable
@DomName('SVGAElement.requiredFeatures')
+ @DocsEditable
StringList get requiredFeatures native "SVGAElement_requiredFeatures_Getter";
- @DocsEditable
@DomName('SVGAElement.systemLanguage')
+ @DocsEditable
StringList get systemLanguage native "SVGAElement_systemLanguage_Getter";
- @DocsEditable
@DomName('SVGAElement.hasExtension')
+ @DocsEditable
bool hasExtension(String extension) native "SVGAElement_hasExtension_Callback";
- @DocsEditable
@DomName('SVGAElement.transform')
+ @DocsEditable
AnimatedTransformList get transform native "SVGAElement_transform_Getter";
- @DocsEditable
@DomName('SVGAElement.href')
+ @DocsEditable
AnimatedString get href native "SVGAElement_href_Getter";
}
@@ -177,24 +178,24 @@
class AltGlyphElement extends TextPositioningElement implements UriReference {
AltGlyphElement.internal() : super.internal();
- @DocsEditable
@DomName('SVGAltGlyphElement.format')
+ @DocsEditable
String get format native "SVGAltGlyphElement_format_Getter";
- @DocsEditable
@DomName('SVGAltGlyphElement.format')
+ @DocsEditable
void set format(String value) native "SVGAltGlyphElement_format_Setter";
- @DocsEditable
@DomName('SVGAltGlyphElement.glyphRef')
+ @DocsEditable
String get glyphRef native "SVGAltGlyphElement_glyphRef_Getter";
- @DocsEditable
@DomName('SVGAltGlyphElement.glyphRef')
+ @DocsEditable
void set glyphRef(String value) native "SVGAltGlyphElement_glyphRef_Setter";
- @DocsEditable
@DomName('SVGAltGlyphElement.href')
+ @DocsEditable
AnimatedString get href native "SVGAltGlyphElement_href_Getter";
}
@@ -233,40 +234,40 @@
static const int SVG_ANGLETYPE_UNSPECIFIED = 1;
- @DocsEditable
@DomName('SVGAngle.unitType')
+ @DocsEditable
int get unitType native "SVGAngle_unitType_Getter";
- @DocsEditable
@DomName('SVGAngle.value')
+ @DocsEditable
num get value native "SVGAngle_value_Getter";
- @DocsEditable
@DomName('SVGAngle.value')
+ @DocsEditable
void set value(num value) native "SVGAngle_value_Setter";
- @DocsEditable
@DomName('SVGAngle.valueAsString')
+ @DocsEditable
String get valueAsString native "SVGAngle_valueAsString_Getter";
- @DocsEditable
@DomName('SVGAngle.valueAsString')
+ @DocsEditable
void set valueAsString(String value) native "SVGAngle_valueAsString_Setter";
- @DocsEditable
@DomName('SVGAngle.valueInSpecifiedUnits')
+ @DocsEditable
num get valueInSpecifiedUnits native "SVGAngle_valueInSpecifiedUnits_Getter";
- @DocsEditable
@DomName('SVGAngle.valueInSpecifiedUnits')
+ @DocsEditable
void set valueInSpecifiedUnits(num value) native "SVGAngle_valueInSpecifiedUnits_Setter";
- @DocsEditable
@DomName('SVGAngle.convertToSpecifiedUnits')
+ @DocsEditable
void convertToSpecifiedUnits(int unitType) native "SVGAngle_convertToSpecifiedUnits_Callback";
- @DocsEditable
@DomName('SVGAngle.newValueSpecifiedUnits')
+ @DocsEditable
void newValueSpecifiedUnits(int unitType, num valueInSpecifiedUnits) native "SVGAngle_newValueSpecifiedUnits_Callback";
}
@@ -346,12 +347,12 @@
class AnimatedAngle extends NativeFieldWrapperClass1 {
AnimatedAngle.internal();
- @DocsEditable
@DomName('SVGAnimatedAngle.animVal')
+ @DocsEditable
Angle get animVal native "SVGAnimatedAngle_animVal_Getter";
- @DocsEditable
@DomName('SVGAnimatedAngle.baseVal')
+ @DocsEditable
Angle get baseVal native "SVGAnimatedAngle_baseVal_Getter";
}
@@ -367,16 +368,16 @@
class AnimatedBoolean extends NativeFieldWrapperClass1 {
AnimatedBoolean.internal();
- @DocsEditable
@DomName('SVGAnimatedBoolean.animVal')
+ @DocsEditable
bool get animVal native "SVGAnimatedBoolean_animVal_Getter";
- @DocsEditable
@DomName('SVGAnimatedBoolean.baseVal')
+ @DocsEditable
bool get baseVal native "SVGAnimatedBoolean_baseVal_Getter";
- @DocsEditable
@DomName('SVGAnimatedBoolean.baseVal')
+ @DocsEditable
void set baseVal(bool value) native "SVGAnimatedBoolean_baseVal_Setter";
}
@@ -392,16 +393,16 @@
class AnimatedEnumeration extends NativeFieldWrapperClass1 {
AnimatedEnumeration.internal();
- @DocsEditable
@DomName('SVGAnimatedEnumeration.animVal')
+ @DocsEditable
int get animVal native "SVGAnimatedEnumeration_animVal_Getter";
- @DocsEditable
@DomName('SVGAnimatedEnumeration.baseVal')
+ @DocsEditable
int get baseVal native "SVGAnimatedEnumeration_baseVal_Getter";
- @DocsEditable
@DomName('SVGAnimatedEnumeration.baseVal')
+ @DocsEditable
void set baseVal(int value) native "SVGAnimatedEnumeration_baseVal_Setter";
}
@@ -417,16 +418,16 @@
class AnimatedInteger extends NativeFieldWrapperClass1 {
AnimatedInteger.internal();
- @DocsEditable
@DomName('SVGAnimatedInteger.animVal')
+ @DocsEditable
int get animVal native "SVGAnimatedInteger_animVal_Getter";
- @DocsEditable
@DomName('SVGAnimatedInteger.baseVal')
+ @DocsEditable
int get baseVal native "SVGAnimatedInteger_baseVal_Getter";
- @DocsEditable
@DomName('SVGAnimatedInteger.baseVal')
+ @DocsEditable
void set baseVal(int value) native "SVGAnimatedInteger_baseVal_Setter";
}
@@ -442,12 +443,12 @@
class AnimatedLength extends NativeFieldWrapperClass1 {
AnimatedLength.internal();
- @DocsEditable
@DomName('SVGAnimatedLength.animVal')
+ @DocsEditable
Length get animVal native "SVGAnimatedLength_animVal_Getter";
- @DocsEditable
@DomName('SVGAnimatedLength.baseVal')
+ @DocsEditable
Length get baseVal native "SVGAnimatedLength_baseVal_Getter";
}
@@ -463,12 +464,12 @@
class AnimatedLengthList extends NativeFieldWrapperClass1 {
AnimatedLengthList.internal();
- @DocsEditable
@DomName('SVGAnimatedLengthList.animVal')
+ @DocsEditable
LengthList get animVal native "SVGAnimatedLengthList_animVal_Getter";
- @DocsEditable
@DomName('SVGAnimatedLengthList.baseVal')
+ @DocsEditable
LengthList get baseVal native "SVGAnimatedLengthList_baseVal_Getter";
}
@@ -484,16 +485,16 @@
class AnimatedNumber extends NativeFieldWrapperClass1 {
AnimatedNumber.internal();
- @DocsEditable
@DomName('SVGAnimatedNumber.animVal')
+ @DocsEditable
num get animVal native "SVGAnimatedNumber_animVal_Getter";
- @DocsEditable
@DomName('SVGAnimatedNumber.baseVal')
+ @DocsEditable
num get baseVal native "SVGAnimatedNumber_baseVal_Getter";
- @DocsEditable
@DomName('SVGAnimatedNumber.baseVal')
+ @DocsEditable
void set baseVal(num value) native "SVGAnimatedNumber_baseVal_Setter";
}
@@ -509,12 +510,12 @@
class AnimatedNumberList extends NativeFieldWrapperClass1 {
AnimatedNumberList.internal();
- @DocsEditable
@DomName('SVGAnimatedNumberList.animVal')
+ @DocsEditable
NumberList get animVal native "SVGAnimatedNumberList_animVal_Getter";
- @DocsEditable
@DomName('SVGAnimatedNumberList.baseVal')
+ @DocsEditable
NumberList get baseVal native "SVGAnimatedNumberList_baseVal_Getter";
}
@@ -530,12 +531,12 @@
class AnimatedPreserveAspectRatio extends NativeFieldWrapperClass1 {
AnimatedPreserveAspectRatio.internal();
- @DocsEditable
@DomName('SVGAnimatedPreserveAspectRatio.animVal')
+ @DocsEditable
PreserveAspectRatio get animVal native "SVGAnimatedPreserveAspectRatio_animVal_Getter";
- @DocsEditable
@DomName('SVGAnimatedPreserveAspectRatio.baseVal')
+ @DocsEditable
PreserveAspectRatio get baseVal native "SVGAnimatedPreserveAspectRatio_baseVal_Getter";
}
@@ -551,12 +552,12 @@
class AnimatedRect extends NativeFieldWrapperClass1 {
AnimatedRect.internal();
- @DocsEditable
@DomName('SVGAnimatedRect.animVal')
+ @DocsEditable
Rect get animVal native "SVGAnimatedRect_animVal_Getter";
- @DocsEditable
@DomName('SVGAnimatedRect.baseVal')
+ @DocsEditable
Rect get baseVal native "SVGAnimatedRect_baseVal_Getter";
}
@@ -572,16 +573,16 @@
class AnimatedString extends NativeFieldWrapperClass1 {
AnimatedString.internal();
- @DocsEditable
@DomName('SVGAnimatedString.animVal')
+ @DocsEditable
String get animVal native "SVGAnimatedString_animVal_Getter";
- @DocsEditable
@DomName('SVGAnimatedString.baseVal')
+ @DocsEditable
String get baseVal native "SVGAnimatedString_baseVal_Getter";
- @DocsEditable
@DomName('SVGAnimatedString.baseVal')
+ @DocsEditable
void set baseVal(String value) native "SVGAnimatedString_baseVal_Setter";
}
@@ -597,12 +598,12 @@
class AnimatedTransformList extends NativeFieldWrapperClass1 {
AnimatedTransformList.internal();
- @DocsEditable
@DomName('SVGAnimatedTransformList.animVal')
+ @DocsEditable
TransformList get animVal native "SVGAnimatedTransformList_animVal_Getter";
- @DocsEditable
@DomName('SVGAnimatedTransformList.baseVal')
+ @DocsEditable
TransformList get baseVal native "SVGAnimatedTransformList_baseVal_Getter";
}
@@ -621,56 +622,56 @@
@DocsEditable
factory AnimationElement() => _SvgElementFactoryProvider.createSvgElement_tag("animation");
- @DocsEditable
@DomName('SVGAnimationElement.targetElement')
+ @DocsEditable
SvgElement get targetElement native "SVGAnimationElement_targetElement_Getter";
- @DocsEditable
@DomName('SVGAnimationElement.getCurrentTime')
+ @DocsEditable
num getCurrentTime() native "SVGAnimationElement_getCurrentTime_Callback";
- @DocsEditable
@DomName('SVGAnimationElement.getSimpleDuration')
+ @DocsEditable
num getSimpleDuration() native "SVGAnimationElement_getSimpleDuration_Callback";
- @DocsEditable
@DomName('SVGAnimationElement.getStartTime')
+ @DocsEditable
num getStartTime() native "SVGAnimationElement_getStartTime_Callback";
- @DocsEditable
@DomName('SVGAnimationElement.beginElement')
+ @DocsEditable
void beginElement() native "SVGAnimationElement_beginElement_Callback";
- @DocsEditable
@DomName('SVGAnimationElement.beginElementAt')
+ @DocsEditable
void beginElementAt(num offset) native "SVGAnimationElement_beginElementAt_Callback";
- @DocsEditable
@DomName('SVGAnimationElement.endElement')
+ @DocsEditable
void endElement() native "SVGAnimationElement_endElement_Callback";
- @DocsEditable
@DomName('SVGAnimationElement.endElementAt')
+ @DocsEditable
void endElementAt(num offset) native "SVGAnimationElement_endElementAt_Callback";
- @DocsEditable
@DomName('SVGAnimationElement.externalResourcesRequired')
+ @DocsEditable
AnimatedBoolean get externalResourcesRequired native "SVGAnimationElement_externalResourcesRequired_Getter";
- @DocsEditable
@DomName('SVGAnimationElement.requiredExtensions')
+ @DocsEditable
StringList get requiredExtensions native "SVGAnimationElement_requiredExtensions_Getter";
- @DocsEditable
@DomName('SVGAnimationElement.requiredFeatures')
+ @DocsEditable
StringList get requiredFeatures native "SVGAnimationElement_requiredFeatures_Getter";
- @DocsEditable
@DomName('SVGAnimationElement.systemLanguage')
+ @DocsEditable
StringList get systemLanguage native "SVGAnimationElement_systemLanguage_Getter";
- @DocsEditable
@DomName('SVGAnimationElement.hasExtension')
+ @DocsEditable
bool hasExtension(String extension) native "SVGAnimationElement_hasExtension_Callback";
}
@@ -689,92 +690,92 @@
@DocsEditable
factory CircleElement() => _SvgElementFactoryProvider.createSvgElement_tag("circle");
- @DocsEditable
@DomName('SVGCircleElement.cx')
+ @DocsEditable
AnimatedLength get cx native "SVGCircleElement_cx_Getter";
- @DocsEditable
@DomName('SVGCircleElement.cy')
+ @DocsEditable
AnimatedLength get cy native "SVGCircleElement_cy_Getter";
- @DocsEditable
@DomName('SVGCircleElement.r')
+ @DocsEditable
AnimatedLength get r native "SVGCircleElement_r_Getter";
- @DocsEditable
@DomName('SVGCircleElement.externalResourcesRequired')
+ @DocsEditable
AnimatedBoolean get externalResourcesRequired native "SVGCircleElement_externalResourcesRequired_Getter";
- @DocsEditable
@DomName('SVGCircleElement.xmllang')
+ @DocsEditable
String get xmllang native "SVGCircleElement_xmllang_Getter";
- @DocsEditable
@DomName('SVGCircleElement.xmllang')
+ @DocsEditable
void set xmllang(String value) native "SVGCircleElement_xmllang_Setter";
- @DocsEditable
@DomName('SVGCircleElement.xmlspace')
+ @DocsEditable
String get xmlspace native "SVGCircleElement_xmlspace_Getter";
- @DocsEditable
@DomName('SVGCircleElement.xmlspace')
+ @DocsEditable
void set xmlspace(String value) native "SVGCircleElement_xmlspace_Setter";
- @DocsEditable
@DomName('SVGCircleElement.farthestViewportElement')
+ @DocsEditable
SvgElement get farthestViewportElement native "SVGCircleElement_farthestViewportElement_Getter";
- @DocsEditable
@DomName('SVGCircleElement.nearestViewportElement')
+ @DocsEditable
SvgElement get nearestViewportElement native "SVGCircleElement_nearestViewportElement_Getter";
- @DocsEditable
@DomName('SVGCircleElement.getBBox')
+ @DocsEditable
Rect getBBox() native "SVGCircleElement_getBBox_Callback";
- @DocsEditable
@DomName('SVGCircleElement.getCTM')
+ @DocsEditable
Matrix getCtm() native "SVGCircleElement_getCTM_Callback";
- @DocsEditable
@DomName('SVGCircleElement.getScreenCTM')
+ @DocsEditable
Matrix getScreenCtm() native "SVGCircleElement_getScreenCTM_Callback";
- @DocsEditable
@DomName('SVGCircleElement.getTransformToElement')
+ @DocsEditable
Matrix getTransformToElement(SvgElement element) native "SVGCircleElement_getTransformToElement_Callback";
- @DocsEditable
@DomName('SVGCircleElement.className')
+ @DocsEditable
AnimatedString get $dom_svgClassName native "SVGCircleElement_className_Getter";
- @DocsEditable
@DomName('SVGCircleElement.style')
+ @DocsEditable
CssStyleDeclaration get style native "SVGCircleElement_style_Getter";
- @DocsEditable
@DomName('SVGCircleElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native "SVGCircleElement_getPresentationAttribute_Callback";
- @DocsEditable
@DomName('SVGCircleElement.requiredExtensions')
+ @DocsEditable
StringList get requiredExtensions native "SVGCircleElement_requiredExtensions_Getter";
- @DocsEditable
@DomName('SVGCircleElement.requiredFeatures')
+ @DocsEditable
StringList get requiredFeatures native "SVGCircleElement_requiredFeatures_Getter";
- @DocsEditable
@DomName('SVGCircleElement.systemLanguage')
+ @DocsEditable
StringList get systemLanguage native "SVGCircleElement_systemLanguage_Getter";
- @DocsEditable
@DomName('SVGCircleElement.hasExtension')
+ @DocsEditable
bool hasExtension(String extension) native "SVGCircleElement_hasExtension_Callback";
- @DocsEditable
@DomName('SVGCircleElement.transform')
+ @DocsEditable
AnimatedTransformList get transform native "SVGCircleElement_transform_Getter";
}
@@ -793,84 +794,84 @@
@DocsEditable
factory ClipPathElement() => _SvgElementFactoryProvider.createSvgElement_tag("clipPath");
- @DocsEditable
@DomName('SVGClipPathElement.clipPathUnits')
+ @DocsEditable
AnimatedEnumeration get clipPathUnits native "SVGClipPathElement_clipPathUnits_Getter";
- @DocsEditable
@DomName('SVGClipPathElement.externalResourcesRequired')
+ @DocsEditable
AnimatedBoolean get externalResourcesRequired native "SVGClipPathElement_externalResourcesRequired_Getter";
- @DocsEditable
@DomName('SVGClipPathElement.xmllang')
+ @DocsEditable
String get xmllang native "SVGClipPathElement_xmllang_Getter";
- @DocsEditable
@DomName('SVGClipPathElement.xmllang')
+ @DocsEditable
void set xmllang(String value) native "SVGClipPathElement_xmllang_Setter";
- @DocsEditable
@DomName('SVGClipPathElement.xmlspace')
+ @DocsEditable
String get xmlspace native "SVGClipPathElement_xmlspace_Getter";
- @DocsEditable
@DomName('SVGClipPathElement.xmlspace')
+ @DocsEditable
void set xmlspace(String value) native "SVGClipPathElement_xmlspace_Setter";
- @DocsEditable
@DomName('SVGClipPathElement.farthestViewportElement')
+ @DocsEditable
SvgElement get farthestViewportElement native "SVGClipPathElement_farthestViewportElement_Getter";
- @DocsEditable
@DomName('SVGClipPathElement.nearestViewportElement')
+ @DocsEditable
SvgElement get nearestViewportElement native "SVGClipPathElement_nearestViewportElement_Getter";
- @DocsEditable
@DomName('SVGClipPathElement.getBBox')
+ @DocsEditable
Rect getBBox() native "SVGClipPathElement_getBBox_Callback";
- @DocsEditable
@DomName('SVGClipPathElement.getCTM')
+ @DocsEditable
Matrix getCtm() native "SVGClipPathElement_getCTM_Callback";
- @DocsEditable
@DomName('SVGClipPathElement.getScreenCTM')
+ @DocsEditable
Matrix getScreenCtm() native "SVGClipPathElement_getScreenCTM_Callback";
- @DocsEditable
@DomName('SVGClipPathElement.getTransformToElement')
+ @DocsEditable
Matrix getTransformToElement(SvgElement element) native "SVGClipPathElement_getTransformToElement_Callback";
- @DocsEditable
@DomName('SVGClipPathElement.className')
+ @DocsEditable
AnimatedString get $dom_svgClassName native "SVGClipPathElement_className_Getter";
- @DocsEditable
@DomName('SVGClipPathElement.style')
+ @DocsEditable
CssStyleDeclaration get style native "SVGClipPathElement_style_Getter";
- @DocsEditable
@DomName('SVGClipPathElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native "SVGClipPathElement_getPresentationAttribute_Callback";
- @DocsEditable
@DomName('SVGClipPathElement.requiredExtensions')
+ @DocsEditable
StringList get requiredExtensions native "SVGClipPathElement_requiredExtensions_Getter";
- @DocsEditable
@DomName('SVGClipPathElement.requiredFeatures')
+ @DocsEditable
StringList get requiredFeatures native "SVGClipPathElement_requiredFeatures_Getter";
- @DocsEditable
@DomName('SVGClipPathElement.systemLanguage')
+ @DocsEditable
StringList get systemLanguage native "SVGClipPathElement_systemLanguage_Getter";
- @DocsEditable
@DomName('SVGClipPathElement.hasExtension')
+ @DocsEditable
bool hasExtension(String extension) native "SVGClipPathElement_hasExtension_Callback";
- @DocsEditable
@DomName('SVGClipPathElement.transform')
+ @DocsEditable
AnimatedTransformList get transform native "SVGClipPathElement_transform_Getter";
}
@@ -894,24 +895,24 @@
static const int SVG_COLORTYPE_UNKNOWN = 0;
- @DocsEditable
@DomName('SVGColor.colorType')
+ @DocsEditable
int get colorType native "SVGColor_colorType_Getter";
- @DocsEditable
@DomName('SVGColor.rgbColor')
+ @DocsEditable
RgbColor get rgbColor native "SVGColor_rgbColor_Getter";
- @DocsEditable
@DomName('SVGColor.setColor')
+ @DocsEditable
void setColor(int colorType, String rgbColor, String iccColor) native "SVGColor_setColor_Callback";
- @DocsEditable
@DomName('SVGColor.setRGBColor')
+ @DocsEditable
void setRgbColor(String rgbColor) native "SVGColor_setRGBColor_Callback";
- @DocsEditable
@DomName('SVGColor.setRGBColorICCColor')
+ @DocsEditable
void setRgbColorIccColor(String rgbColor, String iccColor) native "SVGColor_setRGBColorICCColor_Callback";
}
@@ -939,32 +940,32 @@
static const int SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN = 0;
- @DocsEditable
@DomName('SVGComponentTransferFunctionElement.amplitude')
+ @DocsEditable
AnimatedNumber get amplitude native "SVGComponentTransferFunctionElement_amplitude_Getter";
- @DocsEditable
@DomName('SVGComponentTransferFunctionElement.exponent')
+ @DocsEditable
AnimatedNumber get exponent native "SVGComponentTransferFunctionElement_exponent_Getter";
- @DocsEditable
@DomName('SVGComponentTransferFunctionElement.intercept')
+ @DocsEditable
AnimatedNumber get intercept native "SVGComponentTransferFunctionElement_intercept_Getter";
- @DocsEditable
@DomName('SVGComponentTransferFunctionElement.offset')
+ @DocsEditable
AnimatedNumber get offset native "SVGComponentTransferFunctionElement_offset_Getter";
- @DocsEditable
@DomName('SVGComponentTransferFunctionElement.slope')
+ @DocsEditable
AnimatedNumber get slope native "SVGComponentTransferFunctionElement_slope_Getter";
- @DocsEditable
@DomName('SVGComponentTransferFunctionElement.tableValues')
+ @DocsEditable
AnimatedNumberList get tableValues native "SVGComponentTransferFunctionElement_tableValues_Getter";
- @DocsEditable
@DomName('SVGComponentTransferFunctionElement.type')
+ @DocsEditable
AnimatedEnumeration get type native "SVGComponentTransferFunctionElement_type_Getter";
}
@@ -983,36 +984,36 @@
@DocsEditable
factory CursorElement() => _SvgElementFactoryProvider.createSvgElement_tag("cursor");
- @DocsEditable
@DomName('SVGCursorElement.x')
+ @DocsEditable
AnimatedLength get x native "SVGCursorElement_x_Getter";
- @DocsEditable
@DomName('SVGCursorElement.y')
+ @DocsEditable
AnimatedLength get y native "SVGCursorElement_y_Getter";
- @DocsEditable
@DomName('SVGCursorElement.externalResourcesRequired')
+ @DocsEditable
AnimatedBoolean get externalResourcesRequired native "SVGCursorElement_externalResourcesRequired_Getter";
- @DocsEditable
@DomName('SVGCursorElement.requiredExtensions')
+ @DocsEditable
StringList get requiredExtensions native "SVGCursorElement_requiredExtensions_Getter";
- @DocsEditable
@DomName('SVGCursorElement.requiredFeatures')
+ @DocsEditable
StringList get requiredFeatures native "SVGCursorElement_requiredFeatures_Getter";
- @DocsEditable
@DomName('SVGCursorElement.systemLanguage')
+ @DocsEditable
StringList get systemLanguage native "SVGCursorElement_systemLanguage_Getter";
- @DocsEditable
@DomName('SVGCursorElement.hasExtension')
+ @DocsEditable
bool hasExtension(String extension) native "SVGCursorElement_hasExtension_Callback";
- @DocsEditable
@DomName('SVGCursorElement.href')
+ @DocsEditable
AnimatedString get href native "SVGCursorElement_href_Getter";
}
@@ -1031,80 +1032,80 @@
@DocsEditable
factory DefsElement() => _SvgElementFactoryProvider.createSvgElement_tag("defs");
- @DocsEditable
@DomName('SVGDefsElement.externalResourcesRequired')
+ @DocsEditable
AnimatedBoolean get externalResourcesRequired native "SVGDefsElement_externalResourcesRequired_Getter";
- @DocsEditable
@DomName('SVGDefsElement.xmllang')
+ @DocsEditable
String get xmllang native "SVGDefsElement_xmllang_Getter";
- @DocsEditable
@DomName('SVGDefsElement.xmllang')
+ @DocsEditable
void set xmllang(String value) native "SVGDefsElement_xmllang_Setter";
- @DocsEditable
@DomName('SVGDefsElement.xmlspace')
+ @DocsEditable
String get xmlspace native "SVGDefsElement_xmlspace_Getter";
- @DocsEditable
@DomName('SVGDefsElement.xmlspace')
+ @DocsEditable
void set xmlspace(String value) native "SVGDefsElement_xmlspace_Setter";
- @DocsEditable
@DomName('SVGDefsElement.farthestViewportElement')
+ @DocsEditable
SvgElement get farthestViewportElement native "SVGDefsElement_farthestViewportElement_Getter";
- @DocsEditable
@DomName('SVGDefsElement.nearestViewportElement')
+ @DocsEditable
SvgElement get nearestViewportElement native "SVGDefsElement_nearestViewportElement_Getter";
- @DocsEditable
@DomName('SVGDefsElement.getBBox')
+ @DocsEditable
Rect getBBox() native "SVGDefsElement_getBBox_Callback";
- @DocsEditable
@DomName('SVGDefsElement.getCTM')
+ @DocsEditable
Matrix getCtm() native "SVGDefsElement_getCTM_Callback";
- @DocsEditable
@DomName('SVGDefsElement.getScreenCTM')
+ @DocsEditable
Matrix getScreenCtm() native "SVGDefsElement_getScreenCTM_Callback";
- @DocsEditable
@DomName('SVGDefsElement.getTransformToElement')
+ @DocsEditable
Matrix getTransformToElement(SvgElement element) native "SVGDefsElement_getTransformToElement_Callback";
- @DocsEditable
@DomName('SVGDefsElement.className')
+ @DocsEditable
AnimatedString get $dom_svgClassName native "SVGDefsElement_className_Getter";
- @DocsEditable
@DomName('SVGDefsElement.style')
+ @DocsEditable
CssStyleDeclaration get style native "SVGDefsElement_style_Getter";
- @DocsEditable
@DomName('SVGDefsElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native "SVGDefsElement_getPresentationAttribute_Callback";
- @DocsEditable
@DomName('SVGDefsElement.requiredExtensions')
+ @DocsEditable
StringList get requiredExtensions native "SVGDefsElement_requiredExtensions_Getter";
- @DocsEditable
@DomName('SVGDefsElement.requiredFeatures')
+ @DocsEditable
StringList get requiredFeatures native "SVGDefsElement_requiredFeatures_Getter";
- @DocsEditable
@DomName('SVGDefsElement.systemLanguage')
+ @DocsEditable
StringList get systemLanguage native "SVGDefsElement_systemLanguage_Getter";
- @DocsEditable
@DomName('SVGDefsElement.hasExtension')
+ @DocsEditable
bool hasExtension(String extension) native "SVGDefsElement_hasExtension_Callback";
- @DocsEditable
@DomName('SVGDefsElement.transform')
+ @DocsEditable
AnimatedTransformList get transform native "SVGDefsElement_transform_Getter";
}
@@ -1123,32 +1124,32 @@
@DocsEditable
factory DescElement() => _SvgElementFactoryProvider.createSvgElement_tag("desc");
- @DocsEditable
@DomName('SVGDescElement.xmllang')
+ @DocsEditable
String get xmllang native "SVGDescElement_xmllang_Getter";
- @DocsEditable
@DomName('SVGDescElement.xmllang')
+ @DocsEditable
void set xmllang(String value) native "SVGDescElement_xmllang_Setter";
- @DocsEditable
@DomName('SVGDescElement.xmlspace')
+ @DocsEditable
String get xmlspace native "SVGDescElement_xmlspace_Getter";
- @DocsEditable
@DomName('SVGDescElement.xmlspace')
+ @DocsEditable
void set xmlspace(String value) native "SVGDescElement_xmlspace_Setter";
- @DocsEditable
@DomName('SVGDescElement.className')
+ @DocsEditable
AnimatedString get $dom_svgClassName native "SVGDescElement_className_Getter";
- @DocsEditable
@DomName('SVGDescElement.style')
+ @DocsEditable
CssStyleDeclaration get style native "SVGDescElement_style_Getter";
- @DocsEditable
@DomName('SVGDescElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native "SVGDescElement_getPresentationAttribute_Callback";
}
@@ -1164,206 +1165,368 @@
class ElementInstance extends EventTarget {
ElementInstance.internal() : super.internal();
+ @DomName('SVGElementInstance.abort')
+ @DocsEditable
static const EventStreamProvider<Event> abortEvent = const EventStreamProvider<Event>('abort');
+ @DomName('SVGElementInstance.beforecopy')
+ @DocsEditable
static const EventStreamProvider<Event> beforeCopyEvent = const EventStreamProvider<Event>('beforecopy');
+ @DomName('SVGElementInstance.beforecut')
+ @DocsEditable
static const EventStreamProvider<Event> beforeCutEvent = const EventStreamProvider<Event>('beforecut');
+ @DomName('SVGElementInstance.beforepaste')
+ @DocsEditable
static const EventStreamProvider<Event> beforePasteEvent = const EventStreamProvider<Event>('beforepaste');
+ @DomName('SVGElementInstance.blur')
+ @DocsEditable
static const EventStreamProvider<Event> blurEvent = const EventStreamProvider<Event>('blur');
+ @DomName('SVGElementInstance.change')
+ @DocsEditable
static const EventStreamProvider<Event> changeEvent = const EventStreamProvider<Event>('change');
+ @DomName('SVGElementInstance.click')
+ @DocsEditable
static const EventStreamProvider<MouseEvent> clickEvent = const EventStreamProvider<MouseEvent>('click');
+ @DomName('SVGElementInstance.contextmenu')
+ @DocsEditable
static const EventStreamProvider<MouseEvent> contextMenuEvent = const EventStreamProvider<MouseEvent>('contextmenu');
+ @DomName('SVGElementInstance.copy')
+ @DocsEditable
static const EventStreamProvider<Event> copyEvent = const EventStreamProvider<Event>('copy');
+ @DomName('SVGElementInstance.cut')
+ @DocsEditable
static const EventStreamProvider<Event> cutEvent = const EventStreamProvider<Event>('cut');
+ @DomName('SVGElementInstance.dblclick')
+ @DocsEditable
static const EventStreamProvider<Event> doubleClickEvent = const EventStreamProvider<Event>('dblclick');
+ @DomName('SVGElementInstance.drag')
+ @DocsEditable
static const EventStreamProvider<MouseEvent> dragEvent = const EventStreamProvider<MouseEvent>('drag');
+ @DomName('SVGElementInstance.dragend')
+ @DocsEditable
static const EventStreamProvider<MouseEvent> dragEndEvent = const EventStreamProvider<MouseEvent>('dragend');
+ @DomName('SVGElementInstance.dragenter')
+ @DocsEditable
static const EventStreamProvider<MouseEvent> dragEnterEvent = const EventStreamProvider<MouseEvent>('dragenter');
+ @DomName('SVGElementInstance.dragleave')
+ @DocsEditable
static const EventStreamProvider<MouseEvent> dragLeaveEvent = const EventStreamProvider<MouseEvent>('dragleave');
+ @DomName('SVGElementInstance.dragover')
+ @DocsEditable
static const EventStreamProvider<MouseEvent> dragOverEvent = const EventStreamProvider<MouseEvent>('dragover');
+ @DomName('SVGElementInstance.dragstart')
+ @DocsEditable
static const EventStreamProvider<MouseEvent> dragStartEvent = const EventStreamProvider<MouseEvent>('dragstart');
+ @DomName('SVGElementInstance.drop')
+ @DocsEditable
static const EventStreamProvider<MouseEvent> dropEvent = const EventStreamProvider<MouseEvent>('drop');
+ @DomName('SVGElementInstance.error')
+ @DocsEditable
static const EventStreamProvider<Event> errorEvent = const EventStreamProvider<Event>('error');
+ @DomName('SVGElementInstance.focus')
+ @DocsEditable
static const EventStreamProvider<Event> focusEvent = const EventStreamProvider<Event>('focus');
+ @DomName('SVGElementInstance.input')
+ @DocsEditable
static const EventStreamProvider<Event> inputEvent = const EventStreamProvider<Event>('input');
+ @DomName('SVGElementInstance.keydown')
+ @DocsEditable
static const EventStreamProvider<KeyboardEvent> keyDownEvent = const EventStreamProvider<KeyboardEvent>('keydown');
+ @DomName('SVGElementInstance.keypress')
+ @DocsEditable
static const EventStreamProvider<KeyboardEvent> keyPressEvent = const EventStreamProvider<KeyboardEvent>('keypress');
+ @DomName('SVGElementInstance.keyup')
+ @DocsEditable
static const EventStreamProvider<KeyboardEvent> keyUpEvent = const EventStreamProvider<KeyboardEvent>('keyup');
+ @DomName('SVGElementInstance.load')
+ @DocsEditable
static const EventStreamProvider<Event> loadEvent = const EventStreamProvider<Event>('load');
+ @DomName('SVGElementInstance.mousedown')
+ @DocsEditable
static const EventStreamProvider<MouseEvent> mouseDownEvent = const EventStreamProvider<MouseEvent>('mousedown');
+ @DomName('SVGElementInstance.mousemove')
+ @DocsEditable
static const EventStreamProvider<MouseEvent> mouseMoveEvent = const EventStreamProvider<MouseEvent>('mousemove');
+ @DomName('SVGElementInstance.mouseout')
+ @DocsEditable
static const EventStreamProvider<MouseEvent> mouseOutEvent = const EventStreamProvider<MouseEvent>('mouseout');
+ @DomName('SVGElementInstance.mouseover')
+ @DocsEditable
static const EventStreamProvider<MouseEvent> mouseOverEvent = const EventStreamProvider<MouseEvent>('mouseover');
+ @DomName('SVGElementInstance.mouseup')
+ @DocsEditable
static const EventStreamProvider<MouseEvent> mouseUpEvent = const EventStreamProvider<MouseEvent>('mouseup');
+ @DomName('SVGElementInstance.mousewheel')
+ @DocsEditable
static const EventStreamProvider<WheelEvent> mouseWheelEvent = const EventStreamProvider<WheelEvent>('mousewheel');
+ @DomName('SVGElementInstance.paste')
+ @DocsEditable
static const EventStreamProvider<Event> pasteEvent = const EventStreamProvider<Event>('paste');
+ @DomName('SVGElementInstance.reset')
+ @DocsEditable
static const EventStreamProvider<Event> resetEvent = const EventStreamProvider<Event>('reset');
+ @DomName('SVGElementInstance.resize')
+ @DocsEditable
static const EventStreamProvider<Event> resizeEvent = const EventStreamProvider<Event>('resize');
+ @DomName('SVGElementInstance.scroll')
+ @DocsEditable
static const EventStreamProvider<Event> scrollEvent = const EventStreamProvider<Event>('scroll');
+ @DomName('SVGElementInstance.search')
+ @DocsEditable
static const EventStreamProvider<Event> searchEvent = const EventStreamProvider<Event>('search');
+ @DomName('SVGElementInstance.select')
+ @DocsEditable
static const EventStreamProvider<Event> selectEvent = const EventStreamProvider<Event>('select');
+ @DomName('SVGElementInstance.selectstart')
+ @DocsEditable
static const EventStreamProvider<Event> selectStartEvent = const EventStreamProvider<Event>('selectstart');
+ @DomName('SVGElementInstance.submit')
+ @DocsEditable
static const EventStreamProvider<Event> submitEvent = const EventStreamProvider<Event>('submit');
+ @DomName('SVGElementInstance.unload')
+ @DocsEditable
static const EventStreamProvider<Event> unloadEvent = const EventStreamProvider<Event>('unload');
@DocsEditable
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
+ @deprecated
ElementInstanceEvents get on =>
new ElementInstanceEvents(this);
- @DocsEditable
@DomName('SVGElementInstance.childNodes')
+ @DocsEditable
List<ElementInstance> get childNodes native "SVGElementInstance_childNodes_Getter";
- @DocsEditable
@DomName('SVGElementInstance.correspondingElement')
+ @DocsEditable
SvgElement get correspondingElement native "SVGElementInstance_correspondingElement_Getter";
- @DocsEditable
@DomName('SVGElementInstance.correspondingUseElement')
+ @DocsEditable
UseElement get correspondingUseElement native "SVGElementInstance_correspondingUseElement_Getter";
- @DocsEditable
@DomName('SVGElementInstance.firstChild')
+ @DocsEditable
ElementInstance get firstChild native "SVGElementInstance_firstChild_Getter";
- @DocsEditable
@DomName('SVGElementInstance.lastChild')
+ @DocsEditable
ElementInstance get lastChild native "SVGElementInstance_lastChild_Getter";
- @DocsEditable
@DomName('SVGElementInstance.nextSibling')
+ @DocsEditable
ElementInstance get nextSibling native "SVGElementInstance_nextSibling_Getter";
- @DocsEditable
@DomName('SVGElementInstance.parentNode')
+ @DocsEditable
ElementInstance get parentNode native "SVGElementInstance_parentNode_Getter";
- @DocsEditable
@DomName('SVGElementInstance.previousSibling')
+ @DocsEditable
ElementInstance get previousSibling native "SVGElementInstance_previousSibling_Getter";
+ @DomName('SVGElementInstance.abort')
+ @DocsEditable
Stream<Event> get onAbort => abortEvent.forTarget(this);
+ @DomName('SVGElementInstance.beforecopy')
+ @DocsEditable
Stream<Event> get onBeforeCopy => beforeCopyEvent.forTarget(this);
+ @DomName('SVGElementInstance.beforecut')
+ @DocsEditable
Stream<Event> get onBeforeCut => beforeCutEvent.forTarget(this);
+ @DomName('SVGElementInstance.beforepaste')
+ @DocsEditable
Stream<Event> get onBeforePaste => beforePasteEvent.forTarget(this);
+ @DomName('SVGElementInstance.blur')
+ @DocsEditable
Stream<Event> get onBlur => blurEvent.forTarget(this);
+ @DomName('SVGElementInstance.change')
+ @DocsEditable
Stream<Event> get onChange => changeEvent.forTarget(this);
+ @DomName('SVGElementInstance.click')
+ @DocsEditable
Stream<MouseEvent> get onClick => clickEvent.forTarget(this);
+ @DomName('SVGElementInstance.contextmenu')
+ @DocsEditable
Stream<MouseEvent> get onContextMenu => contextMenuEvent.forTarget(this);
+ @DomName('SVGElementInstance.copy')
+ @DocsEditable
Stream<Event> get onCopy => copyEvent.forTarget(this);
+ @DomName('SVGElementInstance.cut')
+ @DocsEditable
Stream<Event> get onCut => cutEvent.forTarget(this);
+ @DomName('SVGElementInstance.dblclick')
+ @DocsEditable
Stream<Event> get onDoubleClick => doubleClickEvent.forTarget(this);
+ @DomName('SVGElementInstance.drag')
+ @DocsEditable
Stream<MouseEvent> get onDrag => dragEvent.forTarget(this);
+ @DomName('SVGElementInstance.dragend')
+ @DocsEditable
Stream<MouseEvent> get onDragEnd => dragEndEvent.forTarget(this);
+ @DomName('SVGElementInstance.dragenter')
+ @DocsEditable
Stream<MouseEvent> get onDragEnter => dragEnterEvent.forTarget(this);
+ @DomName('SVGElementInstance.dragleave')
+ @DocsEditable
Stream<MouseEvent> get onDragLeave => dragLeaveEvent.forTarget(this);
+ @DomName('SVGElementInstance.dragover')
+ @DocsEditable
Stream<MouseEvent> get onDragOver => dragOverEvent.forTarget(this);
+ @DomName('SVGElementInstance.dragstart')
+ @DocsEditable
Stream<MouseEvent> get onDragStart => dragStartEvent.forTarget(this);
+ @DomName('SVGElementInstance.drop')
+ @DocsEditable
Stream<MouseEvent> get onDrop => dropEvent.forTarget(this);
+ @DomName('SVGElementInstance.error')
+ @DocsEditable
Stream<Event> get onError => errorEvent.forTarget(this);
+ @DomName('SVGElementInstance.focus')
+ @DocsEditable
Stream<Event> get onFocus => focusEvent.forTarget(this);
+ @DomName('SVGElementInstance.input')
+ @DocsEditable
Stream<Event> get onInput => inputEvent.forTarget(this);
+ @DomName('SVGElementInstance.keydown')
+ @DocsEditable
Stream<KeyboardEvent> get onKeyDown => keyDownEvent.forTarget(this);
+ @DomName('SVGElementInstance.keypress')
+ @DocsEditable
Stream<KeyboardEvent> get onKeyPress => keyPressEvent.forTarget(this);
+ @DomName('SVGElementInstance.keyup')
+ @DocsEditable
Stream<KeyboardEvent> get onKeyUp => keyUpEvent.forTarget(this);
+ @DomName('SVGElementInstance.load')
+ @DocsEditable
Stream<Event> get onLoad => loadEvent.forTarget(this);
+ @DomName('SVGElementInstance.mousedown')
+ @DocsEditable
Stream<MouseEvent> get onMouseDown => mouseDownEvent.forTarget(this);
+ @DomName('SVGElementInstance.mousemove')
+ @DocsEditable
Stream<MouseEvent> get onMouseMove => mouseMoveEvent.forTarget(this);
+ @DomName('SVGElementInstance.mouseout')
+ @DocsEditable
Stream<MouseEvent> get onMouseOut => mouseOutEvent.forTarget(this);
+ @DomName('SVGElementInstance.mouseover')
+ @DocsEditable
Stream<MouseEvent> get onMouseOver => mouseOverEvent.forTarget(this);
+ @DomName('SVGElementInstance.mouseup')
+ @DocsEditable
Stream<MouseEvent> get onMouseUp => mouseUpEvent.forTarget(this);
+ @DomName('SVGElementInstance.mousewheel')
+ @DocsEditable
Stream<WheelEvent> get onMouseWheel => mouseWheelEvent.forTarget(this);
+ @DomName('SVGElementInstance.paste')
+ @DocsEditable
Stream<Event> get onPaste => pasteEvent.forTarget(this);
+ @DomName('SVGElementInstance.reset')
+ @DocsEditable
Stream<Event> get onReset => resetEvent.forTarget(this);
+ @DomName('SVGElementInstance.resize')
+ @DocsEditable
Stream<Event> get onResize => resizeEvent.forTarget(this);
+ @DomName('SVGElementInstance.scroll')
+ @DocsEditable
Stream<Event> get onScroll => scrollEvent.forTarget(this);
+ @DomName('SVGElementInstance.search')
+ @DocsEditable
Stream<Event> get onSearch => searchEvent.forTarget(this);
+ @DomName('SVGElementInstance.select')
+ @DocsEditable
Stream<Event> get onSelect => selectEvent.forTarget(this);
+ @DomName('SVGElementInstance.selectstart')
+ @DocsEditable
Stream<Event> get onSelectStart => selectStartEvent.forTarget(this);
+ @DomName('SVGElementInstance.submit')
+ @DocsEditable
Stream<Event> get onSubmit => submitEvent.forTarget(this);
+ @DomName('SVGElementInstance.unload')
+ @DocsEditable
Stream<Event> get onUnload => unloadEvent.forTarget(this);
}
@DocsEditable
+@deprecated
class ElementInstanceEvents extends Events {
@DocsEditable
ElementInstanceEvents(EventTarget _ptr) : super(_ptr);
@@ -1500,20 +1663,20 @@
class ElementTimeControl extends NativeFieldWrapperClass1 {
ElementTimeControl.internal();
- @DocsEditable
@DomName('ElementTimeControl.beginElement')
+ @DocsEditable
void beginElement() native "ElementTimeControl_beginElement_Callback";
- @DocsEditable
@DomName('ElementTimeControl.beginElementAt')
+ @DocsEditable
void beginElementAt(num offset) native "ElementTimeControl_beginElementAt_Callback";
- @DocsEditable
@DomName('ElementTimeControl.endElement')
+ @DocsEditable
void endElement() native "ElementTimeControl_endElement_Callback";
- @DocsEditable
@DomName('ElementTimeControl.endElementAt')
+ @DocsEditable
void endElementAt(num offset) native "ElementTimeControl_endElementAt_Callback";
}
@@ -1532,96 +1695,96 @@
@DocsEditable
factory EllipseElement() => _SvgElementFactoryProvider.createSvgElement_tag("ellipse");
- @DocsEditable
@DomName('SVGEllipseElement.cx')
+ @DocsEditable
AnimatedLength get cx native "SVGEllipseElement_cx_Getter";
- @DocsEditable
@DomName('SVGEllipseElement.cy')
+ @DocsEditable
AnimatedLength get cy native "SVGEllipseElement_cy_Getter";
- @DocsEditable
@DomName('SVGEllipseElement.rx')
+ @DocsEditable
AnimatedLength get rx native "SVGEllipseElement_rx_Getter";
- @DocsEditable
@DomName('SVGEllipseElement.ry')
+ @DocsEditable
AnimatedLength get ry native "SVGEllipseElement_ry_Getter";
- @DocsEditable
@DomName('SVGEllipseElement.externalResourcesRequired')
+ @DocsEditable
AnimatedBoolean get externalResourcesRequired native "SVGEllipseElement_externalResourcesRequired_Getter";
- @DocsEditable
@DomName('SVGEllipseElement.xmllang')
+ @DocsEditable
String get xmllang native "SVGEllipseElement_xmllang_Getter";
- @DocsEditable
@DomName('SVGEllipseElement.xmllang')
+ @DocsEditable
void set xmllang(String value) native "SVGEllipseElement_xmllang_Setter";
- @DocsEditable
@DomName('SVGEllipseElement.xmlspace')
+ @DocsEditable
String get xmlspace native "SVGEllipseElement_xmlspace_Getter";
- @DocsEditable
@DomName('SVGEllipseElement.xmlspace')
+ @DocsEditable
void set xmlspace(String value) native "SVGEllipseElement_xmlspace_Setter";
- @DocsEditable
@DomName('SVGEllipseElement.farthestViewportElement')
+ @DocsEditable
SvgElement get farthestViewportElement native "SVGEllipseElement_farthestViewportElement_Getter";
- @DocsEditable
@DomName('SVGEllipseElement.nearestViewportElement')
+ @DocsEditable
SvgElement get nearestViewportElement native "SVGEllipseElement_nearestViewportElement_Getter";
- @DocsEditable
@DomName('SVGEllipseElement.getBBox')
+ @DocsEditable
Rect getBBox() native "SVGEllipseElement_getBBox_Callback";
- @DocsEditable
@DomName('SVGEllipseElement.getCTM')
+ @DocsEditable
Matrix getCtm() native "SVGEllipseElement_getCTM_Callback";
- @DocsEditable
@DomName('SVGEllipseElement.getScreenCTM')
+ @DocsEditable
Matrix getScreenCtm() native "SVGEllipseElement_getScreenCTM_Callback";
- @DocsEditable
@DomName('SVGEllipseElement.getTransformToElement')
+ @DocsEditable
Matrix getTransformToElement(SvgElement element) native "SVGEllipseElement_getTransformToElement_Callback";
- @DocsEditable
@DomName('SVGEllipseElement.className')
+ @DocsEditable
AnimatedString get $dom_svgClassName native "SVGEllipseElement_className_Getter";
- @DocsEditable
@DomName('SVGEllipseElement.style')
+ @DocsEditable
CssStyleDeclaration get style native "SVGEllipseElement_style_Getter";
- @DocsEditable
@DomName('SVGEllipseElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native "SVGEllipseElement_getPresentationAttribute_Callback";
- @DocsEditable
@DomName('SVGEllipseElement.requiredExtensions')
+ @DocsEditable
StringList get requiredExtensions native "SVGEllipseElement_requiredExtensions_Getter";
- @DocsEditable
@DomName('SVGEllipseElement.requiredFeatures')
+ @DocsEditable
StringList get requiredFeatures native "SVGEllipseElement_requiredFeatures_Getter";
- @DocsEditable
@DomName('SVGEllipseElement.systemLanguage')
+ @DocsEditable
StringList get systemLanguage native "SVGEllipseElement_systemLanguage_Getter";
- @DocsEditable
@DomName('SVGEllipseElement.hasExtension')
+ @DocsEditable
bool hasExtension(String extension) native "SVGEllipseElement_hasExtension_Callback";
- @DocsEditable
@DomName('SVGEllipseElement.transform')
+ @DocsEditable
AnimatedTransformList get transform native "SVGEllipseElement_transform_Getter";
}
@@ -1637,8 +1800,8 @@
class ExternalResourcesRequired extends NativeFieldWrapperClass1 {
ExternalResourcesRequired.internal();
- @DocsEditable
@DomName('SVGExternalResourcesRequired.externalResourcesRequired')
+ @DocsEditable
AnimatedBoolean get externalResourcesRequired native "SVGExternalResourcesRequired_externalResourcesRequired_Getter";
}
@@ -1666,48 +1829,48 @@
static const int SVG_FEBLEND_MODE_UNKNOWN = 0;
- @DocsEditable
@DomName('SVGFEBlendElement.in1')
+ @DocsEditable
AnimatedString get in1 native "SVGFEBlendElement_in1_Getter";
- @DocsEditable
@DomName('SVGFEBlendElement.in2')
+ @DocsEditable
AnimatedString get in2 native "SVGFEBlendElement_in2_Getter";
- @DocsEditable
@DomName('SVGFEBlendElement.mode')
+ @DocsEditable
AnimatedEnumeration get mode native "SVGFEBlendElement_mode_Getter";
- @DocsEditable
@DomName('SVGFEBlendElement.height')
+ @DocsEditable
AnimatedLength get height native "SVGFEBlendElement_height_Getter";
- @DocsEditable
@DomName('SVGFEBlendElement.result')
+ @DocsEditable
AnimatedString get result native "SVGFEBlendElement_result_Getter";
- @DocsEditable
@DomName('SVGFEBlendElement.width')
+ @DocsEditable
AnimatedLength get width native "SVGFEBlendElement_width_Getter";
- @DocsEditable
@DomName('SVGFEBlendElement.x')
+ @DocsEditable
AnimatedLength get x native "SVGFEBlendElement_x_Getter";
- @DocsEditable
@DomName('SVGFEBlendElement.y')
+ @DocsEditable
AnimatedLength get y native "SVGFEBlendElement_y_Getter";
- @DocsEditable
@DomName('SVGFEBlendElement.className')
+ @DocsEditable
AnimatedString get $dom_svgClassName native "SVGFEBlendElement_className_Getter";
- @DocsEditable
@DomName('SVGFEBlendElement.style')
+ @DocsEditable
CssStyleDeclaration get style native "SVGFEBlendElement_style_Getter";
- @DocsEditable
@DomName('SVGFEBlendElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native "SVGFEBlendElement_getPresentationAttribute_Callback";
}
@@ -1733,48 +1896,48 @@
static const int SVG_FECOLORMATRIX_TYPE_UNKNOWN = 0;
- @DocsEditable
@DomName('SVGFEColorMatrixElement.in1')
+ @DocsEditable
AnimatedString get in1 native "SVGFEColorMatrixElement_in1_Getter";
- @DocsEditable
@DomName('SVGFEColorMatrixElement.type')
+ @DocsEditable
AnimatedEnumeration get type native "SVGFEColorMatrixElement_type_Getter";
- @DocsEditable
@DomName('SVGFEColorMatrixElement.values')
+ @DocsEditable
AnimatedNumberList get values native "SVGFEColorMatrixElement_values_Getter";
- @DocsEditable
@DomName('SVGFEColorMatrixElement.height')
+ @DocsEditable
AnimatedLength get height native "SVGFEColorMatrixElement_height_Getter";
- @DocsEditable
@DomName('SVGFEColorMatrixElement.result')
+ @DocsEditable
AnimatedString get result native "SVGFEColorMatrixElement_result_Getter";
- @DocsEditable
@DomName('SVGFEColorMatrixElement.width')
+ @DocsEditable
AnimatedLength get width native "SVGFEColorMatrixElement_width_Getter";
- @DocsEditable
@DomName('SVGFEColorMatrixElement.x')
+ @DocsEditable
AnimatedLength get x native "SVGFEColorMatrixElement_x_Getter";
- @DocsEditable
@DomName('SVGFEColorMatrixElement.y')
+ @DocsEditable
AnimatedLength get y native "SVGFEColorMatrixElement_y_Getter";
- @DocsEditable
@DomName('SVGFEColorMatrixElement.className')
+ @DocsEditable
AnimatedString get $dom_svgClassName native "SVGFEColorMatrixElement_className_Getter";
- @DocsEditable
@DomName('SVGFEColorMatrixElement.style')
+ @DocsEditable
CssStyleDeclaration get style native "SVGFEColorMatrixElement_style_Getter";
- @DocsEditable
@DomName('SVGFEColorMatrixElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native "SVGFEColorMatrixElement_getPresentationAttribute_Callback";
}
@@ -1790,40 +1953,40 @@
class FEComponentTransferElement extends SvgElement implements FilterPrimitiveStandardAttributes {
FEComponentTransferElement.internal() : super.internal();
- @DocsEditable
@DomName('SVGFEComponentTransferElement.in1')
+ @DocsEditable
AnimatedString get in1 native "SVGFEComponentTransferElement_in1_Getter";
- @DocsEditable
@DomName('SVGFEComponentTransferElement.height')
+ @DocsEditable
AnimatedLength get height native "SVGFEComponentTransferElement_height_Getter";
- @DocsEditable
@DomName('SVGFEComponentTransferElement.result')
+ @DocsEditable
AnimatedString get result native "SVGFEComponentTransferElement_result_Getter";
- @DocsEditable
@DomName('SVGFEComponentTransferElement.width')
+ @DocsEditable
AnimatedLength get width native "SVGFEComponentTransferElement_width_Getter";
- @DocsEditable
@DomName('SVGFEComponentTransferElement.x')
+ @DocsEditable
AnimatedLength get x native "SVGFEComponentTransferElement_x_Getter";
- @DocsEditable
@DomName('SVGFEComponentTransferElement.y')
+ @DocsEditable
AnimatedLength get y native "SVGFEComponentTransferElement_y_Getter";
- @DocsEditable
@DomName('SVGFEComponentTransferElement.className')
+ @DocsEditable
AnimatedString get $dom_svgClassName native "SVGFEComponentTransferElement_className_Getter";
- @DocsEditable
@DomName('SVGFEComponentTransferElement.style')
+ @DocsEditable
CssStyleDeclaration get style native "SVGFEComponentTransferElement_style_Getter";
- @DocsEditable
@DomName('SVGFEComponentTransferElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native "SVGFEComponentTransferElement_getPresentationAttribute_Callback";
}
@@ -1853,64 +2016,64 @@
static const int SVG_FECOMPOSITE_OPERATOR_XOR = 5;
- @DocsEditable
@DomName('SVGFECompositeElement.in1')
+ @DocsEditable
AnimatedString get in1 native "SVGFECompositeElement_in1_Getter";
- @DocsEditable
@DomName('SVGFECompositeElement.in2')
+ @DocsEditable
AnimatedString get in2 native "SVGFECompositeElement_in2_Getter";
- @DocsEditable
@DomName('SVGFECompositeElement.k1')
+ @DocsEditable
AnimatedNumber get k1 native "SVGFECompositeElement_k1_Getter";
- @DocsEditable
@DomName('SVGFECompositeElement.k2')
+ @DocsEditable
AnimatedNumber get k2 native "SVGFECompositeElement_k2_Getter";
- @DocsEditable
@DomName('SVGFECompositeElement.k3')
+ @DocsEditable
AnimatedNumber get k3 native "SVGFECompositeElement_k3_Getter";
- @DocsEditable
@DomName('SVGFECompositeElement.k4')
+ @DocsEditable
AnimatedNumber get k4 native "SVGFECompositeElement_k4_Getter";
- @DocsEditable
@DomName('SVGFECompositeElement.operator')
+ @DocsEditable
AnimatedEnumeration get operator native "SVGFECompositeElement_operator_Getter";
- @DocsEditable
@DomName('SVGFECompositeElement.height')
+ @DocsEditable
AnimatedLength get height native "SVGFECompositeElement_height_Getter";
- @DocsEditable
@DomName('SVGFECompositeElement.result')
+ @DocsEditable
AnimatedString get result native "SVGFECompositeElement_result_Getter";
- @DocsEditable
@DomName('SVGFECompositeElement.width')
+ @DocsEditable
AnimatedLength get width native "SVGFECompositeElement_width_Getter";
- @DocsEditable
@DomName('SVGFECompositeElement.x')
+ @DocsEditable
AnimatedLength get x native "SVGFECompositeElement_x_Getter";
- @DocsEditable
@DomName('SVGFECompositeElement.y')
+ @DocsEditable
AnimatedLength get y native "SVGFECompositeElement_y_Getter";
- @DocsEditable
@DomName('SVGFECompositeElement.className')
+ @DocsEditable
AnimatedString get $dom_svgClassName native "SVGFECompositeElement_className_Getter";
- @DocsEditable
@DomName('SVGFECompositeElement.style')
+ @DocsEditable
CssStyleDeclaration get style native "SVGFECompositeElement_style_Getter";
- @DocsEditable
@DomName('SVGFECompositeElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native "SVGFECompositeElement_getPresentationAttribute_Callback";
}
@@ -1934,84 +2097,84 @@
static const int SVG_EDGEMODE_WRAP = 2;
- @DocsEditable
@DomName('SVGFEConvolveMatrixElement.bias')
+ @DocsEditable
AnimatedNumber get bias native "SVGFEConvolveMatrixElement_bias_Getter";
- @DocsEditable
@DomName('SVGFEConvolveMatrixElement.divisor')
+ @DocsEditable
AnimatedNumber get divisor native "SVGFEConvolveMatrixElement_divisor_Getter";
- @DocsEditable
@DomName('SVGFEConvolveMatrixElement.edgeMode')
+ @DocsEditable
AnimatedEnumeration get edgeMode native "SVGFEConvolveMatrixElement_edgeMode_Getter";
- @DocsEditable
@DomName('SVGFEConvolveMatrixElement.in1')
+ @DocsEditable
AnimatedString get in1 native "SVGFEConvolveMatrixElement_in1_Getter";
- @DocsEditable
@DomName('SVGFEConvolveMatrixElement.kernelMatrix')
+ @DocsEditable
AnimatedNumberList get kernelMatrix native "SVGFEConvolveMatrixElement_kernelMatrix_Getter";
- @DocsEditable
@DomName('SVGFEConvolveMatrixElement.kernelUnitLengthX')
+ @DocsEditable
AnimatedNumber get kernelUnitLengthX native "SVGFEConvolveMatrixElement_kernelUnitLengthX_Getter";
- @DocsEditable
@DomName('SVGFEConvolveMatrixElement.kernelUnitLengthY')
+ @DocsEditable
AnimatedNumber get kernelUnitLengthY native "SVGFEConvolveMatrixElement_kernelUnitLengthY_Getter";
- @DocsEditable
@DomName('SVGFEConvolveMatrixElement.orderX')
+ @DocsEditable
AnimatedInteger get orderX native "SVGFEConvolveMatrixElement_orderX_Getter";
- @DocsEditable
@DomName('SVGFEConvolveMatrixElement.orderY')
+ @DocsEditable
AnimatedInteger get orderY native "SVGFEConvolveMatrixElement_orderY_Getter";
- @DocsEditable
@DomName('SVGFEConvolveMatrixElement.preserveAlpha')
+ @DocsEditable
AnimatedBoolean get preserveAlpha native "SVGFEConvolveMatrixElement_preserveAlpha_Getter";
- @DocsEditable
@DomName('SVGFEConvolveMatrixElement.targetX')
+ @DocsEditable
AnimatedInteger get targetX native "SVGFEConvolveMatrixElement_targetX_Getter";
- @DocsEditable
@DomName('SVGFEConvolveMatrixElement.targetY')
+ @DocsEditable
AnimatedInteger get targetY native "SVGFEConvolveMatrixElement_targetY_Getter";
- @DocsEditable
@DomName('SVGFEConvolveMatrixElement.height')
+ @DocsEditable
AnimatedLength get height native "SVGFEConvolveMatrixElement_height_Getter";
- @DocsEditable
@DomName('SVGFEConvolveMatrixElement.result')
+ @DocsEditable
AnimatedString get result native "SVGFEConvolveMatrixElement_result_Getter";
- @DocsEditable
@DomName('SVGFEConvolveMatrixElement.width')
+ @DocsEditable
AnimatedLength get width native "SVGFEConvolveMatrixElement_width_Getter";
- @DocsEditable
@DomName('SVGFEConvolveMatrixElement.x')
+ @DocsEditable
AnimatedLength get x native "SVGFEConvolveMatrixElement_x_Getter";
- @DocsEditable
@DomName('SVGFEConvolveMatrixElement.y')
+ @DocsEditable
AnimatedLength get y native "SVGFEConvolveMatrixElement_y_Getter";
- @DocsEditable
@DomName('SVGFEConvolveMatrixElement.className')
+ @DocsEditable
AnimatedString get $dom_svgClassName native "SVGFEConvolveMatrixElement_className_Getter";
- @DocsEditable
@DomName('SVGFEConvolveMatrixElement.style')
+ @DocsEditable
CssStyleDeclaration get style native "SVGFEConvolveMatrixElement_style_Getter";
- @DocsEditable
@DomName('SVGFEConvolveMatrixElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native "SVGFEConvolveMatrixElement_getPresentationAttribute_Callback";
}
@@ -2027,56 +2190,56 @@
class FEDiffuseLightingElement extends SvgElement implements FilterPrimitiveStandardAttributes {
FEDiffuseLightingElement.internal() : super.internal();
- @DocsEditable
@DomName('SVGFEDiffuseLightingElement.diffuseConstant')
+ @DocsEditable
AnimatedNumber get diffuseConstant native "SVGFEDiffuseLightingElement_diffuseConstant_Getter";
- @DocsEditable
@DomName('SVGFEDiffuseLightingElement.in1')
+ @DocsEditable
AnimatedString get in1 native "SVGFEDiffuseLightingElement_in1_Getter";
- @DocsEditable
@DomName('SVGFEDiffuseLightingElement.kernelUnitLengthX')
+ @DocsEditable
AnimatedNumber get kernelUnitLengthX native "SVGFEDiffuseLightingElement_kernelUnitLengthX_Getter";
- @DocsEditable
@DomName('SVGFEDiffuseLightingElement.kernelUnitLengthY')
+ @DocsEditable
AnimatedNumber get kernelUnitLengthY native "SVGFEDiffuseLightingElement_kernelUnitLengthY_Getter";
- @DocsEditable
@DomName('SVGFEDiffuseLightingElement.surfaceScale')
+ @DocsEditable
AnimatedNumber get surfaceScale native "SVGFEDiffuseLightingElement_surfaceScale_Getter";
- @DocsEditable
@DomName('SVGFEDiffuseLightingElement.height')
+ @DocsEditable
AnimatedLength get height native "SVGFEDiffuseLightingElement_height_Getter";
- @DocsEditable
@DomName('SVGFEDiffuseLightingElement.result')
+ @DocsEditable
AnimatedString get result native "SVGFEDiffuseLightingElement_result_Getter";
- @DocsEditable
@DomName('SVGFEDiffuseLightingElement.width')
+ @DocsEditable
AnimatedLength get width native "SVGFEDiffuseLightingElement_width_Getter";
- @DocsEditable
@DomName('SVGFEDiffuseLightingElement.x')
+ @DocsEditable
AnimatedLength get x native "SVGFEDiffuseLightingElement_x_Getter";
- @DocsEditable
@DomName('SVGFEDiffuseLightingElement.y')
+ @DocsEditable
AnimatedLength get y native "SVGFEDiffuseLightingElement_y_Getter";
- @DocsEditable
@DomName('SVGFEDiffuseLightingElement.className')
+ @DocsEditable
AnimatedString get $dom_svgClassName native "SVGFEDiffuseLightingElement_className_Getter";
- @DocsEditable
@DomName('SVGFEDiffuseLightingElement.style')
+ @DocsEditable
CssStyleDeclaration get style native "SVGFEDiffuseLightingElement_style_Getter";
- @DocsEditable
@DomName('SVGFEDiffuseLightingElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native "SVGFEDiffuseLightingElement_getPresentationAttribute_Callback";
}
@@ -2102,56 +2265,56 @@
static const int SVG_CHANNEL_UNKNOWN = 0;
- @DocsEditable
@DomName('SVGFEDisplacementMapElement.in1')
+ @DocsEditable
AnimatedString get in1 native "SVGFEDisplacementMapElement_in1_Getter";
- @DocsEditable
@DomName('SVGFEDisplacementMapElement.in2')
+ @DocsEditable
AnimatedString get in2 native "SVGFEDisplacementMapElement_in2_Getter";
- @DocsEditable
@DomName('SVGFEDisplacementMapElement.scale')
+ @DocsEditable
AnimatedNumber get scale native "SVGFEDisplacementMapElement_scale_Getter";
- @DocsEditable
@DomName('SVGFEDisplacementMapElement.xChannelSelector')
+ @DocsEditable
AnimatedEnumeration get xChannelSelector native "SVGFEDisplacementMapElement_xChannelSelector_Getter";
- @DocsEditable
@DomName('SVGFEDisplacementMapElement.yChannelSelector')
+ @DocsEditable
AnimatedEnumeration get yChannelSelector native "SVGFEDisplacementMapElement_yChannelSelector_Getter";
- @DocsEditable
@DomName('SVGFEDisplacementMapElement.height')
+ @DocsEditable
AnimatedLength get height native "SVGFEDisplacementMapElement_height_Getter";
- @DocsEditable
@DomName('SVGFEDisplacementMapElement.result')
+ @DocsEditable
AnimatedString get result native "SVGFEDisplacementMapElement_result_Getter";
- @DocsEditable
@DomName('SVGFEDisplacementMapElement.width')
+ @DocsEditable
AnimatedLength get width native "SVGFEDisplacementMapElement_width_Getter";
- @DocsEditable
@DomName('SVGFEDisplacementMapElement.x')
+ @DocsEditable
AnimatedLength get x native "SVGFEDisplacementMapElement_x_Getter";
- @DocsEditable
@DomName('SVGFEDisplacementMapElement.y')
+ @DocsEditable
AnimatedLength get y native "SVGFEDisplacementMapElement_y_Getter";
- @DocsEditable
@DomName('SVGFEDisplacementMapElement.className')
+ @DocsEditable
AnimatedString get $dom_svgClassName native "SVGFEDisplacementMapElement_className_Getter";
- @DocsEditable
@DomName('SVGFEDisplacementMapElement.style')
+ @DocsEditable
CssStyleDeclaration get style native "SVGFEDisplacementMapElement_style_Getter";
- @DocsEditable
@DomName('SVGFEDisplacementMapElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native "SVGFEDisplacementMapElement_getPresentationAttribute_Callback";
}
@@ -2167,12 +2330,12 @@
class FEDistantLightElement extends SvgElement {
FEDistantLightElement.internal() : super.internal();
- @DocsEditable
@DomName('SVGFEDistantLightElement.azimuth')
+ @DocsEditable
AnimatedNumber get azimuth native "SVGFEDistantLightElement_azimuth_Getter";
- @DocsEditable
@DomName('SVGFEDistantLightElement.elevation')
+ @DocsEditable
AnimatedNumber get elevation native "SVGFEDistantLightElement_elevation_Getter";
}
@@ -2188,60 +2351,60 @@
class FEDropShadowElement extends SvgElement implements FilterPrimitiveStandardAttributes {
FEDropShadowElement.internal() : super.internal();
- @DocsEditable
@DomName('SVGFEDropShadowElement.dx')
+ @DocsEditable
AnimatedNumber get dx native "SVGFEDropShadowElement_dx_Getter";
- @DocsEditable
@DomName('SVGFEDropShadowElement.dy')
+ @DocsEditable
AnimatedNumber get dy native "SVGFEDropShadowElement_dy_Getter";
- @DocsEditable
@DomName('SVGFEDropShadowElement.in1')
+ @DocsEditable
AnimatedString get in1 native "SVGFEDropShadowElement_in1_Getter";
- @DocsEditable
@DomName('SVGFEDropShadowElement.stdDeviationX')
+ @DocsEditable
AnimatedNumber get stdDeviationX native "SVGFEDropShadowElement_stdDeviationX_Getter";
- @DocsEditable
@DomName('SVGFEDropShadowElement.stdDeviationY')
+ @DocsEditable
AnimatedNumber get stdDeviationY native "SVGFEDropShadowElement_stdDeviationY_Getter";
- @DocsEditable
@DomName('SVGFEDropShadowElement.setStdDeviation')
+ @DocsEditable
void setStdDeviation(num stdDeviationX, num stdDeviationY) native "SVGFEDropShadowElement_setStdDeviation_Callback";
- @DocsEditable
@DomName('SVGFEDropShadowElement.height')
+ @DocsEditable
AnimatedLength get height native "SVGFEDropShadowElement_height_Getter";
- @DocsEditable
@DomName('SVGFEDropShadowElement.result')
+ @DocsEditable
AnimatedString get result native "SVGFEDropShadowElement_result_Getter";
- @DocsEditable
@DomName('SVGFEDropShadowElement.width')
+ @DocsEditable
AnimatedLength get width native "SVGFEDropShadowElement_width_Getter";
- @DocsEditable
@DomName('SVGFEDropShadowElement.x')
+ @DocsEditable
AnimatedLength get x native "SVGFEDropShadowElement_x_Getter";
- @DocsEditable
@DomName('SVGFEDropShadowElement.y')
+ @DocsEditable
AnimatedLength get y native "SVGFEDropShadowElement_y_Getter";
- @DocsEditable
@DomName('SVGFEDropShadowElement.className')
+ @DocsEditable
AnimatedString get $dom_svgClassName native "SVGFEDropShadowElement_className_Getter";
- @DocsEditable
@DomName('SVGFEDropShadowElement.style')
+ @DocsEditable
CssStyleDeclaration get style native "SVGFEDropShadowElement_style_Getter";
- @DocsEditable
@DomName('SVGFEDropShadowElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native "SVGFEDropShadowElement_getPresentationAttribute_Callback";
}
@@ -2257,36 +2420,36 @@
class FEFloodElement extends SvgElement implements FilterPrimitiveStandardAttributes {
FEFloodElement.internal() : super.internal();
- @DocsEditable
@DomName('SVGFEFloodElement.height')
+ @DocsEditable
AnimatedLength get height native "SVGFEFloodElement_height_Getter";
- @DocsEditable
@DomName('SVGFEFloodElement.result')
+ @DocsEditable
AnimatedString get result native "SVGFEFloodElement_result_Getter";
- @DocsEditable
@DomName('SVGFEFloodElement.width')
+ @DocsEditable
AnimatedLength get width native "SVGFEFloodElement_width_Getter";
- @DocsEditable
@DomName('SVGFEFloodElement.x')
+ @DocsEditable
AnimatedLength get x native "SVGFEFloodElement_x_Getter";
- @DocsEditable
@DomName('SVGFEFloodElement.y')
+ @DocsEditable
AnimatedLength get y native "SVGFEFloodElement_y_Getter";
- @DocsEditable
@DomName('SVGFEFloodElement.className')
+ @DocsEditable
AnimatedString get $dom_svgClassName native "SVGFEFloodElement_className_Getter";
- @DocsEditable
@DomName('SVGFEFloodElement.style')
+ @DocsEditable
CssStyleDeclaration get style native "SVGFEFloodElement_style_Getter";
- @DocsEditable
@DomName('SVGFEFloodElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native "SVGFEFloodElement_getPresentationAttribute_Callback";
}
@@ -2354,52 +2517,52 @@
class FEGaussianBlurElement extends SvgElement implements FilterPrimitiveStandardAttributes {
FEGaussianBlurElement.internal() : super.internal();
- @DocsEditable
@DomName('SVGFEGaussianBlurElement.in1')
+ @DocsEditable
AnimatedString get in1 native "SVGFEGaussianBlurElement_in1_Getter";
- @DocsEditable
@DomName('SVGFEGaussianBlurElement.stdDeviationX')
+ @DocsEditable
AnimatedNumber get stdDeviationX native "SVGFEGaussianBlurElement_stdDeviationX_Getter";
- @DocsEditable
@DomName('SVGFEGaussianBlurElement.stdDeviationY')
+ @DocsEditable
AnimatedNumber get stdDeviationY native "SVGFEGaussianBlurElement_stdDeviationY_Getter";
- @DocsEditable
@DomName('SVGFEGaussianBlurElement.setStdDeviation')
+ @DocsEditable
void setStdDeviation(num stdDeviationX, num stdDeviationY) native "SVGFEGaussianBlurElement_setStdDeviation_Callback";
- @DocsEditable
@DomName('SVGFEGaussianBlurElement.height')
+ @DocsEditable
AnimatedLength get height native "SVGFEGaussianBlurElement_height_Getter";
- @DocsEditable
@DomName('SVGFEGaussianBlurElement.result')
+ @DocsEditable
AnimatedString get result native "SVGFEGaussianBlurElement_result_Getter";
- @DocsEditable
@DomName('SVGFEGaussianBlurElement.width')
+ @DocsEditable
AnimatedLength get width native "SVGFEGaussianBlurElement_width_Getter";
- @DocsEditable
@DomName('SVGFEGaussianBlurElement.x')
+ @DocsEditable
AnimatedLength get x native "SVGFEGaussianBlurElement_x_Getter";
- @DocsEditable
@DomName('SVGFEGaussianBlurElement.y')
+ @DocsEditable
AnimatedLength get y native "SVGFEGaussianBlurElement_y_Getter";
- @DocsEditable
@DomName('SVGFEGaussianBlurElement.className')
+ @DocsEditable
AnimatedString get $dom_svgClassName native "SVGFEGaussianBlurElement_className_Getter";
- @DocsEditable
@DomName('SVGFEGaussianBlurElement.style')
+ @DocsEditable
CssStyleDeclaration get style native "SVGFEGaussianBlurElement_style_Getter";
- @DocsEditable
@DomName('SVGFEGaussianBlurElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native "SVGFEGaussianBlurElement_getPresentationAttribute_Callback";
}
@@ -2415,64 +2578,64 @@
class FEImageElement extends SvgElement implements FilterPrimitiveStandardAttributes, UriReference, ExternalResourcesRequired, LangSpace {
FEImageElement.internal() : super.internal();
- @DocsEditable
@DomName('SVGFEImageElement.preserveAspectRatio')
+ @DocsEditable
AnimatedPreserveAspectRatio get preserveAspectRatio native "SVGFEImageElement_preserveAspectRatio_Getter";
- @DocsEditable
@DomName('SVGFEImageElement.externalResourcesRequired')
+ @DocsEditable
AnimatedBoolean get externalResourcesRequired native "SVGFEImageElement_externalResourcesRequired_Getter";
- @DocsEditable
@DomName('SVGFEImageElement.height')
+ @DocsEditable
AnimatedLength get height native "SVGFEImageElement_height_Getter";
- @DocsEditable
@DomName('SVGFEImageElement.result')
+ @DocsEditable
AnimatedString get result native "SVGFEImageElement_result_Getter";
- @DocsEditable
@DomName('SVGFEImageElement.width')
+ @DocsEditable
AnimatedLength get width native "SVGFEImageElement_width_Getter";
- @DocsEditable
@DomName('SVGFEImageElement.x')
+ @DocsEditable
AnimatedLength get x native "SVGFEImageElement_x_Getter";
- @DocsEditable
@DomName('SVGFEImageElement.y')
+ @DocsEditable
AnimatedLength get y native "SVGFEImageElement_y_Getter";
- @DocsEditable
@DomName('SVGFEImageElement.xmllang')
+ @DocsEditable
String get xmllang native "SVGFEImageElement_xmllang_Getter";
- @DocsEditable
@DomName('SVGFEImageElement.xmllang')
+ @DocsEditable
void set xmllang(String value) native "SVGFEImageElement_xmllang_Setter";
- @DocsEditable
@DomName('SVGFEImageElement.xmlspace')
+ @DocsEditable
String get xmlspace native "SVGFEImageElement_xmlspace_Getter";
- @DocsEditable
@DomName('SVGFEImageElement.xmlspace')
+ @DocsEditable
void set xmlspace(String value) native "SVGFEImageElement_xmlspace_Setter";
- @DocsEditable
@DomName('SVGFEImageElement.className')
+ @DocsEditable
AnimatedString get $dom_svgClassName native "SVGFEImageElement_className_Getter";
- @DocsEditable
@DomName('SVGFEImageElement.style')
+ @DocsEditable
CssStyleDeclaration get style native "SVGFEImageElement_style_Getter";
- @DocsEditable
@DomName('SVGFEImageElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native "SVGFEImageElement_getPresentationAttribute_Callback";
- @DocsEditable
@DomName('SVGFEImageElement.href')
+ @DocsEditable
AnimatedString get href native "SVGFEImageElement_href_Getter";
}
@@ -2488,36 +2651,36 @@
class FEMergeElement extends SvgElement implements FilterPrimitiveStandardAttributes {
FEMergeElement.internal() : super.internal();
- @DocsEditable
@DomName('SVGFEMergeElement.height')
+ @DocsEditable
AnimatedLength get height native "SVGFEMergeElement_height_Getter";
- @DocsEditable
@DomName('SVGFEMergeElement.result')
+ @DocsEditable
AnimatedString get result native "SVGFEMergeElement_result_Getter";
- @DocsEditable
@DomName('SVGFEMergeElement.width')
+ @DocsEditable
AnimatedLength get width native "SVGFEMergeElement_width_Getter";
- @DocsEditable
@DomName('SVGFEMergeElement.x')
+ @DocsEditable
AnimatedLength get x native "SVGFEMergeElement_x_Getter";
- @DocsEditable
@DomName('SVGFEMergeElement.y')
+ @DocsEditable
AnimatedLength get y native "SVGFEMergeElement_y_Getter";
- @DocsEditable
@DomName('SVGFEMergeElement.className')
+ @DocsEditable
AnimatedString get $dom_svgClassName native "SVGFEMergeElement_className_Getter";
- @DocsEditable
@DomName('SVGFEMergeElement.style')
+ @DocsEditable
CssStyleDeclaration get style native "SVGFEMergeElement_style_Getter";
- @DocsEditable
@DomName('SVGFEMergeElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native "SVGFEMergeElement_getPresentationAttribute_Callback";
}
@@ -2533,8 +2696,8 @@
class FEMergeNodeElement extends SvgElement {
FEMergeNodeElement.internal() : super.internal();
- @DocsEditable
@DomName('SVGFEMergeNodeElement.in1')
+ @DocsEditable
AnimatedString get in1 native "SVGFEMergeNodeElement_in1_Getter";
}
@@ -2556,56 +2719,56 @@
static const int SVG_MORPHOLOGY_OPERATOR_UNKNOWN = 0;
- @DocsEditable
@DomName('SVGFEMorphologyElement.in1')
+ @DocsEditable
AnimatedString get in1 native "SVGFEMorphologyElement_in1_Getter";
- @DocsEditable
@DomName('SVGFEMorphologyElement.operator')
+ @DocsEditable
AnimatedEnumeration get operator native "SVGFEMorphologyElement_operator_Getter";
- @DocsEditable
@DomName('SVGFEMorphologyElement.radiusX')
+ @DocsEditable
AnimatedNumber get radiusX native "SVGFEMorphologyElement_radiusX_Getter";
- @DocsEditable
@DomName('SVGFEMorphologyElement.radiusY')
+ @DocsEditable
AnimatedNumber get radiusY native "SVGFEMorphologyElement_radiusY_Getter";
- @DocsEditable
@DomName('SVGFEMorphologyElement.setRadius')
+ @DocsEditable
void setRadius(num radiusX, num radiusY) native "SVGFEMorphologyElement_setRadius_Callback";
- @DocsEditable
@DomName('SVGFEMorphologyElement.height')
+ @DocsEditable
AnimatedLength get height native "SVGFEMorphologyElement_height_Getter";
- @DocsEditable
@DomName('SVGFEMorphologyElement.result')
+ @DocsEditable
AnimatedString get result native "SVGFEMorphologyElement_result_Getter";
- @DocsEditable
@DomName('SVGFEMorphologyElement.width')
+ @DocsEditable
AnimatedLength get width native "SVGFEMorphologyElement_width_Getter";
- @DocsEditable
@DomName('SVGFEMorphologyElement.x')
+ @DocsEditable
AnimatedLength get x native "SVGFEMorphologyElement_x_Getter";
- @DocsEditable
@DomName('SVGFEMorphologyElement.y')
+ @DocsEditable
AnimatedLength get y native "SVGFEMorphologyElement_y_Getter";
- @DocsEditable
@DomName('SVGFEMorphologyElement.className')
+ @DocsEditable
AnimatedString get $dom_svgClassName native "SVGFEMorphologyElement_className_Getter";
- @DocsEditable
@DomName('SVGFEMorphologyElement.style')
+ @DocsEditable
CssStyleDeclaration get style native "SVGFEMorphologyElement_style_Getter";
- @DocsEditable
@DomName('SVGFEMorphologyElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native "SVGFEMorphologyElement_getPresentationAttribute_Callback";
}
@@ -2621,48 +2784,48 @@
class FEOffsetElement extends SvgElement implements FilterPrimitiveStandardAttributes {
FEOffsetElement.internal() : super.internal();
- @DocsEditable
@DomName('SVGFEOffsetElement.dx')
+ @DocsEditable
AnimatedNumber get dx native "SVGFEOffsetElement_dx_Getter";
- @DocsEditable
@DomName('SVGFEOffsetElement.dy')
+ @DocsEditable
AnimatedNumber get dy native "SVGFEOffsetElement_dy_Getter";
- @DocsEditable
@DomName('SVGFEOffsetElement.in1')
+ @DocsEditable
AnimatedString get in1 native "SVGFEOffsetElement_in1_Getter";
- @DocsEditable
@DomName('SVGFEOffsetElement.height')
+ @DocsEditable
AnimatedLength get height native "SVGFEOffsetElement_height_Getter";
- @DocsEditable
@DomName('SVGFEOffsetElement.result')
+ @DocsEditable
AnimatedString get result native "SVGFEOffsetElement_result_Getter";
- @DocsEditable
@DomName('SVGFEOffsetElement.width')
+ @DocsEditable
AnimatedLength get width native "SVGFEOffsetElement_width_Getter";
- @DocsEditable
@DomName('SVGFEOffsetElement.x')
+ @DocsEditable
AnimatedLength get x native "SVGFEOffsetElement_x_Getter";
- @DocsEditable
@DomName('SVGFEOffsetElement.y')
+ @DocsEditable
AnimatedLength get y native "SVGFEOffsetElement_y_Getter";
- @DocsEditable
@DomName('SVGFEOffsetElement.className')
+ @DocsEditable
AnimatedString get $dom_svgClassName native "SVGFEOffsetElement_className_Getter";
- @DocsEditable
@DomName('SVGFEOffsetElement.style')
+ @DocsEditable
CssStyleDeclaration get style native "SVGFEOffsetElement_style_Getter";
- @DocsEditable
@DomName('SVGFEOffsetElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native "SVGFEOffsetElement_getPresentationAttribute_Callback";
}
@@ -2678,16 +2841,16 @@
class FEPointLightElement extends SvgElement {
FEPointLightElement.internal() : super.internal();
- @DocsEditable
@DomName('SVGFEPointLightElement.x')
+ @DocsEditable
AnimatedNumber get x native "SVGFEPointLightElement_x_Getter";
- @DocsEditable
@DomName('SVGFEPointLightElement.y')
+ @DocsEditable
AnimatedNumber get y native "SVGFEPointLightElement_y_Getter";
- @DocsEditable
@DomName('SVGFEPointLightElement.z')
+ @DocsEditable
AnimatedNumber get z native "SVGFEPointLightElement_z_Getter";
}
@@ -2703,52 +2866,52 @@
class FESpecularLightingElement extends SvgElement implements FilterPrimitiveStandardAttributes {
FESpecularLightingElement.internal() : super.internal();
- @DocsEditable
@DomName('SVGFESpecularLightingElement.in1')
+ @DocsEditable
AnimatedString get in1 native "SVGFESpecularLightingElement_in1_Getter";
- @DocsEditable
@DomName('SVGFESpecularLightingElement.specularConstant')
+ @DocsEditable
AnimatedNumber get specularConstant native "SVGFESpecularLightingElement_specularConstant_Getter";
- @DocsEditable
@DomName('SVGFESpecularLightingElement.specularExponent')
+ @DocsEditable
AnimatedNumber get specularExponent native "SVGFESpecularLightingElement_specularExponent_Getter";
- @DocsEditable
@DomName('SVGFESpecularLightingElement.surfaceScale')
+ @DocsEditable
AnimatedNumber get surfaceScale native "SVGFESpecularLightingElement_surfaceScale_Getter";
- @DocsEditable
@DomName('SVGFESpecularLightingElement.height')
+ @DocsEditable
AnimatedLength get height native "SVGFESpecularLightingElement_height_Getter";
- @DocsEditable
@DomName('SVGFESpecularLightingElement.result')
+ @DocsEditable
AnimatedString get result native "SVGFESpecularLightingElement_result_Getter";
- @DocsEditable
@DomName('SVGFESpecularLightingElement.width')
+ @DocsEditable
AnimatedLength get width native "SVGFESpecularLightingElement_width_Getter";
- @DocsEditable
@DomName('SVGFESpecularLightingElement.x')
+ @DocsEditable
AnimatedLength get x native "SVGFESpecularLightingElement_x_Getter";
- @DocsEditable
@DomName('SVGFESpecularLightingElement.y')
+ @DocsEditable
AnimatedLength get y native "SVGFESpecularLightingElement_y_Getter";
- @DocsEditable
@DomName('SVGFESpecularLightingElement.className')
+ @DocsEditable
AnimatedString get $dom_svgClassName native "SVGFESpecularLightingElement_className_Getter";
- @DocsEditable
@DomName('SVGFESpecularLightingElement.style')
+ @DocsEditable
CssStyleDeclaration get style native "SVGFESpecularLightingElement_style_Getter";
- @DocsEditable
@DomName('SVGFESpecularLightingElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native "SVGFESpecularLightingElement_getPresentationAttribute_Callback";
}
@@ -2764,36 +2927,36 @@
class FESpotLightElement extends SvgElement {
FESpotLightElement.internal() : super.internal();
- @DocsEditable
@DomName('SVGFESpotLightElement.limitingConeAngle')
+ @DocsEditable
AnimatedNumber get limitingConeAngle native "SVGFESpotLightElement_limitingConeAngle_Getter";
- @DocsEditable
@DomName('SVGFESpotLightElement.pointsAtX')
+ @DocsEditable
AnimatedNumber get pointsAtX native "SVGFESpotLightElement_pointsAtX_Getter";
- @DocsEditable
@DomName('SVGFESpotLightElement.pointsAtY')
+ @DocsEditable
AnimatedNumber get pointsAtY native "SVGFESpotLightElement_pointsAtY_Getter";
- @DocsEditable
@DomName('SVGFESpotLightElement.pointsAtZ')
+ @DocsEditable
AnimatedNumber get pointsAtZ native "SVGFESpotLightElement_pointsAtZ_Getter";
- @DocsEditable
@DomName('SVGFESpotLightElement.specularExponent')
+ @DocsEditable
AnimatedNumber get specularExponent native "SVGFESpotLightElement_specularExponent_Getter";
- @DocsEditable
@DomName('SVGFESpotLightElement.x')
+ @DocsEditable
AnimatedNumber get x native "SVGFESpotLightElement_x_Getter";
- @DocsEditable
@DomName('SVGFESpotLightElement.y')
+ @DocsEditable
AnimatedNumber get y native "SVGFESpotLightElement_y_Getter";
- @DocsEditable
@DomName('SVGFESpotLightElement.z')
+ @DocsEditable
AnimatedNumber get z native "SVGFESpotLightElement_z_Getter";
}
@@ -2809,40 +2972,40 @@
class FETileElement extends SvgElement implements FilterPrimitiveStandardAttributes {
FETileElement.internal() : super.internal();
- @DocsEditable
@DomName('SVGFETileElement.in1')
+ @DocsEditable
AnimatedString get in1 native "SVGFETileElement_in1_Getter";
- @DocsEditable
@DomName('SVGFETileElement.height')
+ @DocsEditable
AnimatedLength get height native "SVGFETileElement_height_Getter";
- @DocsEditable
@DomName('SVGFETileElement.result')
+ @DocsEditable
AnimatedString get result native "SVGFETileElement_result_Getter";
- @DocsEditable
@DomName('SVGFETileElement.width')
+ @DocsEditable
AnimatedLength get width native "SVGFETileElement_width_Getter";
- @DocsEditable
@DomName('SVGFETileElement.x')
+ @DocsEditable
AnimatedLength get x native "SVGFETileElement_x_Getter";
- @DocsEditable
@DomName('SVGFETileElement.y')
+ @DocsEditable
AnimatedLength get y native "SVGFETileElement_y_Getter";
- @DocsEditable
@DomName('SVGFETileElement.className')
+ @DocsEditable
AnimatedString get $dom_svgClassName native "SVGFETileElement_className_Getter";
- @DocsEditable
@DomName('SVGFETileElement.style')
+ @DocsEditable
CssStyleDeclaration get style native "SVGFETileElement_style_Getter";
- @DocsEditable
@DomName('SVGFETileElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native "SVGFETileElement_getPresentationAttribute_Callback";
}
@@ -2870,60 +3033,60 @@
static const int SVG_TURBULENCE_TYPE_UNKNOWN = 0;
- @DocsEditable
@DomName('SVGFETurbulenceElement.baseFrequencyX')
+ @DocsEditable
AnimatedNumber get baseFrequencyX native "SVGFETurbulenceElement_baseFrequencyX_Getter";
- @DocsEditable
@DomName('SVGFETurbulenceElement.baseFrequencyY')
+ @DocsEditable
AnimatedNumber get baseFrequencyY native "SVGFETurbulenceElement_baseFrequencyY_Getter";
- @DocsEditable
@DomName('SVGFETurbulenceElement.numOctaves')
+ @DocsEditable
AnimatedInteger get numOctaves native "SVGFETurbulenceElement_numOctaves_Getter";
- @DocsEditable
@DomName('SVGFETurbulenceElement.seed')
+ @DocsEditable
AnimatedNumber get seed native "SVGFETurbulenceElement_seed_Getter";
- @DocsEditable
@DomName('SVGFETurbulenceElement.stitchTiles')
+ @DocsEditable
AnimatedEnumeration get stitchTiles native "SVGFETurbulenceElement_stitchTiles_Getter";
- @DocsEditable
@DomName('SVGFETurbulenceElement.type')
+ @DocsEditable
AnimatedEnumeration get type native "SVGFETurbulenceElement_type_Getter";
- @DocsEditable
@DomName('SVGFETurbulenceElement.height')
+ @DocsEditable
AnimatedLength get height native "SVGFETurbulenceElement_height_Getter";
- @DocsEditable
@DomName('SVGFETurbulenceElement.result')
+ @DocsEditable
AnimatedString get result native "SVGFETurbulenceElement_result_Getter";
- @DocsEditable
@DomName('SVGFETurbulenceElement.width')
+ @DocsEditable
AnimatedLength get width native "SVGFETurbulenceElement_width_Getter";
- @DocsEditable
@DomName('SVGFETurbulenceElement.x')
+ @DocsEditable
AnimatedLength get x native "SVGFETurbulenceElement_x_Getter";
- @DocsEditable
@DomName('SVGFETurbulenceElement.y')
+ @DocsEditable
AnimatedLength get y native "SVGFETurbulenceElement_y_Getter";
- @DocsEditable
@DomName('SVGFETurbulenceElement.className')
+ @DocsEditable
AnimatedString get $dom_svgClassName native "SVGFETurbulenceElement_className_Getter";
- @DocsEditable
@DomName('SVGFETurbulenceElement.style')
+ @DocsEditable
CssStyleDeclaration get style native "SVGFETurbulenceElement_style_Getter";
- @DocsEditable
@DomName('SVGFETurbulenceElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native "SVGFETurbulenceElement_getPresentationAttribute_Callback";
}
@@ -2942,76 +3105,76 @@
@DocsEditable
factory FilterElement() => _SvgElementFactoryProvider.createSvgElement_tag("filter");
- @DocsEditable
@DomName('SVGFilterElement.filterResX')
+ @DocsEditable
AnimatedInteger get filterResX native "SVGFilterElement_filterResX_Getter";
- @DocsEditable
@DomName('SVGFilterElement.filterResY')
+ @DocsEditable
AnimatedInteger get filterResY native "SVGFilterElement_filterResY_Getter";
- @DocsEditable
@DomName('SVGFilterElement.filterUnits')
+ @DocsEditable
AnimatedEnumeration get filterUnits native "SVGFilterElement_filterUnits_Getter";
- @DocsEditable
@DomName('SVGFilterElement.height')
+ @DocsEditable
AnimatedLength get height native "SVGFilterElement_height_Getter";
- @DocsEditable
@DomName('SVGFilterElement.primitiveUnits')
+ @DocsEditable
AnimatedEnumeration get primitiveUnits native "SVGFilterElement_primitiveUnits_Getter";
- @DocsEditable
@DomName('SVGFilterElement.width')
+ @DocsEditable
AnimatedLength get width native "SVGFilterElement_width_Getter";
- @DocsEditable
@DomName('SVGFilterElement.x')
+ @DocsEditable
AnimatedLength get x native "SVGFilterElement_x_Getter";
- @DocsEditable
@DomName('SVGFilterElement.y')
+ @DocsEditable
AnimatedLength get y native "SVGFilterElement_y_Getter";
- @DocsEditable
@DomName('SVGFilterElement.setFilterRes')
+ @DocsEditable
void setFilterRes(int filterResX, int filterResY) native "SVGFilterElement_setFilterRes_Callback";
- @DocsEditable
@DomName('SVGFilterElement.externalResourcesRequired')
+ @DocsEditable
AnimatedBoolean get externalResourcesRequired native "SVGFilterElement_externalResourcesRequired_Getter";
- @DocsEditable
@DomName('SVGFilterElement.xmllang')
+ @DocsEditable
String get xmllang native "SVGFilterElement_xmllang_Getter";
- @DocsEditable
@DomName('SVGFilterElement.xmllang')
+ @DocsEditable
void set xmllang(String value) native "SVGFilterElement_xmllang_Setter";
- @DocsEditable
@DomName('SVGFilterElement.xmlspace')
+ @DocsEditable
String get xmlspace native "SVGFilterElement_xmlspace_Getter";
- @DocsEditable
@DomName('SVGFilterElement.xmlspace')
+ @DocsEditable
void set xmlspace(String value) native "SVGFilterElement_xmlspace_Setter";
- @DocsEditable
@DomName('SVGFilterElement.className')
+ @DocsEditable
AnimatedString get $dom_svgClassName native "SVGFilterElement_className_Getter";
- @DocsEditable
@DomName('SVGFilterElement.style')
+ @DocsEditable
CssStyleDeclaration get style native "SVGFilterElement_style_Getter";
- @DocsEditable
@DomName('SVGFilterElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native "SVGFilterElement_getPresentationAttribute_Callback";
- @DocsEditable
@DomName('SVGFilterElement.href')
+ @DocsEditable
AnimatedString get href native "SVGFilterElement_href_Getter";
}
@@ -3027,36 +3190,36 @@
class FilterPrimitiveStandardAttributes extends NativeFieldWrapperClass1 implements Stylable {
FilterPrimitiveStandardAttributes.internal();
- @DocsEditable
@DomName('SVGFilterPrimitiveStandardAttributes.height')
+ @DocsEditable
AnimatedLength get height native "SVGFilterPrimitiveStandardAttributes_height_Getter";
- @DocsEditable
@DomName('SVGFilterPrimitiveStandardAttributes.result')
+ @DocsEditable
AnimatedString get result native "SVGFilterPrimitiveStandardAttributes_result_Getter";
- @DocsEditable
@DomName('SVGFilterPrimitiveStandardAttributes.width')
+ @DocsEditable
AnimatedLength get width native "SVGFilterPrimitiveStandardAttributes_width_Getter";
- @DocsEditable
@DomName('SVGFilterPrimitiveStandardAttributes.x')
+ @DocsEditable
AnimatedLength get x native "SVGFilterPrimitiveStandardAttributes_x_Getter";
- @DocsEditable
@DomName('SVGFilterPrimitiveStandardAttributes.y')
+ @DocsEditable
AnimatedLength get y native "SVGFilterPrimitiveStandardAttributes_y_Getter";
- @DocsEditable
@DomName('SVGFilterPrimitiveStandardAttributes.className')
+ @DocsEditable
AnimatedString get $dom_svgClassName native "SVGFilterPrimitiveStandardAttributes_className_Getter";
- @DocsEditable
@DomName('SVGFilterPrimitiveStandardAttributes.style')
+ @DocsEditable
CssStyleDeclaration get style native "SVGFilterPrimitiveStandardAttributes_style_Getter";
- @DocsEditable
@DomName('SVGFilterPrimitiveStandardAttributes.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native "SVGFilterPrimitiveStandardAttributes_getPresentationAttribute_Callback";
}
@@ -3072,12 +3235,12 @@
class FitToViewBox extends NativeFieldWrapperClass1 {
FitToViewBox.internal();
- @DocsEditable
@DomName('SVGFitToViewBox.preserveAspectRatio')
+ @DocsEditable
AnimatedPreserveAspectRatio get preserveAspectRatio native "SVGFitToViewBox_preserveAspectRatio_Getter";
- @DocsEditable
@DomName('SVGFitToViewBox.viewBox')
+ @DocsEditable
AnimatedRect get viewBox native "SVGFitToViewBox_viewBox_Getter";
}
@@ -3192,96 +3355,96 @@
@DocsEditable
factory ForeignObjectElement() => _SvgElementFactoryProvider.createSvgElement_tag("foreignObject");
- @DocsEditable
@DomName('SVGForeignObjectElement.height')
+ @DocsEditable
AnimatedLength get height native "SVGForeignObjectElement_height_Getter";
- @DocsEditable
@DomName('SVGForeignObjectElement.width')
+ @DocsEditable
AnimatedLength get width native "SVGForeignObjectElement_width_Getter";
- @DocsEditable
@DomName('SVGForeignObjectElement.x')
+ @DocsEditable
AnimatedLength get x native "SVGForeignObjectElement_x_Getter";
- @DocsEditable
@DomName('SVGForeignObjectElement.y')
+ @DocsEditable
AnimatedLength get y native "SVGForeignObjectElement_y_Getter";
- @DocsEditable
@DomName('SVGForeignObjectElement.externalResourcesRequired')
+ @DocsEditable
AnimatedBoolean get externalResourcesRequired native "SVGForeignObjectElement_externalResourcesRequired_Getter";
- @DocsEditable
@DomName('SVGForeignObjectElement.xmllang')
+ @DocsEditable
String get xmllang native "SVGForeignObjectElement_xmllang_Getter";
- @DocsEditable
@DomName('SVGForeignObjectElement.xmllang')
+ @DocsEditable
void set xmllang(String value) native "SVGForeignObjectElement_xmllang_Setter";
- @DocsEditable
@DomName('SVGForeignObjectElement.xmlspace')
+ @DocsEditable
String get xmlspace native "SVGForeignObjectElement_xmlspace_Getter";
- @DocsEditable
@DomName('SVGForeignObjectElement.xmlspace')
+ @DocsEditable
void set xmlspace(String value) native "SVGForeignObjectElement_xmlspace_Setter";
- @DocsEditable
@DomName('SVGForeignObjectElement.farthestViewportElement')
+ @DocsEditable
SvgElement get farthestViewportElement native "SVGForeignObjectElement_farthestViewportElement_Getter";
- @DocsEditable
@DomName('SVGForeignObjectElement.nearestViewportElement')
+ @DocsEditable
SvgElement get nearestViewportElement native "SVGForeignObjectElement_nearestViewportElement_Getter";
- @DocsEditable
@DomName('SVGForeignObjectElement.getBBox')
+ @DocsEditable
Rect getBBox() native "SVGForeignObjectElement_getBBox_Callback";
- @DocsEditable
@DomName('SVGForeignObjectElement.getCTM')
+ @DocsEditable
Matrix getCtm() native "SVGForeignObjectElement_getCTM_Callback";
- @DocsEditable
@DomName('SVGForeignObjectElement.getScreenCTM')
+ @DocsEditable
Matrix getScreenCtm() native "SVGForeignObjectElement_getScreenCTM_Callback";
- @DocsEditable
@DomName('SVGForeignObjectElement.getTransformToElement')
+ @DocsEditable
Matrix getTransformToElement(SvgElement element) native "SVGForeignObjectElement_getTransformToElement_Callback";
- @DocsEditable
@DomName('SVGForeignObjectElement.className')
+ @DocsEditable
AnimatedString get $dom_svgClassName native "SVGForeignObjectElement_className_Getter";
- @DocsEditable
@DomName('SVGForeignObjectElement.style')
+ @DocsEditable
CssStyleDeclaration get style native "SVGForeignObjectElement_style_Getter";
- @DocsEditable
@DomName('SVGForeignObjectElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native "SVGForeignObjectElement_getPresentationAttribute_Callback";
- @DocsEditable
@DomName('SVGForeignObjectElement.requiredExtensions')
+ @DocsEditable
StringList get requiredExtensions native "SVGForeignObjectElement_requiredExtensions_Getter";
- @DocsEditable
@DomName('SVGForeignObjectElement.requiredFeatures')
+ @DocsEditable
StringList get requiredFeatures native "SVGForeignObjectElement_requiredFeatures_Getter";
- @DocsEditable
@DomName('SVGForeignObjectElement.systemLanguage')
+ @DocsEditable
StringList get systemLanguage native "SVGForeignObjectElement_systemLanguage_Getter";
- @DocsEditable
@DomName('SVGForeignObjectElement.hasExtension')
+ @DocsEditable
bool hasExtension(String extension) native "SVGForeignObjectElement_hasExtension_Callback";
- @DocsEditable
@DomName('SVGForeignObjectElement.transform')
+ @DocsEditable
AnimatedTransformList get transform native "SVGForeignObjectElement_transform_Getter";
}
@@ -3300,80 +3463,80 @@
@DocsEditable
factory GElement() => _SvgElementFactoryProvider.createSvgElement_tag("g");
- @DocsEditable
@DomName('SVGGElement.externalResourcesRequired')
+ @DocsEditable
AnimatedBoolean get externalResourcesRequired native "SVGGElement_externalResourcesRequired_Getter";
- @DocsEditable
@DomName('SVGGElement.xmllang')
+ @DocsEditable
String get xmllang native "SVGGElement_xmllang_Getter";
- @DocsEditable
@DomName('SVGGElement.xmllang')
+ @DocsEditable
void set xmllang(String value) native "SVGGElement_xmllang_Setter";
- @DocsEditable
@DomName('SVGGElement.xmlspace')
+ @DocsEditable
String get xmlspace native "SVGGElement_xmlspace_Getter";
- @DocsEditable
@DomName('SVGGElement.xmlspace')
+ @DocsEditable
void set xmlspace(String value) native "SVGGElement_xmlspace_Setter";
- @DocsEditable
@DomName('SVGGElement.farthestViewportElement')
+ @DocsEditable
SvgElement get farthestViewportElement native "SVGGElement_farthestViewportElement_Getter";
- @DocsEditable
@DomName('SVGGElement.nearestViewportElement')
+ @DocsEditable
SvgElement get nearestViewportElement native "SVGGElement_nearestViewportElement_Getter";
- @DocsEditable
@DomName('SVGGElement.getBBox')
+ @DocsEditable
Rect getBBox() native "SVGGElement_getBBox_Callback";
- @DocsEditable
@DomName('SVGGElement.getCTM')
+ @DocsEditable
Matrix getCtm() native "SVGGElement_getCTM_Callback";
- @DocsEditable
@DomName('SVGGElement.getScreenCTM')
+ @DocsEditable
Matrix getScreenCtm() native "SVGGElement_getScreenCTM_Callback";
- @DocsEditable
@DomName('SVGGElement.getTransformToElement')
+ @DocsEditable
Matrix getTransformToElement(SvgElement element) native "SVGGElement_getTransformToElement_Callback";
- @DocsEditable
@DomName('SVGGElement.className')
+ @DocsEditable
AnimatedString get $dom_svgClassName native "SVGGElement_className_Getter";
- @DocsEditable
@DomName('SVGGElement.style')
+ @DocsEditable
CssStyleDeclaration get style native "SVGGElement_style_Getter";
- @DocsEditable
@DomName('SVGGElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native "SVGGElement_getPresentationAttribute_Callback";
- @DocsEditable
@DomName('SVGGElement.requiredExtensions')
+ @DocsEditable
StringList get requiredExtensions native "SVGGElement_requiredExtensions_Getter";
- @DocsEditable
@DomName('SVGGElement.requiredFeatures')
+ @DocsEditable
StringList get requiredFeatures native "SVGGElement_requiredFeatures_Getter";
- @DocsEditable
@DomName('SVGGElement.systemLanguage')
+ @DocsEditable
StringList get systemLanguage native "SVGGElement_systemLanguage_Getter";
- @DocsEditable
@DomName('SVGGElement.hasExtension')
+ @DocsEditable
bool hasExtension(String extension) native "SVGGElement_hasExtension_Callback";
- @DocsEditable
@DomName('SVGGElement.transform')
+ @DocsEditable
AnimatedTransformList get transform native "SVGGElement_transform_Getter";
}
@@ -3405,68 +3568,68 @@
class GlyphRefElement extends SvgElement implements UriReference, Stylable {
GlyphRefElement.internal() : super.internal();
- @DocsEditable
@DomName('SVGGlyphRefElement.dx')
+ @DocsEditable
num get dx native "SVGGlyphRefElement_dx_Getter";
- @DocsEditable
@DomName('SVGGlyphRefElement.dx')
+ @DocsEditable
void set dx(num value) native "SVGGlyphRefElement_dx_Setter";
- @DocsEditable
@DomName('SVGGlyphRefElement.dy')
+ @DocsEditable
num get dy native "SVGGlyphRefElement_dy_Getter";
- @DocsEditable
@DomName('SVGGlyphRefElement.dy')
+ @DocsEditable
void set dy(num value) native "SVGGlyphRefElement_dy_Setter";
- @DocsEditable
@DomName('SVGGlyphRefElement.format')
+ @DocsEditable
String get format native "SVGGlyphRefElement_format_Getter";
- @DocsEditable
@DomName('SVGGlyphRefElement.format')
+ @DocsEditable
void set format(String value) native "SVGGlyphRefElement_format_Setter";
- @DocsEditable
@DomName('SVGGlyphRefElement.glyphRef')
+ @DocsEditable
String get glyphRef native "SVGGlyphRefElement_glyphRef_Getter";
- @DocsEditable
@DomName('SVGGlyphRefElement.glyphRef')
+ @DocsEditable
void set glyphRef(String value) native "SVGGlyphRefElement_glyphRef_Setter";
- @DocsEditable
@DomName('SVGGlyphRefElement.x')
+ @DocsEditable
num get x native "SVGGlyphRefElement_x_Getter";
- @DocsEditable
@DomName('SVGGlyphRefElement.x')
+ @DocsEditable
void set x(num value) native "SVGGlyphRefElement_x_Setter";
- @DocsEditable
@DomName('SVGGlyphRefElement.y')
+ @DocsEditable
num get y native "SVGGlyphRefElement_y_Getter";
- @DocsEditable
@DomName('SVGGlyphRefElement.y')
+ @DocsEditable
void set y(num value) native "SVGGlyphRefElement_y_Setter";
- @DocsEditable
@DomName('SVGGlyphRefElement.className')
+ @DocsEditable
AnimatedString get $dom_svgClassName native "SVGGlyphRefElement_className_Getter";
- @DocsEditable
@DomName('SVGGlyphRefElement.style')
+ @DocsEditable
CssStyleDeclaration get style native "SVGGlyphRefElement_style_Getter";
- @DocsEditable
@DomName('SVGGlyphRefElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native "SVGGlyphRefElement_getPresentationAttribute_Callback";
- @DocsEditable
@DomName('SVGGlyphRefElement.href')
+ @DocsEditable
AnimatedString get href native "SVGGlyphRefElement_href_Getter";
}
@@ -3490,36 +3653,36 @@
static const int SVG_SPREADMETHOD_UNKNOWN = 0;
- @DocsEditable
@DomName('SVGGradientElement.gradientTransform')
+ @DocsEditable
AnimatedTransformList get gradientTransform native "SVGGradientElement_gradientTransform_Getter";
- @DocsEditable
@DomName('SVGGradientElement.gradientUnits')
+ @DocsEditable
AnimatedEnumeration get gradientUnits native "SVGGradientElement_gradientUnits_Getter";
- @DocsEditable
@DomName('SVGGradientElement.spreadMethod')
+ @DocsEditable
AnimatedEnumeration get spreadMethod native "SVGGradientElement_spreadMethod_Getter";
- @DocsEditable
@DomName('SVGGradientElement.externalResourcesRequired')
+ @DocsEditable
AnimatedBoolean get externalResourcesRequired native "SVGGradientElement_externalResourcesRequired_Getter";
- @DocsEditable
@DomName('SVGGradientElement.className')
+ @DocsEditable
AnimatedString get $dom_svgClassName native "SVGGradientElement_className_Getter";
- @DocsEditable
@DomName('SVGGradientElement.style')
+ @DocsEditable
CssStyleDeclaration get style native "SVGGradientElement_style_Getter";
- @DocsEditable
@DomName('SVGGradientElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native "SVGGradientElement_getPresentationAttribute_Callback";
- @DocsEditable
@DomName('SVGGradientElement.href')
+ @DocsEditable
AnimatedString get href native "SVGGradientElement_href_Getter";
}
@@ -3554,104 +3717,104 @@
@DocsEditable
factory ImageElement() => _SvgElementFactoryProvider.createSvgElement_tag("image");
- @DocsEditable
@DomName('SVGImageElement.height')
+ @DocsEditable
AnimatedLength get height native "SVGImageElement_height_Getter";
- @DocsEditable
@DomName('SVGImageElement.preserveAspectRatio')
+ @DocsEditable
AnimatedPreserveAspectRatio get preserveAspectRatio native "SVGImageElement_preserveAspectRatio_Getter";
- @DocsEditable
@DomName('SVGImageElement.width')
+ @DocsEditable
AnimatedLength get width native "SVGImageElement_width_Getter";
- @DocsEditable
@DomName('SVGImageElement.x')
+ @DocsEditable
AnimatedLength get x native "SVGImageElement_x_Getter";
- @DocsEditable
@DomName('SVGImageElement.y')
+ @DocsEditable
AnimatedLength get y native "SVGImageElement_y_Getter";
- @DocsEditable
@DomName('SVGImageElement.externalResourcesRequired')
+ @DocsEditable
AnimatedBoolean get externalResourcesRequired native "SVGImageElement_externalResourcesRequired_Getter";
- @DocsEditable
@DomName('SVGImageElement.xmllang')
+ @DocsEditable
String get xmllang native "SVGImageElement_xmllang_Getter";
- @DocsEditable
@DomName('SVGImageElement.xmllang')
+ @DocsEditable
void set xmllang(String value) native "SVGImageElement_xmllang_Setter";
- @DocsEditable
@DomName('SVGImageElement.xmlspace')
+ @DocsEditable
String get xmlspace native "SVGImageElement_xmlspace_Getter";
- @DocsEditable
@DomName('SVGImageElement.xmlspace')
+ @DocsEditable
void set xmlspace(String value) native "SVGImageElement_xmlspace_Setter";
- @DocsEditable
@DomName('SVGImageElement.farthestViewportElement')
+ @DocsEditable
SvgElement get farthestViewportElement native "SVGImageElement_farthestViewportElement_Getter";
- @DocsEditable
@DomName('SVGImageElement.nearestViewportElement')
+ @DocsEditable
SvgElement get nearestViewportElement native "SVGImageElement_nearestViewportElement_Getter";
- @DocsEditable
@DomName('SVGImageElement.getBBox')
+ @DocsEditable
Rect getBBox() native "SVGImageElement_getBBox_Callback";
- @DocsEditable
@DomName('SVGImageElement.getCTM')
+ @DocsEditable
Matrix getCtm() native "SVGImageElement_getCTM_Callback";
- @DocsEditable
@DomName('SVGImageElement.getScreenCTM')
+ @DocsEditable
Matrix getScreenCtm() native "SVGImageElement_getScreenCTM_Callback";
- @DocsEditable
@DomName('SVGImageElement.getTransformToElement')
+ @DocsEditable
Matrix getTransformToElement(SvgElement element) native "SVGImageElement_getTransformToElement_Callback";
- @DocsEditable
@DomName('SVGImageElement.className')
+ @DocsEditable
AnimatedString get $dom_svgClassName native "SVGImageElement_className_Getter";
- @DocsEditable
@DomName('SVGImageElement.style')
+ @DocsEditable
CssStyleDeclaration get style native "SVGImageElement_style_Getter";
- @DocsEditable
@DomName('SVGImageElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native "SVGImageElement_getPresentationAttribute_Callback";
- @DocsEditable
@DomName('SVGImageElement.requiredExtensions')
+ @DocsEditable
StringList get requiredExtensions native "SVGImageElement_requiredExtensions_Getter";
- @DocsEditable
@DomName('SVGImageElement.requiredFeatures')
+ @DocsEditable
StringList get requiredFeatures native "SVGImageElement_requiredFeatures_Getter";
- @DocsEditable
@DomName('SVGImageElement.systemLanguage')
+ @DocsEditable
StringList get systemLanguage native "SVGImageElement_systemLanguage_Getter";
- @DocsEditable
@DomName('SVGImageElement.hasExtension')
+ @DocsEditable
bool hasExtension(String extension) native "SVGImageElement_hasExtension_Callback";
- @DocsEditable
@DomName('SVGImageElement.transform')
+ @DocsEditable
AnimatedTransformList get transform native "SVGImageElement_transform_Getter";
- @DocsEditable
@DomName('SVGImageElement.href')
+ @DocsEditable
AnimatedString get href native "SVGImageElement_href_Getter";
}
@@ -3667,20 +3830,20 @@
class LangSpace extends NativeFieldWrapperClass1 {
LangSpace.internal();
- @DocsEditable
@DomName('SVGLangSpace.xmllang')
+ @DocsEditable
String get xmllang native "SVGLangSpace_xmllang_Getter";
- @DocsEditable
@DomName('SVGLangSpace.xmllang')
+ @DocsEditable
void set xmllang(String value) native "SVGLangSpace_xmllang_Setter";
- @DocsEditable
@DomName('SVGLangSpace.xmlspace')
+ @DocsEditable
String get xmlspace native "SVGLangSpace_xmlspace_Getter";
- @DocsEditable
@DomName('SVGLangSpace.xmlspace')
+ @DocsEditable
void set xmlspace(String value) native "SVGLangSpace_xmlspace_Setter";
}
@@ -3718,40 +3881,40 @@
static const int SVG_LENGTHTYPE_UNKNOWN = 0;
- @DocsEditable
@DomName('SVGLength.unitType')
+ @DocsEditable
int get unitType native "SVGLength_unitType_Getter";
- @DocsEditable
@DomName('SVGLength.value')
+ @DocsEditable
num get value native "SVGLength_value_Getter";
- @DocsEditable
@DomName('SVGLength.value')
+ @DocsEditable
void set value(num value) native "SVGLength_value_Setter";
- @DocsEditable
@DomName('SVGLength.valueAsString')
+ @DocsEditable
String get valueAsString native "SVGLength_valueAsString_Getter";
- @DocsEditable
@DomName('SVGLength.valueAsString')
+ @DocsEditable
void set valueAsString(String value) native "SVGLength_valueAsString_Setter";
- @DocsEditable
@DomName('SVGLength.valueInSpecifiedUnits')
+ @DocsEditable
num get valueInSpecifiedUnits native "SVGLength_valueInSpecifiedUnits_Getter";
- @DocsEditable
@DomName('SVGLength.valueInSpecifiedUnits')
+ @DocsEditable
void set valueInSpecifiedUnits(num value) native "SVGLength_valueInSpecifiedUnits_Setter";
- @DocsEditable
@DomName('SVGLength.convertToSpecifiedUnits')
+ @DocsEditable
void convertToSpecifiedUnits(int unitType) native "SVGLength_convertToSpecifiedUnits_Callback";
- @DocsEditable
@DomName('SVGLength.newValueSpecifiedUnits')
+ @DocsEditable
void newValueSpecifiedUnits(int unitType, num valueInSpecifiedUnits) native "SVGLength_newValueSpecifiedUnits_Callback";
}
@@ -3767,8 +3930,8 @@
class LengthList extends NativeFieldWrapperClass1 implements List<Length> {
LengthList.internal();
- @DocsEditable
@DomName('SVGLengthList.numberOfItems')
+ @DocsEditable
int get numberOfItems native "SVGLengthList_numberOfItems_Getter";
Length operator[](int index) native "SVGLengthList_item_Callback";
@@ -3798,11 +3961,13 @@
void forEach(void f(Length element)) => IterableMixinWorkaround.forEach(this, f);
- String join([String separator]) => IterableMixinWorkaround.joinList(this, separator);
+ String join([String separator]) =>
+ IterableMixinWorkaround.joinList(this, separator);
List mappedBy(f(Length element)) => IterableMixinWorkaround.mappedByList(this, f);
- Iterable<Length> where(bool f(Length element)) => IterableMixinWorkaround.where(this, f);
+ Iterable<Length> where(bool f(Length element)) =>
+ IterableMixinWorkaround.where(this, f);
bool every(bool f(Length element)) => IterableMixinWorkaround.every(this, f);
@@ -3862,6 +4027,9 @@
// clear() defined by IDL.
+ List<Length> get reversed =>
+ new ReversedListView<Length>(this, 0, null);
+
void sort([int compare(Length a, Length b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -3890,9 +4058,11 @@
throw new StateError("More than one element");
}
- Length min([int compare(Length a, Length b)]) => IterableMixinWorkaround.min(this, compare);
+ Length min([int compare(Length a, Length b)]) =>
+ IterableMixinWorkaround.min(this, compare);
- Length max([int compare(Length a, Length b)]) => IterableMixinWorkaround.max(this, compare);
+ Length max([int compare(Length a, Length b)]) =>
+ IterableMixinWorkaround.max(this, compare);
Length removeAt(int pos) {
throw new UnsupportedError("Cannot remove from immutable List.");
@@ -3939,32 +4109,32 @@
// -- end List<Length> mixins.
- @DocsEditable
@DomName('SVGLengthList.appendItem')
+ @DocsEditable
Length appendItem(Length item) native "SVGLengthList_appendItem_Callback";
- @DocsEditable
@DomName('SVGLengthList.clear')
+ @DocsEditable
void clear() native "SVGLengthList_clear_Callback";
- @DocsEditable
@DomName('SVGLengthList.getItem')
+ @DocsEditable
Length getItem(int index) native "SVGLengthList_getItem_Callback";
- @DocsEditable
@DomName('SVGLengthList.initialize')
+ @DocsEditable
Length initialize(Length item) native "SVGLengthList_initialize_Callback";
- @DocsEditable
@DomName('SVGLengthList.insertItemBefore')
+ @DocsEditable
Length insertItemBefore(Length item, int index) native "SVGLengthList_insertItemBefore_Callback";
- @DocsEditable
@DomName('SVGLengthList.removeItem')
+ @DocsEditable
Length removeItem(int index) native "SVGLengthList_removeItem_Callback";
- @DocsEditable
@DomName('SVGLengthList.replaceItem')
+ @DocsEditable
Length replaceItem(Length item, int index) native "SVGLengthList_replaceItem_Callback";
}
@@ -3983,96 +4153,96 @@
@DocsEditable
factory LineElement() => _SvgElementFactoryProvider.createSvgElement_tag("line");
- @DocsEditable
@DomName('SVGLineElement.x1')
+ @DocsEditable
AnimatedLength get x1 native "SVGLineElement_x1_Getter";
- @DocsEditable
@DomName('SVGLineElement.x2')
+ @DocsEditable
AnimatedLength get x2 native "SVGLineElement_x2_Getter";
- @DocsEditable
@DomName('SVGLineElement.y1')
+ @DocsEditable
AnimatedLength get y1 native "SVGLineElement_y1_Getter";
- @DocsEditable
@DomName('SVGLineElement.y2')
+ @DocsEditable
AnimatedLength get y2 native "SVGLineElement_y2_Getter";
- @DocsEditable
@DomName('SVGLineElement.externalResourcesRequired')
+ @DocsEditable
AnimatedBoolean get externalResourcesRequired native "SVGLineElement_externalResourcesRequired_Getter";
- @DocsEditable
@DomName('SVGLineElement.xmllang')
+ @DocsEditable
String get xmllang native "SVGLineElement_xmllang_Getter";
- @DocsEditable
@DomName('SVGLineElement.xmllang')
+ @DocsEditable
void set xmllang(String value) native "SVGLineElement_xmllang_Setter";
- @DocsEditable
@DomName('SVGLineElement.xmlspace')
+ @DocsEditable
String get xmlspace native "SVGLineElement_xmlspace_Getter";
- @DocsEditable
@DomName('SVGLineElement.xmlspace')
+ @DocsEditable
void set xmlspace(String value) native "SVGLineElement_xmlspace_Setter";
- @DocsEditable
@DomName('SVGLineElement.farthestViewportElement')
+ @DocsEditable
SvgElement get farthestViewportElement native "SVGLineElement_farthestViewportElement_Getter";
- @DocsEditable
@DomName('SVGLineElement.nearestViewportElement')
+ @DocsEditable
SvgElement get nearestViewportElement native "SVGLineElement_nearestViewportElement_Getter";
- @DocsEditable
@DomName('SVGLineElement.getBBox')
+ @DocsEditable
Rect getBBox() native "SVGLineElement_getBBox_Callback";
- @DocsEditable
@DomName('SVGLineElement.getCTM')
+ @DocsEditable
Matrix getCtm() native "SVGLineElement_getCTM_Callback";
- @DocsEditable
@DomName('SVGLineElement.getScreenCTM')
+ @DocsEditable
Matrix getScreenCtm() native "SVGLineElement_getScreenCTM_Callback";
- @DocsEditable
@DomName('SVGLineElement.getTransformToElement')
+ @DocsEditable
Matrix getTransformToElement(SvgElement element) native "SVGLineElement_getTransformToElement_Callback";
- @DocsEditable
@DomName('SVGLineElement.className')
+ @DocsEditable
AnimatedString get $dom_svgClassName native "SVGLineElement_className_Getter";
- @DocsEditable
@DomName('SVGLineElement.style')
+ @DocsEditable
CssStyleDeclaration get style native "SVGLineElement_style_Getter";
- @DocsEditable
@DomName('SVGLineElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native "SVGLineElement_getPresentationAttribute_Callback";
- @DocsEditable
@DomName('SVGLineElement.requiredExtensions')
+ @DocsEditable
StringList get requiredExtensions native "SVGLineElement_requiredExtensions_Getter";
- @DocsEditable
@DomName('SVGLineElement.requiredFeatures')
+ @DocsEditable
StringList get requiredFeatures native "SVGLineElement_requiredFeatures_Getter";
- @DocsEditable
@DomName('SVGLineElement.systemLanguage')
+ @DocsEditable
StringList get systemLanguage native "SVGLineElement_systemLanguage_Getter";
- @DocsEditable
@DomName('SVGLineElement.hasExtension')
+ @DocsEditable
bool hasExtension(String extension) native "SVGLineElement_hasExtension_Callback";
- @DocsEditable
@DomName('SVGLineElement.transform')
+ @DocsEditable
AnimatedTransformList get transform native "SVGLineElement_transform_Getter";
}
@@ -4091,20 +4261,20 @@
@DocsEditable
factory LinearGradientElement() => _SvgElementFactoryProvider.createSvgElement_tag("linearGradient");
- @DocsEditable
@DomName('SVGLinearGradientElement.x1')
+ @DocsEditable
AnimatedLength get x1 native "SVGLinearGradientElement_x1_Getter";
- @DocsEditable
@DomName('SVGLinearGradientElement.x2')
+ @DocsEditable
AnimatedLength get x2 native "SVGLinearGradientElement_x2_Getter";
- @DocsEditable
@DomName('SVGLinearGradientElement.y1')
+ @DocsEditable
AnimatedLength get y1 native "SVGLinearGradientElement_y1_Getter";
- @DocsEditable
@DomName('SVGLinearGradientElement.y2')
+ @DocsEditable
AnimatedLength get y2 native "SVGLinearGradientElement_y2_Getter";
}
@@ -4120,28 +4290,28 @@
class Locatable extends NativeFieldWrapperClass1 {
Locatable.internal();
- @DocsEditable
@DomName('SVGLocatable.farthestViewportElement')
+ @DocsEditable
SvgElement get farthestViewportElement native "SVGLocatable_farthestViewportElement_Getter";
- @DocsEditable
@DomName('SVGLocatable.nearestViewportElement')
+ @DocsEditable
SvgElement get nearestViewportElement native "SVGLocatable_nearestViewportElement_Getter";
- @DocsEditable
@DomName('SVGLocatable.getBBox')
+ @DocsEditable
Rect getBBox() native "SVGLocatable_getBBox_Callback";
- @DocsEditable
@DomName('SVGLocatable.getCTM')
+ @DocsEditable
Matrix getCtm() native "SVGLocatable_getCTM_Callback";
- @DocsEditable
@DomName('SVGLocatable.getScreenCTM')
+ @DocsEditable
Matrix getScreenCtm() native "SVGLocatable_getScreenCTM_Callback";
- @DocsEditable
@DomName('SVGLocatable.getTransformToElement')
+ @DocsEditable
Matrix getTransformToElement(SvgElement element) native "SVGLocatable_getTransformToElement_Callback";
}
@@ -4160,12 +4330,12 @@
@DocsEditable
factory MPathElement() => _SvgElementFactoryProvider.createSvgElement_tag("mpath");
- @DocsEditable
@DomName('SVGMPathElement.externalResourcesRequired')
+ @DocsEditable
AnimatedBoolean get externalResourcesRequired native "SVGMPathElement_externalResourcesRequired_Getter";
- @DocsEditable
@DomName('SVGMPathElement.href')
+ @DocsEditable
AnimatedString get href native "SVGMPathElement_href_Getter";
}
@@ -4196,80 +4366,80 @@
static const int SVG_MARKER_ORIENT_UNKNOWN = 0;
- @DocsEditable
@DomName('SVGMarkerElement.markerHeight')
+ @DocsEditable
AnimatedLength get markerHeight native "SVGMarkerElement_markerHeight_Getter";
- @DocsEditable
@DomName('SVGMarkerElement.markerUnits')
+ @DocsEditable
AnimatedEnumeration get markerUnits native "SVGMarkerElement_markerUnits_Getter";
- @DocsEditable
@DomName('SVGMarkerElement.markerWidth')
+ @DocsEditable
AnimatedLength get markerWidth native "SVGMarkerElement_markerWidth_Getter";
- @DocsEditable
@DomName('SVGMarkerElement.orientAngle')
+ @DocsEditable
AnimatedAngle get orientAngle native "SVGMarkerElement_orientAngle_Getter";
- @DocsEditable
@DomName('SVGMarkerElement.orientType')
+ @DocsEditable
AnimatedEnumeration get orientType native "SVGMarkerElement_orientType_Getter";
- @DocsEditable
@DomName('SVGMarkerElement.refX')
+ @DocsEditable
AnimatedLength get refX native "SVGMarkerElement_refX_Getter";
- @DocsEditable
@DomName('SVGMarkerElement.refY')
+ @DocsEditable
AnimatedLength get refY native "SVGMarkerElement_refY_Getter";
- @DocsEditable
@DomName('SVGMarkerElement.setOrientToAngle')
+ @DocsEditable
void setOrientToAngle(Angle angle) native "SVGMarkerElement_setOrientToAngle_Callback";
- @DocsEditable
@DomName('SVGMarkerElement.setOrientToAuto')
+ @DocsEditable
void setOrientToAuto() native "SVGMarkerElement_setOrientToAuto_Callback";
- @DocsEditable
@DomName('SVGMarkerElement.externalResourcesRequired')
+ @DocsEditable
AnimatedBoolean get externalResourcesRequired native "SVGMarkerElement_externalResourcesRequired_Getter";
- @DocsEditable
@DomName('SVGMarkerElement.preserveAspectRatio')
+ @DocsEditable
AnimatedPreserveAspectRatio get preserveAspectRatio native "SVGMarkerElement_preserveAspectRatio_Getter";
- @DocsEditable
@DomName('SVGMarkerElement.viewBox')
+ @DocsEditable
AnimatedRect get viewBox native "SVGMarkerElement_viewBox_Getter";
- @DocsEditable
@DomName('SVGMarkerElement.xmllang')
+ @DocsEditable
String get xmllang native "SVGMarkerElement_xmllang_Getter";
- @DocsEditable
@DomName('SVGMarkerElement.xmllang')
+ @DocsEditable
void set xmllang(String value) native "SVGMarkerElement_xmllang_Setter";
- @DocsEditable
@DomName('SVGMarkerElement.xmlspace')
+ @DocsEditable
String get xmlspace native "SVGMarkerElement_xmlspace_Getter";
- @DocsEditable
@DomName('SVGMarkerElement.xmlspace')
+ @DocsEditable
void set xmlspace(String value) native "SVGMarkerElement_xmlspace_Setter";
- @DocsEditable
@DomName('SVGMarkerElement.className')
+ @DocsEditable
AnimatedString get $dom_svgClassName native "SVGMarkerElement_className_Getter";
- @DocsEditable
@DomName('SVGMarkerElement.style')
+ @DocsEditable
CssStyleDeclaration get style native "SVGMarkerElement_style_Getter";
- @DocsEditable
@DomName('SVGMarkerElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native "SVGMarkerElement_getPresentationAttribute_Callback";
}
@@ -4288,76 +4458,76 @@
@DocsEditable
factory MaskElement() => _SvgElementFactoryProvider.createSvgElement_tag("mask");
- @DocsEditable
@DomName('SVGMaskElement.height')
+ @DocsEditable
AnimatedLength get height native "SVGMaskElement_height_Getter";
- @DocsEditable
@DomName('SVGMaskElement.maskContentUnits')
+ @DocsEditable
AnimatedEnumeration get maskContentUnits native "SVGMaskElement_maskContentUnits_Getter";
- @DocsEditable
@DomName('SVGMaskElement.maskUnits')
+ @DocsEditable
AnimatedEnumeration get maskUnits native "SVGMaskElement_maskUnits_Getter";
- @DocsEditable
@DomName('SVGMaskElement.width')
+ @DocsEditable
AnimatedLength get width native "SVGMaskElement_width_Getter";
- @DocsEditable
@DomName('SVGMaskElement.x')
+ @DocsEditable
AnimatedLength get x native "SVGMaskElement_x_Getter";
- @DocsEditable
@DomName('SVGMaskElement.y')
+ @DocsEditable
AnimatedLength get y native "SVGMaskElement_y_Getter";
- @DocsEditable
@DomName('SVGMaskElement.externalResourcesRequired')
+ @DocsEditable
AnimatedBoolean get externalResourcesRequired native "SVGMaskElement_externalResourcesRequired_Getter";
- @DocsEditable
@DomName('SVGMaskElement.xmllang')
+ @DocsEditable
String get xmllang native "SVGMaskElement_xmllang_Getter";
- @DocsEditable
@DomName('SVGMaskElement.xmllang')
+ @DocsEditable
void set xmllang(String value) native "SVGMaskElement_xmllang_Setter";
- @DocsEditable
@DomName('SVGMaskElement.xmlspace')
+ @DocsEditable
String get xmlspace native "SVGMaskElement_xmlspace_Getter";
- @DocsEditable
@DomName('SVGMaskElement.xmlspace')
+ @DocsEditable
void set xmlspace(String value) native "SVGMaskElement_xmlspace_Setter";
- @DocsEditable
@DomName('SVGMaskElement.className')
+ @DocsEditable
AnimatedString get $dom_svgClassName native "SVGMaskElement_className_Getter";
- @DocsEditable
@DomName('SVGMaskElement.style')
+ @DocsEditable
CssStyleDeclaration get style native "SVGMaskElement_style_Getter";
- @DocsEditable
@DomName('SVGMaskElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native "SVGMaskElement_getPresentationAttribute_Callback";
- @DocsEditable
@DomName('SVGMaskElement.requiredExtensions')
+ @DocsEditable
StringList get requiredExtensions native "SVGMaskElement_requiredExtensions_Getter";
- @DocsEditable
@DomName('SVGMaskElement.requiredFeatures')
+ @DocsEditable
StringList get requiredFeatures native "SVGMaskElement_requiredFeatures_Getter";
- @DocsEditable
@DomName('SVGMaskElement.systemLanguage')
+ @DocsEditable
StringList get systemLanguage native "SVGMaskElement_systemLanguage_Getter";
- @DocsEditable
@DomName('SVGMaskElement.hasExtension')
+ @DocsEditable
bool hasExtension(String extension) native "SVGMaskElement_hasExtension_Callback";
}
@@ -4373,96 +4543,96 @@
class Matrix extends NativeFieldWrapperClass1 {
Matrix.internal();
- @DocsEditable
@DomName('SVGMatrix.a')
+ @DocsEditable
num get a native "SVGMatrix_a_Getter";
- @DocsEditable
@DomName('SVGMatrix.a')
+ @DocsEditable
void set a(num value) native "SVGMatrix_a_Setter";
- @DocsEditable
@DomName('SVGMatrix.b')
+ @DocsEditable
num get b native "SVGMatrix_b_Getter";
- @DocsEditable
@DomName('SVGMatrix.b')
+ @DocsEditable
void set b(num value) native "SVGMatrix_b_Setter";
- @DocsEditable
@DomName('SVGMatrix.c')
+ @DocsEditable
num get c native "SVGMatrix_c_Getter";
- @DocsEditable
@DomName('SVGMatrix.c')
+ @DocsEditable
void set c(num value) native "SVGMatrix_c_Setter";
- @DocsEditable
@DomName('SVGMatrix.d')
+ @DocsEditable
num get d native "SVGMatrix_d_Getter";
- @DocsEditable
@DomName('SVGMatrix.d')
+ @DocsEditable
void set d(num value) native "SVGMatrix_d_Setter";
- @DocsEditable
@DomName('SVGMatrix.e')
+ @DocsEditable
num get e native "SVGMatrix_e_Getter";
- @DocsEditable
@DomName('SVGMatrix.e')
+ @DocsEditable
void set e(num value) native "SVGMatrix_e_Setter";
- @DocsEditable
@DomName('SVGMatrix.f')
+ @DocsEditable
num get f native "SVGMatrix_f_Getter";
- @DocsEditable
@DomName('SVGMatrix.f')
+ @DocsEditable
void set f(num value) native "SVGMatrix_f_Setter";
- @DocsEditable
@DomName('SVGMatrix.flipX')
+ @DocsEditable
Matrix flipX() native "SVGMatrix_flipX_Callback";
- @DocsEditable
@DomName('SVGMatrix.flipY')
+ @DocsEditable
Matrix flipY() native "SVGMatrix_flipY_Callback";
- @DocsEditable
@DomName('SVGMatrix.inverse')
+ @DocsEditable
Matrix inverse() native "SVGMatrix_inverse_Callback";
- @DocsEditable
@DomName('SVGMatrix.multiply')
+ @DocsEditable
Matrix multiply(Matrix secondMatrix) native "SVGMatrix_multiply_Callback";
- @DocsEditable
@DomName('SVGMatrix.rotate')
+ @DocsEditable
Matrix rotate(num angle) native "SVGMatrix_rotate_Callback";
- @DocsEditable
@DomName('SVGMatrix.rotateFromVector')
+ @DocsEditable
Matrix rotateFromVector(num x, num y) native "SVGMatrix_rotateFromVector_Callback";
- @DocsEditable
@DomName('SVGMatrix.scale')
+ @DocsEditable
Matrix scale(num scaleFactor) native "SVGMatrix_scale_Callback";
- @DocsEditable
@DomName('SVGMatrix.scaleNonUniform')
+ @DocsEditable
Matrix scaleNonUniform(num scaleFactorX, num scaleFactorY) native "SVGMatrix_scaleNonUniform_Callback";
- @DocsEditable
@DomName('SVGMatrix.skewX')
+ @DocsEditable
Matrix skewX(num angle) native "SVGMatrix_skewX_Callback";
- @DocsEditable
@DomName('SVGMatrix.skewY')
+ @DocsEditable
Matrix skewY(num angle) native "SVGMatrix_skewY_Callback";
- @DocsEditable
@DomName('SVGMatrix.translate')
+ @DocsEditable
Matrix translate(num x, num y) native "SVGMatrix_translate_Callback";
}
@@ -4504,12 +4674,12 @@
class Number extends NativeFieldWrapperClass1 {
Number.internal();
- @DocsEditable
@DomName('SVGNumber.value')
+ @DocsEditable
num get value native "SVGNumber_value_Getter";
- @DocsEditable
@DomName('SVGNumber.value')
+ @DocsEditable
void set value(num value) native "SVGNumber_value_Setter";
}
@@ -4525,8 +4695,8 @@
class NumberList extends NativeFieldWrapperClass1 implements List<Number> {
NumberList.internal();
- @DocsEditable
@DomName('SVGNumberList.numberOfItems')
+ @DocsEditable
int get numberOfItems native "SVGNumberList_numberOfItems_Getter";
Number operator[](int index) native "SVGNumberList_item_Callback";
@@ -4556,11 +4726,13 @@
void forEach(void f(Number element)) => IterableMixinWorkaround.forEach(this, f);
- String join([String separator]) => IterableMixinWorkaround.joinList(this, separator);
+ String join([String separator]) =>
+ IterableMixinWorkaround.joinList(this, separator);
List mappedBy(f(Number element)) => IterableMixinWorkaround.mappedByList(this, f);
- Iterable<Number> where(bool f(Number element)) => IterableMixinWorkaround.where(this, f);
+ Iterable<Number> where(bool f(Number element)) =>
+ IterableMixinWorkaround.where(this, f);
bool every(bool f(Number element)) => IterableMixinWorkaround.every(this, f);
@@ -4620,6 +4792,9 @@
// clear() defined by IDL.
+ List<Number> get reversed =>
+ new ReversedListView<Number>(this, 0, null);
+
void sort([int compare(Number a, Number b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -4648,9 +4823,11 @@
throw new StateError("More than one element");
}
- Number min([int compare(Number a, Number b)]) => IterableMixinWorkaround.min(this, compare);
+ Number min([int compare(Number a, Number b)]) =>
+ IterableMixinWorkaround.min(this, compare);
- Number max([int compare(Number a, Number b)]) => IterableMixinWorkaround.max(this, compare);
+ Number max([int compare(Number a, Number b)]) =>
+ IterableMixinWorkaround.max(this, compare);
Number removeAt(int pos) {
throw new UnsupportedError("Cannot remove from immutable List.");
@@ -4697,32 +4874,32 @@
// -- end List<Number> mixins.
- @DocsEditable
@DomName('SVGNumberList.appendItem')
+ @DocsEditable
Number appendItem(Number item) native "SVGNumberList_appendItem_Callback";
- @DocsEditable
@DomName('SVGNumberList.clear')
+ @DocsEditable
void clear() native "SVGNumberList_clear_Callback";
- @DocsEditable
@DomName('SVGNumberList.getItem')
+ @DocsEditable
Number getItem(int index) native "SVGNumberList_getItem_Callback";
- @DocsEditable
@DomName('SVGNumberList.initialize')
+ @DocsEditable
Number initialize(Number item) native "SVGNumberList_initialize_Callback";
- @DocsEditable
@DomName('SVGNumberList.insertItemBefore')
+ @DocsEditable
Number insertItemBefore(Number item, int index) native "SVGNumberList_insertItemBefore_Callback";
- @DocsEditable
@DomName('SVGNumberList.removeItem')
+ @DocsEditable
Number removeItem(int index) native "SVGNumberList_removeItem_Callback";
- @DocsEditable
@DomName('SVGNumberList.replaceItem')
+ @DocsEditable
Number replaceItem(Number item, int index) native "SVGNumberList_replaceItem_Callback";
}
@@ -4758,20 +4935,20 @@
static const int SVG_PAINTTYPE_URI_RGBCOLOR_ICCCOLOR = 106;
- @DocsEditable
@DomName('SVGPaint.paintType')
+ @DocsEditable
int get paintType native "SVGPaint_paintType_Getter";
- @DocsEditable
@DomName('SVGPaint.uri')
+ @DocsEditable
String get uri native "SVGPaint_uri_Getter";
- @DocsEditable
@DomName('SVGPaint.setPaint')
+ @DocsEditable
void setPaint(int paintType, String uri, String rgbColor, String iccColor) native "SVGPaint_setPaint_Callback";
- @DocsEditable
@DomName('SVGPaint.setUri')
+ @DocsEditable
void setUri(String uri) native "SVGPaint_setUri_Callback";
}
@@ -4790,188 +4967,188 @@
@DocsEditable
factory PathElement() => _SvgElementFactoryProvider.createSvgElement_tag("path");
- @DocsEditable
@DomName('SVGPathElement.animatedNormalizedPathSegList')
+ @DocsEditable
PathSegList get animatedNormalizedPathSegList native "SVGPathElement_animatedNormalizedPathSegList_Getter";
- @DocsEditable
@DomName('SVGPathElement.animatedPathSegList')
+ @DocsEditable
PathSegList get animatedPathSegList native "SVGPathElement_animatedPathSegList_Getter";
- @DocsEditable
@DomName('SVGPathElement.normalizedPathSegList')
+ @DocsEditable
PathSegList get normalizedPathSegList native "SVGPathElement_normalizedPathSegList_Getter";
- @DocsEditable
@DomName('SVGPathElement.pathLength')
+ @DocsEditable
AnimatedNumber get pathLength native "SVGPathElement_pathLength_Getter";
- @DocsEditable
@DomName('SVGPathElement.pathSegList')
+ @DocsEditable
PathSegList get pathSegList native "SVGPathElement_pathSegList_Getter";
- @DocsEditable
@DomName('SVGPathElement.createSVGPathSegArcAbs')
+ @DocsEditable
PathSegArcAbs createSvgPathSegArcAbs(num x, num y, num r1, num r2, num angle, bool largeArcFlag, bool sweepFlag) native "SVGPathElement_createSVGPathSegArcAbs_Callback";
- @DocsEditable
@DomName('SVGPathElement.createSVGPathSegArcRel')
+ @DocsEditable
PathSegArcRel createSvgPathSegArcRel(num x, num y, num r1, num r2, num angle, bool largeArcFlag, bool sweepFlag) native "SVGPathElement_createSVGPathSegArcRel_Callback";
- @DocsEditable
@DomName('SVGPathElement.createSVGPathSegClosePath')
+ @DocsEditable
PathSegClosePath createSvgPathSegClosePath() native "SVGPathElement_createSVGPathSegClosePath_Callback";
- @DocsEditable
@DomName('SVGPathElement.createSVGPathSegCurvetoCubicAbs')
+ @DocsEditable
PathSegCurvetoCubicAbs createSvgPathSegCurvetoCubicAbs(num x, num y, num x1, num y1, num x2, num y2) native "SVGPathElement_createSVGPathSegCurvetoCubicAbs_Callback";
- @DocsEditable
@DomName('SVGPathElement.createSVGPathSegCurvetoCubicRel')
+ @DocsEditable
PathSegCurvetoCubicRel createSvgPathSegCurvetoCubicRel(num x, num y, num x1, num y1, num x2, num y2) native "SVGPathElement_createSVGPathSegCurvetoCubicRel_Callback";
- @DocsEditable
@DomName('SVGPathElement.createSVGPathSegCurvetoCubicSmoothAbs')
+ @DocsEditable
PathSegCurvetoCubicSmoothAbs createSvgPathSegCurvetoCubicSmoothAbs(num x, num y, num x2, num y2) native "SVGPathElement_createSVGPathSegCurvetoCubicSmoothAbs_Callback";
- @DocsEditable
@DomName('SVGPathElement.createSVGPathSegCurvetoCubicSmoothRel')
+ @DocsEditable
PathSegCurvetoCubicSmoothRel createSvgPathSegCurvetoCubicSmoothRel(num x, num y, num x2, num y2) native "SVGPathElement_createSVGPathSegCurvetoCubicSmoothRel_Callback";
- @DocsEditable
@DomName('SVGPathElement.createSVGPathSegCurvetoQuadraticAbs')
+ @DocsEditable
PathSegCurvetoQuadraticAbs createSvgPathSegCurvetoQuadraticAbs(num x, num y, num x1, num y1) native "SVGPathElement_createSVGPathSegCurvetoQuadraticAbs_Callback";
- @DocsEditable
@DomName('SVGPathElement.createSVGPathSegCurvetoQuadraticRel')
+ @DocsEditable
PathSegCurvetoQuadraticRel createSvgPathSegCurvetoQuadraticRel(num x, num y, num x1, num y1) native "SVGPathElement_createSVGPathSegCurvetoQuadraticRel_Callback";
- @DocsEditable
@DomName('SVGPathElement.createSVGPathSegCurvetoQuadraticSmoothAbs')
+ @DocsEditable
PathSegCurvetoQuadraticSmoothAbs createSvgPathSegCurvetoQuadraticSmoothAbs(num x, num y) native "SVGPathElement_createSVGPathSegCurvetoQuadraticSmoothAbs_Callback";
- @DocsEditable
@DomName('SVGPathElement.createSVGPathSegCurvetoQuadraticSmoothRel')
+ @DocsEditable
PathSegCurvetoQuadraticSmoothRel createSvgPathSegCurvetoQuadraticSmoothRel(num x, num y) native "SVGPathElement_createSVGPathSegCurvetoQuadraticSmoothRel_Callback";
- @DocsEditable
@DomName('SVGPathElement.createSVGPathSegLinetoAbs')
+ @DocsEditable
PathSegLinetoAbs createSvgPathSegLinetoAbs(num x, num y) native "SVGPathElement_createSVGPathSegLinetoAbs_Callback";
- @DocsEditable
@DomName('SVGPathElement.createSVGPathSegLinetoHorizontalAbs')
+ @DocsEditable
PathSegLinetoHorizontalAbs createSvgPathSegLinetoHorizontalAbs(num x) native "SVGPathElement_createSVGPathSegLinetoHorizontalAbs_Callback";
- @DocsEditable
@DomName('SVGPathElement.createSVGPathSegLinetoHorizontalRel')
+ @DocsEditable
PathSegLinetoHorizontalRel createSvgPathSegLinetoHorizontalRel(num x) native "SVGPathElement_createSVGPathSegLinetoHorizontalRel_Callback";
- @DocsEditable
@DomName('SVGPathElement.createSVGPathSegLinetoRel')
+ @DocsEditable
PathSegLinetoRel createSvgPathSegLinetoRel(num x, num y) native "SVGPathElement_createSVGPathSegLinetoRel_Callback";
- @DocsEditable
@DomName('SVGPathElement.createSVGPathSegLinetoVerticalAbs')
+ @DocsEditable
PathSegLinetoVerticalAbs createSvgPathSegLinetoVerticalAbs(num y) native "SVGPathElement_createSVGPathSegLinetoVerticalAbs_Callback";
- @DocsEditable
@DomName('SVGPathElement.createSVGPathSegLinetoVerticalRel')
+ @DocsEditable
PathSegLinetoVerticalRel createSvgPathSegLinetoVerticalRel(num y) native "SVGPathElement_createSVGPathSegLinetoVerticalRel_Callback";
- @DocsEditable
@DomName('SVGPathElement.createSVGPathSegMovetoAbs')
+ @DocsEditable
PathSegMovetoAbs createSvgPathSegMovetoAbs(num x, num y) native "SVGPathElement_createSVGPathSegMovetoAbs_Callback";
- @DocsEditable
@DomName('SVGPathElement.createSVGPathSegMovetoRel')
+ @DocsEditable
PathSegMovetoRel createSvgPathSegMovetoRel(num x, num y) native "SVGPathElement_createSVGPathSegMovetoRel_Callback";
- @DocsEditable
@DomName('SVGPathElement.getPathSegAtLength')
+ @DocsEditable
int getPathSegAtLength(num distance) native "SVGPathElement_getPathSegAtLength_Callback";
- @DocsEditable
@DomName('SVGPathElement.getPointAtLength')
+ @DocsEditable
Point getPointAtLength(num distance) native "SVGPathElement_getPointAtLength_Callback";
- @DocsEditable
@DomName('SVGPathElement.getTotalLength')
+ @DocsEditable
num getTotalLength() native "SVGPathElement_getTotalLength_Callback";
- @DocsEditable
@DomName('SVGPathElement.externalResourcesRequired')
+ @DocsEditable
AnimatedBoolean get externalResourcesRequired native "SVGPathElement_externalResourcesRequired_Getter";
- @DocsEditable
@DomName('SVGPathElement.xmllang')
+ @DocsEditable
String get xmllang native "SVGPathElement_xmllang_Getter";
- @DocsEditable
@DomName('SVGPathElement.xmllang')
+ @DocsEditable
void set xmllang(String value) native "SVGPathElement_xmllang_Setter";
- @DocsEditable
@DomName('SVGPathElement.xmlspace')
+ @DocsEditable
String get xmlspace native "SVGPathElement_xmlspace_Getter";
- @DocsEditable
@DomName('SVGPathElement.xmlspace')
+ @DocsEditable
void set xmlspace(String value) native "SVGPathElement_xmlspace_Setter";
- @DocsEditable
@DomName('SVGPathElement.farthestViewportElement')
+ @DocsEditable
SvgElement get farthestViewportElement native "SVGPathElement_farthestViewportElement_Getter";
- @DocsEditable
@DomName('SVGPathElement.nearestViewportElement')
+ @DocsEditable
SvgElement get nearestViewportElement native "SVGPathElement_nearestViewportElement_Getter";
- @DocsEditable
@DomName('SVGPathElement.getBBox')
+ @DocsEditable
Rect getBBox() native "SVGPathElement_getBBox_Callback";
- @DocsEditable
@DomName('SVGPathElement.getCTM')
+ @DocsEditable
Matrix getCtm() native "SVGPathElement_getCTM_Callback";
- @DocsEditable
@DomName('SVGPathElement.getScreenCTM')
+ @DocsEditable
Matrix getScreenCtm() native "SVGPathElement_getScreenCTM_Callback";
- @DocsEditable
@DomName('SVGPathElement.getTransformToElement')
+ @DocsEditable
Matrix getTransformToElement(SvgElement element) native "SVGPathElement_getTransformToElement_Callback";
- @DocsEditable
@DomName('SVGPathElement.className')
+ @DocsEditable
AnimatedString get $dom_svgClassName native "SVGPathElement_className_Getter";
- @DocsEditable
@DomName('SVGPathElement.style')
+ @DocsEditable
CssStyleDeclaration get style native "SVGPathElement_style_Getter";
- @DocsEditable
@DomName('SVGPathElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native "SVGPathElement_getPresentationAttribute_Callback";
- @DocsEditable
@DomName('SVGPathElement.requiredExtensions')
+ @DocsEditable
StringList get requiredExtensions native "SVGPathElement_requiredExtensions_Getter";
- @DocsEditable
@DomName('SVGPathElement.requiredFeatures')
+ @DocsEditable
StringList get requiredFeatures native "SVGPathElement_requiredFeatures_Getter";
- @DocsEditable
@DomName('SVGPathElement.systemLanguage')
+ @DocsEditable
StringList get systemLanguage native "SVGPathElement_systemLanguage_Getter";
- @DocsEditable
@DomName('SVGPathElement.hasExtension')
+ @DocsEditable
bool hasExtension(String extension) native "SVGPathElement_hasExtension_Callback";
- @DocsEditable
@DomName('SVGPathElement.transform')
+ @DocsEditable
AnimatedTransformList get transform native "SVGPathElement_transform_Getter";
}
@@ -5027,12 +5204,12 @@
static const int PATHSEG_UNKNOWN = 0;
- @DocsEditable
@DomName('SVGPathSeg.pathSegType')
+ @DocsEditable
int get pathSegType native "SVGPathSeg_pathSegType_Getter";
- @DocsEditable
@DomName('SVGPathSeg.pathSegTypeAsLetter')
+ @DocsEditable
String get pathSegTypeAsLetter native "SVGPathSeg_pathSegTypeAsLetter_Getter";
}
@@ -5048,60 +5225,60 @@
class PathSegArcAbs extends PathSeg {
PathSegArcAbs.internal() : super.internal();
- @DocsEditable
@DomName('SVGPathSegArcAbs.angle')
+ @DocsEditable
num get angle native "SVGPathSegArcAbs_angle_Getter";
- @DocsEditable
@DomName('SVGPathSegArcAbs.angle')
+ @DocsEditable
void set angle(num value) native "SVGPathSegArcAbs_angle_Setter";
- @DocsEditable
@DomName('SVGPathSegArcAbs.largeArcFlag')
+ @DocsEditable
bool get largeArcFlag native "SVGPathSegArcAbs_largeArcFlag_Getter";
- @DocsEditable
@DomName('SVGPathSegArcAbs.largeArcFlag')
+ @DocsEditable
void set largeArcFlag(bool value) native "SVGPathSegArcAbs_largeArcFlag_Setter";
- @DocsEditable
@DomName('SVGPathSegArcAbs.r1')
+ @DocsEditable
num get r1 native "SVGPathSegArcAbs_r1_Getter";
- @DocsEditable
@DomName('SVGPathSegArcAbs.r1')
+ @DocsEditable
void set r1(num value) native "SVGPathSegArcAbs_r1_Setter";
- @DocsEditable
@DomName('SVGPathSegArcAbs.r2')
+ @DocsEditable
num get r2 native "SVGPathSegArcAbs_r2_Getter";
- @DocsEditable
@DomName('SVGPathSegArcAbs.r2')
+ @DocsEditable
void set r2(num value) native "SVGPathSegArcAbs_r2_Setter";
- @DocsEditable
@DomName('SVGPathSegArcAbs.sweepFlag')
+ @DocsEditable
bool get sweepFlag native "SVGPathSegArcAbs_sweepFlag_Getter";
- @DocsEditable
@DomName('SVGPathSegArcAbs.sweepFlag')
+ @DocsEditable
void set sweepFlag(bool value) native "SVGPathSegArcAbs_sweepFlag_Setter";
- @DocsEditable
@DomName('SVGPathSegArcAbs.x')
+ @DocsEditable
num get x native "SVGPathSegArcAbs_x_Getter";
- @DocsEditable
@DomName('SVGPathSegArcAbs.x')
+ @DocsEditable
void set x(num value) native "SVGPathSegArcAbs_x_Setter";
- @DocsEditable
@DomName('SVGPathSegArcAbs.y')
+ @DocsEditable
num get y native "SVGPathSegArcAbs_y_Getter";
- @DocsEditable
@DomName('SVGPathSegArcAbs.y')
+ @DocsEditable
void set y(num value) native "SVGPathSegArcAbs_y_Setter";
}
@@ -5117,60 +5294,60 @@
class PathSegArcRel extends PathSeg {
PathSegArcRel.internal() : super.internal();
- @DocsEditable
@DomName('SVGPathSegArcRel.angle')
+ @DocsEditable
num get angle native "SVGPathSegArcRel_angle_Getter";
- @DocsEditable
@DomName('SVGPathSegArcRel.angle')
+ @DocsEditable
void set angle(num value) native "SVGPathSegArcRel_angle_Setter";
- @DocsEditable
@DomName('SVGPathSegArcRel.largeArcFlag')
+ @DocsEditable
bool get largeArcFlag native "SVGPathSegArcRel_largeArcFlag_Getter";
- @DocsEditable
@DomName('SVGPathSegArcRel.largeArcFlag')
+ @DocsEditable
void set largeArcFlag(bool value) native "SVGPathSegArcRel_largeArcFlag_Setter";
- @DocsEditable
@DomName('SVGPathSegArcRel.r1')
+ @DocsEditable
num get r1 native "SVGPathSegArcRel_r1_Getter";
- @DocsEditable
@DomName('SVGPathSegArcRel.r1')
+ @DocsEditable
void set r1(num value) native "SVGPathSegArcRel_r1_Setter";
- @DocsEditable
@DomName('SVGPathSegArcRel.r2')
+ @DocsEditable
num get r2 native "SVGPathSegArcRel_r2_Getter";
- @DocsEditable
@DomName('SVGPathSegArcRel.r2')
+ @DocsEditable
void set r2(num value) native "SVGPathSegArcRel_r2_Setter";
- @DocsEditable
@DomName('SVGPathSegArcRel.sweepFlag')
+ @DocsEditable
bool get sweepFlag native "SVGPathSegArcRel_sweepFlag_Getter";
- @DocsEditable
@DomName('SVGPathSegArcRel.sweepFlag')
+ @DocsEditable
void set sweepFlag(bool value) native "SVGPathSegArcRel_sweepFlag_Setter";
- @DocsEditable
@DomName('SVGPathSegArcRel.x')
+ @DocsEditable
num get x native "SVGPathSegArcRel_x_Getter";
- @DocsEditable
@DomName('SVGPathSegArcRel.x')
+ @DocsEditable
void set x(num value) native "SVGPathSegArcRel_x_Setter";
- @DocsEditable
@DomName('SVGPathSegArcRel.y')
+ @DocsEditable
num get y native "SVGPathSegArcRel_y_Getter";
- @DocsEditable
@DomName('SVGPathSegArcRel.y')
+ @DocsEditable
void set y(num value) native "SVGPathSegArcRel_y_Setter";
}
@@ -5199,52 +5376,52 @@
class PathSegCurvetoCubicAbs extends PathSeg {
PathSegCurvetoCubicAbs.internal() : super.internal();
- @DocsEditable
@DomName('SVGPathSegCurvetoCubicAbs.x')
+ @DocsEditable
num get x native "SVGPathSegCurvetoCubicAbs_x_Getter";
- @DocsEditable
@DomName('SVGPathSegCurvetoCubicAbs.x')
+ @DocsEditable
void set x(num value) native "SVGPathSegCurvetoCubicAbs_x_Setter";
- @DocsEditable
@DomName('SVGPathSegCurvetoCubicAbs.x1')
+ @DocsEditable
num get x1 native "SVGPathSegCurvetoCubicAbs_x1_Getter";
- @DocsEditable
@DomName('SVGPathSegCurvetoCubicAbs.x1')
+ @DocsEditable
void set x1(num value) native "SVGPathSegCurvetoCubicAbs_x1_Setter";
- @DocsEditable
@DomName('SVGPathSegCurvetoCubicAbs.x2')
+ @DocsEditable
num get x2 native "SVGPathSegCurvetoCubicAbs_x2_Getter";
- @DocsEditable
@DomName('SVGPathSegCurvetoCubicAbs.x2')
+ @DocsEditable
void set x2(num value) native "SVGPathSegCurvetoCubicAbs_x2_Setter";
- @DocsEditable
@DomName('SVGPathSegCurvetoCubicAbs.y')
+ @DocsEditable
num get y native "SVGPathSegCurvetoCubicAbs_y_Getter";
- @DocsEditable
@DomName('SVGPathSegCurvetoCubicAbs.y')
+ @DocsEditable
void set y(num value) native "SVGPathSegCurvetoCubicAbs_y_Setter";
- @DocsEditable
@DomName('SVGPathSegCurvetoCubicAbs.y1')
+ @DocsEditable
num get y1 native "SVGPathSegCurvetoCubicAbs_y1_Getter";
- @DocsEditable
@DomName('SVGPathSegCurvetoCubicAbs.y1')
+ @DocsEditable
void set y1(num value) native "SVGPathSegCurvetoCubicAbs_y1_Setter";
- @DocsEditable
@DomName('SVGPathSegCurvetoCubicAbs.y2')
+ @DocsEditable
num get y2 native "SVGPathSegCurvetoCubicAbs_y2_Getter";
- @DocsEditable
@DomName('SVGPathSegCurvetoCubicAbs.y2')
+ @DocsEditable
void set y2(num value) native "SVGPathSegCurvetoCubicAbs_y2_Setter";
}
@@ -5260,52 +5437,52 @@
class PathSegCurvetoCubicRel extends PathSeg {
PathSegCurvetoCubicRel.internal() : super.internal();
- @DocsEditable
@DomName('SVGPathSegCurvetoCubicRel.x')
+ @DocsEditable
num get x native "SVGPathSegCurvetoCubicRel_x_Getter";
- @DocsEditable
@DomName('SVGPathSegCurvetoCubicRel.x')
+ @DocsEditable
void set x(num value) native "SVGPathSegCurvetoCubicRel_x_Setter";
- @DocsEditable
@DomName('SVGPathSegCurvetoCubicRel.x1')
+ @DocsEditable
num get x1 native "SVGPathSegCurvetoCubicRel_x1_Getter";
- @DocsEditable
@DomName('SVGPathSegCurvetoCubicRel.x1')
+ @DocsEditable
void set x1(num value) native "SVGPathSegCurvetoCubicRel_x1_Setter";
- @DocsEditable
@DomName('SVGPathSegCurvetoCubicRel.x2')
+ @DocsEditable
num get x2 native "SVGPathSegCurvetoCubicRel_x2_Getter";
- @DocsEditable
@DomName('SVGPathSegCurvetoCubicRel.x2')
+ @DocsEditable
void set x2(num value) native "SVGPathSegCurvetoCubicRel_x2_Setter";
- @DocsEditable
@DomName('SVGPathSegCurvetoCubicRel.y')
+ @DocsEditable
num get y native "SVGPathSegCurvetoCubicRel_y_Getter";
- @DocsEditable
@DomName('SVGPathSegCurvetoCubicRel.y')
+ @DocsEditable
void set y(num value) native "SVGPathSegCurvetoCubicRel_y_Setter";
- @DocsEditable
@DomName('SVGPathSegCurvetoCubicRel.y1')
+ @DocsEditable
num get y1 native "SVGPathSegCurvetoCubicRel_y1_Getter";
- @DocsEditable
@DomName('SVGPathSegCurvetoCubicRel.y1')
+ @DocsEditable
void set y1(num value) native "SVGPathSegCurvetoCubicRel_y1_Setter";
- @DocsEditable
@DomName('SVGPathSegCurvetoCubicRel.y2')
+ @DocsEditable
num get y2 native "SVGPathSegCurvetoCubicRel_y2_Getter";
- @DocsEditable
@DomName('SVGPathSegCurvetoCubicRel.y2')
+ @DocsEditable
void set y2(num value) native "SVGPathSegCurvetoCubicRel_y2_Setter";
}
@@ -5321,36 +5498,36 @@
class PathSegCurvetoCubicSmoothAbs extends PathSeg {
PathSegCurvetoCubicSmoothAbs.internal() : super.internal();
- @DocsEditable
@DomName('SVGPathSegCurvetoCubicSmoothAbs.x')
+ @DocsEditable
num get x native "SVGPathSegCurvetoCubicSmoothAbs_x_Getter";
- @DocsEditable
@DomName('SVGPathSegCurvetoCubicSmoothAbs.x')
+ @DocsEditable
void set x(num value) native "SVGPathSegCurvetoCubicSmoothAbs_x_Setter";
- @DocsEditable
@DomName('SVGPathSegCurvetoCubicSmoothAbs.x2')
+ @DocsEditable
num get x2 native "SVGPathSegCurvetoCubicSmoothAbs_x2_Getter";
- @DocsEditable
@DomName('SVGPathSegCurvetoCubicSmoothAbs.x2')
+ @DocsEditable
void set x2(num value) native "SVGPathSegCurvetoCubicSmoothAbs_x2_Setter";
- @DocsEditable
@DomName('SVGPathSegCurvetoCubicSmoothAbs.y')
+ @DocsEditable
num get y native "SVGPathSegCurvetoCubicSmoothAbs_y_Getter";
- @DocsEditable
@DomName('SVGPathSegCurvetoCubicSmoothAbs.y')
+ @DocsEditable
void set y(num value) native "SVGPathSegCurvetoCubicSmoothAbs_y_Setter";
- @DocsEditable
@DomName('SVGPathSegCurvetoCubicSmoothAbs.y2')
+ @DocsEditable
num get y2 native "SVGPathSegCurvetoCubicSmoothAbs_y2_Getter";
- @DocsEditable
@DomName('SVGPathSegCurvetoCubicSmoothAbs.y2')
+ @DocsEditable
void set y2(num value) native "SVGPathSegCurvetoCubicSmoothAbs_y2_Setter";
}
@@ -5366,36 +5543,36 @@
class PathSegCurvetoCubicSmoothRel extends PathSeg {
PathSegCurvetoCubicSmoothRel.internal() : super.internal();
- @DocsEditable
@DomName('SVGPathSegCurvetoCubicSmoothRel.x')
+ @DocsEditable
num get x native "SVGPathSegCurvetoCubicSmoothRel_x_Getter";
- @DocsEditable
@DomName('SVGPathSegCurvetoCubicSmoothRel.x')
+ @DocsEditable
void set x(num value) native "SVGPathSegCurvetoCubicSmoothRel_x_Setter";
- @DocsEditable
@DomName('SVGPathSegCurvetoCubicSmoothRel.x2')
+ @DocsEditable
num get x2 native "SVGPathSegCurvetoCubicSmoothRel_x2_Getter";
- @DocsEditable
@DomName('SVGPathSegCurvetoCubicSmoothRel.x2')
+ @DocsEditable
void set x2(num value) native "SVGPathSegCurvetoCubicSmoothRel_x2_Setter";
- @DocsEditable
@DomName('SVGPathSegCurvetoCubicSmoothRel.y')
+ @DocsEditable
num get y native "SVGPathSegCurvetoCubicSmoothRel_y_Getter";
- @DocsEditable
@DomName('SVGPathSegCurvetoCubicSmoothRel.y')
+ @DocsEditable
void set y(num value) native "SVGPathSegCurvetoCubicSmoothRel_y_Setter";
- @DocsEditable
@DomName('SVGPathSegCurvetoCubicSmoothRel.y2')
+ @DocsEditable
num get y2 native "SVGPathSegCurvetoCubicSmoothRel_y2_Getter";
- @DocsEditable
@DomName('SVGPathSegCurvetoCubicSmoothRel.y2')
+ @DocsEditable
void set y2(num value) native "SVGPathSegCurvetoCubicSmoothRel_y2_Setter";
}
@@ -5411,36 +5588,36 @@
class PathSegCurvetoQuadraticAbs extends PathSeg {
PathSegCurvetoQuadraticAbs.internal() : super.internal();
- @DocsEditable
@DomName('SVGPathSegCurvetoQuadraticAbs.x')
+ @DocsEditable
num get x native "SVGPathSegCurvetoQuadraticAbs_x_Getter";
- @DocsEditable
@DomName('SVGPathSegCurvetoQuadraticAbs.x')
+ @DocsEditable
void set x(num value) native "SVGPathSegCurvetoQuadraticAbs_x_Setter";
- @DocsEditable
@DomName('SVGPathSegCurvetoQuadraticAbs.x1')
+ @DocsEditable
num get x1 native "SVGPathSegCurvetoQuadraticAbs_x1_Getter";
- @DocsEditable
@DomName('SVGPathSegCurvetoQuadraticAbs.x1')
+ @DocsEditable
void set x1(num value) native "SVGPathSegCurvetoQuadraticAbs_x1_Setter";
- @DocsEditable
@DomName('SVGPathSegCurvetoQuadraticAbs.y')
+ @DocsEditable
num get y native "SVGPathSegCurvetoQuadraticAbs_y_Getter";
- @DocsEditable
@DomName('SVGPathSegCurvetoQuadraticAbs.y')
+ @DocsEditable
void set y(num value) native "SVGPathSegCurvetoQuadraticAbs_y_Setter";
- @DocsEditable
@DomName('SVGPathSegCurvetoQuadraticAbs.y1')
+ @DocsEditable
num get y1 native "SVGPathSegCurvetoQuadraticAbs_y1_Getter";
- @DocsEditable
@DomName('SVGPathSegCurvetoQuadraticAbs.y1')
+ @DocsEditable
void set y1(num value) native "SVGPathSegCurvetoQuadraticAbs_y1_Setter";
}
@@ -5456,36 +5633,36 @@
class PathSegCurvetoQuadraticRel extends PathSeg {
PathSegCurvetoQuadraticRel.internal() : super.internal();
- @DocsEditable
@DomName('SVGPathSegCurvetoQuadraticRel.x')
+ @DocsEditable
num get x native "SVGPathSegCurvetoQuadraticRel_x_Getter";
- @DocsEditable
@DomName('SVGPathSegCurvetoQuadraticRel.x')
+ @DocsEditable
void set x(num value) native "SVGPathSegCurvetoQuadraticRel_x_Setter";
- @DocsEditable
@DomName('SVGPathSegCurvetoQuadraticRel.x1')
+ @DocsEditable
num get x1 native "SVGPathSegCurvetoQuadraticRel_x1_Getter";
- @DocsEditable
@DomName('SVGPathSegCurvetoQuadraticRel.x1')
+ @DocsEditable
void set x1(num value) native "SVGPathSegCurvetoQuadraticRel_x1_Setter";
- @DocsEditable
@DomName('SVGPathSegCurvetoQuadraticRel.y')
+ @DocsEditable
num get y native "SVGPathSegCurvetoQuadraticRel_y_Getter";
- @DocsEditable
@DomName('SVGPathSegCurvetoQuadraticRel.y')
+ @DocsEditable
void set y(num value) native "SVGPathSegCurvetoQuadraticRel_y_Setter";
- @DocsEditable
@DomName('SVGPathSegCurvetoQuadraticRel.y1')
+ @DocsEditable
num get y1 native "SVGPathSegCurvetoQuadraticRel_y1_Getter";
- @DocsEditable
@DomName('SVGPathSegCurvetoQuadraticRel.y1')
+ @DocsEditable
void set y1(num value) native "SVGPathSegCurvetoQuadraticRel_y1_Setter";
}
@@ -5501,20 +5678,20 @@
class PathSegCurvetoQuadraticSmoothAbs extends PathSeg {
PathSegCurvetoQuadraticSmoothAbs.internal() : super.internal();
- @DocsEditable
@DomName('SVGPathSegCurvetoQuadraticSmoothAbs.x')
+ @DocsEditable
num get x native "SVGPathSegCurvetoQuadraticSmoothAbs_x_Getter";
- @DocsEditable
@DomName('SVGPathSegCurvetoQuadraticSmoothAbs.x')
+ @DocsEditable
void set x(num value) native "SVGPathSegCurvetoQuadraticSmoothAbs_x_Setter";
- @DocsEditable
@DomName('SVGPathSegCurvetoQuadraticSmoothAbs.y')
+ @DocsEditable
num get y native "SVGPathSegCurvetoQuadraticSmoothAbs_y_Getter";
- @DocsEditable
@DomName('SVGPathSegCurvetoQuadraticSmoothAbs.y')
+ @DocsEditable
void set y(num value) native "SVGPathSegCurvetoQuadraticSmoothAbs_y_Setter";
}
@@ -5530,20 +5707,20 @@
class PathSegCurvetoQuadraticSmoothRel extends PathSeg {
PathSegCurvetoQuadraticSmoothRel.internal() : super.internal();
- @DocsEditable
@DomName('SVGPathSegCurvetoQuadraticSmoothRel.x')
+ @DocsEditable
num get x native "SVGPathSegCurvetoQuadraticSmoothRel_x_Getter";
- @DocsEditable
@DomName('SVGPathSegCurvetoQuadraticSmoothRel.x')
+ @DocsEditable
void set x(num value) native "SVGPathSegCurvetoQuadraticSmoothRel_x_Setter";
- @DocsEditable
@DomName('SVGPathSegCurvetoQuadraticSmoothRel.y')
+ @DocsEditable
num get y native "SVGPathSegCurvetoQuadraticSmoothRel_y_Getter";
- @DocsEditable
@DomName('SVGPathSegCurvetoQuadraticSmoothRel.y')
+ @DocsEditable
void set y(num value) native "SVGPathSegCurvetoQuadraticSmoothRel_y_Setter";
}
@@ -5559,20 +5736,20 @@
class PathSegLinetoAbs extends PathSeg {
PathSegLinetoAbs.internal() : super.internal();
- @DocsEditable
@DomName('SVGPathSegLinetoAbs.x')
+ @DocsEditable
num get x native "SVGPathSegLinetoAbs_x_Getter";
- @DocsEditable
@DomName('SVGPathSegLinetoAbs.x')
+ @DocsEditable
void set x(num value) native "SVGPathSegLinetoAbs_x_Setter";
- @DocsEditable
@DomName('SVGPathSegLinetoAbs.y')
+ @DocsEditable
num get y native "SVGPathSegLinetoAbs_y_Getter";
- @DocsEditable
@DomName('SVGPathSegLinetoAbs.y')
+ @DocsEditable
void set y(num value) native "SVGPathSegLinetoAbs_y_Setter";
}
@@ -5588,12 +5765,12 @@
class PathSegLinetoHorizontalAbs extends PathSeg {
PathSegLinetoHorizontalAbs.internal() : super.internal();
- @DocsEditable
@DomName('SVGPathSegLinetoHorizontalAbs.x')
+ @DocsEditable
num get x native "SVGPathSegLinetoHorizontalAbs_x_Getter";
- @DocsEditable
@DomName('SVGPathSegLinetoHorizontalAbs.x')
+ @DocsEditable
void set x(num value) native "SVGPathSegLinetoHorizontalAbs_x_Setter";
}
@@ -5609,12 +5786,12 @@
class PathSegLinetoHorizontalRel extends PathSeg {
PathSegLinetoHorizontalRel.internal() : super.internal();
- @DocsEditable
@DomName('SVGPathSegLinetoHorizontalRel.x')
+ @DocsEditable
num get x native "SVGPathSegLinetoHorizontalRel_x_Getter";
- @DocsEditable
@DomName('SVGPathSegLinetoHorizontalRel.x')
+ @DocsEditable
void set x(num value) native "SVGPathSegLinetoHorizontalRel_x_Setter";
}
@@ -5630,20 +5807,20 @@
class PathSegLinetoRel extends PathSeg {
PathSegLinetoRel.internal() : super.internal();
- @DocsEditable
@DomName('SVGPathSegLinetoRel.x')
+ @DocsEditable
num get x native "SVGPathSegLinetoRel_x_Getter";
- @DocsEditable
@DomName('SVGPathSegLinetoRel.x')
+ @DocsEditable
void set x(num value) native "SVGPathSegLinetoRel_x_Setter";
- @DocsEditable
@DomName('SVGPathSegLinetoRel.y')
+ @DocsEditable
num get y native "SVGPathSegLinetoRel_y_Getter";
- @DocsEditable
@DomName('SVGPathSegLinetoRel.y')
+ @DocsEditable
void set y(num value) native "SVGPathSegLinetoRel_y_Setter";
}
@@ -5659,12 +5836,12 @@
class PathSegLinetoVerticalAbs extends PathSeg {
PathSegLinetoVerticalAbs.internal() : super.internal();
- @DocsEditable
@DomName('SVGPathSegLinetoVerticalAbs.y')
+ @DocsEditable
num get y native "SVGPathSegLinetoVerticalAbs_y_Getter";
- @DocsEditable
@DomName('SVGPathSegLinetoVerticalAbs.y')
+ @DocsEditable
void set y(num value) native "SVGPathSegLinetoVerticalAbs_y_Setter";
}
@@ -5680,12 +5857,12 @@
class PathSegLinetoVerticalRel extends PathSeg {
PathSegLinetoVerticalRel.internal() : super.internal();
- @DocsEditable
@DomName('SVGPathSegLinetoVerticalRel.y')
+ @DocsEditable
num get y native "SVGPathSegLinetoVerticalRel_y_Getter";
- @DocsEditable
@DomName('SVGPathSegLinetoVerticalRel.y')
+ @DocsEditable
void set y(num value) native "SVGPathSegLinetoVerticalRel_y_Setter";
}
@@ -5701,8 +5878,8 @@
class PathSegList extends NativeFieldWrapperClass1 implements List<PathSeg> {
PathSegList.internal();
- @DocsEditable
@DomName('SVGPathSegList.numberOfItems')
+ @DocsEditable
int get numberOfItems native "SVGPathSegList_numberOfItems_Getter";
PathSeg operator[](int index) native "SVGPathSegList_item_Callback";
@@ -5732,11 +5909,13 @@
void forEach(void f(PathSeg element)) => IterableMixinWorkaround.forEach(this, f);
- String join([String separator]) => IterableMixinWorkaround.joinList(this, separator);
+ String join([String separator]) =>
+ IterableMixinWorkaround.joinList(this, separator);
List mappedBy(f(PathSeg element)) => IterableMixinWorkaround.mappedByList(this, f);
- Iterable<PathSeg> where(bool f(PathSeg element)) => IterableMixinWorkaround.where(this, f);
+ Iterable<PathSeg> where(bool f(PathSeg element)) =>
+ IterableMixinWorkaround.where(this, f);
bool every(bool f(PathSeg element)) => IterableMixinWorkaround.every(this, f);
@@ -5796,6 +5975,9 @@
// clear() defined by IDL.
+ List<PathSeg> get reversed =>
+ new ReversedListView<PathSeg>(this, 0, null);
+
void sort([int compare(PathSeg a, PathSeg b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -5824,9 +6006,11 @@
throw new StateError("More than one element");
}
- PathSeg min([int compare(PathSeg a, PathSeg b)]) => IterableMixinWorkaround.min(this, compare);
+ PathSeg min([int compare(PathSeg a, PathSeg b)]) =>
+ IterableMixinWorkaround.min(this, compare);
- PathSeg max([int compare(PathSeg a, PathSeg b)]) => IterableMixinWorkaround.max(this, compare);
+ PathSeg max([int compare(PathSeg a, PathSeg b)]) =>
+ IterableMixinWorkaround.max(this, compare);
PathSeg removeAt(int pos) {
throw new UnsupportedError("Cannot remove from immutable List.");
@@ -5873,32 +6057,32 @@
// -- end List<PathSeg> mixins.
- @DocsEditable
@DomName('SVGPathSegList.appendItem')
+ @DocsEditable
PathSeg appendItem(PathSeg newItem) native "SVGPathSegList_appendItem_Callback";
- @DocsEditable
@DomName('SVGPathSegList.clear')
+ @DocsEditable
void clear() native "SVGPathSegList_clear_Callback";
- @DocsEditable
@DomName('SVGPathSegList.getItem')
+ @DocsEditable
PathSeg getItem(int index) native "SVGPathSegList_getItem_Callback";
- @DocsEditable
@DomName('SVGPathSegList.initialize')
+ @DocsEditable
PathSeg initialize(PathSeg newItem) native "SVGPathSegList_initialize_Callback";
- @DocsEditable
@DomName('SVGPathSegList.insertItemBefore')
+ @DocsEditable
PathSeg insertItemBefore(PathSeg newItem, int index) native "SVGPathSegList_insertItemBefore_Callback";
- @DocsEditable
@DomName('SVGPathSegList.removeItem')
+ @DocsEditable
PathSeg removeItem(int index) native "SVGPathSegList_removeItem_Callback";
- @DocsEditable
@DomName('SVGPathSegList.replaceItem')
+ @DocsEditable
PathSeg replaceItem(PathSeg newItem, int index) native "SVGPathSegList_replaceItem_Callback";
}
@@ -5914,20 +6098,20 @@
class PathSegMovetoAbs extends PathSeg {
PathSegMovetoAbs.internal() : super.internal();
- @DocsEditable
@DomName('SVGPathSegMovetoAbs.x')
+ @DocsEditable
num get x native "SVGPathSegMovetoAbs_x_Getter";
- @DocsEditable
@DomName('SVGPathSegMovetoAbs.x')
+ @DocsEditable
void set x(num value) native "SVGPathSegMovetoAbs_x_Setter";
- @DocsEditable
@DomName('SVGPathSegMovetoAbs.y')
+ @DocsEditable
num get y native "SVGPathSegMovetoAbs_y_Getter";
- @DocsEditable
@DomName('SVGPathSegMovetoAbs.y')
+ @DocsEditable
void set y(num value) native "SVGPathSegMovetoAbs_y_Setter";
}
@@ -5943,20 +6127,20 @@
class PathSegMovetoRel extends PathSeg {
PathSegMovetoRel.internal() : super.internal();
- @DocsEditable
@DomName('SVGPathSegMovetoRel.x')
+ @DocsEditable
num get x native "SVGPathSegMovetoRel_x_Getter";
- @DocsEditable
@DomName('SVGPathSegMovetoRel.x')
+ @DocsEditable
void set x(num value) native "SVGPathSegMovetoRel_x_Setter";
- @DocsEditable
@DomName('SVGPathSegMovetoRel.y')
+ @DocsEditable
num get y native "SVGPathSegMovetoRel_y_Getter";
- @DocsEditable
@DomName('SVGPathSegMovetoRel.y')
+ @DocsEditable
void set y(num value) native "SVGPathSegMovetoRel_y_Setter";
}
@@ -5975,92 +6159,92 @@
@DocsEditable
factory PatternElement() => _SvgElementFactoryProvider.createSvgElement_tag("pattern");
- @DocsEditable
@DomName('SVGPatternElement.height')
+ @DocsEditable
AnimatedLength get height native "SVGPatternElement_height_Getter";
- @DocsEditable
@DomName('SVGPatternElement.patternContentUnits')
+ @DocsEditable
AnimatedEnumeration get patternContentUnits native "SVGPatternElement_patternContentUnits_Getter";
- @DocsEditable
@DomName('SVGPatternElement.patternTransform')
+ @DocsEditable
AnimatedTransformList get patternTransform native "SVGPatternElement_patternTransform_Getter";
- @DocsEditable
@DomName('SVGPatternElement.patternUnits')
+ @DocsEditable
AnimatedEnumeration get patternUnits native "SVGPatternElement_patternUnits_Getter";
- @DocsEditable
@DomName('SVGPatternElement.width')
+ @DocsEditable
AnimatedLength get width native "SVGPatternElement_width_Getter";
- @DocsEditable
@DomName('SVGPatternElement.x')
+ @DocsEditable
AnimatedLength get x native "SVGPatternElement_x_Getter";
- @DocsEditable
@DomName('SVGPatternElement.y')
+ @DocsEditable
AnimatedLength get y native "SVGPatternElement_y_Getter";
- @DocsEditable
@DomName('SVGPatternElement.externalResourcesRequired')
+ @DocsEditable
AnimatedBoolean get externalResourcesRequired native "SVGPatternElement_externalResourcesRequired_Getter";
- @DocsEditable
@DomName('SVGPatternElement.preserveAspectRatio')
+ @DocsEditable
AnimatedPreserveAspectRatio get preserveAspectRatio native "SVGPatternElement_preserveAspectRatio_Getter";
- @DocsEditable
@DomName('SVGPatternElement.viewBox')
+ @DocsEditable
AnimatedRect get viewBox native "SVGPatternElement_viewBox_Getter";
- @DocsEditable
@DomName('SVGPatternElement.xmllang')
+ @DocsEditable
String get xmllang native "SVGPatternElement_xmllang_Getter";
- @DocsEditable
@DomName('SVGPatternElement.xmllang')
+ @DocsEditable
void set xmllang(String value) native "SVGPatternElement_xmllang_Setter";
- @DocsEditable
@DomName('SVGPatternElement.xmlspace')
+ @DocsEditable
String get xmlspace native "SVGPatternElement_xmlspace_Getter";
- @DocsEditable
@DomName('SVGPatternElement.xmlspace')
+ @DocsEditable
void set xmlspace(String value) native "SVGPatternElement_xmlspace_Setter";
- @DocsEditable
@DomName('SVGPatternElement.className')
+ @DocsEditable
AnimatedString get $dom_svgClassName native "SVGPatternElement_className_Getter";
- @DocsEditable
@DomName('SVGPatternElement.style')
+ @DocsEditable
CssStyleDeclaration get style native "SVGPatternElement_style_Getter";
- @DocsEditable
@DomName('SVGPatternElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native "SVGPatternElement_getPresentationAttribute_Callback";
- @DocsEditable
@DomName('SVGPatternElement.requiredExtensions')
+ @DocsEditable
StringList get requiredExtensions native "SVGPatternElement_requiredExtensions_Getter";
- @DocsEditable
@DomName('SVGPatternElement.requiredFeatures')
+ @DocsEditable
StringList get requiredFeatures native "SVGPatternElement_requiredFeatures_Getter";
- @DocsEditable
@DomName('SVGPatternElement.systemLanguage')
+ @DocsEditable
StringList get systemLanguage native "SVGPatternElement_systemLanguage_Getter";
- @DocsEditable
@DomName('SVGPatternElement.hasExtension')
+ @DocsEditable
bool hasExtension(String extension) native "SVGPatternElement_hasExtension_Callback";
- @DocsEditable
@DomName('SVGPatternElement.href')
+ @DocsEditable
AnimatedString get href native "SVGPatternElement_href_Getter";
}
@@ -6076,24 +6260,24 @@
class Point extends NativeFieldWrapperClass1 {
Point.internal();
- @DocsEditable
@DomName('SVGPoint.x')
+ @DocsEditable
num get x native "SVGPoint_x_Getter";
- @DocsEditable
@DomName('SVGPoint.x')
+ @DocsEditable
void set x(num value) native "SVGPoint_x_Setter";
- @DocsEditable
@DomName('SVGPoint.y')
+ @DocsEditable
num get y native "SVGPoint_y_Getter";
- @DocsEditable
@DomName('SVGPoint.y')
+ @DocsEditable
void set y(num value) native "SVGPoint_y_Setter";
- @DocsEditable
@DomName('SVGPoint.matrixTransform')
+ @DocsEditable
Point matrixTransform(Matrix matrix) native "SVGPoint_matrixTransform_Callback";
}
@@ -6109,36 +6293,36 @@
class PointList extends NativeFieldWrapperClass1 {
PointList.internal();
- @DocsEditable
@DomName('SVGPointList.numberOfItems')
+ @DocsEditable
int get numberOfItems native "SVGPointList_numberOfItems_Getter";
- @DocsEditable
@DomName('SVGPointList.appendItem')
+ @DocsEditable
Point appendItem(Point item) native "SVGPointList_appendItem_Callback";
- @DocsEditable
@DomName('SVGPointList.clear')
+ @DocsEditable
void clear() native "SVGPointList_clear_Callback";
- @DocsEditable
@DomName('SVGPointList.getItem')
+ @DocsEditable
Point getItem(int index) native "SVGPointList_getItem_Callback";
- @DocsEditable
@DomName('SVGPointList.initialize')
+ @DocsEditable
Point initialize(Point item) native "SVGPointList_initialize_Callback";
- @DocsEditable
@DomName('SVGPointList.insertItemBefore')
+ @DocsEditable
Point insertItemBefore(Point item, int index) native "SVGPointList_insertItemBefore_Callback";
- @DocsEditable
@DomName('SVGPointList.removeItem')
+ @DocsEditable
Point removeItem(int index) native "SVGPointList_removeItem_Callback";
- @DocsEditable
@DomName('SVGPointList.replaceItem')
+ @DocsEditable
Point replaceItem(Point item, int index) native "SVGPointList_replaceItem_Callback";
}
@@ -6157,88 +6341,88 @@
@DocsEditable
factory PolygonElement() => _SvgElementFactoryProvider.createSvgElement_tag("polygon");
- @DocsEditable
@DomName('SVGPolygonElement.animatedPoints')
+ @DocsEditable
PointList get animatedPoints native "SVGPolygonElement_animatedPoints_Getter";
- @DocsEditable
@DomName('SVGPolygonElement.points')
+ @DocsEditable
PointList get points native "SVGPolygonElement_points_Getter";
- @DocsEditable
@DomName('SVGPolygonElement.externalResourcesRequired')
+ @DocsEditable
AnimatedBoolean get externalResourcesRequired native "SVGPolygonElement_externalResourcesRequired_Getter";
- @DocsEditable
@DomName('SVGPolygonElement.xmllang')
+ @DocsEditable
String get xmllang native "SVGPolygonElement_xmllang_Getter";
- @DocsEditable
@DomName('SVGPolygonElement.xmllang')
+ @DocsEditable
void set xmllang(String value) native "SVGPolygonElement_xmllang_Setter";
- @DocsEditable
@DomName('SVGPolygonElement.xmlspace')
+ @DocsEditable
String get xmlspace native "SVGPolygonElement_xmlspace_Getter";
- @DocsEditable
@DomName('SVGPolygonElement.xmlspace')
+ @DocsEditable
void set xmlspace(String value) native "SVGPolygonElement_xmlspace_Setter";
- @DocsEditable
@DomName('SVGPolygonElement.farthestViewportElement')
+ @DocsEditable
SvgElement get farthestViewportElement native "SVGPolygonElement_farthestViewportElement_Getter";
- @DocsEditable
@DomName('SVGPolygonElement.nearestViewportElement')
+ @DocsEditable
SvgElement get nearestViewportElement native "SVGPolygonElement_nearestViewportElement_Getter";
- @DocsEditable
@DomName('SVGPolygonElement.getBBox')
+ @DocsEditable
Rect getBBox() native "SVGPolygonElement_getBBox_Callback";
- @DocsEditable
@DomName('SVGPolygonElement.getCTM')
+ @DocsEditable
Matrix getCtm() native "SVGPolygonElement_getCTM_Callback";
- @DocsEditable
@DomName('SVGPolygonElement.getScreenCTM')
+ @DocsEditable
Matrix getScreenCtm() native "SVGPolygonElement_getScreenCTM_Callback";
- @DocsEditable
@DomName('SVGPolygonElement.getTransformToElement')
+ @DocsEditable
Matrix getTransformToElement(SvgElement element) native "SVGPolygonElement_getTransformToElement_Callback";
- @DocsEditable
@DomName('SVGPolygonElement.className')
+ @DocsEditable
AnimatedString get $dom_svgClassName native "SVGPolygonElement_className_Getter";
- @DocsEditable
@DomName('SVGPolygonElement.style')
+ @DocsEditable
CssStyleDeclaration get style native "SVGPolygonElement_style_Getter";
- @DocsEditable
@DomName('SVGPolygonElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native "SVGPolygonElement_getPresentationAttribute_Callback";
- @DocsEditable
@DomName('SVGPolygonElement.requiredExtensions')
+ @DocsEditable
StringList get requiredExtensions native "SVGPolygonElement_requiredExtensions_Getter";
- @DocsEditable
@DomName('SVGPolygonElement.requiredFeatures')
+ @DocsEditable
StringList get requiredFeatures native "SVGPolygonElement_requiredFeatures_Getter";
- @DocsEditable
@DomName('SVGPolygonElement.systemLanguage')
+ @DocsEditable
StringList get systemLanguage native "SVGPolygonElement_systemLanguage_Getter";
- @DocsEditable
@DomName('SVGPolygonElement.hasExtension')
+ @DocsEditable
bool hasExtension(String extension) native "SVGPolygonElement_hasExtension_Callback";
- @DocsEditable
@DomName('SVGPolygonElement.transform')
+ @DocsEditable
AnimatedTransformList get transform native "SVGPolygonElement_transform_Getter";
}
@@ -6257,88 +6441,88 @@
@DocsEditable
factory PolylineElement() => _SvgElementFactoryProvider.createSvgElement_tag("polyline");
- @DocsEditable
@DomName('SVGPolylineElement.animatedPoints')
+ @DocsEditable
PointList get animatedPoints native "SVGPolylineElement_animatedPoints_Getter";
- @DocsEditable
@DomName('SVGPolylineElement.points')
+ @DocsEditable
PointList get points native "SVGPolylineElement_points_Getter";
- @DocsEditable
@DomName('SVGPolylineElement.externalResourcesRequired')
+ @DocsEditable
AnimatedBoolean get externalResourcesRequired native "SVGPolylineElement_externalResourcesRequired_Getter";
- @DocsEditable
@DomName('SVGPolylineElement.xmllang')
+ @DocsEditable
String get xmllang native "SVGPolylineElement_xmllang_Getter";
- @DocsEditable
@DomName('SVGPolylineElement.xmllang')
+ @DocsEditable
void set xmllang(String value) native "SVGPolylineElement_xmllang_Setter";
- @DocsEditable
@DomName('SVGPolylineElement.xmlspace')
+ @DocsEditable
String get xmlspace native "SVGPolylineElement_xmlspace_Getter";
- @DocsEditable
@DomName('SVGPolylineElement.xmlspace')
+ @DocsEditable
void set xmlspace(String value) native "SVGPolylineElement_xmlspace_Setter";
- @DocsEditable
@DomName('SVGPolylineElement.farthestViewportElement')
+ @DocsEditable
SvgElement get farthestViewportElement native "SVGPolylineElement_farthestViewportElement_Getter";
- @DocsEditable
@DomName('SVGPolylineElement.nearestViewportElement')
+ @DocsEditable
SvgElement get nearestViewportElement native "SVGPolylineElement_nearestViewportElement_Getter";
- @DocsEditable
@DomName('SVGPolylineElement.getBBox')
+ @DocsEditable
Rect getBBox() native "SVGPolylineElement_getBBox_Callback";
- @DocsEditable
@DomName('SVGPolylineElement.getCTM')
+ @DocsEditable
Matrix getCtm() native "SVGPolylineElement_getCTM_Callback";
- @DocsEditable
@DomName('SVGPolylineElement.getScreenCTM')
+ @DocsEditable
Matrix getScreenCtm() native "SVGPolylineElement_getScreenCTM_Callback";
- @DocsEditable
@DomName('SVGPolylineElement.getTransformToElement')
+ @DocsEditable
Matrix getTransformToElement(SvgElement element) native "SVGPolylineElement_getTransformToElement_Callback";
- @DocsEditable
@DomName('SVGPolylineElement.className')
+ @DocsEditable
AnimatedString get $dom_svgClassName native "SVGPolylineElement_className_Getter";
- @DocsEditable
@DomName('SVGPolylineElement.style')
+ @DocsEditable
CssStyleDeclaration get style native "SVGPolylineElement_style_Getter";
- @DocsEditable
@DomName('SVGPolylineElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native "SVGPolylineElement_getPresentationAttribute_Callback";
- @DocsEditable
@DomName('SVGPolylineElement.requiredExtensions')
+ @DocsEditable
StringList get requiredExtensions native "SVGPolylineElement_requiredExtensions_Getter";
- @DocsEditable
@DomName('SVGPolylineElement.requiredFeatures')
+ @DocsEditable
StringList get requiredFeatures native "SVGPolylineElement_requiredFeatures_Getter";
- @DocsEditable
@DomName('SVGPolylineElement.systemLanguage')
+ @DocsEditable
StringList get systemLanguage native "SVGPolylineElement_systemLanguage_Getter";
- @DocsEditable
@DomName('SVGPolylineElement.hasExtension')
+ @DocsEditable
bool hasExtension(String extension) native "SVGPolylineElement_hasExtension_Callback";
- @DocsEditable
@DomName('SVGPolylineElement.transform')
+ @DocsEditable
AnimatedTransformList get transform native "SVGPolylineElement_transform_Getter";
}
@@ -6382,20 +6566,20 @@
static const int SVG_PRESERVEASPECTRATIO_XMINYMIN = 2;
- @DocsEditable
@DomName('SVGPreserveAspectRatio.align')
+ @DocsEditable
int get align native "SVGPreserveAspectRatio_align_Getter";
- @DocsEditable
@DomName('SVGPreserveAspectRatio.align')
+ @DocsEditable
void set align(int value) native "SVGPreserveAspectRatio_align_Setter";
- @DocsEditable
@DomName('SVGPreserveAspectRatio.meetOrSlice')
+ @DocsEditable
int get meetOrSlice native "SVGPreserveAspectRatio_meetOrSlice_Getter";
- @DocsEditable
@DomName('SVGPreserveAspectRatio.meetOrSlice')
+ @DocsEditable
void set meetOrSlice(int value) native "SVGPreserveAspectRatio_meetOrSlice_Setter";
}
@@ -6414,28 +6598,28 @@
@DocsEditable
factory RadialGradientElement() => _SvgElementFactoryProvider.createSvgElement_tag("radialGradient");
- @DocsEditable
@DomName('SVGRadialGradientElement.cx')
+ @DocsEditable
AnimatedLength get cx native "SVGRadialGradientElement_cx_Getter";
- @DocsEditable
@DomName('SVGRadialGradientElement.cy')
+ @DocsEditable
AnimatedLength get cy native "SVGRadialGradientElement_cy_Getter";
- @DocsEditable
@DomName('SVGRadialGradientElement.fr')
+ @DocsEditable
AnimatedLength get fr native "SVGRadialGradientElement_fr_Getter";
- @DocsEditable
@DomName('SVGRadialGradientElement.fx')
+ @DocsEditable
AnimatedLength get fx native "SVGRadialGradientElement_fx_Getter";
- @DocsEditable
@DomName('SVGRadialGradientElement.fy')
+ @DocsEditable
AnimatedLength get fy native "SVGRadialGradientElement_fy_Getter";
- @DocsEditable
@DomName('SVGRadialGradientElement.r')
+ @DocsEditable
AnimatedLength get r native "SVGRadialGradientElement_r_Getter";
}
@@ -6451,36 +6635,36 @@
class Rect extends NativeFieldWrapperClass1 {
Rect.internal();
- @DocsEditable
@DomName('SVGRect.height')
+ @DocsEditable
num get height native "SVGRect_height_Getter";
- @DocsEditable
@DomName('SVGRect.height')
+ @DocsEditable
void set height(num value) native "SVGRect_height_Setter";
- @DocsEditable
@DomName('SVGRect.width')
+ @DocsEditable
num get width native "SVGRect_width_Getter";
- @DocsEditable
@DomName('SVGRect.width')
+ @DocsEditable
void set width(num value) native "SVGRect_width_Setter";
- @DocsEditable
@DomName('SVGRect.x')
+ @DocsEditable
num get x native "SVGRect_x_Getter";
- @DocsEditable
@DomName('SVGRect.x')
+ @DocsEditable
void set x(num value) native "SVGRect_x_Setter";
- @DocsEditable
@DomName('SVGRect.y')
+ @DocsEditable
num get y native "SVGRect_y_Getter";
- @DocsEditable
@DomName('SVGRect.y')
+ @DocsEditable
void set y(num value) native "SVGRect_y_Setter";
}
@@ -6499,104 +6683,104 @@
@DocsEditable
factory RectElement() => _SvgElementFactoryProvider.createSvgElement_tag("rect");
- @DocsEditable
@DomName('SVGRectElement.height')
+ @DocsEditable
AnimatedLength get height native "SVGRectElement_height_Getter";
- @DocsEditable
@DomName('SVGRectElement.rx')
+ @DocsEditable
AnimatedLength get rx native "SVGRectElement_rx_Getter";
- @DocsEditable
@DomName('SVGRectElement.ry')
+ @DocsEditable
AnimatedLength get ry native "SVGRectElement_ry_Getter";
- @DocsEditable
@DomName('SVGRectElement.width')
+ @DocsEditable
AnimatedLength get width native "SVGRectElement_width_Getter";
- @DocsEditable
@DomName('SVGRectElement.x')
+ @DocsEditable
AnimatedLength get x native "SVGRectElement_x_Getter";
- @DocsEditable
@DomName('SVGRectElement.y')
+ @DocsEditable
AnimatedLength get y native "SVGRectElement_y_Getter";
- @DocsEditable
@DomName('SVGRectElement.externalResourcesRequired')
+ @DocsEditable
AnimatedBoolean get externalResourcesRequired native "SVGRectElement_externalResourcesRequired_Getter";
- @DocsEditable
@DomName('SVGRectElement.xmllang')
+ @DocsEditable
String get xmllang native "SVGRectElement_xmllang_Getter";
- @DocsEditable
@DomName('SVGRectElement.xmllang')
+ @DocsEditable
void set xmllang(String value) native "SVGRectElement_xmllang_Setter";
- @DocsEditable
@DomName('SVGRectElement.xmlspace')
+ @DocsEditable
String get xmlspace native "SVGRectElement_xmlspace_Getter";
- @DocsEditable
@DomName('SVGRectElement.xmlspace')
+ @DocsEditable
void set xmlspace(String value) native "SVGRectElement_xmlspace_Setter";
- @DocsEditable
@DomName('SVGRectElement.farthestViewportElement')
+ @DocsEditable
SvgElement get farthestViewportElement native "SVGRectElement_farthestViewportElement_Getter";
- @DocsEditable
@DomName('SVGRectElement.nearestViewportElement')
+ @DocsEditable
SvgElement get nearestViewportElement native "SVGRectElement_nearestViewportElement_Getter";
- @DocsEditable
@DomName('SVGRectElement.getBBox')
+ @DocsEditable
Rect getBBox() native "SVGRectElement_getBBox_Callback";
- @DocsEditable
@DomName('SVGRectElement.getCTM')
+ @DocsEditable
Matrix getCtm() native "SVGRectElement_getCTM_Callback";
- @DocsEditable
@DomName('SVGRectElement.getScreenCTM')
+ @DocsEditable
Matrix getScreenCtm() native "SVGRectElement_getScreenCTM_Callback";
- @DocsEditable
@DomName('SVGRectElement.getTransformToElement')
+ @DocsEditable
Matrix getTransformToElement(SvgElement element) native "SVGRectElement_getTransformToElement_Callback";
- @DocsEditable
@DomName('SVGRectElement.className')
+ @DocsEditable
AnimatedString get $dom_svgClassName native "SVGRectElement_className_Getter";
- @DocsEditable
@DomName('SVGRectElement.style')
+ @DocsEditable
CssStyleDeclaration get style native "SVGRectElement_style_Getter";
- @DocsEditable
@DomName('SVGRectElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native "SVGRectElement_getPresentationAttribute_Callback";
- @DocsEditable
@DomName('SVGRectElement.requiredExtensions')
+ @DocsEditable
StringList get requiredExtensions native "SVGRectElement_requiredExtensions_Getter";
- @DocsEditable
@DomName('SVGRectElement.requiredFeatures')
+ @DocsEditable
StringList get requiredFeatures native "SVGRectElement_requiredFeatures_Getter";
- @DocsEditable
@DomName('SVGRectElement.systemLanguage')
+ @DocsEditable
StringList get systemLanguage native "SVGRectElement_systemLanguage_Getter";
- @DocsEditable
@DomName('SVGRectElement.hasExtension')
+ @DocsEditable
bool hasExtension(String extension) native "SVGRectElement_hasExtension_Callback";
- @DocsEditable
@DomName('SVGRectElement.transform')
+ @DocsEditable
AnimatedTransformList get transform native "SVGRectElement_transform_Getter";
}
@@ -6640,20 +6824,20 @@
@DocsEditable
factory ScriptElement() => _SvgElementFactoryProvider.createSvgElement_tag("script");
- @DocsEditable
@DomName('SVGScriptElement.type')
+ @DocsEditable
String get type native "SVGScriptElement_type_Getter";
- @DocsEditable
@DomName('SVGScriptElement.type')
+ @DocsEditable
void set type(String value) native "SVGScriptElement_type_Setter";
- @DocsEditable
@DomName('SVGScriptElement.externalResourcesRequired')
+ @DocsEditable
AnimatedBoolean get externalResourcesRequired native "SVGScriptElement_externalResourcesRequired_Getter";
- @DocsEditable
@DomName('SVGScriptElement.href')
+ @DocsEditable
AnimatedString get href native "SVGScriptElement_href_Getter";
}
@@ -6688,20 +6872,20 @@
@DocsEditable
factory StopElement() => _SvgElementFactoryProvider.createSvgElement_tag("stop");
- @DocsEditable
@DomName('SVGStopElement.offset')
+ @DocsEditable
AnimatedNumber get offset native "SVGStopElement_offset_Getter";
- @DocsEditable
@DomName('SVGStopElement.className')
+ @DocsEditable
AnimatedString get $dom_svgClassName native "SVGStopElement_className_Getter";
- @DocsEditable
@DomName('SVGStopElement.style')
+ @DocsEditable
CssStyleDeclaration get style native "SVGStopElement_style_Getter";
- @DocsEditable
@DomName('SVGStopElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native "SVGStopElement_getPresentationAttribute_Callback";
}
@@ -6717,8 +6901,8 @@
class StringList extends NativeFieldWrapperClass1 implements List<String> {
StringList.internal();
- @DocsEditable
@DomName('SVGStringList.numberOfItems')
+ @DocsEditable
int get numberOfItems native "SVGStringList_numberOfItems_Getter";
String operator[](int index) native "SVGStringList_item_Callback";
@@ -6748,11 +6932,13 @@
void forEach(void f(String element)) => IterableMixinWorkaround.forEach(this, f);
- String join([String separator]) => IterableMixinWorkaround.joinList(this, separator);
+ String join([String separator]) =>
+ IterableMixinWorkaround.joinList(this, separator);
List mappedBy(f(String element)) => IterableMixinWorkaround.mappedByList(this, f);
- Iterable<String> where(bool f(String element)) => IterableMixinWorkaround.where(this, f);
+ Iterable<String> where(bool f(String element)) =>
+ IterableMixinWorkaround.where(this, f);
bool every(bool f(String element)) => IterableMixinWorkaround.every(this, f);
@@ -6812,6 +6998,9 @@
// clear() defined by IDL.
+ List<String> get reversed =>
+ new ReversedListView<String>(this, 0, null);
+
void sort([int compare(String a, String b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -6840,9 +7029,11 @@
throw new StateError("More than one element");
}
- String min([int compare(String a, String b)]) => IterableMixinWorkaround.min(this, compare);
+ String min([int compare(String a, String b)]) =>
+ IterableMixinWorkaround.min(this, compare);
- String max([int compare(String a, String b)]) => IterableMixinWorkaround.max(this, compare);
+ String max([int compare(String a, String b)]) =>
+ IterableMixinWorkaround.max(this, compare);
String removeAt(int pos) {
throw new UnsupportedError("Cannot remove from immutable List.");
@@ -6889,32 +7080,32 @@
// -- end List<String> mixins.
- @DocsEditable
@DomName('SVGStringList.appendItem')
+ @DocsEditable
String appendItem(String item) native "SVGStringList_appendItem_Callback";
- @DocsEditable
@DomName('SVGStringList.clear')
+ @DocsEditable
void clear() native "SVGStringList_clear_Callback";
- @DocsEditable
@DomName('SVGStringList.getItem')
+ @DocsEditable
String getItem(int index) native "SVGStringList_getItem_Callback";
- @DocsEditable
@DomName('SVGStringList.initialize')
+ @DocsEditable
String initialize(String item) native "SVGStringList_initialize_Callback";
- @DocsEditable
@DomName('SVGStringList.insertItemBefore')
+ @DocsEditable
String insertItemBefore(String item, int index) native "SVGStringList_insertItemBefore_Callback";
- @DocsEditable
@DomName('SVGStringList.removeItem')
+ @DocsEditable
String removeItem(int index) native "SVGStringList_removeItem_Callback";
- @DocsEditable
@DomName('SVGStringList.replaceItem')
+ @DocsEditable
String replaceItem(String item, int index) native "SVGStringList_replaceItem_Callback";
}
@@ -6930,16 +7121,16 @@
class Stylable extends NativeFieldWrapperClass1 {
Stylable.internal();
- @DocsEditable
@DomName('SVGStylable.className')
+ @DocsEditable
AnimatedString get $dom_svgClassName native "SVGStylable_className_Getter";
- @DocsEditable
@DomName('SVGStylable.style')
+ @DocsEditable
CssStyleDeclaration get style native "SVGStylable_style_Getter";
- @DocsEditable
@DomName('SVGStylable.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native "SVGStylable_getPresentationAttribute_Callback";
}
@@ -6958,52 +7149,52 @@
@DocsEditable
factory StyleElement() => _SvgElementFactoryProvider.createSvgElement_tag("style");
- @DocsEditable
@DomName('SVGStyleElement.disabled')
+ @DocsEditable
bool get disabled native "SVGStyleElement_disabled_Getter";
- @DocsEditable
@DomName('SVGStyleElement.disabled')
+ @DocsEditable
void set disabled(bool value) native "SVGStyleElement_disabled_Setter";
- @DocsEditable
@DomName('SVGStyleElement.media')
+ @DocsEditable
String get media native "SVGStyleElement_media_Getter";
- @DocsEditable
@DomName('SVGStyleElement.media')
+ @DocsEditable
void set media(String value) native "SVGStyleElement_media_Setter";
- @DocsEditable
@DomName('SVGStyleElement.title')
+ @DocsEditable
String get title native "SVGStyleElement_title_Getter";
- @DocsEditable
@DomName('SVGStyleElement.title')
+ @DocsEditable
void set title(String value) native "SVGStyleElement_title_Setter";
- @DocsEditable
@DomName('SVGStyleElement.type')
+ @DocsEditable
String get type native "SVGStyleElement_type_Getter";
- @DocsEditable
@DomName('SVGStyleElement.type')
+ @DocsEditable
void set type(String value) native "SVGStyleElement_type_Setter";
- @DocsEditable
@DomName('SVGStyleElement.xmllang')
+ @DocsEditable
String get xmllang native "SVGStyleElement_xmllang_Getter";
- @DocsEditable
@DomName('SVGStyleElement.xmllang')
+ @DocsEditable
void set xmllang(String value) native "SVGStyleElement_xmllang_Setter";
- @DocsEditable
@DomName('SVGStyleElement.xmlspace')
+ @DocsEditable
String get xmlspace native "SVGStyleElement_xmlspace_Getter";
- @DocsEditable
@DomName('SVGStyleElement.xmlspace')
+ @DocsEditable
void set xmlspace(String value) native "SVGStyleElement_xmlspace_Setter";
}
@@ -7019,12 +7210,12 @@
class SvgDocument extends Document {
SvgDocument.internal() : super.internal();
- @DocsEditable
@DomName('SVGDocument.rootElement')
+ @DocsEditable
SvgSvgElement get rootElement native "SVGDocument_rootElement_Getter";
- @DocsEditable
@DomName('SVGDocument.createEvent')
+ @DocsEditable
Event $dom_createEvent(String eventType) native "SVGDocument_createEvent_Callback";
}
@@ -7060,7 +7251,6 @@
}
}
-@DocsEditable
@DomName('SVGElement')
class SvgElement extends Element {
factory SvgElement.tag(String tag) =>
@@ -7144,28 +7334,28 @@
SvgElement.internal() : super.internal();
- @DocsEditable
@DomName('SVGElement.id')
+ @DocsEditable
String get id native "SVGElement_id_Getter";
- @DocsEditable
@DomName('SVGElement.id')
+ @DocsEditable
void set id(String value) native "SVGElement_id_Setter";
- @DocsEditable
@DomName('SVGElement.ownerSVGElement')
+ @DocsEditable
SvgSvgElement get ownerSvgElement native "SVGElement_ownerSVGElement_Getter";
- @DocsEditable
@DomName('SVGElement.viewportElement')
+ @DocsEditable
SvgElement get viewportElement native "SVGElement_viewportElement_Getter";
- @DocsEditable
@DomName('SVGElement.xmlbase')
+ @DocsEditable
String get xmlbase native "SVGElement_xmlbase_Getter";
- @DocsEditable
@DomName('SVGElement.xmlbase')
+ @DocsEditable
void set xmlbase(String value) native "SVGElement_xmlbase_Setter";
}
@@ -7187,20 +7377,20 @@
static const int SVG_WRONG_TYPE_ERR = 0;
- @DocsEditable
@DomName('SVGException.code')
+ @DocsEditable
int get code native "SVGException_code_Getter";
- @DocsEditable
@DomName('SVGException.message')
+ @DocsEditable
String get message native "SVGException_message_Getter";
- @DocsEditable
@DomName('SVGException.name')
+ @DocsEditable
String get name native "SVGException_name_Getter";
- @DocsEditable
@DomName('SVGException.toString')
+ @DocsEditable
String toString() native "SVGException_toString_Callback";
}
@@ -7209,263 +7399,262 @@
// BSD-style license that can be found in the LICENSE file.
-@DocsEditable
@DomName('SVGSVGElement')
class SvgSvgElement extends SvgElement implements FitToViewBox, Tests, Stylable, Locatable, ExternalResourcesRequired, ZoomAndPan, LangSpace {
factory SvgSvgElement() => _SvgSvgElementFactoryProvider.createSvgSvgElement();
SvgSvgElement.internal() : super.internal();
- @DocsEditable
@DomName('SVGSVGElement.contentScriptType')
+ @DocsEditable
String get contentScriptType native "SVGSVGElement_contentScriptType_Getter";
- @DocsEditable
@DomName('SVGSVGElement.contentScriptType')
+ @DocsEditable
void set contentScriptType(String value) native "SVGSVGElement_contentScriptType_Setter";
- @DocsEditable
@DomName('SVGSVGElement.contentStyleType')
+ @DocsEditable
String get contentStyleType native "SVGSVGElement_contentStyleType_Getter";
- @DocsEditable
@DomName('SVGSVGElement.contentStyleType')
+ @DocsEditable
void set contentStyleType(String value) native "SVGSVGElement_contentStyleType_Setter";
- @DocsEditable
@DomName('SVGSVGElement.currentScale')
+ @DocsEditable
num get currentScale native "SVGSVGElement_currentScale_Getter";
- @DocsEditable
@DomName('SVGSVGElement.currentScale')
+ @DocsEditable
void set currentScale(num value) native "SVGSVGElement_currentScale_Setter";
- @DocsEditable
@DomName('SVGSVGElement.currentTranslate')
+ @DocsEditable
Point get currentTranslate native "SVGSVGElement_currentTranslate_Getter";
- @DocsEditable
@DomName('SVGSVGElement.currentView')
+ @DocsEditable
ViewSpec get currentView native "SVGSVGElement_currentView_Getter";
- @DocsEditable
@DomName('SVGSVGElement.height')
+ @DocsEditable
AnimatedLength get height native "SVGSVGElement_height_Getter";
- @DocsEditable
@DomName('SVGSVGElement.pixelUnitToMillimeterX')
+ @DocsEditable
num get pixelUnitToMillimeterX native "SVGSVGElement_pixelUnitToMillimeterX_Getter";
- @DocsEditable
@DomName('SVGSVGElement.pixelUnitToMillimeterY')
+ @DocsEditable
num get pixelUnitToMillimeterY native "SVGSVGElement_pixelUnitToMillimeterY_Getter";
- @DocsEditable
@DomName('SVGSVGElement.screenPixelToMillimeterX')
+ @DocsEditable
num get screenPixelToMillimeterX native "SVGSVGElement_screenPixelToMillimeterX_Getter";
- @DocsEditable
@DomName('SVGSVGElement.screenPixelToMillimeterY')
+ @DocsEditable
num get screenPixelToMillimeterY native "SVGSVGElement_screenPixelToMillimeterY_Getter";
- @DocsEditable
@DomName('SVGSVGElement.useCurrentView')
+ @DocsEditable
bool get useCurrentView native "SVGSVGElement_useCurrentView_Getter";
- @DocsEditable
@DomName('SVGSVGElement.viewport')
+ @DocsEditable
Rect get viewport native "SVGSVGElement_viewport_Getter";
- @DocsEditable
@DomName('SVGSVGElement.width')
+ @DocsEditable
AnimatedLength get width native "SVGSVGElement_width_Getter";
- @DocsEditable
@DomName('SVGSVGElement.x')
+ @DocsEditable
AnimatedLength get x native "SVGSVGElement_x_Getter";
- @DocsEditable
@DomName('SVGSVGElement.y')
+ @DocsEditable
AnimatedLength get y native "SVGSVGElement_y_Getter";
- @DocsEditable
@DomName('SVGSVGElement.animationsPaused')
+ @DocsEditable
bool animationsPaused() native "SVGSVGElement_animationsPaused_Callback";
- @DocsEditable
@DomName('SVGSVGElement.checkEnclosure')
+ @DocsEditable
bool checkEnclosure(SvgElement element, Rect rect) native "SVGSVGElement_checkEnclosure_Callback";
- @DocsEditable
@DomName('SVGSVGElement.checkIntersection')
+ @DocsEditable
bool checkIntersection(SvgElement element, Rect rect) native "SVGSVGElement_checkIntersection_Callback";
- @DocsEditable
@DomName('SVGSVGElement.createSVGAngle')
+ @DocsEditable
Angle createSvgAngle() native "SVGSVGElement_createSVGAngle_Callback";
- @DocsEditable
@DomName('SVGSVGElement.createSVGLength')
+ @DocsEditable
Length createSvgLength() native "SVGSVGElement_createSVGLength_Callback";
- @DocsEditable
@DomName('SVGSVGElement.createSVGMatrix')
+ @DocsEditable
Matrix createSvgMatrix() native "SVGSVGElement_createSVGMatrix_Callback";
- @DocsEditable
@DomName('SVGSVGElement.createSVGNumber')
+ @DocsEditable
Number createSvgNumber() native "SVGSVGElement_createSVGNumber_Callback";
- @DocsEditable
@DomName('SVGSVGElement.createSVGPoint')
+ @DocsEditable
Point createSvgPoint() native "SVGSVGElement_createSVGPoint_Callback";
- @DocsEditable
@DomName('SVGSVGElement.createSVGRect')
+ @DocsEditable
Rect createSvgRect() native "SVGSVGElement_createSVGRect_Callback";
- @DocsEditable
@DomName('SVGSVGElement.createSVGTransform')
+ @DocsEditable
Transform createSvgTransform() native "SVGSVGElement_createSVGTransform_Callback";
- @DocsEditable
@DomName('SVGSVGElement.createSVGTransformFromMatrix')
+ @DocsEditable
Transform createSvgTransformFromMatrix(Matrix matrix) native "SVGSVGElement_createSVGTransformFromMatrix_Callback";
- @DocsEditable
@DomName('SVGSVGElement.deselectAll')
+ @DocsEditable
void deselectAll() native "SVGSVGElement_deselectAll_Callback";
- @DocsEditable
@DomName('SVGSVGElement.forceRedraw')
+ @DocsEditable
void forceRedraw() native "SVGSVGElement_forceRedraw_Callback";
- @DocsEditable
@DomName('SVGSVGElement.getCurrentTime')
+ @DocsEditable
num getCurrentTime() native "SVGSVGElement_getCurrentTime_Callback";
- @DocsEditable
@DomName('SVGSVGElement.getElementById')
+ @DocsEditable
Element getElementById(String elementId) native "SVGSVGElement_getElementById_Callback";
- @DocsEditable
@DomName('SVGSVGElement.getEnclosureList')
+ @DocsEditable
List<Node> getEnclosureList(Rect rect, SvgElement referenceElement) native "SVGSVGElement_getEnclosureList_Callback";
- @DocsEditable
@DomName('SVGSVGElement.getIntersectionList')
+ @DocsEditable
List<Node> getIntersectionList(Rect rect, SvgElement referenceElement) native "SVGSVGElement_getIntersectionList_Callback";
- @DocsEditable
@DomName('SVGSVGElement.pauseAnimations')
+ @DocsEditable
void pauseAnimations() native "SVGSVGElement_pauseAnimations_Callback";
- @DocsEditable
@DomName('SVGSVGElement.setCurrentTime')
+ @DocsEditable
void setCurrentTime(num seconds) native "SVGSVGElement_setCurrentTime_Callback";
- @DocsEditable
@DomName('SVGSVGElement.suspendRedraw')
+ @DocsEditable
int suspendRedraw(int maxWaitMilliseconds) native "SVGSVGElement_suspendRedraw_Callback";
- @DocsEditable
@DomName('SVGSVGElement.unpauseAnimations')
+ @DocsEditable
void unpauseAnimations() native "SVGSVGElement_unpauseAnimations_Callback";
- @DocsEditable
@DomName('SVGSVGElement.unsuspendRedraw')
+ @DocsEditable
void unsuspendRedraw(int suspendHandleId) native "SVGSVGElement_unsuspendRedraw_Callback";
- @DocsEditable
@DomName('SVGSVGElement.unsuspendRedrawAll')
+ @DocsEditable
void unsuspendRedrawAll() native "SVGSVGElement_unsuspendRedrawAll_Callback";
- @DocsEditable
@DomName('SVGSVGElement.externalResourcesRequired')
+ @DocsEditable
AnimatedBoolean get externalResourcesRequired native "SVGSVGElement_externalResourcesRequired_Getter";
- @DocsEditable
@DomName('SVGSVGElement.preserveAspectRatio')
+ @DocsEditable
AnimatedPreserveAspectRatio get preserveAspectRatio native "SVGSVGElement_preserveAspectRatio_Getter";
- @DocsEditable
@DomName('SVGSVGElement.viewBox')
+ @DocsEditable
AnimatedRect get viewBox native "SVGSVGElement_viewBox_Getter";
- @DocsEditable
@DomName('SVGSVGElement.xmllang')
+ @DocsEditable
String get xmllang native "SVGSVGElement_xmllang_Getter";
- @DocsEditable
@DomName('SVGSVGElement.xmllang')
+ @DocsEditable
void set xmllang(String value) native "SVGSVGElement_xmllang_Setter";
- @DocsEditable
@DomName('SVGSVGElement.xmlspace')
+ @DocsEditable
String get xmlspace native "SVGSVGElement_xmlspace_Getter";
- @DocsEditable
@DomName('SVGSVGElement.xmlspace')
+ @DocsEditable
void set xmlspace(String value) native "SVGSVGElement_xmlspace_Setter";
- @DocsEditable
@DomName('SVGSVGElement.farthestViewportElement')
+ @DocsEditable
SvgElement get farthestViewportElement native "SVGSVGElement_farthestViewportElement_Getter";
- @DocsEditable
@DomName('SVGSVGElement.nearestViewportElement')
+ @DocsEditable
SvgElement get nearestViewportElement native "SVGSVGElement_nearestViewportElement_Getter";
- @DocsEditable
@DomName('SVGSVGElement.getBBox')
+ @DocsEditable
Rect getBBox() native "SVGSVGElement_getBBox_Callback";
- @DocsEditable
@DomName('SVGSVGElement.getCTM')
+ @DocsEditable
Matrix getCtm() native "SVGSVGElement_getCTM_Callback";
- @DocsEditable
@DomName('SVGSVGElement.getScreenCTM')
+ @DocsEditable
Matrix getScreenCtm() native "SVGSVGElement_getScreenCTM_Callback";
- @DocsEditable
@DomName('SVGSVGElement.getTransformToElement')
+ @DocsEditable
Matrix getTransformToElement(SvgElement element) native "SVGSVGElement_getTransformToElement_Callback";
- @DocsEditable
@DomName('SVGSVGElement.className')
+ @DocsEditable
AnimatedString get $dom_svgClassName native "SVGSVGElement_className_Getter";
- @DocsEditable
@DomName('SVGSVGElement.style')
+ @DocsEditable
CssStyleDeclaration get style native "SVGSVGElement_style_Getter";
- @DocsEditable
@DomName('SVGSVGElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native "SVGSVGElement_getPresentationAttribute_Callback";
- @DocsEditable
@DomName('SVGSVGElement.requiredExtensions')
+ @DocsEditable
StringList get requiredExtensions native "SVGSVGElement_requiredExtensions_Getter";
- @DocsEditable
@DomName('SVGSVGElement.requiredFeatures')
+ @DocsEditable
StringList get requiredFeatures native "SVGSVGElement_requiredFeatures_Getter";
- @DocsEditable
@DomName('SVGSVGElement.systemLanguage')
+ @DocsEditable
StringList get systemLanguage native "SVGSVGElement_systemLanguage_Getter";
- @DocsEditable
@DomName('SVGSVGElement.hasExtension')
+ @DocsEditable
bool hasExtension(String extension) native "SVGSVGElement_hasExtension_Callback";
- @DocsEditable
@DomName('SVGSVGElement.zoomAndPan')
+ @DocsEditable
int get zoomAndPan native "SVGSVGElement_zoomAndPan_Getter";
- @DocsEditable
@DomName('SVGSVGElement.zoomAndPan')
+ @DocsEditable
void set zoomAndPan(int value) native "SVGSVGElement_zoomAndPan_Setter";
}
@@ -7484,80 +7673,80 @@
@DocsEditable
factory SwitchElement() => _SvgElementFactoryProvider.createSvgElement_tag("switch");
- @DocsEditable
@DomName('SVGSwitchElement.externalResourcesRequired')
+ @DocsEditable
AnimatedBoolean get externalResourcesRequired native "SVGSwitchElement_externalResourcesRequired_Getter";
- @DocsEditable
@DomName('SVGSwitchElement.xmllang')
+ @DocsEditable
String get xmllang native "SVGSwitchElement_xmllang_Getter";
- @DocsEditable
@DomName('SVGSwitchElement.xmllang')
+ @DocsEditable
void set xmllang(String value) native "SVGSwitchElement_xmllang_Setter";
- @DocsEditable
@DomName('SVGSwitchElement.xmlspace')
+ @DocsEditable
String get xmlspace native "SVGSwitchElement_xmlspace_Getter";
- @DocsEditable
@DomName('SVGSwitchElement.xmlspace')
+ @DocsEditable
void set xmlspace(String value) native "SVGSwitchElement_xmlspace_Setter";
- @DocsEditable
@DomName('SVGSwitchElement.farthestViewportElement')
+ @DocsEditable
SvgElement get farthestViewportElement native "SVGSwitchElement_farthestViewportElement_Getter";
- @DocsEditable
@DomName('SVGSwitchElement.nearestViewportElement')
+ @DocsEditable
SvgElement get nearestViewportElement native "SVGSwitchElement_nearestViewportElement_Getter";
- @DocsEditable
@DomName('SVGSwitchElement.getBBox')
+ @DocsEditable
Rect getBBox() native "SVGSwitchElement_getBBox_Callback";
- @DocsEditable
@DomName('SVGSwitchElement.getCTM')
+ @DocsEditable
Matrix getCtm() native "SVGSwitchElement_getCTM_Callback";
- @DocsEditable
@DomName('SVGSwitchElement.getScreenCTM')
+ @DocsEditable
Matrix getScreenCtm() native "SVGSwitchElement_getScreenCTM_Callback";
- @DocsEditable
@DomName('SVGSwitchElement.getTransformToElement')
+ @DocsEditable
Matrix getTransformToElement(SvgElement element) native "SVGSwitchElement_getTransformToElement_Callback";
- @DocsEditable
@DomName('SVGSwitchElement.className')
+ @DocsEditable
AnimatedString get $dom_svgClassName native "SVGSwitchElement_className_Getter";
- @DocsEditable
@DomName('SVGSwitchElement.style')
+ @DocsEditable
CssStyleDeclaration get style native "SVGSwitchElement_style_Getter";
- @DocsEditable
@DomName('SVGSwitchElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native "SVGSwitchElement_getPresentationAttribute_Callback";
- @DocsEditable
@DomName('SVGSwitchElement.requiredExtensions')
+ @DocsEditable
StringList get requiredExtensions native "SVGSwitchElement_requiredExtensions_Getter";
- @DocsEditable
@DomName('SVGSwitchElement.requiredFeatures')
+ @DocsEditable
StringList get requiredFeatures native "SVGSwitchElement_requiredFeatures_Getter";
- @DocsEditable
@DomName('SVGSwitchElement.systemLanguage')
+ @DocsEditable
StringList get systemLanguage native "SVGSwitchElement_systemLanguage_Getter";
- @DocsEditable
@DomName('SVGSwitchElement.hasExtension')
+ @DocsEditable
bool hasExtension(String extension) native "SVGSwitchElement_hasExtension_Callback";
- @DocsEditable
@DomName('SVGSwitchElement.transform')
+ @DocsEditable
AnimatedTransformList get transform native "SVGSwitchElement_transform_Getter";
}
@@ -7576,44 +7765,44 @@
@DocsEditable
factory SymbolElement() => _SvgElementFactoryProvider.createSvgElement_tag("symbol");
- @DocsEditable
@DomName('SVGSymbolElement.externalResourcesRequired')
+ @DocsEditable
AnimatedBoolean get externalResourcesRequired native "SVGSymbolElement_externalResourcesRequired_Getter";
- @DocsEditable
@DomName('SVGSymbolElement.preserveAspectRatio')
+ @DocsEditable
AnimatedPreserveAspectRatio get preserveAspectRatio native "SVGSymbolElement_preserveAspectRatio_Getter";
- @DocsEditable
@DomName('SVGSymbolElement.viewBox')
+ @DocsEditable
AnimatedRect get viewBox native "SVGSymbolElement_viewBox_Getter";
- @DocsEditable
@DomName('SVGSymbolElement.xmllang')
+ @DocsEditable
String get xmllang native "SVGSymbolElement_xmllang_Getter";
- @DocsEditable
@DomName('SVGSymbolElement.xmllang')
+ @DocsEditable
void set xmllang(String value) native "SVGSymbolElement_xmllang_Setter";
- @DocsEditable
@DomName('SVGSymbolElement.xmlspace')
+ @DocsEditable
String get xmlspace native "SVGSymbolElement_xmlspace_Getter";
- @DocsEditable
@DomName('SVGSymbolElement.xmlspace')
+ @DocsEditable
void set xmlspace(String value) native "SVGSymbolElement_xmlspace_Setter";
- @DocsEditable
@DomName('SVGSymbolElement.className')
+ @DocsEditable
AnimatedString get $dom_svgClassName native "SVGSymbolElement_className_Getter";
- @DocsEditable
@DomName('SVGSymbolElement.style')
+ @DocsEditable
CssStyleDeclaration get style native "SVGSymbolElement_style_Getter";
- @DocsEditable
@DomName('SVGSymbolElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native "SVGSymbolElement_getPresentationAttribute_Callback";
}
@@ -7632,8 +7821,8 @@
@DocsEditable
factory TRefElement() => _SvgElementFactoryProvider.createSvgElement_tag("tref");
- @DocsEditable
@DomName('SVGTRefElement.href')
+ @DocsEditable
AnimatedString get href native "SVGTRefElement_href_Getter";
}
@@ -7665,20 +7854,20 @@
class Tests extends NativeFieldWrapperClass1 {
Tests.internal();
- @DocsEditable
@DomName('SVGTests.requiredExtensions')
+ @DocsEditable
StringList get requiredExtensions native "SVGTests_requiredExtensions_Getter";
- @DocsEditable
@DomName('SVGTests.requiredFeatures')
+ @DocsEditable
StringList get requiredFeatures native "SVGTests_requiredFeatures_Getter";
- @DocsEditable
@DomName('SVGTests.systemLanguage')
+ @DocsEditable
StringList get systemLanguage native "SVGTests_systemLanguage_Getter";
- @DocsEditable
@DomName('SVGTests.hasExtension')
+ @DocsEditable
bool hasExtension(String extension) native "SVGTests_hasExtension_Callback";
}
@@ -7700,96 +7889,96 @@
static const int LENGTHADJUST_UNKNOWN = 0;
- @DocsEditable
@DomName('SVGTextContentElement.lengthAdjust')
+ @DocsEditable
AnimatedEnumeration get lengthAdjust native "SVGTextContentElement_lengthAdjust_Getter";
- @DocsEditable
@DomName('SVGTextContentElement.textLength')
+ @DocsEditable
AnimatedLength get textLength native "SVGTextContentElement_textLength_Getter";
- @DocsEditable
@DomName('SVGTextContentElement.getCharNumAtPosition')
+ @DocsEditable
int getCharNumAtPosition(Point point) native "SVGTextContentElement_getCharNumAtPosition_Callback";
- @DocsEditable
@DomName('SVGTextContentElement.getComputedTextLength')
+ @DocsEditable
num getComputedTextLength() native "SVGTextContentElement_getComputedTextLength_Callback";
- @DocsEditable
@DomName('SVGTextContentElement.getEndPositionOfChar')
+ @DocsEditable
Point getEndPositionOfChar(int offset) native "SVGTextContentElement_getEndPositionOfChar_Callback";
- @DocsEditable
@DomName('SVGTextContentElement.getExtentOfChar')
+ @DocsEditable
Rect getExtentOfChar(int offset) native "SVGTextContentElement_getExtentOfChar_Callback";
- @DocsEditable
@DomName('SVGTextContentElement.getNumberOfChars')
+ @DocsEditable
int getNumberOfChars() native "SVGTextContentElement_getNumberOfChars_Callback";
- @DocsEditable
@DomName('SVGTextContentElement.getRotationOfChar')
+ @DocsEditable
num getRotationOfChar(int offset) native "SVGTextContentElement_getRotationOfChar_Callback";
- @DocsEditable
@DomName('SVGTextContentElement.getStartPositionOfChar')
+ @DocsEditable
Point getStartPositionOfChar(int offset) native "SVGTextContentElement_getStartPositionOfChar_Callback";
- @DocsEditable
@DomName('SVGTextContentElement.getSubStringLength')
+ @DocsEditable
num getSubStringLength(int offset, int length) native "SVGTextContentElement_getSubStringLength_Callback";
- @DocsEditable
@DomName('SVGTextContentElement.selectSubString')
+ @DocsEditable
void selectSubString(int offset, int length) native "SVGTextContentElement_selectSubString_Callback";
- @DocsEditable
@DomName('SVGTextContentElement.externalResourcesRequired')
+ @DocsEditable
AnimatedBoolean get externalResourcesRequired native "SVGTextContentElement_externalResourcesRequired_Getter";
- @DocsEditable
@DomName('SVGTextContentElement.xmllang')
+ @DocsEditable
String get xmllang native "SVGTextContentElement_xmllang_Getter";
- @DocsEditable
@DomName('SVGTextContentElement.xmllang')
+ @DocsEditable
void set xmllang(String value) native "SVGTextContentElement_xmllang_Setter";
- @DocsEditable
@DomName('SVGTextContentElement.xmlspace')
+ @DocsEditable
String get xmlspace native "SVGTextContentElement_xmlspace_Getter";
- @DocsEditable
@DomName('SVGTextContentElement.xmlspace')
+ @DocsEditable
void set xmlspace(String value) native "SVGTextContentElement_xmlspace_Setter";
- @DocsEditable
@DomName('SVGTextContentElement.className')
+ @DocsEditable
AnimatedString get $dom_svgClassName native "SVGTextContentElement_className_Getter";
- @DocsEditable
@DomName('SVGTextContentElement.style')
+ @DocsEditable
CssStyleDeclaration get style native "SVGTextContentElement_style_Getter";
- @DocsEditable
@DomName('SVGTextContentElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native "SVGTextContentElement_getPresentationAttribute_Callback";
- @DocsEditable
@DomName('SVGTextContentElement.requiredExtensions')
+ @DocsEditable
StringList get requiredExtensions native "SVGTextContentElement_requiredExtensions_Getter";
- @DocsEditable
@DomName('SVGTextContentElement.requiredFeatures')
+ @DocsEditable
StringList get requiredFeatures native "SVGTextContentElement_requiredFeatures_Getter";
- @DocsEditable
@DomName('SVGTextContentElement.systemLanguage')
+ @DocsEditable
StringList get systemLanguage native "SVGTextContentElement_systemLanguage_Getter";
- @DocsEditable
@DomName('SVGTextContentElement.hasExtension')
+ @DocsEditable
bool hasExtension(String extension) native "SVGTextContentElement_hasExtension_Callback";
}
@@ -7808,32 +7997,32 @@
@DocsEditable
factory TextElement() => _SvgElementFactoryProvider.createSvgElement_tag("text");
- @DocsEditable
@DomName('SVGTextElement.farthestViewportElement')
+ @DocsEditable
SvgElement get farthestViewportElement native "SVGTextElement_farthestViewportElement_Getter";
- @DocsEditable
@DomName('SVGTextElement.nearestViewportElement')
+ @DocsEditable
SvgElement get nearestViewportElement native "SVGTextElement_nearestViewportElement_Getter";
- @DocsEditable
@DomName('SVGTextElement.getBBox')
+ @DocsEditable
Rect getBBox() native "SVGTextElement_getBBox_Callback";
- @DocsEditable
@DomName('SVGTextElement.getCTM')
+ @DocsEditable
Matrix getCtm() native "SVGTextElement_getCTM_Callback";
- @DocsEditable
@DomName('SVGTextElement.getScreenCTM')
+ @DocsEditable
Matrix getScreenCtm() native "SVGTextElement_getScreenCTM_Callback";
- @DocsEditable
@DomName('SVGTextElement.getTransformToElement')
+ @DocsEditable
Matrix getTransformToElement(SvgElement element) native "SVGTextElement_getTransformToElement_Callback";
- @DocsEditable
@DomName('SVGTextElement.transform')
+ @DocsEditable
AnimatedTransformList get transform native "SVGTextElement_transform_Getter";
}
@@ -7861,20 +8050,20 @@
static const int TEXTPATH_SPACINGTYPE_UNKNOWN = 0;
- @DocsEditable
@DomName('SVGTextPathElement.method')
+ @DocsEditable
AnimatedEnumeration get method native "SVGTextPathElement_method_Getter";
- @DocsEditable
@DomName('SVGTextPathElement.spacing')
+ @DocsEditable
AnimatedEnumeration get spacing native "SVGTextPathElement_spacing_Getter";
- @DocsEditable
@DomName('SVGTextPathElement.startOffset')
+ @DocsEditable
AnimatedLength get startOffset native "SVGTextPathElement_startOffset_Getter";
- @DocsEditable
@DomName('SVGTextPathElement.href')
+ @DocsEditable
AnimatedString get href native "SVGTextPathElement_href_Getter";
}
@@ -7890,24 +8079,24 @@
class TextPositioningElement extends TextContentElement {
TextPositioningElement.internal() : super.internal();
- @DocsEditable
@DomName('SVGTextPositioningElement.dx')
+ @DocsEditable
AnimatedLengthList get dx native "SVGTextPositioningElement_dx_Getter";
- @DocsEditable
@DomName('SVGTextPositioningElement.dy')
+ @DocsEditable
AnimatedLengthList get dy native "SVGTextPositioningElement_dy_Getter";
- @DocsEditable
@DomName('SVGTextPositioningElement.rotate')
+ @DocsEditable
AnimatedNumberList get rotate native "SVGTextPositioningElement_rotate_Getter";
- @DocsEditable
@DomName('SVGTextPositioningElement.x')
+ @DocsEditable
AnimatedLengthList get x native "SVGTextPositioningElement_x_Getter";
- @DocsEditable
@DomName('SVGTextPositioningElement.y')
+ @DocsEditable
AnimatedLengthList get y native "SVGTextPositioningElement_y_Getter";
}
@@ -7926,32 +8115,32 @@
@DocsEditable
factory TitleElement() => _SvgElementFactoryProvider.createSvgElement_tag("title");
- @DocsEditable
@DomName('SVGTitleElement.xmllang')
+ @DocsEditable
String get xmllang native "SVGTitleElement_xmllang_Getter";
- @DocsEditable
@DomName('SVGTitleElement.xmllang')
+ @DocsEditable
void set xmllang(String value) native "SVGTitleElement_xmllang_Setter";
- @DocsEditable
@DomName('SVGTitleElement.xmlspace')
+ @DocsEditable
String get xmlspace native "SVGTitleElement_xmlspace_Getter";
- @DocsEditable
@DomName('SVGTitleElement.xmlspace')
+ @DocsEditable
void set xmlspace(String value) native "SVGTitleElement_xmlspace_Setter";
- @DocsEditable
@DomName('SVGTitleElement.className')
+ @DocsEditable
AnimatedString get $dom_svgClassName native "SVGTitleElement_className_Getter";
- @DocsEditable
@DomName('SVGTitleElement.style')
+ @DocsEditable
CssStyleDeclaration get style native "SVGTitleElement_style_Getter";
- @DocsEditable
@DomName('SVGTitleElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native "SVGTitleElement_getPresentationAttribute_Callback";
}
@@ -7981,40 +8170,40 @@
static const int SVG_TRANSFORM_UNKNOWN = 0;
- @DocsEditable
@DomName('SVGTransform.angle')
+ @DocsEditable
num get angle native "SVGTransform_angle_Getter";
- @DocsEditable
@DomName('SVGTransform.matrix')
+ @DocsEditable
Matrix get matrix native "SVGTransform_matrix_Getter";
- @DocsEditable
@DomName('SVGTransform.type')
+ @DocsEditable
int get type native "SVGTransform_type_Getter";
- @DocsEditable
@DomName('SVGTransform.setMatrix')
+ @DocsEditable
void setMatrix(Matrix matrix) native "SVGTransform_setMatrix_Callback";
- @DocsEditable
@DomName('SVGTransform.setRotate')
+ @DocsEditable
void setRotate(num angle, num cx, num cy) native "SVGTransform_setRotate_Callback";
- @DocsEditable
@DomName('SVGTransform.setScale')
+ @DocsEditable
void setScale(num sx, num sy) native "SVGTransform_setScale_Callback";
- @DocsEditable
@DomName('SVGTransform.setSkewX')
+ @DocsEditable
void setSkewX(num angle) native "SVGTransform_setSkewX_Callback";
- @DocsEditable
@DomName('SVGTransform.setSkewY')
+ @DocsEditable
void setSkewY(num angle) native "SVGTransform_setSkewY_Callback";
- @DocsEditable
@DomName('SVGTransform.setTranslate')
+ @DocsEditable
void setTranslate(num tx, num ty) native "SVGTransform_setTranslate_Callback";
}
@@ -8030,8 +8219,8 @@
class TransformList extends NativeFieldWrapperClass1 implements List<Transform> {
TransformList.internal();
- @DocsEditable
@DomName('SVGTransformList.numberOfItems')
+ @DocsEditable
int get numberOfItems native "SVGTransformList_numberOfItems_Getter";
Transform operator[](int index) native "SVGTransformList_item_Callback";
@@ -8061,11 +8250,13 @@
void forEach(void f(Transform element)) => IterableMixinWorkaround.forEach(this, f);
- String join([String separator]) => IterableMixinWorkaround.joinList(this, separator);
+ String join([String separator]) =>
+ IterableMixinWorkaround.joinList(this, separator);
List mappedBy(f(Transform element)) => IterableMixinWorkaround.mappedByList(this, f);
- Iterable<Transform> where(bool f(Transform element)) => IterableMixinWorkaround.where(this, f);
+ Iterable<Transform> where(bool f(Transform element)) =>
+ IterableMixinWorkaround.where(this, f);
bool every(bool f(Transform element)) => IterableMixinWorkaround.every(this, f);
@@ -8125,6 +8316,9 @@
// clear() defined by IDL.
+ List<Transform> get reversed =>
+ new ReversedListView<Transform>(this, 0, null);
+
void sort([int compare(Transform a, Transform b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -8153,9 +8347,11 @@
throw new StateError("More than one element");
}
- Transform min([int compare(Transform a, Transform b)]) => IterableMixinWorkaround.min(this, compare);
+ Transform min([int compare(Transform a, Transform b)]) =>
+ IterableMixinWorkaround.min(this, compare);
- Transform max([int compare(Transform a, Transform b)]) => IterableMixinWorkaround.max(this, compare);
+ Transform max([int compare(Transform a, Transform b)]) =>
+ IterableMixinWorkaround.max(this, compare);
Transform removeAt(int pos) {
throw new UnsupportedError("Cannot remove from immutable List.");
@@ -8202,40 +8398,40 @@
// -- end List<Transform> mixins.
- @DocsEditable
@DomName('SVGTransformList.appendItem')
+ @DocsEditable
Transform appendItem(Transform item) native "SVGTransformList_appendItem_Callback";
- @DocsEditable
@DomName('SVGTransformList.clear')
+ @DocsEditable
void clear() native "SVGTransformList_clear_Callback";
- @DocsEditable
@DomName('SVGTransformList.consolidate')
+ @DocsEditable
Transform consolidate() native "SVGTransformList_consolidate_Callback";
- @DocsEditable
@DomName('SVGTransformList.createSVGTransformFromMatrix')
+ @DocsEditable
Transform createSvgTransformFromMatrix(Matrix matrix) native "SVGTransformList_createSVGTransformFromMatrix_Callback";
- @DocsEditable
@DomName('SVGTransformList.getItem')
+ @DocsEditable
Transform getItem(int index) native "SVGTransformList_getItem_Callback";
- @DocsEditable
@DomName('SVGTransformList.initialize')
+ @DocsEditable
Transform initialize(Transform item) native "SVGTransformList_initialize_Callback";
- @DocsEditable
@DomName('SVGTransformList.insertItemBefore')
+ @DocsEditable
Transform insertItemBefore(Transform item, int index) native "SVGTransformList_insertItemBefore_Callback";
- @DocsEditable
@DomName('SVGTransformList.removeItem')
+ @DocsEditable
Transform removeItem(int index) native "SVGTransformList_removeItem_Callback";
- @DocsEditable
@DomName('SVGTransformList.replaceItem')
+ @DocsEditable
Transform replaceItem(Transform item, int index) native "SVGTransformList_replaceItem_Callback";
}
@@ -8251,32 +8447,32 @@
class Transformable extends NativeFieldWrapperClass1 implements Locatable {
Transformable.internal();
- @DocsEditable
@DomName('SVGTransformable.transform')
+ @DocsEditable
AnimatedTransformList get transform native "SVGTransformable_transform_Getter";
- @DocsEditable
@DomName('SVGTransformable.farthestViewportElement')
+ @DocsEditable
SvgElement get farthestViewportElement native "SVGTransformable_farthestViewportElement_Getter";
- @DocsEditable
@DomName('SVGTransformable.nearestViewportElement')
+ @DocsEditable
SvgElement get nearestViewportElement native "SVGTransformable_nearestViewportElement_Getter";
- @DocsEditable
@DomName('SVGTransformable.getBBox')
+ @DocsEditable
Rect getBBox() native "SVGTransformable_getBBox_Callback";
- @DocsEditable
@DomName('SVGTransformable.getCTM')
+ @DocsEditable
Matrix getCtm() native "SVGTransformable_getCTM_Callback";
- @DocsEditable
@DomName('SVGTransformable.getScreenCTM')
+ @DocsEditable
Matrix getScreenCtm() native "SVGTransformable_getScreenCTM_Callback";
- @DocsEditable
@DomName('SVGTransformable.getTransformToElement')
+ @DocsEditable
Matrix getTransformToElement(SvgElement element) native "SVGTransformable_getTransformToElement_Callback";
}
@@ -8311,8 +8507,8 @@
class UriReference extends NativeFieldWrapperClass1 {
UriReference.internal();
- @DocsEditable
@DomName('SVGURIReference.href')
+ @DocsEditable
AnimatedString get href native "SVGURIReference_href_Getter";
}
@@ -8331,108 +8527,108 @@
@DocsEditable
factory UseElement() => _SvgElementFactoryProvider.createSvgElement_tag("use");
- @DocsEditable
@DomName('SVGUseElement.animatedInstanceRoot')
+ @DocsEditable
ElementInstance get animatedInstanceRoot native "SVGUseElement_animatedInstanceRoot_Getter";
- @DocsEditable
@DomName('SVGUseElement.height')
+ @DocsEditable
AnimatedLength get height native "SVGUseElement_height_Getter";
- @DocsEditable
@DomName('SVGUseElement.instanceRoot')
+ @DocsEditable
ElementInstance get instanceRoot native "SVGUseElement_instanceRoot_Getter";
- @DocsEditable
@DomName('SVGUseElement.width')
+ @DocsEditable
AnimatedLength get width native "SVGUseElement_width_Getter";
- @DocsEditable
@DomName('SVGUseElement.x')
+ @DocsEditable
AnimatedLength get x native "SVGUseElement_x_Getter";
- @DocsEditable
@DomName('SVGUseElement.y')
+ @DocsEditable
AnimatedLength get y native "SVGUseElement_y_Getter";
- @DocsEditable
@DomName('SVGUseElement.externalResourcesRequired')
+ @DocsEditable
AnimatedBoolean get externalResourcesRequired native "SVGUseElement_externalResourcesRequired_Getter";
- @DocsEditable
@DomName('SVGUseElement.xmllang')
+ @DocsEditable
String get xmllang native "SVGUseElement_xmllang_Getter";
- @DocsEditable
@DomName('SVGUseElement.xmllang')
+ @DocsEditable
void set xmllang(String value) native "SVGUseElement_xmllang_Setter";
- @DocsEditable
@DomName('SVGUseElement.xmlspace')
+ @DocsEditable
String get xmlspace native "SVGUseElement_xmlspace_Getter";
- @DocsEditable
@DomName('SVGUseElement.xmlspace')
+ @DocsEditable
void set xmlspace(String value) native "SVGUseElement_xmlspace_Setter";
- @DocsEditable
@DomName('SVGUseElement.farthestViewportElement')
+ @DocsEditable
SvgElement get farthestViewportElement native "SVGUseElement_farthestViewportElement_Getter";
- @DocsEditable
@DomName('SVGUseElement.nearestViewportElement')
+ @DocsEditable
SvgElement get nearestViewportElement native "SVGUseElement_nearestViewportElement_Getter";
- @DocsEditable
@DomName('SVGUseElement.getBBox')
+ @DocsEditable
Rect getBBox() native "SVGUseElement_getBBox_Callback";
- @DocsEditable
@DomName('SVGUseElement.getCTM')
+ @DocsEditable
Matrix getCtm() native "SVGUseElement_getCTM_Callback";
- @DocsEditable
@DomName('SVGUseElement.getScreenCTM')
+ @DocsEditable
Matrix getScreenCtm() native "SVGUseElement_getScreenCTM_Callback";
- @DocsEditable
@DomName('SVGUseElement.getTransformToElement')
+ @DocsEditable
Matrix getTransformToElement(SvgElement element) native "SVGUseElement_getTransformToElement_Callback";
- @DocsEditable
@DomName('SVGUseElement.className')
+ @DocsEditable
AnimatedString get $dom_svgClassName native "SVGUseElement_className_Getter";
- @DocsEditable
@DomName('SVGUseElement.style')
+ @DocsEditable
CssStyleDeclaration get style native "SVGUseElement_style_Getter";
- @DocsEditable
@DomName('SVGUseElement.getPresentationAttribute')
+ @DocsEditable
CssValue getPresentationAttribute(String name) native "SVGUseElement_getPresentationAttribute_Callback";
- @DocsEditable
@DomName('SVGUseElement.requiredExtensions')
+ @DocsEditable
StringList get requiredExtensions native "SVGUseElement_requiredExtensions_Getter";
- @DocsEditable
@DomName('SVGUseElement.requiredFeatures')
+ @DocsEditable
StringList get requiredFeatures native "SVGUseElement_requiredFeatures_Getter";
- @DocsEditable
@DomName('SVGUseElement.systemLanguage')
+ @DocsEditable
StringList get systemLanguage native "SVGUseElement_systemLanguage_Getter";
- @DocsEditable
@DomName('SVGUseElement.hasExtension')
+ @DocsEditable
bool hasExtension(String extension) native "SVGUseElement_hasExtension_Callback";
- @DocsEditable
@DomName('SVGUseElement.transform')
+ @DocsEditable
AnimatedTransformList get transform native "SVGUseElement_transform_Getter";
- @DocsEditable
@DomName('SVGUseElement.href')
+ @DocsEditable
AnimatedString get href native "SVGUseElement_href_Getter";
}
@@ -8467,28 +8663,28 @@
@DocsEditable
factory ViewElement() => _SvgElementFactoryProvider.createSvgElement_tag("view");
- @DocsEditable
@DomName('SVGViewElement.viewTarget')
+ @DocsEditable
StringList get viewTarget native "SVGViewElement_viewTarget_Getter";
- @DocsEditable
@DomName('SVGViewElement.externalResourcesRequired')
+ @DocsEditable
AnimatedBoolean get externalResourcesRequired native "SVGViewElement_externalResourcesRequired_Getter";
- @DocsEditable
@DomName('SVGViewElement.preserveAspectRatio')
+ @DocsEditable
AnimatedPreserveAspectRatio get preserveAspectRatio native "SVGViewElement_preserveAspectRatio_Getter";
- @DocsEditable
@DomName('SVGViewElement.viewBox')
+ @DocsEditable
AnimatedRect get viewBox native "SVGViewElement_viewBox_Getter";
- @DocsEditable
@DomName('SVGViewElement.zoomAndPan')
+ @DocsEditable
int get zoomAndPan native "SVGViewElement_zoomAndPan_Getter";
- @DocsEditable
@DomName('SVGViewElement.zoomAndPan')
+ @DocsEditable
void set zoomAndPan(int value) native "SVGViewElement_zoomAndPan_Setter";
}
@@ -8504,44 +8700,44 @@
class ViewSpec extends NativeFieldWrapperClass1 {
ViewSpec.internal();
- @DocsEditable
@DomName('SVGViewSpec.preserveAspectRatio')
+ @DocsEditable
AnimatedPreserveAspectRatio get preserveAspectRatio native "SVGViewSpec_preserveAspectRatio_Getter";
- @DocsEditable
@DomName('SVGViewSpec.preserveAspectRatioString')
+ @DocsEditable
String get preserveAspectRatioString native "SVGViewSpec_preserveAspectRatioString_Getter";
- @DocsEditable
@DomName('SVGViewSpec.transform')
+ @DocsEditable
TransformList get transform native "SVGViewSpec_transform_Getter";
- @DocsEditable
@DomName('SVGViewSpec.transformString')
+ @DocsEditable
String get transformString native "SVGViewSpec_transformString_Getter";
- @DocsEditable
@DomName('SVGViewSpec.viewBox')
+ @DocsEditable
AnimatedRect get viewBox native "SVGViewSpec_viewBox_Getter";
- @DocsEditable
@DomName('SVGViewSpec.viewBoxString')
+ @DocsEditable
String get viewBoxString native "SVGViewSpec_viewBoxString_Getter";
- @DocsEditable
@DomName('SVGViewSpec.viewTarget')
+ @DocsEditable
SvgElement get viewTarget native "SVGViewSpec_viewTarget_Getter";
- @DocsEditable
@DomName('SVGViewSpec.viewTargetString')
+ @DocsEditable
String get viewTargetString native "SVGViewSpec_viewTargetString_Getter";
- @DocsEditable
@DomName('SVGViewSpec.zoomAndPan')
+ @DocsEditable
int get zoomAndPan native "SVGViewSpec_zoomAndPan_Getter";
- @DocsEditable
@DomName('SVGViewSpec.zoomAndPan')
+ @DocsEditable
void set zoomAndPan(int value) native "SVGViewSpec_zoomAndPan_Setter";
}
@@ -8563,12 +8759,12 @@
static const int SVG_ZOOMANDPAN_UNKNOWN = 0;
- @DocsEditable
@DomName('SVGZoomAndPan.zoomAndPan')
+ @DocsEditable
int get zoomAndPan native "SVGZoomAndPan_zoomAndPan_Getter";
- @DocsEditable
@DomName('SVGZoomAndPan.zoomAndPan')
+ @DocsEditable
void set zoomAndPan(int value) native "SVGZoomAndPan_zoomAndPan_Setter";
}
@@ -8584,24 +8780,24 @@
class ZoomEvent extends UIEvent {
ZoomEvent.internal() : super.internal();
- @DocsEditable
@DomName('SVGZoomEvent.newScale')
+ @DocsEditable
num get newScale native "SVGZoomEvent_newScale_Getter";
- @DocsEditable
@DomName('SVGZoomEvent.newTranslate')
+ @DocsEditable
Point get newTranslate native "SVGZoomEvent_newTranslate_Getter";
- @DocsEditable
@DomName('SVGZoomEvent.previousScale')
+ @DocsEditable
num get previousScale native "SVGZoomEvent_previousScale_Getter";
- @DocsEditable
@DomName('SVGZoomEvent.previousTranslate')
+ @DocsEditable
Point get previousTranslate native "SVGZoomEvent_previousTranslate_Getter";
- @DocsEditable
@DomName('SVGZoomEvent.zoomRectScreen')
+ @DocsEditable
Rect get zoomRectScreen native "SVGZoomEvent_zoomRectScreen_Getter";
}
@@ -8617,8 +8813,8 @@
class _ElementInstanceList extends NativeFieldWrapperClass1 implements List<ElementInstance> {
_ElementInstanceList.internal();
- @DocsEditable
@DomName('SVGElementInstanceList.length')
+ @DocsEditable
int get length native "SVGElementInstanceList_length_Getter";
ElementInstance operator[](int index) native "SVGElementInstanceList_item_Callback";
@@ -8646,11 +8842,13 @@
void forEach(void f(ElementInstance element)) => IterableMixinWorkaround.forEach(this, f);
- String join([String separator]) => IterableMixinWorkaround.joinList(this, separator);
+ String join([String separator]) =>
+ IterableMixinWorkaround.joinList(this, separator);
List mappedBy(f(ElementInstance element)) => IterableMixinWorkaround.mappedByList(this, f);
- Iterable<ElementInstance> where(bool f(ElementInstance element)) => IterableMixinWorkaround.where(this, f);
+ Iterable<ElementInstance> where(bool f(ElementInstance element)) =>
+ IterableMixinWorkaround.where(this, f);
bool every(bool f(ElementInstance element)) => IterableMixinWorkaround.every(this, f);
@@ -8712,6 +8910,9 @@
throw new UnsupportedError("Cannot clear immutable List.");
}
+ List<ElementInstance> get reversed =>
+ new ReversedListView<ElementInstance>(this, 0, null);
+
void sort([int compare(ElementInstance a, ElementInstance b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -8740,9 +8941,11 @@
throw new StateError("More than one element");
}
- ElementInstance min([int compare(ElementInstance a, ElementInstance b)]) => IterableMixinWorkaround.min(this, compare);
+ ElementInstance min([int compare(ElementInstance a, ElementInstance b)]) =>
+ IterableMixinWorkaround.min(this, compare);
- ElementInstance max([int compare(ElementInstance a, ElementInstance b)]) => IterableMixinWorkaround.max(this, compare);
+ ElementInstance max([int compare(ElementInstance a, ElementInstance b)]) =>
+ IterableMixinWorkaround.max(this, compare);
ElementInstance removeAt(int pos) {
throw new UnsupportedError("Cannot remove from immutable List.");
@@ -8789,8 +8992,8 @@
// -- end List<ElementInstance> mixins.
- @DocsEditable
@DomName('SVGElementInstanceList.item')
+ @DocsEditable
ElementInstance item(int index) native "SVGElementInstanceList_item_Callback";
}
diff --git a/sdk/lib/uri/uri.dart b/sdk/lib/uri/uri.dart
index 6b01a06..3b1af61 100644
--- a/sdk/lib/uri/uri.dart
+++ b/sdk/lib/uri/uri.dart
@@ -24,8 +24,13 @@
final String query;
final String fragment;
+ /**
+ * Deprecated. Please use [parse] instead.
+ */
Uri.fromString(String uri) : this._fromMatch(_splitRe.firstMatch(uri));
+ static Uri parse(String uri) => new Uri._fromMatch(_splitRe.firstMatch(uri));
+
Uri._fromMatch(Match m) :
this.fromComponents(scheme: _emptyIfNull(m[_COMPONENT_SCHEME]),
userInfo: _emptyIfNull(m[_COMPONENT_USER_INFO]),
@@ -119,7 +124,7 @@
}
Uri resolve(String uri) {
- return resolveUri(new Uri.fromString(uri));
+ return resolveUri(Uri.parse(uri));
}
Uri resolveUri(Uri reference) {
diff --git a/sdk/lib/web_audio/dart2js/web_audio_dart2js.dart b/sdk/lib/web_audio/dart2js/web_audio_dart2js.dart
index e684d70..5d466fd 100644
--- a/sdk/lib/web_audio/dart2js/web_audio_dart2js.dart
+++ b/sdk/lib/web_audio/dart2js/web_audio_dart2js.dart
@@ -1,8 +1,11 @@
library web_audio;
import 'dart:async';
+import 'dart:collection';
+import 'dart:collection-dev';
import 'dart:html';
import 'dart:html_common';
+import 'dart:_foreign_helper' show JS;
// DO NOT EDIT
// Auto-generated dart:audio library.
@@ -14,33 +17,40 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('AnalyserNode')
class AnalyserNode extends AudioNode native "*AnalyserNode" {
- @DocsEditable @DomName('AnalyserNode.fftSize')
+ @DomName('AnalyserNode.fftSize')
+ @DocsEditable
int fftSize;
- @DocsEditable @DomName('AnalyserNode.frequencyBinCount')
+ @DomName('AnalyserNode.frequencyBinCount')
+ @DocsEditable
final int frequencyBinCount;
- @DocsEditable @DomName('AnalyserNode.maxDecibels')
+ @DomName('AnalyserNode.maxDecibels')
+ @DocsEditable
num maxDecibels;
- @DocsEditable @DomName('AnalyserNode.minDecibels')
+ @DomName('AnalyserNode.minDecibels')
+ @DocsEditable
num minDecibels;
- @DocsEditable @DomName('AnalyserNode.smoothingTimeConstant')
+ @DomName('AnalyserNode.smoothingTimeConstant')
+ @DocsEditable
num smoothingTimeConstant;
- @DocsEditable @DomName('AnalyserNode.getByteFrequencyData')
+ @DomName('AnalyserNode.getByteFrequencyData')
+ @DocsEditable
void getByteFrequencyData(Uint8Array array) native;
- @DocsEditable @DomName('AnalyserNode.getByteTimeDomainData')
+ @DomName('AnalyserNode.getByteTimeDomainData')
+ @DocsEditable
void getByteTimeDomainData(Uint8Array array) native;
- @DocsEditable @DomName('AnalyserNode.getFloatFrequencyData')
+ @DomName('AnalyserNode.getFloatFrequencyData')
+ @DocsEditable
void getFloatFrequencyData(Float32Array array) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -48,27 +58,32 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('AudioBuffer')
class AudioBuffer native "*AudioBuffer" {
- @DocsEditable @DomName('AudioBuffer.duration')
+ @DomName('AudioBuffer.duration')
+ @DocsEditable
final num duration;
- @DocsEditable @DomName('AudioBuffer.gain')
+ @DomName('AudioBuffer.gain')
+ @DocsEditable
num gain;
- @DocsEditable @DomName('AudioBuffer.length')
+ @DomName('AudioBuffer.length')
+ @DocsEditable
final int length;
- @DocsEditable @DomName('AudioBuffer.numberOfChannels')
+ @DomName('AudioBuffer.numberOfChannels')
+ @DocsEditable
final int numberOfChannels;
- @DocsEditable @DomName('AudioBuffer.sampleRate')
+ @DomName('AudioBuffer.sampleRate')
+ @DocsEditable
final num sampleRate;
- @DocsEditable @DomName('AudioBuffer.getChannelData')
+ @DomName('AudioBuffer.getChannelData')
+ @DocsEditable
Float32Array getChannelData(int channelIndex) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -84,7 +99,6 @@
// BSD-style license that can be found in the LICENSE file.
-@DocsEditable
@DomName('AudioBufferSourceNode')
class AudioBufferSourceNode extends AudioSourceNode native "*AudioBufferSourceNode" {
@@ -126,25 +140,32 @@
static const int UNSCHEDULED_STATE = 0;
- @DocsEditable @DomName('AudioBufferSourceNode.buffer')
+ @DomName('AudioBufferSourceNode.buffer')
+ @DocsEditable
AudioBuffer buffer;
- @DocsEditable @DomName('AudioBufferSourceNode.gain')
+ @DomName('AudioBufferSourceNode.gain')
+ @DocsEditable
final AudioGain gain;
- @DocsEditable @DomName('AudioBufferSourceNode.loop')
+ @DomName('AudioBufferSourceNode.loop')
+ @DocsEditable
bool loop;
- @DocsEditable @DomName('AudioBufferSourceNode.loopEnd')
+ @DomName('AudioBufferSourceNode.loopEnd')
+ @DocsEditable
num loopEnd;
- @DocsEditable @DomName('AudioBufferSourceNode.loopStart')
+ @DomName('AudioBufferSourceNode.loopStart')
+ @DocsEditable
num loopStart;
- @DocsEditable @DomName('AudioBufferSourceNode.playbackRate')
+ @DomName('AudioBufferSourceNode.playbackRate')
+ @DocsEditable
final AudioParam playbackRate;
- @DocsEditable @DomName('AudioBufferSourceNode.playbackState')
+ @DomName('AudioBufferSourceNode.playbackState')
+ @DocsEditable
final int playbackState;
}
@@ -153,10 +174,11 @@
// BSD-style license that can be found in the LICENSE file.
-@DocsEditable
@DomName('AudioContext')
class AudioContext extends EventTarget native "*AudioContext" {
+ @DomName('AudioContext.complete')
+ @DocsEditable
static const EventStreamProvider<Event> completeEvent = const EventStreamProvider<Event>('complete');
@DocsEditable
@@ -164,78 +186,104 @@
@DocsEditable
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
+ @deprecated
AudioContextEvents get on =>
new AudioContextEvents(this);
- @DocsEditable @DomName('AudioContext.activeSourceCount')
+ @DomName('AudioContext.activeSourceCount')
+ @DocsEditable
final int activeSourceCount;
- @DocsEditable @DomName('AudioContext.currentTime')
+ @DomName('AudioContext.currentTime')
+ @DocsEditable
final num currentTime;
- @DocsEditable @DomName('AudioContext.destination')
+ @DomName('AudioContext.destination')
+ @DocsEditable
final AudioDestinationNode destination;
- @DocsEditable @DomName('AudioContext.listener')
+ @DomName('AudioContext.listener')
+ @DocsEditable
final AudioListener listener;
- @DocsEditable @DomName('AudioContext.sampleRate')
+ @DomName('AudioContext.sampleRate')
+ @DocsEditable
final num sampleRate;
- @DocsEditable @DomName('AudioContext.createAnalyser')
+ @DomName('AudioContext.createAnalyser')
+ @DocsEditable
AnalyserNode createAnalyser() native;
- @DocsEditable @DomName('AudioContext.createBiquadFilter')
+ @DomName('AudioContext.createBiquadFilter')
+ @DocsEditable
BiquadFilterNode createBiquadFilter() native;
- @DocsEditable @DomName('AudioContext.createBuffer')
+ @DomName('AudioContext.createBuffer')
+ @DocsEditable
AudioBuffer createBuffer(buffer_OR_numberOfChannels, mixToMono_OR_numberOfFrames, [num sampleRate]) native;
- @DocsEditable @DomName('AudioContext.createBufferSource')
+ @DomName('AudioContext.createBufferSource')
+ @DocsEditable
AudioBufferSourceNode createBufferSource() native;
- @DocsEditable @DomName('AudioContext.createChannelMerger')
+ @DomName('AudioContext.createChannelMerger')
+ @DocsEditable
ChannelMergerNode createChannelMerger([int numberOfInputs]) native;
- @DocsEditable @DomName('AudioContext.createChannelSplitter')
+ @DomName('AudioContext.createChannelSplitter')
+ @DocsEditable
ChannelSplitterNode createChannelSplitter([int numberOfOutputs]) native;
- @DocsEditable @DomName('AudioContext.createConvolver')
+ @DomName('AudioContext.createConvolver')
+ @DocsEditable
ConvolverNode createConvolver() native;
- @DocsEditable @DomName('AudioContext.createDelay')
+ @DomName('AudioContext.createDelay')
+ @DocsEditable
DelayNode createDelay([num maxDelayTime]) native;
- @DocsEditable @DomName('AudioContext.createDynamicsCompressor')
+ @DomName('AudioContext.createDynamicsCompressor')
+ @DocsEditable
DynamicsCompressorNode createDynamicsCompressor() native;
- @DocsEditable @DomName('AudioContext.createMediaElementSource')
+ @DomName('AudioContext.createMediaElementSource')
+ @DocsEditable
MediaElementAudioSourceNode createMediaElementSource(MediaElement mediaElement) native;
- @DocsEditable @DomName('AudioContext.createMediaStreamDestination')
+ @DomName('AudioContext.createMediaStreamDestination')
+ @DocsEditable
MediaStreamAudioDestinationNode createMediaStreamDestination() native;
- @DocsEditable @DomName('AudioContext.createMediaStreamSource')
+ @DomName('AudioContext.createMediaStreamSource')
+ @DocsEditable
MediaStreamAudioSourceNode createMediaStreamSource(MediaStream mediaStream) native;
- @DocsEditable @DomName('AudioContext.createOscillator')
+ @DomName('AudioContext.createOscillator')
+ @DocsEditable
OscillatorNode createOscillator() native;
- @DocsEditable @DomName('AudioContext.createPanner')
+ @DomName('AudioContext.createPanner')
+ @DocsEditable
PannerNode createPanner() native;
- @DocsEditable @DomName('AudioContext.createWaveShaper')
+ @DomName('AudioContext.createWaveShaper')
+ @DocsEditable
WaveShaperNode createWaveShaper() native;
- @DocsEditable @DomName('AudioContext.createWaveTable')
+ @DomName('AudioContext.createWaveTable')
+ @DocsEditable
WaveTable createWaveTable(Float32Array real, Float32Array imag) native;
- @DocsEditable @DomName('AudioContext.decodeAudioData')
+ @DomName('AudioContext.decodeAudioData')
+ @DocsEditable
void decodeAudioData(ArrayBuffer audioData, AudioBufferCallback successCallback, [AudioBufferCallback errorCallback]) native;
- @DocsEditable @DomName('AudioContext.startRendering')
+ @DomName('AudioContext.startRendering')
+ @DocsEditable
void startRendering() native;
+ @DomName('AudioContext.complete')
+ @DocsEditable
Stream<Event> get onComplete => completeEvent.forTarget(this);
static AudioContext _create() => JS('AudioContext',
@@ -267,6 +315,7 @@
}
@DocsEditable
+@deprecated
class AudioContextEvents extends Events {
@DocsEditable
AudioContextEvents(EventTarget _ptr) : super(_ptr);
@@ -279,12 +328,12 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('AudioDestinationNode')
class AudioDestinationNode extends AudioNode native "*AudioDestinationNode" {
- @DocsEditable @DomName('AudioDestinationNode.numberOfChannels')
+ @DomName('AudioDestinationNode.numberOfChannels')
+ @DocsEditable
final int numberOfChannels;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -292,7 +341,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('AudioGain')
class AudioGain extends AudioParam native "*AudioGain" {
@@ -302,24 +350,28 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('AudioListener')
class AudioListener native "*AudioListener" {
- @DocsEditable @DomName('AudioListener.dopplerFactor')
+ @DomName('AudioListener.dopplerFactor')
+ @DocsEditable
num dopplerFactor;
- @DocsEditable @DomName('AudioListener.speedOfSound')
+ @DomName('AudioListener.speedOfSound')
+ @DocsEditable
num speedOfSound;
- @DocsEditable @DomName('AudioListener.setOrientation')
+ @DomName('AudioListener.setOrientation')
+ @DocsEditable
void setOrientation(num x, num y, num z, num xUp, num yUp, num zUp) native;
- @DocsEditable @DomName('AudioListener.setPosition')
+ @DomName('AudioListener.setPosition')
+ @DocsEditable
void setPosition(num x, num y, num z) native;
- @DocsEditable @DomName('AudioListener.setVelocity')
+ @DomName('AudioListener.setVelocity')
+ @DocsEditable
void setVelocity(num x, num y, num z) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -327,24 +379,28 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('AudioNode')
class AudioNode native "*AudioNode" {
- @DocsEditable @DomName('AudioNode.context')
+ @DomName('AudioNode.context')
+ @DocsEditable
final AudioContext context;
- @DocsEditable @DomName('AudioNode.numberOfInputs')
+ @DomName('AudioNode.numberOfInputs')
+ @DocsEditable
final int numberOfInputs;
- @DocsEditable @DomName('AudioNode.numberOfOutputs')
+ @DomName('AudioNode.numberOfOutputs')
+ @DocsEditable
final int numberOfOutputs;
- @DocsEditable @DomName('AudioNode.connect')
+ @DomName('AudioNode.connect')
+ @DocsEditable
void connect(destination, int output, [int input]) native;
- @DocsEditable @DomName('AudioNode.disconnect')
+ @DomName('AudioNode.disconnect')
+ @DocsEditable
void disconnect(int output) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -352,45 +408,56 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('AudioParam')
class AudioParam native "*AudioParam" {
- @DocsEditable @DomName('AudioParam.defaultValue')
+ @DomName('AudioParam.defaultValue')
+ @DocsEditable
final num defaultValue;
- @DocsEditable @DomName('AudioParam.maxValue')
+ @DomName('AudioParam.maxValue')
+ @DocsEditable
final num maxValue;
- @DocsEditable @DomName('AudioParam.minValue')
+ @DomName('AudioParam.minValue')
+ @DocsEditable
final num minValue;
- @DocsEditable @DomName('AudioParam.name')
+ @DomName('AudioParam.name')
+ @DocsEditable
final String name;
- @DocsEditable @DomName('AudioParam.units')
+ @DomName('AudioParam.units')
+ @DocsEditable
final int units;
- @DocsEditable @DomName('AudioParam.value')
+ @DomName('AudioParam.value')
+ @DocsEditable
num value;
- @DocsEditable @DomName('AudioParam.cancelScheduledValues')
+ @DomName('AudioParam.cancelScheduledValues')
+ @DocsEditable
void cancelScheduledValues(num startTime) native;
- @DocsEditable @DomName('AudioParam.exponentialRampToValueAtTime')
+ @DomName('AudioParam.exponentialRampToValueAtTime')
+ @DocsEditable
void exponentialRampToValueAtTime(num value, num time) native;
- @DocsEditable @DomName('AudioParam.linearRampToValueAtTime')
+ @DomName('AudioParam.linearRampToValueAtTime')
+ @DocsEditable
void linearRampToValueAtTime(num value, num time) native;
- @DocsEditable @DomName('AudioParam.setTargetAtTime')
+ @DomName('AudioParam.setTargetAtTime')
+ @DocsEditable
void setTargetAtTime(num target, num time, num timeConstant) native;
- @DocsEditable @DomName('AudioParam.setValueAtTime')
+ @DomName('AudioParam.setValueAtTime')
+ @DocsEditable
void setValueAtTime(num value, num time) native;
- @DocsEditable @DomName('AudioParam.setValueCurveAtTime')
+ @DomName('AudioParam.setValueCurveAtTime')
+ @DocsEditable
void setValueCurveAtTime(Float32Array values, num time, num duration) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -398,15 +465,16 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('AudioProcessingEvent')
class AudioProcessingEvent extends Event native "*AudioProcessingEvent" {
- @DocsEditable @DomName('AudioProcessingEvent.inputBuffer')
+ @DomName('AudioProcessingEvent.inputBuffer')
+ @DocsEditable
final AudioBuffer inputBuffer;
- @DocsEditable @DomName('AudioProcessingEvent.outputBuffer')
+ @DomName('AudioProcessingEvent.outputBuffer')
+ @DocsEditable
final AudioBuffer outputBuffer;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -414,7 +482,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('AudioSourceNode')
class AudioSourceNode extends AudioNode native "*AudioSourceNode" {
@@ -424,7 +491,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('BiquadFilterNode')
class BiquadFilterNode extends AudioNode native "*BiquadFilterNode" {
@@ -445,22 +511,28 @@
static const int PEAKING = 5;
- @DocsEditable @DomName('BiquadFilterNode.Q')
+ @DomName('BiquadFilterNode.Q')
+ @DocsEditable
final AudioParam Q;
- @DocsEditable @DomName('BiquadFilterNode.detune')
+ @DomName('BiquadFilterNode.detune')
+ @DocsEditable
final AudioParam detune;
- @DocsEditable @DomName('BiquadFilterNode.frequency')
+ @DomName('BiquadFilterNode.frequency')
+ @DocsEditable
final AudioParam frequency;
- @DocsEditable @DomName('BiquadFilterNode.gain')
+ @DomName('BiquadFilterNode.gain')
+ @DocsEditable
final AudioParam gain;
- @DocsEditable @DomName('BiquadFilterNode.type')
+ @DomName('BiquadFilterNode.type')
+ @DocsEditable
String type;
- @DocsEditable @DomName('BiquadFilterNode.getFrequencyResponse')
+ @DomName('BiquadFilterNode.getFrequencyResponse')
+ @DocsEditable
void getFrequencyResponse(Float32Array frequencyHz, Float32Array magResponse, Float32Array phaseResponse) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -468,7 +540,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('ChannelMergerNode')
class ChannelMergerNode extends AudioNode native "*ChannelMergerNode" {
@@ -478,7 +549,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('ChannelSplitterNode')
class ChannelSplitterNode extends AudioNode native "*ChannelSplitterNode" {
@@ -488,15 +558,16 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('ConvolverNode')
class ConvolverNode extends AudioNode native "*ConvolverNode" {
- @DocsEditable @DomName('ConvolverNode.buffer')
+ @DomName('ConvolverNode.buffer')
+ @DocsEditable
AudioBuffer buffer;
- @DocsEditable @DomName('ConvolverNode.normalize')
+ @DomName('ConvolverNode.normalize')
+ @DocsEditable
bool normalize;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -504,12 +575,12 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('DelayNode')
class DelayNode extends AudioNode native "*DelayNode" {
- @DocsEditable @DomName('DelayNode.delayTime')
+ @DomName('DelayNode.delayTime')
+ @DocsEditable
final AudioParam delayTime;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -517,27 +588,32 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('DynamicsCompressorNode')
class DynamicsCompressorNode extends AudioNode native "*DynamicsCompressorNode" {
- @DocsEditable @DomName('DynamicsCompressorNode.attack')
+ @DomName('DynamicsCompressorNode.attack')
+ @DocsEditable
final AudioParam attack;
- @DocsEditable @DomName('DynamicsCompressorNode.knee')
+ @DomName('DynamicsCompressorNode.knee')
+ @DocsEditable
final AudioParam knee;
- @DocsEditable @DomName('DynamicsCompressorNode.ratio')
+ @DomName('DynamicsCompressorNode.ratio')
+ @DocsEditable
final AudioParam ratio;
- @DocsEditable @DomName('DynamicsCompressorNode.reduction')
+ @DomName('DynamicsCompressorNode.reduction')
+ @DocsEditable
final AudioParam reduction;
- @DocsEditable @DomName('DynamicsCompressorNode.release')
+ @DomName('DynamicsCompressorNode.release')
+ @DocsEditable
final AudioParam release;
- @DocsEditable @DomName('DynamicsCompressorNode.threshold')
+ @DomName('DynamicsCompressorNode.threshold')
+ @DocsEditable
final AudioParam threshold;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -545,12 +621,12 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('GainNode')
class GainNode extends AudioNode native "*GainNode" {
- @DocsEditable @DomName('GainNode.gain')
+ @DomName('GainNode.gain')
+ @DocsEditable
final AudioGain gain;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -558,12 +634,12 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('MediaElementAudioSourceNode')
class MediaElementAudioSourceNode extends AudioSourceNode native "*MediaElementAudioSourceNode" {
- @DocsEditable @DomName('MediaElementAudioSourceNode.mediaElement')
+ @DomName('MediaElementAudioSourceNode.mediaElement')
+ @DocsEditable
final MediaElement mediaElement;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -571,12 +647,12 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('MediaStreamAudioDestinationNode')
class MediaStreamAudioDestinationNode extends AudioSourceNode native "*MediaStreamAudioDestinationNode" {
- @DocsEditable @DomName('MediaStreamAudioDestinationNode.stream')
+ @DomName('MediaStreamAudioDestinationNode.stream')
+ @DocsEditable
final MediaStream stream;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -584,12 +660,12 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('MediaStreamAudioSourceNode')
class MediaStreamAudioSourceNode extends AudioSourceNode native "*MediaStreamAudioSourceNode" {
- @DocsEditable @DomName('MediaStreamAudioSourceNode.mediaStream')
+ @DomName('MediaStreamAudioSourceNode.mediaStream')
+ @DocsEditable
final MediaStream mediaStream;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -597,12 +673,12 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('OfflineAudioCompletionEvent')
class OfflineAudioCompletionEvent extends Event native "*OfflineAudioCompletionEvent" {
- @DocsEditable @DomName('OfflineAudioCompletionEvent.renderedBuffer')
+ @DomName('OfflineAudioCompletionEvent.renderedBuffer')
+ @DocsEditable
final AudioBuffer renderedBuffer;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -610,7 +686,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('OfflineAudioContext')
class OfflineAudioContext extends AudioContext implements EventTarget native "*OfflineAudioContext" {
@@ -624,7 +699,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('OscillatorNode')
class OscillatorNode extends AudioSourceNode native "*OscillatorNode" {
@@ -647,25 +721,32 @@
static const int UNSCHEDULED_STATE = 0;
- @DocsEditable @DomName('OscillatorNode.detune')
+ @DomName('OscillatorNode.detune')
+ @DocsEditable
final AudioParam detune;
- @DocsEditable @DomName('OscillatorNode.frequency')
+ @DomName('OscillatorNode.frequency')
+ @DocsEditable
final AudioParam frequency;
- @DocsEditable @DomName('OscillatorNode.playbackState')
+ @DomName('OscillatorNode.playbackState')
+ @DocsEditable
final int playbackState;
- @DocsEditable @DomName('OscillatorNode.type')
+ @DomName('OscillatorNode.type')
+ @DocsEditable
String type;
- @DocsEditable @DomName('OscillatorNode.setWaveTable')
+ @DomName('OscillatorNode.setWaveTable')
+ @DocsEditable
void setWaveTable(WaveTable waveTable) native;
- @DocsEditable @DomName('OscillatorNode.start')
+ @DomName('OscillatorNode.start')
+ @DocsEditable
void start(num when) native;
- @DocsEditable @DomName('OscillatorNode.stop')
+ @DomName('OscillatorNode.stop')
+ @DocsEditable
void stop(num when) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -673,7 +754,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('PannerNode')
class PannerNode extends AudioNode native "*PannerNode" {
@@ -690,37 +770,48 @@
static const int SOUNDFIELD = 2;
- @DocsEditable @DomName('PannerNode.coneInnerAngle')
+ @DomName('PannerNode.coneInnerAngle')
+ @DocsEditable
num coneInnerAngle;
- @DocsEditable @DomName('PannerNode.coneOuterAngle')
+ @DomName('PannerNode.coneOuterAngle')
+ @DocsEditable
num coneOuterAngle;
- @DocsEditable @DomName('PannerNode.coneOuterGain')
+ @DomName('PannerNode.coneOuterGain')
+ @DocsEditable
num coneOuterGain;
- @DocsEditable @DomName('PannerNode.distanceModel')
+ @DomName('PannerNode.distanceModel')
+ @DocsEditable
String distanceModel;
- @DocsEditable @DomName('PannerNode.maxDistance')
+ @DomName('PannerNode.maxDistance')
+ @DocsEditable
num maxDistance;
- @DocsEditable @DomName('PannerNode.panningModel')
+ @DomName('PannerNode.panningModel')
+ @DocsEditable
String panningModel;
- @DocsEditable @DomName('PannerNode.refDistance')
+ @DomName('PannerNode.refDistance')
+ @DocsEditable
num refDistance;
- @DocsEditable @DomName('PannerNode.rolloffFactor')
+ @DomName('PannerNode.rolloffFactor')
+ @DocsEditable
num rolloffFactor;
- @DocsEditable @DomName('PannerNode.setOrientation')
+ @DomName('PannerNode.setOrientation')
+ @DocsEditable
void setOrientation(num x, num y, num z) native;
- @DocsEditable @DomName('PannerNode.setPosition')
+ @DomName('PannerNode.setPosition')
+ @DocsEditable
void setPosition(num x, num y, num z) native;
- @DocsEditable @DomName('PannerNode.setVelocity')
+ @DomName('PannerNode.setVelocity')
+ @DocsEditable
void setVelocity(num x, num y, num z) native;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -728,12 +819,12 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('ScriptProcessorNode')
class ScriptProcessorNode extends AudioNode implements EventTarget native "*ScriptProcessorNode" {
- @DocsEditable @DomName('ScriptProcessorNode.bufferSize')
+ @DomName('ScriptProcessorNode.bufferSize')
+ @DocsEditable
final int bufferSize;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -741,12 +832,12 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('WaveShaperNode')
class WaveShaperNode extends AudioNode native "*WaveShaperNode" {
- @DocsEditable @DomName('WaveShaperNode.curve')
+ @DomName('WaveShaperNode.curve')
+ @DocsEditable
Float32Array curve;
}
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
@@ -754,7 +845,6 @@
// BSD-style license that can be found in the LICENSE file.
-
@DocsEditable
@DomName('WaveTable')
class WaveTable native "*WaveTable" {
diff --git a/sdk/lib/web_audio/dartium/web_audio_dartium.dart b/sdk/lib/web_audio/dartium/web_audio_dartium.dart
index c37f538..44782ea 100644
--- a/sdk/lib/web_audio/dartium/web_audio_dartium.dart
+++ b/sdk/lib/web_audio/dartium/web_audio_dartium.dart
@@ -1,7 +1,10 @@
library web_audio;
import 'dart:async';
+import 'dart:collection';
+import 'dart:collection-dev';
import 'dart:html';
+import 'dart:html_common';
import 'dart:nativewrappers';
// DO NOT EDIT
// Auto-generated dart:audio library.
@@ -21,52 +24,52 @@
class AnalyserNode extends AudioNode {
AnalyserNode.internal() : super.internal();
- @DocsEditable
@DomName('AnalyserNode.fftSize')
+ @DocsEditable
int get fftSize native "AnalyserNode_fftSize_Getter";
- @DocsEditable
@DomName('AnalyserNode.fftSize')
+ @DocsEditable
void set fftSize(int value) native "AnalyserNode_fftSize_Setter";
- @DocsEditable
@DomName('AnalyserNode.frequencyBinCount')
+ @DocsEditable
int get frequencyBinCount native "AnalyserNode_frequencyBinCount_Getter";
- @DocsEditable
@DomName('AnalyserNode.maxDecibels')
+ @DocsEditable
num get maxDecibels native "AnalyserNode_maxDecibels_Getter";
- @DocsEditable
@DomName('AnalyserNode.maxDecibels')
+ @DocsEditable
void set maxDecibels(num value) native "AnalyserNode_maxDecibels_Setter";
- @DocsEditable
@DomName('AnalyserNode.minDecibels')
+ @DocsEditable
num get minDecibels native "AnalyserNode_minDecibels_Getter";
- @DocsEditable
@DomName('AnalyserNode.minDecibels')
+ @DocsEditable
void set minDecibels(num value) native "AnalyserNode_minDecibels_Setter";
- @DocsEditable
@DomName('AnalyserNode.smoothingTimeConstant')
+ @DocsEditable
num get smoothingTimeConstant native "AnalyserNode_smoothingTimeConstant_Getter";
- @DocsEditable
@DomName('AnalyserNode.smoothingTimeConstant')
+ @DocsEditable
void set smoothingTimeConstant(num value) native "AnalyserNode_smoothingTimeConstant_Setter";
- @DocsEditable
@DomName('AnalyserNode.getByteFrequencyData')
+ @DocsEditable
void getByteFrequencyData(Uint8Array array) native "AnalyserNode_getByteFrequencyData_Callback";
- @DocsEditable
@DomName('AnalyserNode.getByteTimeDomainData')
+ @DocsEditable
void getByteTimeDomainData(Uint8Array array) native "AnalyserNode_getByteTimeDomainData_Callback";
- @DocsEditable
@DomName('AnalyserNode.getFloatFrequencyData')
+ @DocsEditable
void getFloatFrequencyData(Float32Array array) native "AnalyserNode_getFloatFrequencyData_Callback";
}
@@ -82,32 +85,32 @@
class AudioBuffer extends NativeFieldWrapperClass1 {
AudioBuffer.internal();
- @DocsEditable
@DomName('AudioBuffer.duration')
+ @DocsEditable
num get duration native "AudioBuffer_duration_Getter";
- @DocsEditable
@DomName('AudioBuffer.gain')
+ @DocsEditable
num get gain native "AudioBuffer_gain_Getter";
- @DocsEditable
@DomName('AudioBuffer.gain')
+ @DocsEditable
void set gain(num value) native "AudioBuffer_gain_Setter";
- @DocsEditable
@DomName('AudioBuffer.length')
+ @DocsEditable
int get length native "AudioBuffer_length_Getter";
- @DocsEditable
@DomName('AudioBuffer.numberOfChannels')
+ @DocsEditable
int get numberOfChannels native "AudioBuffer_numberOfChannels_Getter";
- @DocsEditable
@DomName('AudioBuffer.sampleRate')
+ @DocsEditable
num get sampleRate native "AudioBuffer_sampleRate_Getter";
- @DocsEditable
@DomName('AudioBuffer.getChannelData')
+ @DocsEditable
Float32Array getChannelData(int channelIndex) native "AudioBuffer_getChannelData_Callback";
}
@@ -139,48 +142,48 @@
static const int UNSCHEDULED_STATE = 0;
- @DocsEditable
@DomName('AudioBufferSourceNode.buffer')
+ @DocsEditable
AudioBuffer get buffer native "AudioBufferSourceNode_buffer_Getter";
- @DocsEditable
@DomName('AudioBufferSourceNode.buffer')
+ @DocsEditable
void set buffer(AudioBuffer value) native "AudioBufferSourceNode_buffer_Setter";
- @DocsEditable
@DomName('AudioBufferSourceNode.gain')
+ @DocsEditable
AudioGain get gain native "AudioBufferSourceNode_gain_Getter";
- @DocsEditable
@DomName('AudioBufferSourceNode.loop')
+ @DocsEditable
bool get loop native "AudioBufferSourceNode_loop_Getter";
- @DocsEditable
@DomName('AudioBufferSourceNode.loop')
+ @DocsEditable
void set loop(bool value) native "AudioBufferSourceNode_loop_Setter";
- @DocsEditable
@DomName('AudioBufferSourceNode.loopEnd')
+ @DocsEditable
num get loopEnd native "AudioBufferSourceNode_loopEnd_Getter";
- @DocsEditable
@DomName('AudioBufferSourceNode.loopEnd')
+ @DocsEditable
void set loopEnd(num value) native "AudioBufferSourceNode_loopEnd_Setter";
- @DocsEditable
@DomName('AudioBufferSourceNode.loopStart')
+ @DocsEditable
num get loopStart native "AudioBufferSourceNode_loopStart_Getter";
- @DocsEditable
@DomName('AudioBufferSourceNode.loopStart')
+ @DocsEditable
void set loopStart(num value) native "AudioBufferSourceNode_loopStart_Setter";
- @DocsEditable
@DomName('AudioBufferSourceNode.playbackRate')
+ @DocsEditable
AudioParam get playbackRate native "AudioBufferSourceNode_playbackRate_Getter";
- @DocsEditable
@DomName('AudioBufferSourceNode.playbackState')
+ @DocsEditable
int get playbackState native "AudioBufferSourceNode_playbackState_Getter";
void start(num when, [num grainOffset, num grainDuration]) {
@@ -199,20 +202,20 @@
throw new ArgumentError("Incorrect number or type of arguments");
}
+ @DomName('AudioBufferSourceNode._start_1')
@DocsEditable
- @DomName('AudioBufferSourceNode.start_1')
- void _start_1(when) native "AudioBufferSourceNode_start_1_Callback";
+ void _start_1(when) native "AudioBufferSourceNode__start_1_Callback";
+ @DomName('AudioBufferSourceNode._start_2')
@DocsEditable
- @DomName('AudioBufferSourceNode.start_2')
- void _start_2(when, grainOffset) native "AudioBufferSourceNode_start_2_Callback";
+ void _start_2(when, grainOffset) native "AudioBufferSourceNode__start_2_Callback";
+ @DomName('AudioBufferSourceNode._start_3')
@DocsEditable
- @DomName('AudioBufferSourceNode.start_3')
- void _start_3(when, grainOffset, grainDuration) native "AudioBufferSourceNode_start_3_Callback";
+ void _start_3(when, grainOffset, grainDuration) native "AudioBufferSourceNode__start_3_Callback";
- @DocsEditable
@DomName('AudioBufferSourceNode.stop')
+ @DocsEditable
void stop(num when) native "AudioBufferSourceNode_stop_Callback";
}
@@ -221,11 +224,12 @@
// BSD-style license that can be found in the LICENSE file.
-@DocsEditable
@DomName('AudioContext')
class AudioContext extends EventTarget {
AudioContext.internal() : super.internal();
+ @DomName('AudioContext.complete')
+ @DocsEditable
static const EventStreamProvider<Event> completeEvent = const EventStreamProvider<Event>('complete');
@DocsEditable
@@ -234,35 +238,36 @@
@DocsEditable
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
+ @deprecated
AudioContextEvents get on =>
new AudioContextEvents(this);
- @DocsEditable
@DomName('AudioContext.activeSourceCount')
+ @DocsEditable
int get activeSourceCount native "AudioContext_activeSourceCount_Getter";
- @DocsEditable
@DomName('AudioContext.currentTime')
+ @DocsEditable
num get currentTime native "AudioContext_currentTime_Getter";
- @DocsEditable
@DomName('AudioContext.destination')
+ @DocsEditable
AudioDestinationNode get destination native "AudioContext_destination_Getter";
- @DocsEditable
@DomName('AudioContext.listener')
+ @DocsEditable
AudioListener get listener native "AudioContext_listener_Getter";
- @DocsEditable
@DomName('AudioContext.sampleRate')
+ @DocsEditable
num get sampleRate native "AudioContext_sampleRate_Getter";
- @DocsEditable
@DomName('AudioContext.createAnalyser')
+ @DocsEditable
AnalyserNode createAnalyser() native "AudioContext_createAnalyser_Callback";
- @DocsEditable
@DomName('AudioContext.createBiquadFilter')
+ @DocsEditable
BiquadFilterNode createBiquadFilter() native "AudioContext_createBiquadFilter_Callback";
AudioBuffer createBuffer(buffer_OR_numberOfChannels, mixToMono_OR_numberOfFrames, [num sampleRate]) {
@@ -275,16 +280,16 @@
throw new ArgumentError("Incorrect number or type of arguments");
}
+ @DomName('AudioContext._createBuffer_1')
@DocsEditable
- @DomName('AudioContext.createBuffer_1')
- AudioBuffer _createBuffer_1(buffer_OR_numberOfChannels, mixToMono_OR_numberOfFrames, sampleRate) native "AudioContext_createBuffer_1_Callback";
+ AudioBuffer _createBuffer_1(buffer_OR_numberOfChannels, mixToMono_OR_numberOfFrames, sampleRate) native "AudioContext__createBuffer_1_Callback";
+ @DomName('AudioContext._createBuffer_2')
@DocsEditable
- @DomName('AudioContext.createBuffer_2')
- AudioBuffer _createBuffer_2(buffer_OR_numberOfChannels, mixToMono_OR_numberOfFrames) native "AudioContext_createBuffer_2_Callback";
+ AudioBuffer _createBuffer_2(buffer_OR_numberOfChannels, mixToMono_OR_numberOfFrames) native "AudioContext__createBuffer_2_Callback";
- @DocsEditable
@DomName('AudioContext.createBufferSource')
+ @DocsEditable
AudioBufferSourceNode createBufferSource() native "AudioContext_createBufferSource_Callback";
ChannelMergerNode createChannelMerger([int numberOfInputs]) {
@@ -294,13 +299,13 @@
return _createChannelMerger_2();
}
+ @DomName('AudioContext._createChannelMerger_1')
@DocsEditable
- @DomName('AudioContext.createChannelMerger_1')
- ChannelMergerNode _createChannelMerger_1(numberOfInputs) native "AudioContext_createChannelMerger_1_Callback";
+ ChannelMergerNode _createChannelMerger_1(numberOfInputs) native "AudioContext__createChannelMerger_1_Callback";
+ @DomName('AudioContext._createChannelMerger_2')
@DocsEditable
- @DomName('AudioContext.createChannelMerger_2')
- ChannelMergerNode _createChannelMerger_2() native "AudioContext_createChannelMerger_2_Callback";
+ ChannelMergerNode _createChannelMerger_2() native "AudioContext__createChannelMerger_2_Callback";
ChannelSplitterNode createChannelSplitter([int numberOfOutputs]) {
if (?numberOfOutputs) {
@@ -309,16 +314,16 @@
return _createChannelSplitter_2();
}
+ @DomName('AudioContext._createChannelSplitter_1')
@DocsEditable
- @DomName('AudioContext.createChannelSplitter_1')
- ChannelSplitterNode _createChannelSplitter_1(numberOfOutputs) native "AudioContext_createChannelSplitter_1_Callback";
+ ChannelSplitterNode _createChannelSplitter_1(numberOfOutputs) native "AudioContext__createChannelSplitter_1_Callback";
+ @DomName('AudioContext._createChannelSplitter_2')
@DocsEditable
- @DomName('AudioContext.createChannelSplitter_2')
- ChannelSplitterNode _createChannelSplitter_2() native "AudioContext_createChannelSplitter_2_Callback";
+ ChannelSplitterNode _createChannelSplitter_2() native "AudioContext__createChannelSplitter_2_Callback";
- @DocsEditable
@DomName('AudioContext.createConvolver')
+ @DocsEditable
ConvolverNode createConvolver() native "AudioContext_createConvolver_Callback";
DelayNode createDelay([num maxDelayTime]) {
@@ -328,40 +333,40 @@
return _createDelay_2();
}
+ @DomName('AudioContext._createDelay_1')
@DocsEditable
- @DomName('AudioContext.createDelay_1')
- DelayNode _createDelay_1(maxDelayTime) native "AudioContext_createDelay_1_Callback";
+ DelayNode _createDelay_1(maxDelayTime) native "AudioContext__createDelay_1_Callback";
+ @DomName('AudioContext._createDelay_2')
@DocsEditable
- @DomName('AudioContext.createDelay_2')
- DelayNode _createDelay_2() native "AudioContext_createDelay_2_Callback";
+ DelayNode _createDelay_2() native "AudioContext__createDelay_2_Callback";
- @DocsEditable
@DomName('AudioContext.createDynamicsCompressor')
+ @DocsEditable
DynamicsCompressorNode createDynamicsCompressor() native "AudioContext_createDynamicsCompressor_Callback";
- @DocsEditable
@DomName('AudioContext.createGain')
+ @DocsEditable
GainNode createGain() native "AudioContext_createGain_Callback";
- @DocsEditable
@DomName('AudioContext.createMediaElementSource')
+ @DocsEditable
MediaElementAudioSourceNode createMediaElementSource(MediaElement mediaElement) native "AudioContext_createMediaElementSource_Callback";
- @DocsEditable
@DomName('AudioContext.createMediaStreamDestination')
+ @DocsEditable
MediaStreamAudioDestinationNode createMediaStreamDestination() native "AudioContext_createMediaStreamDestination_Callback";
- @DocsEditable
@DomName('AudioContext.createMediaStreamSource')
+ @DocsEditable
MediaStreamAudioSourceNode createMediaStreamSource(MediaStream mediaStream) native "AudioContext_createMediaStreamSource_Callback";
- @DocsEditable
@DomName('AudioContext.createOscillator')
+ @DocsEditable
OscillatorNode createOscillator() native "AudioContext_createOscillator_Callback";
- @DocsEditable
@DomName('AudioContext.createPanner')
+ @DocsEditable
PannerNode createPanner() native "AudioContext_createPanner_Callback";
ScriptProcessorNode createScriptProcessor(int bufferSize, [int numberOfInputChannels, int numberOfOutputChannels]) {
@@ -374,39 +379,42 @@
return _createScriptProcessor_3(bufferSize);
}
+ @DomName('AudioContext._createScriptProcessor_1')
@DocsEditable
- @DomName('AudioContext.createScriptProcessor_1')
- ScriptProcessorNode _createScriptProcessor_1(bufferSize, numberOfInputChannels, numberOfOutputChannels) native "AudioContext_createScriptProcessor_1_Callback";
+ ScriptProcessorNode _createScriptProcessor_1(bufferSize, numberOfInputChannels, numberOfOutputChannels) native "AudioContext__createScriptProcessor_1_Callback";
+ @DomName('AudioContext._createScriptProcessor_2')
@DocsEditable
- @DomName('AudioContext.createScriptProcessor_2')
- ScriptProcessorNode _createScriptProcessor_2(bufferSize, numberOfInputChannels) native "AudioContext_createScriptProcessor_2_Callback";
+ ScriptProcessorNode _createScriptProcessor_2(bufferSize, numberOfInputChannels) native "AudioContext__createScriptProcessor_2_Callback";
+ @DomName('AudioContext._createScriptProcessor_3')
@DocsEditable
- @DomName('AudioContext.createScriptProcessor_3')
- ScriptProcessorNode _createScriptProcessor_3(bufferSize) native "AudioContext_createScriptProcessor_3_Callback";
+ ScriptProcessorNode _createScriptProcessor_3(bufferSize) native "AudioContext__createScriptProcessor_3_Callback";
- @DocsEditable
@DomName('AudioContext.createWaveShaper')
+ @DocsEditable
WaveShaperNode createWaveShaper() native "AudioContext_createWaveShaper_Callback";
- @DocsEditable
@DomName('AudioContext.createWaveTable')
+ @DocsEditable
WaveTable createWaveTable(Float32Array real, Float32Array imag) native "AudioContext_createWaveTable_Callback";
- @DocsEditable
@DomName('AudioContext.decodeAudioData')
+ @DocsEditable
void decodeAudioData(ArrayBuffer audioData, AudioBufferCallback successCallback, [AudioBufferCallback errorCallback]) native "AudioContext_decodeAudioData_Callback";
- @DocsEditable
@DomName('AudioContext.startRendering')
+ @DocsEditable
void startRendering() native "AudioContext_startRendering_Callback";
+ @DomName('AudioContext.complete')
+ @DocsEditable
Stream<Event> get onComplete => completeEvent.forTarget(this);
}
@DocsEditable
+@deprecated
class AudioContextEvents extends Events {
@DocsEditable
AudioContextEvents(EventTarget _ptr) : super(_ptr);
@@ -426,8 +434,8 @@
class AudioDestinationNode extends AudioNode {
AudioDestinationNode.internal() : super.internal();
- @DocsEditable
@DomName('AudioDestinationNode.numberOfChannels')
+ @DocsEditable
int get numberOfChannels native "AudioDestinationNode_numberOfChannels_Getter";
}
@@ -456,32 +464,32 @@
class AudioListener extends NativeFieldWrapperClass1 {
AudioListener.internal();
- @DocsEditable
@DomName('AudioListener.dopplerFactor')
+ @DocsEditable
num get dopplerFactor native "AudioListener_dopplerFactor_Getter";
- @DocsEditable
@DomName('AudioListener.dopplerFactor')
+ @DocsEditable
void set dopplerFactor(num value) native "AudioListener_dopplerFactor_Setter";
- @DocsEditable
@DomName('AudioListener.speedOfSound')
+ @DocsEditable
num get speedOfSound native "AudioListener_speedOfSound_Getter";
- @DocsEditable
@DomName('AudioListener.speedOfSound')
+ @DocsEditable
void set speedOfSound(num value) native "AudioListener_speedOfSound_Setter";
- @DocsEditable
@DomName('AudioListener.setOrientation')
+ @DocsEditable
void setOrientation(num x, num y, num z, num xUp, num yUp, num zUp) native "AudioListener_setOrientation_Callback";
- @DocsEditable
@DomName('AudioListener.setPosition')
+ @DocsEditable
void setPosition(num x, num y, num z) native "AudioListener_setPosition_Callback";
- @DocsEditable
@DomName('AudioListener.setVelocity')
+ @DocsEditable
void setVelocity(num x, num y, num z) native "AudioListener_setVelocity_Callback";
}
@@ -497,16 +505,16 @@
class AudioNode extends NativeFieldWrapperClass1 {
AudioNode.internal();
- @DocsEditable
@DomName('AudioNode.context')
+ @DocsEditable
AudioContext get context native "AudioNode_context_Getter";
- @DocsEditable
@DomName('AudioNode.numberOfInputs')
+ @DocsEditable
int get numberOfInputs native "AudioNode_numberOfInputs_Getter";
- @DocsEditable
@DomName('AudioNode.numberOfOutputs')
+ @DocsEditable
int get numberOfOutputs native "AudioNode_numberOfOutputs_Getter";
void connect(destination, int output, [int input]) {
@@ -521,16 +529,16 @@
throw new ArgumentError("Incorrect number or type of arguments");
}
+ @DomName('AudioNode._connect_1')
@DocsEditable
- @DomName('AudioNode.connect_1')
- void _connect_1(destination, output, input) native "AudioNode_connect_1_Callback";
+ void _connect_1(destination, output, input) native "AudioNode__connect_1_Callback";
+ @DomName('AudioNode._connect_2')
@DocsEditable
- @DomName('AudioNode.connect_2')
- void _connect_2(destination, output) native "AudioNode_connect_2_Callback";
+ void _connect_2(destination, output) native "AudioNode__connect_2_Callback";
- @DocsEditable
@DomName('AudioNode.disconnect')
+ @DocsEditable
void disconnect(int output) native "AudioNode_disconnect_Callback";
}
@@ -546,56 +554,56 @@
class AudioParam extends NativeFieldWrapperClass1 {
AudioParam.internal();
- @DocsEditable
@DomName('AudioParam.defaultValue')
+ @DocsEditable
num get defaultValue native "AudioParam_defaultValue_Getter";
- @DocsEditable
@DomName('AudioParam.maxValue')
+ @DocsEditable
num get maxValue native "AudioParam_maxValue_Getter";
- @DocsEditable
@DomName('AudioParam.minValue')
+ @DocsEditable
num get minValue native "AudioParam_minValue_Getter";
- @DocsEditable
@DomName('AudioParam.name')
+ @DocsEditable
String get name native "AudioParam_name_Getter";
- @DocsEditable
@DomName('AudioParam.units')
+ @DocsEditable
int get units native "AudioParam_units_Getter";
- @DocsEditable
@DomName('AudioParam.value')
+ @DocsEditable
num get value native "AudioParam_value_Getter";
- @DocsEditable
@DomName('AudioParam.value')
+ @DocsEditable
void set value(num value) native "AudioParam_value_Setter";
- @DocsEditable
@DomName('AudioParam.cancelScheduledValues')
+ @DocsEditable
void cancelScheduledValues(num startTime) native "AudioParam_cancelScheduledValues_Callback";
- @DocsEditable
@DomName('AudioParam.exponentialRampToValueAtTime')
+ @DocsEditable
void exponentialRampToValueAtTime(num value, num time) native "AudioParam_exponentialRampToValueAtTime_Callback";
- @DocsEditable
@DomName('AudioParam.linearRampToValueAtTime')
+ @DocsEditable
void linearRampToValueAtTime(num value, num time) native "AudioParam_linearRampToValueAtTime_Callback";
- @DocsEditable
@DomName('AudioParam.setTargetAtTime')
+ @DocsEditable
void setTargetAtTime(num target, num time, num timeConstant) native "AudioParam_setTargetAtTime_Callback";
- @DocsEditable
@DomName('AudioParam.setValueAtTime')
+ @DocsEditable
void setValueAtTime(num value, num time) native "AudioParam_setValueAtTime_Callback";
- @DocsEditable
@DomName('AudioParam.setValueCurveAtTime')
+ @DocsEditable
void setValueCurveAtTime(Float32Array values, num time, num duration) native "AudioParam_setValueCurveAtTime_Callback";
}
@@ -611,12 +619,12 @@
class AudioProcessingEvent extends Event {
AudioProcessingEvent.internal() : super.internal();
- @DocsEditable
@DomName('AudioProcessingEvent.inputBuffer')
+ @DocsEditable
AudioBuffer get inputBuffer native "AudioProcessingEvent_inputBuffer_Getter";
- @DocsEditable
@DomName('AudioProcessingEvent.outputBuffer')
+ @DocsEditable
AudioBuffer get outputBuffer native "AudioProcessingEvent_outputBuffer_Getter";
}
@@ -661,32 +669,32 @@
static const int PEAKING = 5;
- @DocsEditable
@DomName('BiquadFilterNode.Q')
+ @DocsEditable
AudioParam get Q native "BiquadFilterNode_Q_Getter";
- @DocsEditable
@DomName('BiquadFilterNode.detune')
+ @DocsEditable
AudioParam get detune native "BiquadFilterNode_detune_Getter";
- @DocsEditable
@DomName('BiquadFilterNode.frequency')
+ @DocsEditable
AudioParam get frequency native "BiquadFilterNode_frequency_Getter";
- @DocsEditable
@DomName('BiquadFilterNode.gain')
+ @DocsEditable
AudioParam get gain native "BiquadFilterNode_gain_Getter";
- @DocsEditable
@DomName('BiquadFilterNode.type')
+ @DocsEditable
String get type native "BiquadFilterNode_type_Getter";
- @DocsEditable
@DomName('BiquadFilterNode.type')
+ @DocsEditable
void set type(String value) native "BiquadFilterNode_type_Setter";
- @DocsEditable
@DomName('BiquadFilterNode.getFrequencyResponse')
+ @DocsEditable
void getFrequencyResponse(Float32Array frequencyHz, Float32Array magResponse, Float32Array phaseResponse) native "BiquadFilterNode_getFrequencyResponse_Callback";
}
@@ -728,20 +736,20 @@
class ConvolverNode extends AudioNode {
ConvolverNode.internal() : super.internal();
- @DocsEditable
@DomName('ConvolverNode.buffer')
+ @DocsEditable
AudioBuffer get buffer native "ConvolverNode_buffer_Getter";
- @DocsEditable
@DomName('ConvolverNode.buffer')
+ @DocsEditable
void set buffer(AudioBuffer value) native "ConvolverNode_buffer_Setter";
- @DocsEditable
@DomName('ConvolverNode.normalize')
+ @DocsEditable
bool get normalize native "ConvolverNode_normalize_Getter";
- @DocsEditable
@DomName('ConvolverNode.normalize')
+ @DocsEditable
void set normalize(bool value) native "ConvolverNode_normalize_Setter";
}
@@ -757,8 +765,8 @@
class DelayNode extends AudioNode {
DelayNode.internal() : super.internal();
- @DocsEditable
@DomName('DelayNode.delayTime')
+ @DocsEditable
AudioParam get delayTime native "DelayNode_delayTime_Getter";
}
@@ -774,28 +782,28 @@
class DynamicsCompressorNode extends AudioNode {
DynamicsCompressorNode.internal() : super.internal();
- @DocsEditable
@DomName('DynamicsCompressorNode.attack')
+ @DocsEditable
AudioParam get attack native "DynamicsCompressorNode_attack_Getter";
- @DocsEditable
@DomName('DynamicsCompressorNode.knee')
+ @DocsEditable
AudioParam get knee native "DynamicsCompressorNode_knee_Getter";
- @DocsEditable
@DomName('DynamicsCompressorNode.ratio')
+ @DocsEditable
AudioParam get ratio native "DynamicsCompressorNode_ratio_Getter";
- @DocsEditable
@DomName('DynamicsCompressorNode.reduction')
+ @DocsEditable
AudioParam get reduction native "DynamicsCompressorNode_reduction_Getter";
- @DocsEditable
@DomName('DynamicsCompressorNode.release')
+ @DocsEditable
AudioParam get release native "DynamicsCompressorNode_release_Getter";
- @DocsEditable
@DomName('DynamicsCompressorNode.threshold')
+ @DocsEditable
AudioParam get threshold native "DynamicsCompressorNode_threshold_Getter";
}
@@ -811,8 +819,8 @@
class GainNode extends AudioNode {
GainNode.internal() : super.internal();
- @DocsEditable
@DomName('GainNode.gain')
+ @DocsEditable
AudioGain get gain native "GainNode_gain_Getter";
}
@@ -828,8 +836,8 @@
class MediaElementAudioSourceNode extends AudioSourceNode {
MediaElementAudioSourceNode.internal() : super.internal();
- @DocsEditable
@DomName('MediaElementAudioSourceNode.mediaElement')
+ @DocsEditable
MediaElement get mediaElement native "MediaElementAudioSourceNode_mediaElement_Getter";
}
@@ -845,8 +853,8 @@
class MediaStreamAudioDestinationNode extends AudioSourceNode {
MediaStreamAudioDestinationNode.internal() : super.internal();
- @DocsEditable
@DomName('MediaStreamAudioDestinationNode.stream')
+ @DocsEditable
MediaStream get stream native "MediaStreamAudioDestinationNode_stream_Getter";
}
@@ -862,8 +870,8 @@
class MediaStreamAudioSourceNode extends AudioSourceNode {
MediaStreamAudioSourceNode.internal() : super.internal();
- @DocsEditable
@DomName('MediaStreamAudioSourceNode.mediaStream')
+ @DocsEditable
MediaStream get mediaStream native "MediaStreamAudioSourceNode_mediaStream_Getter";
}
@@ -879,8 +887,8 @@
class OfflineAudioCompletionEvent extends Event {
OfflineAudioCompletionEvent.internal() : super.internal();
- @DocsEditable
@DomName('OfflineAudioCompletionEvent.renderedBuffer')
+ @DocsEditable
AudioBuffer get renderedBuffer native "OfflineAudioCompletionEvent_renderedBuffer_Getter";
}
@@ -931,36 +939,36 @@
static const int UNSCHEDULED_STATE = 0;
- @DocsEditable
@DomName('OscillatorNode.detune')
+ @DocsEditable
AudioParam get detune native "OscillatorNode_detune_Getter";
- @DocsEditable
@DomName('OscillatorNode.frequency')
+ @DocsEditable
AudioParam get frequency native "OscillatorNode_frequency_Getter";
- @DocsEditable
@DomName('OscillatorNode.playbackState')
+ @DocsEditable
int get playbackState native "OscillatorNode_playbackState_Getter";
- @DocsEditable
@DomName('OscillatorNode.type')
+ @DocsEditable
String get type native "OscillatorNode_type_Getter";
- @DocsEditable
@DomName('OscillatorNode.type')
+ @DocsEditable
void set type(String value) native "OscillatorNode_type_Setter";
- @DocsEditable
@DomName('OscillatorNode.setWaveTable')
+ @DocsEditable
void setWaveTable(WaveTable waveTable) native "OscillatorNode_setWaveTable_Callback";
- @DocsEditable
@DomName('OscillatorNode.start')
+ @DocsEditable
void start(num when) native "OscillatorNode_start_Callback";
- @DocsEditable
@DomName('OscillatorNode.stop')
+ @DocsEditable
void stop(num when) native "OscillatorNode_stop_Callback";
}
@@ -988,80 +996,80 @@
static const int SOUNDFIELD = 2;
- @DocsEditable
@DomName('PannerNode.coneInnerAngle')
+ @DocsEditable
num get coneInnerAngle native "PannerNode_coneInnerAngle_Getter";
- @DocsEditable
@DomName('PannerNode.coneInnerAngle')
+ @DocsEditable
void set coneInnerAngle(num value) native "PannerNode_coneInnerAngle_Setter";
- @DocsEditable
@DomName('PannerNode.coneOuterAngle')
+ @DocsEditable
num get coneOuterAngle native "PannerNode_coneOuterAngle_Getter";
- @DocsEditable
@DomName('PannerNode.coneOuterAngle')
+ @DocsEditable
void set coneOuterAngle(num value) native "PannerNode_coneOuterAngle_Setter";
- @DocsEditable
@DomName('PannerNode.coneOuterGain')
+ @DocsEditable
num get coneOuterGain native "PannerNode_coneOuterGain_Getter";
- @DocsEditable
@DomName('PannerNode.coneOuterGain')
+ @DocsEditable
void set coneOuterGain(num value) native "PannerNode_coneOuterGain_Setter";
- @DocsEditable
@DomName('PannerNode.distanceModel')
+ @DocsEditable
String get distanceModel native "PannerNode_distanceModel_Getter";
- @DocsEditable
@DomName('PannerNode.distanceModel')
+ @DocsEditable
void set distanceModel(String value) native "PannerNode_distanceModel_Setter";
- @DocsEditable
@DomName('PannerNode.maxDistance')
+ @DocsEditable
num get maxDistance native "PannerNode_maxDistance_Getter";
- @DocsEditable
@DomName('PannerNode.maxDistance')
+ @DocsEditable
void set maxDistance(num value) native "PannerNode_maxDistance_Setter";
- @DocsEditable
@DomName('PannerNode.panningModel')
+ @DocsEditable
String get panningModel native "PannerNode_panningModel_Getter";
- @DocsEditable
@DomName('PannerNode.panningModel')
+ @DocsEditable
void set panningModel(String value) native "PannerNode_panningModel_Setter";
- @DocsEditable
@DomName('PannerNode.refDistance')
+ @DocsEditable
num get refDistance native "PannerNode_refDistance_Getter";
- @DocsEditable
@DomName('PannerNode.refDistance')
+ @DocsEditable
void set refDistance(num value) native "PannerNode_refDistance_Setter";
- @DocsEditable
@DomName('PannerNode.rolloffFactor')
+ @DocsEditable
num get rolloffFactor native "PannerNode_rolloffFactor_Getter";
- @DocsEditable
@DomName('PannerNode.rolloffFactor')
+ @DocsEditable
void set rolloffFactor(num value) native "PannerNode_rolloffFactor_Setter";
- @DocsEditable
@DomName('PannerNode.setOrientation')
+ @DocsEditable
void setOrientation(num x, num y, num z) native "PannerNode_setOrientation_Callback";
- @DocsEditable
@DomName('PannerNode.setPosition')
+ @DocsEditable
void setPosition(num x, num y, num z) native "PannerNode_setPosition_Callback";
- @DocsEditable
@DomName('PannerNode.setVelocity')
+ @DocsEditable
void setVelocity(num x, num y, num z) native "PannerNode_setVelocity_Callback";
}
@@ -1077,8 +1085,8 @@
class ScriptProcessorNode extends AudioNode implements EventTarget {
ScriptProcessorNode.internal() : super.internal();
- @DocsEditable
@DomName('ScriptProcessorNode.bufferSize')
+ @DocsEditable
int get bufferSize native "ScriptProcessorNode_bufferSize_Getter";
}
@@ -1094,12 +1102,12 @@
class WaveShaperNode extends AudioNode {
WaveShaperNode.internal() : super.internal();
- @DocsEditable
@DomName('WaveShaperNode.curve')
+ @DocsEditable
Float32Array get curve native "WaveShaperNode_curve_Getter";
- @DocsEditable
@DomName('WaveShaperNode.curve')
+ @DocsEditable
void set curve(Float32Array value) native "WaveShaperNode_curve_Setter";
}
diff --git a/tests/co19/co19-compiler.status b/tests/co19/co19-compiler.status
index 9ab3b3c..191148a 100644
--- a/tests/co19/co19-compiler.status
+++ b/tests/co19/co19-compiler.status
@@ -118,6 +118,17 @@
Language/07_Classes/6_Constructors/2_Factories_A01_t02: Fail
+# co19 issue 372 (@static-clean where type warnings are expected)
+Language/07_Classes/6_Constructors_A03_t03: Fail
+Language/11_Expressions/11_Instance_Creation/1_New_A06_t04: Fail
+Language/11_Expressions/11_Instance_Creation/1_New_A06_t05: Fail
+LibTest/core/RegExp/Pattern_semantics/firstMatch_CharacterClassEscape_A01_t01: Fail
+LibTest/core/RegExp/Pattern_semantics/firstMatch_CharacterClassEscape_A02_t01: Fail
+LibTest/core/RegExp/Pattern_semantics/firstMatch_CharacterClassEscape_A06_t01: Fail
+
+
+
+
# testing framework or VM issue 7388 (dies on Turkish character)
Language/11_Expressions/30_Identifier_Reference_A01_t08: Skip
@@ -157,7 +168,6 @@
Language/07_Classes/07_Classes_A03_t06: Fail, OK # TODO(ahe): This test is failing after correctly implementing static warning checks in co19 test suite. The co19 authors have informed me that some of these failures are due to bugs in the test suite.
Language/07_Classes/1_Instance_Methods/2_Operators_A01_t01: Fail, OK # TODO(ahe): This test is failing after correctly implementing static warning checks in co19 test suite. The co19 authors have informed me that some of these failures are due to bugs in the test suite.
Language/07_Classes/3_Setters_A04_t01: Fail, OK # TODO(ahe): This test is failing after correctly implementing static warning checks in co19 test suite. The co19 authors have informed me that some of these failures are due to bugs in the test suite.
-Language/07_Classes/3_Setters_A04_t03: Fail, OK # TODO(ahe): This test is failing after correctly implementing static warning checks in co19 test suite. The co19 authors have informed me that some of these failures are due to bugs in the test suite.
Language/07_Classes/3_Setters_A04_t04: Fail, OK # TODO(ahe): This test is failing after correctly implementing static warning checks in co19 test suite. The co19 authors have informed me that some of these failures are due to bugs in the test suite.
Language/07_Classes/3_Setters_A04_t05: Fail, OK # TODO(ahe): This test is failing after correctly implementing static warning checks in co19 test suite. The co19 authors have informed me that some of these failures are due to bugs in the test suite.
Language/07_Classes/4_Abstract_Instance_Members_A01_t01: Fail, OK # TODO(ahe): This test is failing after correctly implementing static warning checks in co19 test suite. The co19 authors have informed me that some of these failures are due to bugs in the test suite.
@@ -274,7 +284,6 @@
Language/13_Libraries_and_Scripts/1_Imports_A02_t20: Fail, OK # TODO(ahe): This test is failing after correctly implementing static warning checks in co19 test suite. The co19 authors have informed me that some of these failures are due to bugs in the test suite.
Language/13_Libraries_and_Scripts/2_Exports_A01_t02: Fail, OK # TODO(ahe): This test is failing after correctly implementing static warning checks in co19 test suite. The co19 authors have informed me that some of these failures are due to bugs in the test suite.
Language/13_Libraries_and_Scripts/2_Exports_A01_t03: Fail, OK # TODO(ahe): This test is failing after correctly implementing static warning checks in co19 test suite. The co19 authors have informed me that some of these failures are due to bugs in the test suite.
-Language/13_Libraries_and_Scripts/2_Exports_A01_t17: Fail, OK # TODO(ahe): This test is failing after correctly implementing static warning checks in co19 test suite. The co19 authors have informed me that some of these failures are due to bugs in the test suite.
Language/13_Libraries_and_Scripts/2_Exports_A03_t01: Fail, OK # TODO(ahe): This test is failing after correctly implementing static warning checks in co19 test suite. The co19 authors have informed me that some of these failures are due to bugs in the test suite.
Language/13_Libraries_and_Scripts/2_Exports_A03_t02: Fail, OK # TODO(ahe): This test is failing after correctly implementing static warning checks in co19 test suite. The co19 authors have informed me that some of these failures are due to bugs in the test suite.
Language/13_Libraries_and_Scripts/3_Parts_A03_t01: Fail, OK # TODO(ahe): This test is failing after correctly implementing static warning checks in co19 test suite. The co19 authors have informed me that some of these failures are due to bugs in the test suite.
@@ -432,6 +441,55 @@
LibTest/isolate/SendPort/call_A01_t01: Fail, OK # TODO(ahe): This test is failing after correctly implementing static warning checks in co19 test suite. The co19 authors have informed me that some of these failures are due to bugs in the test suite.
LibTest/math/Random/nextDouble_A01_t01: Fail, OK # TODO(ahe): This test is failing after correctly implementing static warning checks in co19 test suite. The co19 authors have informed me that some of these failures are due to bugs in the test suite.
+Language/14_Types/4_Interface_Types_A08_t06: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Expect/setEquals_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Expect/setEquals_A01_t02: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/HashMap/HashMap.from_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/HashMap/HashMap.from_A02_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/HashMap/HashMap_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/HashSet/HashSet.from_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/HashSet/HashSet.from_A02_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/HashSet/HashSet_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/LinkedHashMap/LinkedHashMap.from_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/LinkedHashMap/LinkedHashMap.from_A02_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/LinkedHashMap/LinkedHashMap_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/LinkedHashMap/LinkedHashMap_A02_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/List/List.from_A02_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/List/addAll_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/Queue.from_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/Queue.from_A02_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/Queue_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/addAll_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/addAll_A01_t02: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/addAll_A02_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/addFirst_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/addFirst_A01_t02: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/addLast_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/addLast_A01_t02: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/add_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/add_A01_t02: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/clear_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/every_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/every_A01_t02: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/every_A01_t04: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/every_A01_t05: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/every_A01_t06: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/first_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/first_A02_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/forEach_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/forEach_A01_t02: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/forEach_A01_t05: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/forEach_A01_t04: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/isEmpty_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/last_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/last_A02_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/length_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/removeFirst_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/removeFirst_A02_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/removeLast_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/removeLast_A02_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Set/Set.from_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+
[ $runtime == drt && ($compiler == none || $compiler == frog) ]
*: Skip
diff --git a/tests/co19/co19-dart2dart.status b/tests/co19/co19-dart2dart.status
index a23d5db..4993c00 100644
--- a/tests/co19/co19-dart2dart.status
+++ b/tests/co19/co19-dart2dart.status
@@ -32,6 +32,7 @@
Language/14_Types/3_Type_Declarations/1_Typedef_A07_t03: Fail # http://dartbug.com/7202
Language/14_Types/3_Type_Declarations/1_Typedef_A07_t04: Fail # http://dartbug.com/7202
+Language/12_Statements/02_Expression_Statements_A01_t08: Fail # co 19 issue 370
# Calling unresolved class constructor:
Language/03_Overview/2_Privacy_A01_t19: Fail
@@ -611,3 +612,46 @@
LibTest/core/Future/chain_A02_t05: Fail # Future is in async library. co19 issue 367
LibTest/core/Future/transform_A02_t04: Fail # Future is in async library. co19 issue 367
+
+LibTest/core/Expect/setEquals_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Expect/setEquals_A01_t02: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/HashMap/HashMap.from_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/HashMap/HashMap_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/HashSet/HashSet.from_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/HashSet/HashSet_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/LinkedHashMap/LinkedHashMap.from_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/LinkedHashMap/LinkedHashMap_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/List/List.from_A02_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/List/addAll_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/Queue.from_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/Queue_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/addAll_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/addAll_A01_t02: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/addFirst_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/addFirst_A01_t02: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/addLast_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/addLast_A01_t02: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/add_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/add_A01_t02: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/clear_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/every_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/every_A01_t02: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/every_A01_t03: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/every_A01_t04: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/every_A01_t05: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/first_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/first_A02_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/forEach_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/forEach_A01_t02: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/forEach_A01_t03: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/forEach_A01_t05: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/isEmpty_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/last_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/last_A02_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/length_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/removeFirst_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/removeFirst_A02_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/removeLast_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/removeLast_A02_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Set/Set.from_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+Language/14_Types/4_Interface_Types_A08_t06: Fail # Moved collection classes from core to collection. co19 issue 371.
diff --git a/tests/co19/co19-dart2js.status b/tests/co19/co19-dart2js.status
index 4671c53..3884bbd 100644
--- a/tests/co19/co19-dart2js.status
+++ b/tests/co19/co19-dart2js.status
@@ -76,7 +76,6 @@
Language/11_Expressions/21_Bitwise_Expressions_A01_t17: Fail # TODO(ahe): Please triage this failure.
Language/11_Expressions/22_Equality_A01_t23: Fail # TODO(ahe): Please triage this failure.
Language/11_Expressions/22_Equality_A01_t24: Fail # TODO(ahe): Please triage this failure.
-Language/11_Expressions/22_Equality_A03_t02: Fail # TODO(ahe): Please triage this failure.
Language/11_Expressions/23_Relational_Expressions_A01_t22: Fail # TODO(ahe): Please triage this failure.
Language/11_Expressions/23_Relational_Expressions_A01_t23: Fail # TODO(ahe): Please triage this failure.
Language/11_Expressions/24_Shift_A01_t13: Fail # TODO(ahe): Please triage this failure.
@@ -181,6 +180,7 @@
[ $compiler == dart2js && $runtime == jsshell ]
+LibTest/core/Map/Map_class_A01_t04: Pass, Slow # Issue 8096
Language/05_Variables/05_Variables_A13_t02: Fail # TODO(ngeoaffray): Please triage these failure.
Language/06_Functions/3_Type_of_a_Function_A01_t01: Fail # TODO(ngeoaffray): Please triage these failure.
Language/11_Expressions/05_Strings/1_String_Interpolation_A03_t02: Fail # TODO(ngeoaffray): Please triage these failure.
@@ -534,6 +534,48 @@
LibTest/core/Futures/wait_A02_t01: Fail # Future is in async library. co19 issue 367
LibTest/core/Futures/wait_A02_t02: Fail # Future is in async library. co19 issue 367
+LibTest/core/Expect/setEquals_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Expect/setEquals_A01_t02: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/HashMap/HashMap.from_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/HashMap/HashMap_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/HashSet/HashSet.from_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/HashSet/HashSet_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/LinkedHashMap/LinkedHashMap.from_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/LinkedHashMap/LinkedHashMap_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/List/List.from_A02_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/List/addAll_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/Queue.from_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/Queue_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/addAll_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/addAll_A01_t02: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/addFirst_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/addFirst_A01_t02: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/addLast_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/addLast_A01_t02: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/add_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/add_A01_t02: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/clear_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/every_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/every_A01_t02: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/every_A01_t03: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/every_A01_t04: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/every_A01_t05: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/first_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/first_A02_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/forEach_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/forEach_A01_t02: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/forEach_A01_t03: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/forEach_A01_t05: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/isEmpty_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/last_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/last_A02_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/length_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/removeFirst_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/removeFirst_A02_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/removeLast_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/removeLast_A02_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Set/Set.from_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+
# Issues with co19 test suite in checked mode.
[ $compiler == dart2js && $checked ]
LibTest/isolate/SendPort/call_A01_t01: Fail # Future is in async library. co19 issue 367
diff --git a/tests/co19/co19-runtime.status b/tests/co19/co19-runtime.status
index 40b1b9e..af31ae0 100644
--- a/tests/co19/co19-runtime.status
+++ b/tests/co19/co19-runtime.status
@@ -79,6 +79,7 @@
Language/11_Expressions/31_Type_Test_A01_t02: Fail # Dart issue 7258
Language/11_Expressions/31_Type_Test_A01_t04: Fail # Dart issue 7258
Language/11_Expressions/32_Type_Cast_A01_t04: Fail # co19 issue 356
+Language/12_Statements/02_Expression_Statements_A01_t08: Fail # co19 issue 370 (map literals need 2 type args)
Language/12_Statements/03_Variable_Declaration_A04_t07: Fail # Dart issue 7305
Language/12_Statements/04_Local_Function_Declaration_A02_t02: Fail # Dart issue 5773
Language/12_Statements/06_For_A01_t11: Fail # Dart issue 5675
@@ -395,15 +396,6 @@
[ $compiler == none && $runtime == vm && $mode == debug ]
LibTest/isolate/isolate_api/spawnFunction_A02_t01: Crash
-[ $compiler == none && $arch == simarm ]
-*: Skip
-
-[ $compiler == none && $arch == arm ]
-*: Skip
-
-
-# Dart bug 6719
-# Fail due to Future being in dart:async now
[ $compiler == none && $runtime == vm ]
LibTest/core/Completer/Completer_A01_t01: Fail # Future is in async library. co19 issue 367
LibTest/core/Completer/completeException_A01_t01: Fail # Future is in async library. co19 issue 367
@@ -468,8 +460,64 @@
LibTest/core/Futures/wait_A02_t01: Fail # Future is in async library. co19 issue 367
LibTest/core/Futures/wait_A02_t02: Fail # Future is in async library. co19 issue 367
+LibTest/core/Expect/setEquals_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Expect/setEquals_A01_t02: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/HashMap/HashMap.from_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/HashMap/HashMap_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/HashSet/HashSet.from_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/HashSet/HashSet_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/LinkedHashMap/LinkedHashMap.from_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/LinkedHashMap/LinkedHashMap_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/List/List.from_A02_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/List/addAll_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/Queue.from_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/Queue_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/addAll_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/addAll_A01_t02: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/addFirst_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/addFirst_A01_t02: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/addLast_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/addLast_A01_t02: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/add_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/add_A01_t02: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/clear_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/every_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/every_A01_t02: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/every_A01_t03: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/every_A01_t04: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/every_A01_t05: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/first_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/first_A02_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/forEach_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/forEach_A01_t02: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/forEach_A01_t03: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/forEach_A01_t05: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/isEmpty_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/last_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/last_A02_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/length_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/removeFirst_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/removeFirst_A02_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/removeLast_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Queue/removeLast_A02_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+LibTest/core/Set/Set.from_A01_t01: Fail # Moved collection classes from core to collection. co19 issue 371.
+
[ $compiler == none && $runtime == vm && $unchecked ]
LibTest/core/Future/chain_A02_t05: Fail # Future is in async library. co19 issue 367
LibTest/core/Future/transform_A02_t04: Fail # Future is in async library. co19 issue 367
+
[ $compiler == none && $runtime == vm && $checked ]
LibTest/isolate/SendPort/call_A01_t01: Fail # Future is in async library. co19 issue 367
+Language/14_Types/4_Interface_Types_A08_t06: Fail # Moved collection classes from core to collection. co19 issue 371.
+
+[ $compiler == none && $arch == simarm ]
+*: Skip
+
+[ $compiler == none && $arch == arm ]
+*: Skip
+
+[ $compiler == none && $arch == simmips ]
+*: Skip
+
+[ $compiler == none && $arch == mips ]
+*: Skip
diff --git a/tests/compiler/dart2js/analyze_api_test.dart b/tests/compiler/dart2js/analyze_api_test.dart
new file mode 100644
index 0000000..0162524
--- /dev/null
+++ b/tests/compiler/dart2js/analyze_api_test.dart
@@ -0,0 +1,56 @@
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library analyze_api;
+
+import 'dart:uri';
+import 'dart:io';
+import '../../../sdk/lib/_internal/compiler/compiler.dart' as api;
+import '../../../sdk/lib/_internal/compiler/implementation/apiimpl.dart';
+import '../../../sdk/lib/_internal/compiler/implementation/dart2jslib.dart'
+ hide Compiler;
+import '../../../sdk/lib/_internal/compiler/implementation/filenames.dart';
+import '../../../sdk/lib/_internal/compiler/implementation/source_file_provider.dart';
+import '../../../sdk/lib/_internal/libraries.dart';
+
+class CollectingDiagnosticHandler extends FormattingDiagnosticHandler {
+ bool hasWarnings = false;
+ bool hasErrors = false;
+
+ CollectingDiagnosticHandler(SourceFileProvider provider) : super(provider);
+
+ void diagnosticHandler(Uri uri, int begin, int end, String message,
+ api.Diagnostic kind) {
+ if (kind == api.Diagnostic.WARNING) {
+ hasWarnings = true;
+ }
+ if (kind == api.Diagnostic.ERROR) {
+ hasErrors = true;
+ }
+ super.diagnosticHandler(uri, begin, end, message, kind);
+ }
+}
+
+void main() {
+ Uri currentWorkingDirectory = getCurrentDirectory();
+ var libraryRoot = currentWorkingDirectory.resolve('sdk/');
+ var uriList = new List<Uri>();
+ LIBRARIES.forEach((String name, LibraryInfo info) {
+ if (info.documented) {
+ uriList.add(new Uri.fromComponents(scheme: 'dart', path: name));
+ }
+ });
+ var provider = new SourceFileProvider();
+ var handler = new CollectingDiagnosticHandler(provider);
+ var compiler = new Compiler(
+ provider.readStringFromUri,
+ handler.diagnosticHandler,
+ libraryRoot, libraryRoot,
+ <String>['--analyze-only', '--analyze-all',
+ '--categories=Client,Server']);
+ compiler.librariesToAnalyzeWhenRun = uriList;
+ compiler.run(null);
+ Expect.isFalse(handler.hasWarnings);
+ Expect.isFalse(handler.hasErrors);
+}
diff --git a/tests/compiler/dart2js/analyze_only_test.dart b/tests/compiler/dart2js/analyze_only_test.dart
new file mode 100644
index 0000000..f17aed4
--- /dev/null
+++ b/tests/compiler/dart2js/analyze_only_test.dart
@@ -0,0 +1,129 @@
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Smoke test of the dart2js compiler API.
+library analyze_only;
+
+import 'dart:async';
+import 'dart:uri';
+
+import '../../utils/dummy_compiler_test.dart' as dummy;
+import '../../../sdk/lib/_internal/compiler/compiler.dart';
+
+runCompiler(String main, List<String> options,
+ onValue(String code, List errors, List warnings)) {
+ List errors = new List();
+ List warnings = new List();
+
+ Future<String> localProvider(Uri uri) {
+ if (uri.scheme != 'main') return dummy.provider(uri);
+ return new Future<String>.immediate(main);
+ }
+
+ void localHandler(Uri uri, int begin, int end,
+ String message, Diagnostic kind) {
+ dummy.handler(uri, begin, end, message, kind);
+ if (kind == Diagnostic.ERROR) {
+ errors.add(message);
+ } else if (kind == Diagnostic.WARNING) {
+ warnings.add(message);
+ }
+ }
+
+ print('-----------------------------------------------');
+ print('main source:\n$main');
+ print('options: $options\n');
+ Future<String> result =
+ compile(new Uri.fromComponents(scheme: 'main'),
+ new Uri.fromComponents(scheme: 'lib', path: '/'),
+ new Uri.fromComponents(scheme: 'package', path: '/'),
+ localProvider, localHandler, options);
+ result.then((String code) {
+ onValue(code, errors, warnings);
+ }, onError: (AsyncError e) {
+ throw 'Compilation failed';
+ });
+}
+
+main() {
+ runCompiler(
+ "",
+ [],
+ (String code, List errors, List warnings) {
+ Expect.isNull(code);
+ Expect.equals(1, errors.length);
+ Expect.equals('Could not find main', errors[0].toString());
+ Expect.isTrue(warnings.isEmpty);
+ });
+
+ runCompiler(
+ "main() {}",
+ [],
+ (String code, List errors, List warnings) {
+ Expect.isNotNull(code);
+ Expect.isTrue(errors.isEmpty);
+ Expect.isTrue(warnings.isEmpty);
+ });
+
+ runCompiler(
+ "",
+ ['--analyze-only'],
+ (String code, List errors, List warnings) {
+ Expect.isNull(code);
+ Expect.equals(1, errors.length);
+ Expect.isTrue(errors[0].toString().startsWith('Could not find main'));
+ Expect.isTrue(warnings.isEmpty);
+ });
+
+ runCompiler(
+ "main() {}",
+ ['--analyze-only'],
+ (String code, List errors, List warnings) {
+ Expect.isNull(code);
+ Expect.isTrue(errors.isEmpty);
+ Expect.isTrue(warnings.isEmpty);
+ });
+
+ runCompiler(
+ "Foo foo; // Unresolved but not analyzed.",
+ ['--analyze-only'],
+ (String code, List errors, List warnings) {
+ Expect.isNull(code);
+ Expect.equals(1, errors.length);
+ Expect.isTrue(errors[0].toString().startsWith('Could not find main'));
+ Expect.isTrue(warnings.isEmpty);
+ });
+
+ runCompiler(
+ """main() {
+ Foo foo; // Unresolved and analyzed.
+ }""",
+ ['--analyze-only'],
+ (String code, List errors, List warnings) {
+ Expect.isNull(code);
+ Expect.isTrue(errors.isEmpty);
+ Expect.equals(1, warnings.length);
+ Expect.equals('Warning: cannot resolve type Foo', warnings[0].toString());
+ });
+
+ runCompiler(
+ "Foo foo; // Unresolved and analyzed.",
+ ['--analyze-only', '--analyze-all'],
+ (String code, List errors, List warnings) {
+ Expect.isNull(code);
+ Expect.isTrue(errors.isEmpty);
+ Expect.equals('Warning: cannot resolve type Foo', warnings[0].toString());
+ });
+
+ runCompiler(
+ """Foo foo; // Unresolved and analyzed.
+ main() {}""",
+ ['--analyze-only', '--analyze-all'],
+ (String code, List errors, List warnings) {
+ Expect.isNull(code);
+ Expect.isTrue(errors.isEmpty);
+ Expect.equals(1, warnings.length);
+ Expect.equals('Warning: cannot resolve type Foo', warnings[0].toString());
+ });
+}
diff --git a/tests/compiler/dart2js/class_order_test.dart b/tests/compiler/dart2js/class_order_test.dart
index 49ca432..fcdf17a 100644
--- a/tests/compiler/dart2js/class_order_test.dart
+++ b/tests/compiler/dart2js/class_order_test.dart
@@ -35,7 +35,6 @@
RegExp regexp = new RegExp(r"foo\$0?:(.|\n)*bar\$0:(.|\n)*gee\$0:");
String generated = compileAll(TEST_ONE);
- print(generated);
Expect.isTrue(regexp.hasMatch(generated));
generated = compileAll(TEST_TWO);
diff --git a/tests/compiler/dart2js/cpa_inference_test.dart b/tests/compiler/dart2js/cpa_inference_test.dart
index 5d4ffff..ae90593 100644
--- a/tests/compiler/dart2js/cpa_inference_test.dart
+++ b/tests/compiler/dart2js/cpa_inference_test.dart
@@ -158,7 +158,11 @@
class String {}
class Object {}
class Function {}
- abstract class List {}
+ abstract class List<E> {
+ factory List([int length]);
+ E operator [](int index);
+ void operator []=(int index, E value);
+ }
abstract class Map {}
class Closure {}
class Null {}
@@ -890,7 +894,7 @@
result.checkNodeHasType('bar', [result.bool]);
result.checkNodeHasType('baz', []);
// TODO(polux): the following result should be [:[null, string]:], see
- // fieldInitialization().
+ // testFieldInitialization().
result.checkFieldHasType('A', 'witness', [result.string]);
}
@@ -909,6 +913,48 @@
result.checkFieldHasType('A', 'y', [result.int]);
}
+testLists() {
+ final String source = r"""
+ main() {
+ new List();
+ var l1 = [1.2];
+ var l2 = [];
+ l1['a'] = 42; // raises an error, so int should not be recorded
+ l1[1] = 'abc';
+ "__dynamic_for_test"[1] = true;
+ var x = l1[1];
+ var y = l2[1];
+ var z = l1['foo'];
+ x; y; z;
+ }""";
+ AnalysisResult result = analyze(source);
+ result.checkNodeHasType('x', [result.double, result.string, result.bool]);
+ result.checkNodeHasType('y', [result.double, result.string, result.bool]);
+ result.checkNodeHasType('z', []);
+}
+
+testListWithCapacity() {
+ final String source = r"""
+ main() {
+ var l = new List(10);
+ var x = l[0];
+ x;
+ }""";
+ AnalysisResult result = analyze(source);
+ result.checkNodeHasType('x', [result.nullType]);
+}
+
+testEmptyList() {
+ final String source = r"""
+ main() {
+ var l = new List();
+ var x = l[0];
+ x;
+ }""";
+ AnalysisResult result = analyze(source);
+ result.checkNodeHasType('x', []);
+}
+
testSendWithWrongArity() {
final String source = r"""
f(x) { }
@@ -1014,4 +1060,7 @@
testBigTypesWidening1();
testBigTypesWidening2();
testDynamicIsAbsorbing();
+ testLists();
+ testListWithCapacity();
+ testEmptyList();
}
diff --git a/tests/compiler/dart2js/dart2js.status b/tests/compiler/dart2js/dart2js.status
index 0df75ab..498e3ee 100644
--- a/tests/compiler/dart2js/dart2js.status
+++ b/tests/compiler/dart2js/dart2js.status
@@ -5,6 +5,7 @@
identity_test: Fail # Issue 6638
constant_folding_string_test: Fail
tree_shaking_test: Fail # Issue 4811
+boolified_operator_test: Fail # Issue 8001
[ $checked ]
field_type_inferer_test: Slow, Pass # Issue 6658.
diff --git a/tests/compiler/dart2js/dart_backend_test.dart b/tests/compiler/dart2js/dart_backend_test.dart
index ebaf7f3..08c9e6a 100644
--- a/tests/compiler/dart2js/dart_backend_test.dart
+++ b/tests/compiler/dart2js/dart_backend_test.dart
@@ -118,6 +118,8 @@
}
final options = <String>['--output-type=dart'];
+ // Some tests below are using dart:io.
+ options.add('--categories=Client,Server');
if (minify) options.add('--minify');
if (stripTypes) options.add('--force-strip=types');
diff --git a/tests/compiler/dart2js/gvn_test.dart b/tests/compiler/dart2js/gvn_test.dart
index 34d9d89..59e5904 100644
--- a/tests/compiler/dart2js/gvn_test.dart
+++ b/tests/compiler/dart2js/gvn_test.dart
@@ -13,10 +13,44 @@
}
""";
+// Check that modulo does not have any side effect and we are
+// GVN'ing the length of [:list:].
+const String TEST_TWO = r"""
+void foo(a) {
+ var list = new List<int>();
+ list[0] = list[0 % a];
+ list[1] = list[1 % a];
+}
+""";
+
+// Check that is checks get GVN'ed.
+const String TEST_THREE = r"""
+void foo(a) {
+ print(a is num);
+ print(a is num);
+}
+""";
+
+// Check that instructions that don't have a builtin equivalent can
+// still be GVN'ed.
+const String TEST_FOUR = r"""
+void foo(a) {
+ print(1 >> a);
+ print(1 >> a);
+}
+""";
+
main() {
String generated = compile(TEST_ONE, entry: 'foo');
RegExp regexp = new RegExp(r"1 \+ [a-z]+");
- Iterator matches = regexp.allMatches(generated).iterator;
- Expect.isTrue(matches.moveNext());
- Expect.isFalse(matches.moveNext());
+ checkNumberOfMatches(regexp.allMatches(generated).iterator, 1);
+
+ generated = compile(TEST_TWO, entry: 'foo');
+ checkNumberOfMatches(new RegExp("length").allMatches(generated).iterator, 1);
+
+ generated = compile(TEST_THREE, entry: 'foo');
+ checkNumberOfMatches(new RegExp("number").allMatches(generated).iterator, 1);
+
+ generated = compile(TEST_FOUR, entry: 'foo');
+ checkNumberOfMatches(new RegExp("shr").allMatches(generated).iterator, 1);
}
diff --git a/tests/compiler/dart2js/interceptor_test.dart b/tests/compiler/dart2js/interceptor_test.dart
new file mode 100644
index 0000000..29a8a0d
--- /dev/null
+++ b/tests/compiler/dart2js/interceptor_test.dart
@@ -0,0 +1,22 @@
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'compiler_helper.dart';
+
+const String TEST_ONE = r"""
+ foo(a) {
+ // Make sure there is a bailout version.
+ foo(a);
+ // This will make a one shot interceptor that will be optimized in
+ // the non-bailout version because we know a is a number.
+ return (a + 42).toString;
+ }
+""";
+
+main() {
+ var generated = compile(TEST_ONE, entry: 'foo');
+ // Check that the one shot interceptor got converted to a direct
+ // call to the interceptor object.
+ Expect.isTrue(generated.contains('CONSTANT.get\$toString(a + 42);'));
+}
diff --git a/tests/compiler/dart2js/minify_many_locals_test.dart b/tests/compiler/dart2js/minify_many_locals_test.dart
index 510d46f..98260b9 100644
--- a/tests/compiler/dart2js/minify_many_locals_test.dart
+++ b/tests/compiler/dart2js/minify_many_locals_test.dart
@@ -20,8 +20,7 @@
RegExp re = new RegExp(r"\(a,b,c");
Expect.isTrue(re.hasMatch(generated));
- // 'z' will be used as a local.
- re = new RegExp(r"x,y,A,B,C");
+ re = new RegExp(r"x,y,z,A,B,C");
Expect.isTrue(re.hasMatch(generated));
re = new RegExp(r"Y,Z,a0,a1,a2,a3,a4,a5,a6");
diff --git a/tests/compiler/dart2js/mock_compiler.dart b/tests/compiler/dart2js/mock_compiler.dart
index bb71b40..cd1bd89 100644
--- a/tests/compiler/dart2js/mock_compiler.dart
+++ b/tests/compiler/dart2js/mock_compiler.dart
@@ -4,6 +4,7 @@
library mock_compiler;
+import 'dart:collection';
import 'dart:uri';
import '../../../sdk/lib/_internal/compiler/compiler.dart' as api;
@@ -31,18 +32,12 @@
}
const String DEFAULT_HELPERLIB = r'''
- lt() {} add(var a, var b) {} sub() {} mul() {} div() {} tdiv() {} mod() {}
- neg() {} shl() {} shr() {} eq() {} le() {} gt() {} ge() {}
- or() {} and() {} not() {} eqNull(a) {} eqq() {}
- ltB() {} leB() {} eqB() {} gtB() {} geB() {} eqNullB(a) {}
$throw(x) { return x; }
iae(x) { throw x; } ioore(x) { throw x; }
guard$array(x) { return x; }
guard$num(x) { return x; }
guard$string(x) { return x; }
guard$stringOrArray(x) { return x; }
- index(a, index) {}
- indexSet(a, index, value) {}
makeLiteralMap(List keyValuePairs) {}
setRuntimeTypeInfo(a, b) {}
getRuntimeTypeInfo(a) {}
@@ -52,7 +47,8 @@
class JSInvocationMirror {}
S() {}
assertHelper(a){}
- throwNoSuchMethod(obj, name, arguments, expectedArgumentNames) {}''';
+ throwNoSuchMethod(obj, name, arguments, expectedArgumentNames) {}
+ throwAbstractClassInstantiationError(className) {}''';
const String DEFAULT_INTERCEPTORSLIB = r'''
class JSArray {
@@ -77,6 +73,12 @@
operator |(other) {}
operator &(other) {}
operator ^(other) {}
+ operator >(other) {}
+ operator >=(other) {}
+ operator <(other) {}
+ operator <=(other) {}
+ operator ==(other) {}
+ operator %(other) {}
}
class JSInt {
}
@@ -99,7 +101,10 @@
abstract class double extends num { }
class bool {}
class String {}
- class Object {}
+ class Object {
+ operator ==(other) {}
+ String toString() {}
+ }
class Type {}
class Function {}
class List<E> {}
@@ -257,10 +262,13 @@
scanner.importLibrary(library, coreLibrary, null);
}
+ Uri translateResolvedUri(LibraryElement importingLibrary,
+ Uri resolvedUri, Node node) => resolvedUri;
+
// The mock library doesn't need any patches.
Uri resolvePatchUri(String dartLibraryName) => null;
- Script readScript(Uri uri, [ScriptTag node]) {
+ Script readScript(Uri uri, [Node node]) {
SourceFile sourceFile = sourceFiles[uri.toString()];
if (sourceFile == null) throw new ArgumentError(uri);
return new Script(uri, sourceFile);
diff --git a/tests/compiler/dart2js/part_of_test.dart b/tests/compiler/dart2js/part_of_test.dart
new file mode 100644
index 0000000..54c0bc9
--- /dev/null
+++ b/tests/compiler/dart2js/part_of_test.dart
@@ -0,0 +1,37 @@
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library part_of_test;
+
+import 'dart:uri';
+import 'mock_compiler.dart';
+import '../../../sdk/lib/_internal/compiler/implementation/dart2jslib.dart'
+ show MessageKind;
+
+final libraryUri = new Uri('test:library.dart');
+const String LIBRARY_SOURCE = '''
+library foo;
+part 'part.dart';
+''';
+
+final partUri = new Uri('test:part.dart');
+const String PART_SOURCE = '''
+part of bar;
+''';
+
+void main() {
+ var compiler = new MockCompiler();
+ compiler.registerSource(libraryUri, LIBRARY_SOURCE);
+ compiler.registerSource(partUri, PART_SOURCE);
+
+ compiler.libraryLoader.loadLibrary(libraryUri, null, libraryUri);
+ print('errors: ${compiler.errors}');
+ print('warnings: ${compiler.warnings}');
+ Expect.isTrue(compiler.errors.isEmpty);
+ Expect.equals(1, compiler.warnings.length);
+ Expect.equals(MessageKind.LIBRARY_NAME_MISMATCH,
+ compiler.warnings[0].message.kind);
+ Expect.equals("${MessageKind.LIBRARY_NAME_MISMATCH.error(['foo'])}",
+ compiler.warnings[0].message.toString());
+}
diff --git a/tests/compiler/dart2js/pretty_parameter_test.dart b/tests/compiler/dart2js/pretty_parameter_test.dart
index 17daab1..82309e6 100644
--- a/tests/compiler/dart2js/pretty_parameter_test.dart
+++ b/tests/compiler/dart2js/pretty_parameter_test.dart
@@ -72,7 +72,7 @@
Expect.isTrue(generated.contains(r"function(a, b) {"));
generated = compile(BAR, entry: 'bar');
- Expect.isTrue(generated.contains(r"function(eval$, $$eval) {"));
+ Expect.isTrue(generated.contains(r"function(eval, $$eval) {"));
generated = compile(PARAMETER_AND_TEMP, entry: 'bar');
Expect.isTrue(generated.contains(r"print(t00)"));
diff --git a/tests/compiler/dart2js/resolver_test.dart b/tests/compiler/dart2js/resolver_test.dart
index 61d12cf..fbe3db2 100644
--- a/tests/compiler/dart2js/resolver_test.dart
+++ b/tests/compiler/dart2js/resolver_test.dart
@@ -2,6 +2,7 @@
// 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.
+import 'dart:collection';
import 'dart:uri';
import "../../../sdk/lib/_internal/compiler/implementation/resolution/resolution.dart";
diff --git a/tests/compiler/dart2js/type_substitution_test.dart b/tests/compiler/dart2js/type_substitution_test.dart
index 8c841cc..fb32d7e 100644
--- a/tests/compiler/dart2js/type_substitution_test.dart
+++ b/tests/compiler/dart2js/type_substitution_test.dart
@@ -12,13 +12,17 @@
import "parser_helper.dart";
import "dart:uri";
-DartType getElementType(compiler, String name) {
+Element getElement(compiler, String name) {
var element = findElement(compiler, name);
Expect.isNotNull(element);
if (identical(element.kind, ElementKind.CLASS)) {
element.ensureResolved(compiler);
}
- return element.computeType(compiler);
+ return element;
+}
+
+DartType getElementType(compiler, String name) {
+ return getElement(compiler, name).computeType(compiler);
}
DartType getType(compiler, String name) {
@@ -53,22 +57,72 @@
return count;
}
+void main() {
+ testAsInstanceOf();
+ testTypeSubstitution();
+}
+
+InterfaceType instantiate(ClassElement element, List<DartType> arguments) {
+ return new InterfaceType(element, new Link<DartType>.fromList(arguments));
+}
+
+void testAsInstanceOf() {
+ var uri = new Uri.fromComponents(scheme: 'source');
+ Compiler compiler = compilerFor('''
+ main() {}
+ class A<T> {}
+ class B<T> {}
+ class C<T> extends A<T> {}
+ class D<T> extends A<int> {}
+ class E<T> extends A<A<T>> {}
+ class F<T, U> extends B<F<T, String>> implements A<F<B<U>, int>> {}''',
+ uri);
+ compiler.runCompiler(uri);
+
+ ClassElement A = getElement(compiler, "A");
+ ClassElement B = getElement(compiler, "B");
+ ClassElement C = getElement(compiler, "C");
+ ClassElement D = getElement(compiler, "D");
+ ClassElement E = getElement(compiler, "E");
+ ClassElement F = getElement(compiler, "F");
+
+ DartType numType = compiler.numClass.computeType(compiler);
+ DartType intType = compiler.intClass.computeType(compiler);
+ DartType stringType = compiler.stringClass.computeType(compiler);
+
+ DartType C_int = instantiate(C, [intType]);
+ Expect.equals(instantiate(C, [intType]), C_int);
+ Expect.equals(instantiate(A, [intType]), C_int.asInstanceOf(A));
+
+ DartType D_int = instantiate(D, [stringType]);
+ Expect.equals(instantiate(A, [intType]), D_int.asInstanceOf(A));
+
+ DartType E_int = instantiate(E, [intType]);
+ Expect.equals(instantiate(A, [instantiate(A, [intType])]),
+ E_int.asInstanceOf(A));
+
+ DartType F_int_string = instantiate(F, [intType, stringType]);
+ Expect.equals(instantiate(B, [instantiate(F, [intType, stringType])]),
+ F_int_string.asInstanceOf(B));
+ Expect.equals(instantiate(A, [instantiate(F, [instantiate(B, [stringType]),
+ intType])]),
+ F_int_string.asInstanceOf(A));
+}
+
/**
* Test that substitution of [parameters] by [arguments] in the type found
* through [name1] is the same as the type found through [name2].
*/
-bool test(compiler, arguments, parameters,
+bool testSubstitution(compiler, arguments, parameters,
String name1, String name2) {
DartType type1 = getType(compiler, name1);
DartType type2 = getType(compiler, name2);
DartType subst = type1.subst(arguments, parameters);
- print('$type1.subst($arguments,$parameters)=$subst');
Expect.equals(type2, subst,
"$type1.subst($arguments,$parameters)=$subst != $type2");
}
-
-void main() {
+void testTypeSubstitution() {
var uri = new Uri.fromComponents(scheme: 'source');
var compiler = compilerFor(
r"""
@@ -156,28 +210,31 @@
// TODO(johnniwinther): Create types directly from strings to improve test
// readability.
- test(compiler, arguments, parameters, "void1", "void2");
- test(compiler, arguments, parameters, "dynamic1", "dynamic2");
- test(compiler, arguments, parameters, "int1", "int2");
- test(compiler, arguments, parameters, "String1", "String2");
- test(compiler, arguments, parameters, "ListInt1", "ListInt2");
- test(compiler, arguments, parameters, "ListT1", "ListT2");
- test(compiler, arguments, parameters, "ListS1", "ListS2");
- test(compiler, arguments, parameters, "ListListT1", "ListListT2");
- test(compiler, arguments, parameters, "ListRaw1", "ListRaw2");
- test(compiler, arguments, parameters, "ListDynamic1", "ListDynamic2");
- test(compiler, arguments, parameters, "MapIntString1", "MapIntString2");
- test(compiler, arguments, parameters, "MapTString1", "MapTString2");
- test(compiler, arguments, parameters,
- "MapDynamicString1", "MapDynamicString2");
- test(compiler, arguments, parameters, "TypeVarT1", "TypeVarT2");
- test(compiler, arguments, parameters, "TypeVarS1", "TypeVarS2");
- test(compiler, arguments, parameters, "Function1a", "Function2a");
- test(compiler, arguments, parameters, "Function1b", "Function2b");
- test(compiler, arguments, parameters, "Function1c", "Function2c");
- test(compiler, arguments, parameters, "Typedef1a", "Typedef2a");
- test(compiler, arguments, parameters, "Typedef1b", "Typedef2b");
- test(compiler, arguments, parameters, "Typedef1c", "Typedef2c");
- test(compiler, arguments, parameters, "Typedef1d", "Typedef2d");
- test(compiler, arguments, parameters, "Typedef1e", "Typedef2e");
+ testSubstitution(compiler, arguments, parameters, "void1", "void2");
+ testSubstitution(compiler, arguments, parameters, "dynamic1", "dynamic2");
+ testSubstitution(compiler, arguments, parameters, "int1", "int2");
+ testSubstitution(compiler, arguments, parameters, "String1", "String2");
+ testSubstitution(compiler, arguments, parameters, "ListInt1", "ListInt2");
+ testSubstitution(compiler, arguments, parameters, "ListT1", "ListT2");
+ testSubstitution(compiler, arguments, parameters, "ListS1", "ListS2");
+ testSubstitution(compiler, arguments, parameters, "ListListT1", "ListListT2");
+ testSubstitution(compiler, arguments, parameters, "ListRaw1", "ListRaw2");
+ testSubstitution(compiler, arguments, parameters,
+ "ListDynamic1", "ListDynamic2");
+ testSubstitution(compiler, arguments, parameters,
+ "MapIntString1", "MapIntString2");
+ testSubstitution(compiler, arguments, parameters,
+ "MapTString1", "MapTString2");
+ testSubstitution(compiler, arguments, parameters,
+ "MapDynamicString1", "MapDynamicString2");
+ testSubstitution(compiler, arguments, parameters, "TypeVarT1", "TypeVarT2");
+ testSubstitution(compiler, arguments, parameters, "TypeVarS1", "TypeVarS2");
+ testSubstitution(compiler, arguments, parameters, "Function1a", "Function2a");
+ testSubstitution(compiler, arguments, parameters, "Function1b", "Function2b");
+ testSubstitution(compiler, arguments, parameters, "Function1c", "Function2c");
+ testSubstitution(compiler, arguments, parameters, "Typedef1a", "Typedef2a");
+ testSubstitution(compiler, arguments, parameters, "Typedef1b", "Typedef2b");
+ testSubstitution(compiler, arguments, parameters, "Typedef1c", "Typedef2c");
+ testSubstitution(compiler, arguments, parameters, "Typedef1d", "Typedef2d");
+ testSubstitution(compiler, arguments, parameters, "Typedef1e", "Typedef2e");
}
diff --git a/tests/compiler/dart2js/uri_extras_test.dart b/tests/compiler/dart2js/uri_extras_test.dart
index 199076a..ed20990 100644
--- a/tests/compiler/dart2js/uri_extras_test.dart
+++ b/tests/compiler/dart2js/uri_extras_test.dart
@@ -16,23 +16,23 @@
}
String r;
- r = relativize(new Uri.fromString('file:$base'),
- new Uri.fromString('file:$path'),
+ r = relativize(Uri.parse('file:$base'),
+ Uri.parse('file:$path'),
isWindows);
Expect.stringEquals(expected, r);
- r = relativize(new Uri.fromString('FILE:$base'),
- new Uri.fromString('FILE:$path'),
+ r = relativize(Uri.parse('FILE:$base'),
+ Uri.parse('FILE:$path'),
isWindows);
Expect.stringEquals(expected, r);
- r = relativize(new Uri.fromString('file:$base'),
- new Uri.fromString('FILE:$path'),
+ r = relativize(Uri.parse('file:$base'),
+ Uri.parse('FILE:$path'),
isWindows);
Expect.stringEquals(expected, r);
- r = relativize(new Uri.fromString('FILE:$base'),
- new Uri.fromString('file:$path'),
+ r = relativize(Uri.parse('FILE:$base'),
+ Uri.parse('file:$path'),
isWindows);
Expect.stringEquals(expected, r);
}
diff --git a/tests/compiler/dart2js/value_range_test.dart b/tests/compiler/dart2js/value_range_test.dart
index 03f91f7..fdf0b6b 100644
--- a/tests/compiler/dart2js/value_range_test.dart
+++ b/tests/compiler/dart2js/value_range_test.dart
@@ -241,10 +241,15 @@
operator |(other) {}
operator &(other) {}
operator ^(other) {}
+ operator <(other) {}
+ operator >(other) {}
+ operator <=(other) {}
+ operator >=(other) {}
+ operator ==(other) {}
}
- class JSInt {
+ class JSInt extends JSNumber {
}
- class JSDouble {
+ class JSDouble extends JSNumber {
}
class JSNull {
}
diff --git a/tests/compiler/dart2js_extra/dart2js_extra.status b/tests/compiler/dart2js_extra/dart2js_extra.status
index 7114712..c5180be 100644
--- a/tests/compiler/dart2js_extra/dart2js_extra.status
+++ b/tests/compiler/dart2js_extra/dart2js_extra.status
@@ -28,6 +28,9 @@
[ $compiler == dart2js && $minified ]
to_string_test: Fail # Issue 7179.
+# Mirrors do not work with minification.
+mirror_test: Fail # Issue 6490.
+
[ $jscl ]
timer_test: Fail # Issue 7728.
diff --git a/tests/compiler/dart2js_extra/mirror_test.dart b/tests/compiler/dart2js_extra/mirror_test.dart
index 2595bf4..0cc6b01 100644
--- a/tests/compiler/dart2js_extra/mirror_test.dart
+++ b/tests/compiler/dart2js_extra/mirror_test.dart
@@ -7,7 +7,7 @@
import 'async_helper.dart';
void test(void onDone(bool success)) {
- var now = new Date.now();
+ var now = new DateTime.now();
InstanceMirror mirror = reflect(now);
print('now: ${now}');
print('mirror.type: ${mirror.type}');
diff --git a/tests/compiler/dart2js_extra/type_argument_factory_crash_test.dart b/tests/compiler/dart2js_extra/type_argument_factory_crash_test.dart
index c357c2d..e49f4d6 100644
--- a/tests/compiler/dart2js_extra/type_argument_factory_crash_test.dart
+++ b/tests/compiler/dart2js_extra/type_argument_factory_crash_test.dart
@@ -3,6 +3,8 @@
// BSD-style license that can be found in the LICENSE file.
// A regression test for a dart2js crash.
+library type.argument.factory.crash.test;
+import 'dart:collection' show LinkedHashMap;
void main() {
// This constructor call causes a crash in dart2js.
diff --git a/tests/compiler/dart2js_extra/type_argument_factory_nocrash_test.dart b/tests/compiler/dart2js_extra/type_argument_factory_nocrash_test.dart
index 3d1f10a..975a067 100644
--- a/tests/compiler/dart2js_extra/type_argument_factory_nocrash_test.dart
+++ b/tests/compiler/dart2js_extra/type_argument_factory_nocrash_test.dart
@@ -3,6 +3,8 @@
// BSD-style license that can be found in the LICENSE file.
// A regression test for a dart2js crash.
+library type.argument.factory.nocrash.test;
+import 'dart:collection' show LinkedHashMap;
void main() {
// This constructor call causes a crash in dart2js.
diff --git a/tests/compiler/dart2js_native/foreign_test.dart b/tests/compiler/dart2js_native/foreign_test.dart
index 3df5343..b9feea9 100644
--- a/tests/compiler/dart2js_native/foreign_test.dart
+++ b/tests/compiler/dart2js_native/foreign_test.dart
@@ -2,6 +2,8 @@
// 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.
+import 'dart:_foreign_helper' show JS;
+
foreign1(var a, var b) {
return JS("num", r"# + #", a, b);
}
diff --git a/tests/compiler/dart2js_native/internal_library_test.dart b/tests/compiler/dart2js_native/internal_library_test.dart
new file mode 100644
index 0000000..d42f826
--- /dev/null
+++ b/tests/compiler/dart2js_native/internal_library_test.dart
@@ -0,0 +1,12 @@
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Test that a private library can be accessed from libraries in this special
+// test folder.
+
+import 'dart:_isolate_helper';
+
+void main() {
+ print(lazyPort);
+}
\ No newline at end of file
diff --git a/tests/compiler/dart2js_native/native_equals_frog_test.dart b/tests/compiler/dart2js_native/native_equals_frog_test.dart
new file mode 100644
index 0000000..bc38935
--- /dev/null
+++ b/tests/compiler/dart2js_native/native_equals_frog_test.dart
@@ -0,0 +1,22 @@
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+class A native "*A" {}
+makeA() native;
+
+void setup() native """
+function A() {}
+makeA = function(){return new A;};
+""";
+
+
+main() {
+ setup();
+ var a = makeA();
+ Expect.isTrue(a == a);
+ Expect.isTrue(identical(a, a));
+
+ Expect.isFalse(a == makeA());
+ Expect.isFalse(identical(a, makeA()));
+}
diff --git a/tests/compiler/dart2js_native/native_field_rename_1_frog_test.dart b/tests/compiler/dart2js_native/native_field_rename_1_frog_test.dart
index 317ce35..4d70d50 100644
--- a/tests/compiler/dart2js_native/native_field_rename_1_frog_test.dart
+++ b/tests/compiler/dart2js_native/native_field_rename_1_frog_test.dart
@@ -6,6 +6,8 @@
// fields. However, native fields keep their name. The implication: a getter
// for the field must be based on the field's name, not the field's jsname.
+import 'dart:_js_helper' show JSName;
+
class A native "*A" {
int key; // jsname is 'key'
int getKey() => key;
diff --git a/tests/compiler/dart2js_native/native_field_rename_2_frog_test.dart b/tests/compiler/dart2js_native/native_field_rename_2_frog_test.dart
index edbc3b3..4b27c16 100644
--- a/tests/compiler/dart2js_native/native_field_rename_2_frog_test.dart
+++ b/tests/compiler/dart2js_native/native_field_rename_2_frog_test.dart
@@ -6,6 +6,8 @@
// fields. However, native fields keep their name. The implication: a getter
// for the field must be based on the field's name, not the field's jsname.
+import 'dart:_js_helper' show JSName;
+
interface I {
int key;
}
diff --git a/tests/compiler/dart2js_native/native_method_rename1_frog_test.dart b/tests/compiler/dart2js_native/native_method_rename1_frog_test.dart
index a4add4c..93724f4 100644
--- a/tests/compiler/dart2js_native/native_method_rename1_frog_test.dart
+++ b/tests/compiler/dart2js_native/native_method_rename1_frog_test.dart
@@ -4,6 +4,8 @@
// Test the feature where the native string declares the native method's name.
+import 'dart:_js_helper' show JSName;
+
class A native "*A" {
@JSName('fooA')
int foo() native;
diff --git a/tests/compiler/dart2js_native/native_method_rename2_frog_test.dart b/tests/compiler/dart2js_native/native_method_rename2_frog_test.dart
index c030c7e..c9908b9 100644
--- a/tests/compiler/dart2js_native/native_method_rename2_frog_test.dart
+++ b/tests/compiler/dart2js_native/native_method_rename2_frog_test.dart
@@ -4,6 +4,8 @@
// Test the feature where the native string declares the native method's name.
+import 'dart:_js_helper' show JSName;
+
class A native "*A" {
@JSName('fooA')
int foo() native;
diff --git a/tests/compiler/dart2js_native/native_method_rename3_frog_test.dart b/tests/compiler/dart2js_native/native_method_rename3_frog_test.dart
index 88fc641..10aa736 100644
--- a/tests/compiler/dart2js_native/native_method_rename3_frog_test.dart
+++ b/tests/compiler/dart2js_native/native_method_rename3_frog_test.dart
@@ -5,6 +5,8 @@
// Test the feature where the native string declares the native method's name.
// #3. The name does not get
+import 'dart:_js_helper' show JSName;
+
class A native "*A" {
@JSName('fooA')
int foo() native;
diff --git a/tests/compiler/dart2js_native/native_mixin_test.dart b/tests/compiler/dart2js_native/native_mixin_test.dart
new file mode 100644
index 0000000..197a085
--- /dev/null
+++ b/tests/compiler/dart2js_native/native_mixin_test.dart
@@ -0,0 +1,56 @@
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Test that native classes can use ordinary Dart classes as mixins.
+
+class A native "*A" {
+ foo() => 42;
+ baz() => 99;
+}
+
+class B extends A with M native "*B" {
+ bar() => baz();
+}
+
+class M {
+ foo() => 87;
+ bar() => 101;
+}
+
+A makeA() native;
+B makeB() native;
+
+void setup() native """
+function A() {}
+function B() {}
+makeA = function(){return new A;};
+makeB = function(){return new B;};
+""";
+
+main() {
+ setup();
+ A a = makeA();
+ Expect.equals(42, a.foo());
+ Expect.throws(() => a.bar(), (error) => error is NoSuchMethodError);
+ Expect.equals(99, a.baz());
+ Expect.isTrue(a is A);
+ Expect.isFalse(a is B);
+ Expect.isFalse(a is M);
+
+ B b = makeB();
+ Expect.equals(87, b.foo());
+ Expect.equals(99, b.bar());
+ Expect.equals(99, b.baz());
+ Expect.isTrue(b is A);
+ Expect.isTrue(b is B);
+ Expect.isTrue(b is M);
+
+ M m = new M();
+ Expect.equals(87, m.foo());
+ Expect.equals(101, m.bar());
+ Expect.throws(() => m.baz(), (error) => error is NoSuchMethodError);
+ Expect.isFalse(m is A);
+ Expect.isFalse(m is B);
+ Expect.isTrue(m is M);
+}
diff --git a/tests/compiler/dart2js_native/native_property_frog_test.dart b/tests/compiler/dart2js_native/native_property_frog_test.dart
index ef03e3e..cf076b3 100644
--- a/tests/compiler/dart2js_native/native_property_frog_test.dart
+++ b/tests/compiler/dart2js_native/native_property_frog_test.dart
@@ -4,6 +4,8 @@
// Properties on hidden native classes.
+import 'dart:_foreign_helper' show JS;
+
class A native "*A" {
// Setters and getters should be similar to these methods:
diff --git a/tests/corelib/collection_from_test.dart b/tests/corelib/collection_from_test.dart
index 9996a7c..75dbe71 100644
--- a/tests/corelib/collection_from_test.dart
+++ b/tests/corelib/collection_from_test.dart
@@ -2,6 +2,9 @@
// 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 collection.from.test;
+import 'dart:collection' show Queue;
+
class CollectionFromTest {
static testMain() {
var set = new Set<int>();
diff --git a/tests/corelib/collection_removes_test.dart b/tests/corelib/collection_removes_test.dart
new file mode 100644
index 0000000..738ce72
--- /dev/null
+++ b/tests/corelib/collection_removes_test.dart
@@ -0,0 +1,109 @@
+// 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.
+
+testRemove(Collection base) {
+ int length = base.length;
+ for (int i = 0; i < length; i++) {
+ Expect.isFalse(base.isEmpty);
+ base.remove(base.first);
+ }
+ Expect.isTrue(base.isEmpty);
+}
+
+testRemoveAll(Collection base, Iterable removes) {
+ Set retained = new Set();
+ for (var element in base) {
+ if (!removes.contains(element)) {
+ retained.add(element);
+ }
+ }
+ String name = "$base.removeAll($removes) -> $retained";
+ base.removeAll(removes);
+ for (var value in base) {
+ Expect.isFalse(removes.contains(value), "$name: Found $value");
+ }
+ for (var value in retained) {
+ Expect.isTrue(base.contains(value), "$name: Found $value");
+ }
+}
+
+testRetainAll(Collection base, Iterable retains) {
+ Set retained = new Set();
+ for (var element in base) {
+ if (retains.contains(element)) {
+ retained.add(element);
+ }
+ }
+ String name = "$base.retainAll($retains) -> $retained";
+ base.retainAll(retains);
+ for (var value in base) {
+ Expect.isTrue(retains.contains(value), "$name: Found $value");
+ }
+ for (var value in retained) {
+ Expect.isTrue(base.contains(value), "$name: Found $value");
+ }
+}
+
+testRemoveMatching(Collection base, bool test(value)) {
+ Set retained = new Set();
+ for (var element in base) {
+ if (!test(element)) {
+ retained.add(element);
+ }
+ }
+ String name = "$base.removeMatching(...) -> $retained";
+ base.removeMatching(test);
+ for (var value in base) {
+ Expect.isFalse(test(value), "$name: Found $value");
+ }
+ for (var value in retained) {
+ Expect.isTrue(base.contains(value), "$name: Found $value");
+ }
+}
+
+testRetainMatching(Collection base, bool test(value)) {
+ Set retained = new Set();
+ for (var element in base) {
+ if (test(element)) {
+ retained.add(element);
+ }
+ }
+ String name = "$base.retainMatching(...) -> $retained";
+ base.retainMatching(test);
+ for (var value in base) {
+ Expect.isTrue(test(value), "$name: Found $value");
+ }
+ for (var value in retained) {
+ Expect.isTrue(base.contains(value), "$name: Found $value");
+ }
+}
+
+void main() {
+ var collections = [
+ [], [1], [2], [1, 2], [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
+ [1, 3, 5, 7, 9], [2, 4, 6, 8, 10]
+ ];
+ for (var base in collections) {
+ for (var delta in collections) {
+ testRemove(base.toList());
+ testRemove(base.toSet());
+
+ var deltaSet = delta.toSet();
+ testRemoveAll(base.toList(), delta);
+ testRemoveAll(base.toList(), deltaSet);
+ testRetainAll(base.toList(), delta);
+ testRetainAll(base.toList(), deltaSet);
+ testRemoveMatching(base.toList(), deltaSet.contains);
+ testRetainMatching(base.toList(), (e) => !deltaSet.contains(e));
+
+ testRemoveAll(base.toSet(), delta);
+ testRemoveAll(base.toSet(), deltaSet);
+ testRetainAll(base.toSet(), delta);
+ testRetainAll(base.toSet(), deltaSet);
+ testRemoveMatching(base.toSet(), deltaSet.contains);
+ testRetainMatching(base.toSet(), (e) => !deltaSet.contains(e));
+ }
+ }
+}
+
diff --git a/tests/corelib/collection_test.dart b/tests/corelib/collection_test.dart
index 86d9e03..202b4bb 100644
--- a/tests/corelib/collection_test.dart
+++ b/tests/corelib/collection_test.dart
@@ -2,6 +2,10 @@
// 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 collection_test;
+
+import 'dart:collection' show Queue;
+
class CollectionTest {
CollectionTest(Collection collection) {
testReduce(collection);
diff --git a/tests/corelib/collection_to_string_test.dart b/tests/corelib/collection_to_string_test.dart
index 268f589..694aa0f 100644
--- a/tests/corelib/collection_to_string_test.dart
+++ b/tests/corelib/collection_to_string_test.dart
@@ -7,6 +7,8 @@
*/
library collection_to_string;
+
+import 'dart:collection' show Queue, LinkedHashMap;
import 'dart:math' as Math;
// TODO(jjb): seed random number generator when API allows it
diff --git a/tests/corelib/core_runtime_types_test.dart b/tests/corelib/core_runtime_types_test.dart
index b68a1ff..728adb4 100644
--- a/tests/corelib/core_runtime_types_test.dart
+++ b/tests/corelib/core_runtime_types_test.dart
@@ -253,11 +253,11 @@
static testDateMethods() {
var msec = 115201000;
- var d = new Date.fromMillisecondsSinceEpoch(msec, isUtc: true);
+ var d = new DateTime.fromMillisecondsSinceEpoch(msec, isUtc: true);
assertEquals(d.second, 1);
assertEquals(d.year, 1970);
- d = new Date.now();
+ d = new DateTime.now();
assertEquals(d.year >= 2011, true);
}
diff --git a/tests/corelib/corelib.status b/tests/corelib/corelib.status
index 6bc7e3e..0e5f59b 100644
--- a/tests/corelib/corelib.status
+++ b/tests/corelib/corelib.status
@@ -30,12 +30,6 @@
[ $runtime == vm ]
string_trim_unicode_test: Fail # Bug 6569
-[ $arch == simarm ]
-*: Skip
-
-[ $arch == arm ]
-*: Skip
-
[ $compiler == dart2js ]
math_parse_double_test: Fail # Expect.equals(expected: <78187493520>, actual: <0>)
math_test: Fail # issue 3333
@@ -76,3 +70,15 @@
# Tests fail due to bug in generics on constants, issue 6827
iterable_to_list_test: Fail
iterable_to_set_test: Fail
+
+[ $arch == arm ]
+*: Skip
+
+[ $arch == simarm ]
+*: Skip
+
+[ $arch == mips ]
+*: Skip
+
+[ $arch == simmips ]
+*: Skip
diff --git a/tests/corelib/date_time2_test.dart b/tests/corelib/date_time2_test.dart
index 2004987..f179e4d 100644
--- a/tests/corelib/date_time2_test.dart
+++ b/tests/corelib/date_time2_test.dart
@@ -2,13 +2,13 @@
// 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.
-// Dart test program for Date's hashCode.
+// Dart test program for DateTime's hashCode.
main() {
- var d = new Date.fromString("2000-01-01T00:00:00Z");
- var d2 = new Date.fromString("2000-01-01T00:00:01Z");
+ var d = DateTime.parse("2000-01-01T00:00:00Z");
+ var d2 = DateTime.parse("2000-01-01T00:00:01Z");
// There is no guarantee that the hashcode for these two dates is different,
// but in the worst case we will have to fix this test.
- // The important test here is, that Date .
+ // The important test here is, that DateTime .
Expect.isFalse(d.hashCode == d2.hashCode);
}
diff --git a/tests/corelib/date_time3_test.dart b/tests/corelib/date_time3_test.dart
index f16930f..c61363f 100644
--- a/tests/corelib/date_time3_test.dart
+++ b/tests/corelib/date_time3_test.dart
@@ -7,6 +7,6 @@
main() {
String s = "2012-01-30 08:30:00.010";
- Date d = new Date.fromString(s);
+ DateTime d = DateTime.parse(s);
Expect.equals(s, d.toString());
}
diff --git a/tests/corelib/date_time4_test.dart b/tests/corelib/date_time4_test.dart
index 261111f..d536037 100644
--- a/tests/corelib/date_time4_test.dart
+++ b/tests/corelib/date_time4_test.dart
@@ -9,7 +9,7 @@
// here), we round.
// If (eventually) we support more than just milliseconds this test could
// fail. Please update the test in this case.
- Date dt1 = new Date.fromString("1999-01-02 23:59:59.999519");
+ DateTime dt1 = DateTime.parse("1999-01-02 23:59:59.999519");
Expect.equals(1999, dt1.year);
Expect.equals(1, dt1.month);
Expect.equals(3, dt1.day);
@@ -18,7 +18,7 @@
Expect.equals(0, dt1.second);
Expect.equals(0, dt1.millisecond);
Expect.equals(false, dt1.isUtc);
- dt1 = new Date.fromString("1999-01-02 23:58:59.999519Z");
+ dt1 = DateTime.parse("1999-01-02 23:58:59.999519Z");
Expect.equals(1999, dt1.year);
Expect.equals(1, dt1.month);
Expect.equals(2, dt1.day);
@@ -27,7 +27,7 @@
Expect.equals(0, dt1.second);
Expect.equals(0, dt1.millisecond);
Expect.equals(true, dt1.isUtc);
- dt1 = new Date.fromString("0009-09-09 09:09:09.009411Z");
+ dt1 = DateTime.parse("0009-09-09 09:09:09.009411Z");
Expect.equals(9, dt1.year);
Expect.equals(9, dt1.month);
Expect.equals(9, dt1.day);
@@ -37,7 +37,7 @@
Expect.equals(9, dt1.millisecond);
Expect.equals(true, dt1.isUtc);
String svnDate = "2012-03-30T04:28:13.752341Z";
- dt1 = new Date.fromString(svnDate);
+ dt1 = DateTime.parse(svnDate);
Expect.equals(2012, dt1.year);
Expect.equals(3, dt1.month);
Expect.equals(30, dt1.day);
diff --git a/tests/corelib/date_time5_test.dart b/tests/corelib/date_time5_test.dart
index aa2109e..10448e9 100644
--- a/tests/corelib/date_time5_test.dart
+++ b/tests/corelib/date_time5_test.dart
@@ -2,10 +2,10 @@
// 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.
-// Test Date constructor with optional arguments.
+// Test DateTime constructor with optional arguments.
main() {
- var d = new Date(2012);
+ var d = new DateTime(2012);
Expect.equals(2012, d.year);
Expect.equals(1, d.month);
Expect.equals(1, d.day);
@@ -14,7 +14,7 @@
Expect.equals(0, d.second);
Expect.equals(0, d.millisecond);
- d = new Date(2012, 1, 28);
+ d = new DateTime(2012, 1, 28);
Expect.equals(2012, d.year);
Expect.equals(1, d.month);
Expect.equals(28, d.day);
@@ -23,7 +23,7 @@
Expect.equals(0, d.second);
Expect.equals(0, d.millisecond);
- d = new Date(1970, 3);
+ d = new DateTime(1970, 3);
Expect.equals(1970, d.year);
Expect.equals(3, d.month);
Expect.equals(1, d.day);
@@ -32,7 +32,7 @@
Expect.equals(0, d.second);
Expect.equals(0, d.millisecond);
- d = new Date(1970, 3, 1, 11);
+ d = new DateTime(1970, 3, 1, 11);
Expect.equals(1970, d.year);
Expect.equals(3, d.month);
Expect.equals(1, d.day);
@@ -41,7 +41,7 @@
Expect.equals(0, d.second);
Expect.equals(0, d.millisecond);
- d = new Date(0, 12, 24, 0, 12);
+ d = new DateTime(0, 12, 24, 0, 12);
Expect.equals(0, d.year);
Expect.equals(12, d.month);
Expect.equals(24, d.day);
@@ -50,7 +50,7 @@
Expect.equals(0, d.second);
Expect.equals(0, d.millisecond);
- d = new Date(-1, 2, 2, 3, 0, 0, 4);
+ d = new DateTime(-1, 2, 2, 3, 0, 0, 4);
Expect.equals(-1, d.year);
Expect.equals(2, d.month);
Expect.equals(2, d.day);
@@ -59,7 +59,7 @@
Expect.equals(0, d.second);
Expect.equals(4, d.millisecond);
- d = new Date(-1, 2, 2, 3, 0, 4);
+ d = new DateTime(-1, 2, 2, 3, 0, 4);
Expect.equals(-1, d.year);
Expect.equals(2, d.month);
Expect.equals(2, d.day);
@@ -68,7 +68,7 @@
Expect.equals(4, d.second);
Expect.equals(0, d.millisecond);
- d = new Date(2012, 5, 15, 13, 21, 33, 12);
+ d = new DateTime(2012, 5, 15, 13, 21, 33, 12);
Expect.equals(2012, d.year);
Expect.equals(5, d.month);
Expect.equals(15, d.day);
diff --git a/tests/corelib/date_time6_test.dart b/tests/corelib/date_time6_test.dart
index c4a0b026..0b6418c 100644
--- a/tests/corelib/date_time6_test.dart
+++ b/tests/corelib/date_time6_test.dart
@@ -2,11 +2,11 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// Test Date comparison operators.
+// Test DateTime comparison operators.
main() {
- var d = new Date.fromMillisecondsSinceEpoch(0, isUtc: true);
- var d2 = new Date.fromMillisecondsSinceEpoch(1, isUtc: true);
+ var d = new DateTime.fromMillisecondsSinceEpoch(0, isUtc: true);
+ var d2 = new DateTime.fromMillisecondsSinceEpoch(1, isUtc: true);
Expect.isTrue(d < d2);
Expect.isTrue(d <= d2);
Expect.isTrue(d2 > d);
@@ -16,8 +16,8 @@
Expect.isFalse(d > d2);
Expect.isFalse(d >= d2);
- d = new Date.fromMillisecondsSinceEpoch(-1, isUtc: true);
- d2 = new Date.fromMillisecondsSinceEpoch(0, isUtc: true);
+ d = new DateTime.fromMillisecondsSinceEpoch(-1, isUtc: true);
+ d2 = new DateTime.fromMillisecondsSinceEpoch(0, isUtc: true);
Expect.isTrue(d < d2);
Expect.isTrue(d <= d2);
Expect.isTrue(d2 > d);
diff --git a/tests/corelib/date_time7_test.dart b/tests/corelib/date_time7_test.dart
index da6005e..1be867d 100644
--- a/tests/corelib/date_time7_test.dart
+++ b/tests/corelib/date_time7_test.dart
@@ -2,10 +2,10 @@
// 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.
-// Test Date timeZoneName and timeZoneOffset getters.
+// Test DateTime timeZoneName and timeZoneOffset getters.
testUtc() {
- var d = new Date.fromString("2012-03-04T03:25:38.123Z");
+ var d = DateTime.parse("2012-03-04T03:25:38.123Z");
Expect.equals("UTC", d.timeZoneName);
Expect.equals(0, d.timeZoneOffset.inSeconds);
}
@@ -33,11 +33,11 @@
}
}
- var d = new Date.fromString("2012-01-02T13:45:23");
+ var d = DateTime.parse("2012-01-02T13:45:23");
String name = d.timeZoneName;
checkOffset(name, d.timeZoneOffset);
- d = new Date.fromString("2012-07-02T13:45:23");
+ d = DateTime.parse("2012-07-02T13:45:23");
name = d.timeZoneName;
checkOffset(name, d.timeZoneOffset);
}
diff --git a/tests/corelib/date_time8_test.dart b/tests/corelib/date_time8_test.dart
index c85b870..2e9ac98 100644
--- a/tests/corelib/date_time8_test.dart
+++ b/tests/corelib/date_time8_test.dart
@@ -5,12 +5,12 @@
// Make sure the year 0 is correctly printed.
testUtc() {
- var d = new Date.utc(0, 1, 1);
+ var d = new DateTime.utc(0, 1, 1);
Expect.equals("0000-01-01 00:00:00.000Z", d.toString());
}
testLocal() {
- var d = new Date(0, 1, 1);
+ var d = new DateTime(0, 1, 1);
Expect.equals("0000-01-01 00:00:00.000", d.toString());
}
diff --git a/tests/corelib/date_time_parse_test.dart b/tests/corelib/date_time_parse_test.dart
new file mode 100644
index 0000000..f885392
--- /dev/null
+++ b/tests/corelib/date_time_parse_test.dart
@@ -0,0 +1,20 @@
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+check(DateTime expected, String str) {
+ DateTime actual = DateTime.parse(str);
+ Expect.equals(expected, actual); // Only checks if they are at the same time.
+ Expect.equals(expected.isUtc, actual.isUtc);
+}
+main() {
+ check(new Date(2012, 02, 27, 13, 27), "2012-02-27 13:27:00");
+ check(new Date.utc(2012, 02, 27, 13, 27, 0, 123),
+ "2012-02-27 13:27:00.123456z");
+ check(new Date(2012, 02, 27, 13, 27), "20120227 13:27:00");
+ check(new Date(2012, 02, 27, 13, 27), "20120227T132700");
+ check(new Date(2012, 02, 27), "20120227");
+ check(new Date(2012, 02, 27), "+20120227");
+ check(new Date.utc(2012, 02, 27, 14), "2012-02-27T14Z");
+ check(new Date.utc(-12345, 1, 1), "-123450101 00:00:00 Z");
+}
diff --git a/tests/corelib/date_time_test.dart b/tests/corelib/date_time_test.dart
index a60be14..cceaa1c 100644
--- a/tests/corelib/date_time_test.dart
+++ b/tests/corelib/date_time_test.dart
@@ -2,15 +2,15 @@
// 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.
-// Dart test program for Date.
+// Dart test program for DateTime.
class DateTest {
// Tests if the time moves eventually forward.
static void testNow() {
- var t1 = new Date.now();
+ var t1 = new DateTime.now();
bool timeMovedForward = false;
for (int i = 0; i < 1000000; i++) {
- var t2 = new Date.now();
+ var t2 = new DateTime.now();
if (t1.millisecondsSinceEpoch < t2.millisecondsSinceEpoch) {
timeMovedForward = true;
break;
@@ -21,15 +21,15 @@
}
static void testValue() {
- var dt1 = new Date.now();
+ var dt1 = new DateTime.now();
var millisecondsSinceEpoch = dt1.millisecondsSinceEpoch;
- var dt2 = new Date.fromMillisecondsSinceEpoch(millisecondsSinceEpoch);
+ var dt2 = new DateTime.fromMillisecondsSinceEpoch(millisecondsSinceEpoch);
Expect.equals(millisecondsSinceEpoch, dt2.millisecondsSinceEpoch);
}
static void testFarAwayDates() {
- Date dt =
- new Date.fromMillisecondsSinceEpoch(1000000000000001, isUtc: true);
+ DateTime dt =
+ new DateTime.fromMillisecondsSinceEpoch(1000000000000001, isUtc: true);
Expect.equals(33658, dt.year);
Expect.equals(9, dt.month);
Expect.equals(27, dt.day);
@@ -37,7 +37,7 @@
Expect.equals(46, dt.minute);
Expect.equals(40, dt.second);
Expect.equals(1, dt.millisecond);
- dt = new Date.fromMillisecondsSinceEpoch(-1000000000000001, isUtc: true);
+ dt = new DateTime.fromMillisecondsSinceEpoch(-1000000000000001, isUtc: true);
Expect.equals(-29719, dt.year);
Expect.equals(4, dt.month);
Expect.equals(5, dt.day);
@@ -46,7 +46,7 @@
Expect.equals(19, dt.second);
Expect.equals(999, dt.millisecond);
// Same with local zone.
- dt = new Date.fromMillisecondsSinceEpoch(1000000000000001);
+ dt = new DateTime.fromMillisecondsSinceEpoch(1000000000000001);
Expect.equals(33658, dt.year);
Expect.equals(9, dt.month);
Expect.equals(true, dt.day == 27 || dt.day == 26);
@@ -56,7 +56,7 @@
Expect.equals(true, dt.minute % 15 == 46 % 15);
Expect.equals(40, dt.second);
Expect.equals(1, dt.millisecond);
- dt = new Date.fromMillisecondsSinceEpoch(-1000000000000001);
+ dt = new DateTime.fromMillisecondsSinceEpoch(-1000000000000001);
Expect.equals(-29719, dt.year);
Expect.equals(4, dt.month);
Expect.equals(true, 5 == dt.day || 6 == dt.day);
@@ -70,9 +70,9 @@
static void testEquivalentYears() {
// All hardcoded values come from V8. This means that the values are not
- // necessarily correct (see limitations of Date object in
+ // necessarily correct (see limitations of DateTime object in
// EcmaScript 15.9.1 and in particular 15.9.1.8/9).
- Date dt = new Date.fromMillisecondsSinceEpoch(-31485600000, isUtc: true);
+ DateTime dt = new DateTime.fromMillisecondsSinceEpoch(-31485600000, isUtc: true);
Expect.equals(1969, dt.year);
Expect.equals(1, dt.month);
Expect.equals(1, dt.day);
@@ -80,7 +80,7 @@
Expect.equals(0, dt.minute);
Expect.equals(0, dt.second);
Expect.equals(0, dt.millisecond);
- dt = new Date.fromMillisecondsSinceEpoch(-63108000000, isUtc: true);
+ dt = new DateTime.fromMillisecondsSinceEpoch(-63108000000, isUtc: true);
Expect.equals(1968, dt.year);
Expect.equals(1, dt.month);
Expect.equals(1, dt.day);
@@ -88,7 +88,7 @@
Expect.equals(0, dt.minute);
Expect.equals(0, dt.second);
Expect.equals(0, dt.millisecond);
- dt = new Date.fromMillisecondsSinceEpoch(-94644000000, isUtc: true);
+ dt = new DateTime.fromMillisecondsSinceEpoch(-94644000000, isUtc: true);
Expect.equals(1967, dt.year);
Expect.equals(1, dt.month);
Expect.equals(1, dt.day);
@@ -96,7 +96,7 @@
Expect.equals(0, dt.minute);
Expect.equals(0, dt.second);
Expect.equals(0, dt.millisecond);
- dt = new Date.fromMillisecondsSinceEpoch(-126180000000, isUtc: true);
+ dt = new DateTime.fromMillisecondsSinceEpoch(-126180000000, isUtc: true);
Expect.equals(1966, dt.year);
Expect.equals(1, dt.month);
Expect.equals(1, dt.day);
@@ -104,7 +104,7 @@
Expect.equals(0, dt.minute);
Expect.equals(0, dt.second);
Expect.equals(0, dt.millisecond);
- dt = new Date.fromMillisecondsSinceEpoch(-157716000000, isUtc: true);
+ dt = new DateTime.fromMillisecondsSinceEpoch(-157716000000, isUtc: true);
Expect.equals(1965, dt.year);
Expect.equals(1, dt.month);
Expect.equals(1, dt.day);
@@ -112,7 +112,7 @@
Expect.equals(0, dt.minute);
Expect.equals(0, dt.second);
Expect.equals(0, dt.millisecond);
- dt = new Date.fromMillisecondsSinceEpoch(-2177402400000, isUtc: true);
+ dt = new DateTime.fromMillisecondsSinceEpoch(-2177402400000, isUtc: true);
Expect.equals(1901, dt.year);
Expect.equals(1, dt.month);
Expect.equals(1, dt.day);
@@ -120,7 +120,7 @@
Expect.equals(0, dt.minute);
Expect.equals(0, dt.second);
Expect.equals(0, dt.millisecond);
- dt = new Date.fromMillisecondsSinceEpoch(-5333076000000, isUtc: true);
+ dt = new DateTime.fromMillisecondsSinceEpoch(-5333076000000, isUtc: true);
Expect.equals(1801, dt.year);
Expect.equals(1, dt.month);
Expect.equals(1, dt.day);
@@ -128,7 +128,7 @@
Expect.equals(0, dt.minute);
Expect.equals(0, dt.second);
Expect.equals(0, dt.millisecond);
- dt = new Date.fromMillisecondsSinceEpoch(-8520285600000, isUtc: true);
+ dt = new DateTime.fromMillisecondsSinceEpoch(-8520285600000, isUtc: true);
Expect.equals(1700, dt.year);
Expect.equals(1, dt.month);
Expect.equals(1, dt.day);
@@ -136,7 +136,7 @@
Expect.equals(0, dt.minute);
Expect.equals(0, dt.second);
Expect.equals(0, dt.millisecond);
- dt = new Date.fromMillisecondsSinceEpoch(-14831719200000, isUtc: true);
+ dt = new DateTime.fromMillisecondsSinceEpoch(-14831719200000, isUtc: true);
Expect.equals(1500, dt.year);
Expect.equals(1, dt.month);
Expect.equals(1, dt.day);
@@ -144,7 +144,7 @@
Expect.equals(0, dt.minute);
Expect.equals(0, dt.second);
Expect.equals(0, dt.millisecond);
- dt = new Date.fromMillisecondsSinceEpoch(-59011408800000, isUtc: true);
+ dt = new DateTime.fromMillisecondsSinceEpoch(-59011408800000, isUtc: true);
Expect.equals(100, dt.year);
Expect.equals(1, dt.month);
Expect.equals(1, dt.day);
@@ -152,7 +152,7 @@
Expect.equals(0, dt.minute);
Expect.equals(0, dt.second);
Expect.equals(0, dt.millisecond);
- dt = new Date.fromMillisecondsSinceEpoch(-62011408800000, isUtc: true);
+ dt = new DateTime.fromMillisecondsSinceEpoch(-62011408800000, isUtc: true);
Expect.equals(4, dt.year);
Expect.equals(12, dt.month);
Expect.equals(8, dt.day);
@@ -160,7 +160,7 @@
Expect.equals(40, dt.minute);
Expect.equals(0, dt.second);
Expect.equals(0, dt.millisecond);
- dt = new Date.fromMillisecondsSinceEpoch(-64011408800000, isUtc: true);
+ dt = new DateTime.fromMillisecondsSinceEpoch(-64011408800000, isUtc: true);
Expect.equals(-59, dt.year);
Expect.equals(7, dt.month);
Expect.equals(24, dt.day);
@@ -169,7 +169,7 @@
Expect.equals(40, dt.second);
Expect.equals(0, dt.millisecond);
final int SECONDS_YEAR_2035 = 2051222400;
- dt = new Date.fromMillisecondsSinceEpoch(SECONDS_YEAR_2035 * 1000 + 1,
+ dt = new DateTime.fromMillisecondsSinceEpoch(SECONDS_YEAR_2035 * 1000 + 1,
isUtc: true);
Expect.equals(2035, dt.year);
Expect.equals(1, dt.month);
@@ -178,7 +178,7 @@
Expect.equals(0, dt.minute);
Expect.equals(0, dt.second);
Expect.equals(1, dt.millisecond);
- dt = new Date.fromMillisecondsSinceEpoch(SECONDS_YEAR_2035 * 1000 - 1,
+ dt = new DateTime.fromMillisecondsSinceEpoch(SECONDS_YEAR_2035 * 1000 - 1,
isUtc: true);
Expect.equals(2034, dt.year);
Expect.equals(12, dt.month);
@@ -187,29 +187,29 @@
Expect.equals(59, dt.minute);
Expect.equals(59, dt.second);
Expect.equals(999, dt.millisecond);
- dt = new Date.utc(2035, 1, 1, 0, 0, 0, 1);
+ dt = new DateTime.utc(2035, 1, 1, 0, 0, 0, 1);
Expect.equals(SECONDS_YEAR_2035 * 1000 + 1, dt.millisecondsSinceEpoch);
- dt = new Date.utc(2034, 12, 31, 23, 59, 59, 999);
+ dt = new DateTime.utc(2034, 12, 31, 23, 59, 59, 999);
Expect.equals(SECONDS_YEAR_2035 * 1000 - 1, dt.millisecondsSinceEpoch);
- dt = new Date.fromMillisecondsSinceEpoch(SECONDS_YEAR_2035 * 1000 + 1);
+ dt = new DateTime.fromMillisecondsSinceEpoch(SECONDS_YEAR_2035 * 1000 + 1);
Expect.equals(true, (2035 == dt.year && 1 == dt.month && 1 == dt.day) ||
(2034 == dt.year && 12 == dt.month && 31 == dt.day));
Expect.equals(0, dt.second);
Expect.equals(1, dt.millisecond);
- Date dt2 = new Date(
+ DateTime dt2 = new DateTime(
dt.year, dt.month, dt.day, dt.hour, dt.minute, dt.second,
dt.millisecond);
Expect.equals(dt.millisecondsSinceEpoch, dt2.millisecondsSinceEpoch);
- dt = new Date.fromMillisecondsSinceEpoch(SECONDS_YEAR_2035 * 1000 - 1);
+ dt = new DateTime.fromMillisecondsSinceEpoch(SECONDS_YEAR_2035 * 1000 - 1);
Expect.equals(true, (2035 == dt.year && 1 == dt.month && 1 == dt.day) ||
(2034 == dt.year && 12 == dt.month && 31 == dt.day));
Expect.equals(59, dt.second);
Expect.equals(999, dt.millisecond);
- dt2 = new Date(
+ dt2 = new DateTime(
dt.year, dt.month, dt.day, dt.hour, dt.minute, dt.second,
dt.millisecond);
Expect.equals(dt.millisecondsSinceEpoch, dt2.millisecondsSinceEpoch);
- dt = new Date.fromMillisecondsSinceEpoch(2100000000 * 1000, isUtc: true);
+ dt = new DateTime.fromMillisecondsSinceEpoch(2100000000 * 1000, isUtc: true);
Expect.equals(2036, dt.year);
Expect.equals(7, dt.month);
Expect.equals(18, dt.day);
@@ -218,7 +218,7 @@
Expect.equals(0, dt.second);
Expect.equals(0, dt.millisecond);
// Internally this will use the maximum value for the native calls.
- dt = new Date(2036, 7, 18, 13, 20);
+ dt = new DateTime(2036, 7, 18, 13, 20);
Expect.equals(2036, dt.year);
Expect.equals(7, dt.month);
Expect.equals(18, dt.day);
@@ -231,7 +231,7 @@
static void testExtremes() {
var dt =
- new Date.fromMillisecondsSinceEpoch(8640000000000000, isUtc: true);
+ new DateTime.fromMillisecondsSinceEpoch(8640000000000000, isUtc: true);
Expect.equals(275760, dt.year);
Expect.equals(9, dt.month);
Expect.equals(13, dt.day);
@@ -239,7 +239,7 @@
Expect.equals(0, dt.minute);
Expect.equals(0, dt.second);
Expect.equals(0, dt.millisecond);
- dt = new Date.fromMillisecondsSinceEpoch(-8640000000000000, isUtc: true);
+ dt = new DateTime.fromMillisecondsSinceEpoch(-8640000000000000, isUtc: true);
Expect.equals(-271821, dt.year);
Expect.equals(4, dt.month);
Expect.equals(20, dt.day);
@@ -248,34 +248,34 @@
Expect.equals(0, dt.second);
Expect.equals(0, dt.millisecond);
// Make sure that we can build the extreme dates in local too.
- dt = new Date.fromMillisecondsSinceEpoch(8640000000000000);
- dt = new Date(dt.year, dt.month, dt.day, dt.hour, dt.minute);
+ dt = new DateTime.fromMillisecondsSinceEpoch(8640000000000000);
+ dt = new DateTime(dt.year, dt.month, dt.day, dt.hour, dt.minute);
Expect.equals(8640000000000000, dt.millisecondsSinceEpoch);
- dt = new Date.fromMillisecondsSinceEpoch(-8640000000000000);
- dt = new Date(dt.year, dt.month, dt.day, dt.hour, dt.minute);
+ dt = new DateTime.fromMillisecondsSinceEpoch(-8640000000000000);
+ dt = new DateTime(dt.year, dt.month, dt.day, dt.hour, dt.minute);
Expect.equals(-8640000000000000, dt.millisecondsSinceEpoch);
- Expect.throws(() => new Date.fromMillisecondsSinceEpoch(8640000000000001,
+ Expect.throws(() => new DateTime.fromMillisecondsSinceEpoch(8640000000000001,
isUtc: true));
- Expect.throws(() => new Date.fromMillisecondsSinceEpoch(-8640000000000001,
+ Expect.throws(() => new DateTime.fromMillisecondsSinceEpoch(-8640000000000001,
isUtc: true));
- Expect.throws(() => new Date.fromMillisecondsSinceEpoch(8640000000000001));
- Expect.throws(() => new Date.fromMillisecondsSinceEpoch(-8640000000000001));
- dt = new Date.fromMillisecondsSinceEpoch(8640000000000000);
- Expect.throws(() => new Date(dt.year, dt.month, dt.day,
+ Expect.throws(() => new DateTime.fromMillisecondsSinceEpoch(8640000000000001));
+ Expect.throws(() => new DateTime.fromMillisecondsSinceEpoch(-8640000000000001));
+ dt = new DateTime.fromMillisecondsSinceEpoch(8640000000000000);
+ Expect.throws(() => new DateTime(dt.year, dt.month, dt.day,
dt.hour, dt.minute, 0, 1));
- dt = new Date.fromMillisecondsSinceEpoch(8640000000000000, isUtc: true);
- Expect.throws(() => new Date.utc(dt.year, dt.month, dt.day,
+ dt = new DateTime.fromMillisecondsSinceEpoch(8640000000000000, isUtc: true);
+ Expect.throws(() => new DateTime.utc(dt.year, dt.month, dt.day,
dt.hour, dt.minute, 0, 1));
- dt = new Date.fromMillisecondsSinceEpoch(-8640000000000000);
- Expect.throws(() => new Date(dt.year, dt.month, dt.day,
+ dt = new DateTime.fromMillisecondsSinceEpoch(-8640000000000000);
+ Expect.throws(() => new DateTime(dt.year, dt.month, dt.day,
dt.hour, dt.minute, 0, -1));
- dt = new Date.fromMillisecondsSinceEpoch(-8640000000000000, isUtc: true);
- Expect.throws(() => new Date.utc(dt.year, dt.month, dt.day,
+ dt = new DateTime.fromMillisecondsSinceEpoch(-8640000000000000, isUtc: true);
+ Expect.throws(() => new DateTime.utc(dt.year, dt.month, dt.day,
dt.hour, dt.minute, 0, -1));
}
static void testUTCGetters() {
- var dt = new Date.fromMillisecondsSinceEpoch(1305140315000, isUtc: true);
+ var dt = new DateTime.fromMillisecondsSinceEpoch(1305140315000, isUtc: true);
Expect.equals(2011, dt.year);
Expect.equals(5, dt.month);
Expect.equals(11, dt.day);
@@ -285,7 +285,7 @@
Expect.equals(0, dt.millisecond);
Expect.equals(true, dt.isUtc);
Expect.equals(1305140315000, dt.millisecondsSinceEpoch);
- dt = new Date.fromMillisecondsSinceEpoch(-9999999, isUtc: true);
+ dt = new DateTime.fromMillisecondsSinceEpoch(-9999999, isUtc: true);
Expect.equals(1969, dt.year);
Expect.equals(12, dt.month);
Expect.equals(31, dt.day);
@@ -296,8 +296,8 @@
}
static void testLocalGetters() {
- var dt1 = new Date.fromMillisecondsSinceEpoch(1305140315000);
- var dt2 = new Date.utc(dt1.year, dt1.month, dt1.day,
+ var dt1 = new DateTime.fromMillisecondsSinceEpoch(1305140315000);
+ var dt2 = new DateTime.utc(dt1.year, dt1.month, dt1.day,
dt1.hour, dt1.minute, dt1.second, dt1.millisecond);
Duration zoneOffset = dt1.difference(dt2);
Expect.equals(true, zoneOffset.inDays == 0);
@@ -316,29 +316,29 @@
}
static void testConstructors() {
- var dt0 = new Date.utc(2011, 5, 11, 18, 58, 35, 0);
+ var dt0 = new DateTime.utc(2011, 5, 11, 18, 58, 35, 0);
Expect.equals(1305140315000, dt0.millisecondsSinceEpoch);
- var dt1 = new Date.fromMillisecondsSinceEpoch(1305140315000);
+ var dt1 = new DateTime.fromMillisecondsSinceEpoch(1305140315000);
Expect.equals(dt1.millisecondsSinceEpoch, dt0.millisecondsSinceEpoch);
Expect.equals(true, dt1 == dt0);
- var dt3 = new Date(dt1.year, dt1.month, dt1.day, dt1.hour, dt1.minute,
+ var dt3 = new DateTime(dt1.year, dt1.month, dt1.day, dt1.hour, dt1.minute,
dt1.second, dt1.millisecond);
Expect.equals(dt1.millisecondsSinceEpoch, dt3.millisecondsSinceEpoch);
Expect.equals(true, dt1 == dt3);
- dt3 = new Date(
+ dt3 = new DateTime(
dt1.year, dt1.month, dt1.day, dt1.hour, dt1.minute,
dt1.second, dt1.millisecond);
Expect.equals(dt1.millisecondsSinceEpoch, dt3.millisecondsSinceEpoch);
Expect.equals(true, dt1 == dt3);
var dt2 = dt1.toLocal();
- dt3 = new Date(2011, 5, dt1.day, dt1.hour, dt1.minute, 35, 0);
+ dt3 = new DateTime(2011, 5, dt1.day, dt1.hour, dt1.minute, 35, 0);
Expect.equals(dt2.millisecondsSinceEpoch, dt3.millisecondsSinceEpoch);
Expect.equals(true, dt2 == dt3);
- dt1 = new Date.fromMillisecondsSinceEpoch(-9999999, isUtc: true);
- dt3 = new Date.utc(dt1.year, dt1.month, dt1.day, dt1.hour, dt1.minute,
+ dt1 = new DateTime.fromMillisecondsSinceEpoch(-9999999, isUtc: true);
+ dt3 = new DateTime.utc(dt1.year, dt1.month, dt1.day, dt1.hour, dt1.minute,
dt1.second, dt1.millisecond);
Expect.equals(dt1.millisecondsSinceEpoch, dt3.millisecondsSinceEpoch);
- dt3 = new Date.utc(99, 1, 2, 10, 11, 12, 0);
+ dt3 = new DateTime.utc(99, 1, 2, 10, 11, 12, 0);
Expect.equals(99, dt3.year);
Expect.equals(1, dt3.month);
Expect.equals(2, dt3.day);
@@ -347,7 +347,7 @@
Expect.equals(12, dt3.second);
Expect.equals(0, dt3.millisecond);
Expect.equals(true, dt3.isUtc);
- var dt4 = new Date(99, 1, 2);
+ var dt4 = new DateTime(99, 1, 2);
Expect.equals(99, dt4.year);
Expect.equals(1, dt4.month);
Expect.equals(2, dt4.day);
@@ -356,7 +356,7 @@
Expect.equals(0, dt4.second);
Expect.equals(0, dt4.millisecond);
Expect.isFalse(dt4.isUtc);
- var dt5 = new Date.utc(99, 1, 2);
+ var dt5 = new DateTime.utc(99, 1, 2);
Expect.equals(99, dt5.year);
Expect.equals(1, dt5.month);
Expect.equals(2, dt5.day);
@@ -365,7 +365,7 @@
Expect.equals(0, dt5.second);
Expect.equals(0, dt5.millisecond);
Expect.isTrue(dt5.isUtc);
- var dt6 = new Date(2012, 2, 27, 13, 27, 0);
+ var dt6 = new DateTime(2012, 2, 27, 13, 27, 0);
Expect.equals(2012, dt6.year);
Expect.equals(2, dt6.month);
Expect.equals(27, dt6.day);
@@ -374,7 +374,7 @@
Expect.equals(0, dt6.second);
Expect.equals(0, dt6.millisecond);
Expect.isFalse(dt6.isUtc);
- var dt7 = new Date.utc(2012, 2, 27, 13, 27, 0);
+ var dt7 = new DateTime.utc(2012, 2, 27, 13, 27, 0);
Expect.equals(2012, dt7.year);
Expect.equals(2, dt7.month);
Expect.equals(27, dt7.day);
@@ -386,10 +386,10 @@
}
static void testChangeTimeZone() {
- var dt1 = new Date.fromMillisecondsSinceEpoch(1305140315000);
+ var dt1 = new DateTime.fromMillisecondsSinceEpoch(1305140315000);
var dt2 = dt1.toUtc();
Expect.equals(dt1.millisecondsSinceEpoch, dt2.millisecondsSinceEpoch);
- var dt3 = new Date.fromMillisecondsSinceEpoch(1305140315000, isUtc: true);
+ var dt3 = new DateTime.fromMillisecondsSinceEpoch(1305140315000, isUtc: true);
Expect.equals(dt1.millisecondsSinceEpoch, dt3.millisecondsSinceEpoch);
Expect.equals(dt2.year, dt3.year);
Expect.equals(dt2.month, dt3.month);
@@ -409,7 +409,7 @@
}
static void testSubAdd() {
- var dt1 = new Date.fromMillisecondsSinceEpoch(1305140315000, isUtc: true);
+ var dt1 = new DateTime.fromMillisecondsSinceEpoch(1305140315000, isUtc: true);
var dt2 = dt1.add(new Duration(milliseconds:
3 * Duration.MILLISECONDS_PER_SECOND + 5));
Expect.equals(dt1.year, dt2.year);
@@ -426,11 +426,11 @@
}
static void testUnderflowAndOverflow() {
- final dtBase = new Date(2012, 6, 20, 12, 30, 30, 500);
+ final dtBase = new DateTime(2012, 6, 20, 12, 30, 30, 500);
// Millisecond
print(" >>> Millisecond+");
- var dt = new Date(dtBase.year, dtBase.month, dtBase.day, dtBase.hour,
+ var dt = new DateTime(dtBase.year, dtBase.month, dtBase.day, dtBase.hour,
dtBase.minute, dtBase.second, 1000);
Expect.equals(dtBase.year, dt.year);
Expect.equals(dtBase.month, dt.month);
@@ -441,7 +441,7 @@
Expect.equals(0, dt.millisecond);
print(" >>> Millisecond-");
- dt = new Date(dtBase.year, dtBase.month, dtBase.day, dtBase.hour,
+ dt = new DateTime(dtBase.year, dtBase.month, dtBase.day, dtBase.hour,
dtBase.minute, dtBase.second, -1000);
Expect.equals(dtBase.year, dt.year);
Expect.equals(dtBase.month, dt.month);
@@ -453,7 +453,7 @@
// Second
print(" >>> Second+");
- dt = new Date(dtBase.year, dtBase.month, dtBase.day, dtBase.hour,
+ dt = new DateTime(dtBase.year, dtBase.month, dtBase.day, dtBase.hour,
dtBase.minute, 60, dtBase.millisecond);
Expect.equals(dtBase.year, dt.year);
Expect.equals(dtBase.month, dt.month);
@@ -464,7 +464,7 @@
Expect.equals(dtBase.millisecond, dt.millisecond);
print(" >>> Second-");
- dt = new Date(dtBase.year, dtBase.month, dtBase.day, dtBase.hour,
+ dt = new DateTime(dtBase.year, dtBase.month, dtBase.day, dtBase.hour,
dtBase.minute, -60, dtBase.millisecond);
Expect.equals(dtBase.year, dt.year);
Expect.equals(dtBase.month, dt.month);
@@ -476,7 +476,7 @@
// Minute
print(" >>> Minute+");
- dt = new Date(dtBase.year, dtBase.month, dtBase.day, dtBase.hour, 60,
+ dt = new DateTime(dtBase.year, dtBase.month, dtBase.day, dtBase.hour, 60,
dtBase.second, dtBase.millisecond);
Expect.equals(dtBase.year, dt.year);
Expect.equals(dtBase.month, dt.month);
@@ -487,7 +487,7 @@
Expect.equals(dtBase.millisecond, dt.millisecond);
print(" >>> Minute-");
- dt = new Date(dtBase.year, dtBase.month, dtBase.day, dtBase.hour, -60,
+ dt = new DateTime(dtBase.year, dtBase.month, dtBase.day, dtBase.hour, -60,
dtBase.second, dtBase.millisecond);
Expect.equals(dtBase.year, dt.year);
Expect.equals(dtBase.month, dt.month);
@@ -499,7 +499,7 @@
// Hour
print(" >>> Hour+");
- dt = new Date(dtBase.year, dtBase.month, dtBase.day, 24, dtBase.minute,
+ dt = new DateTime(dtBase.year, dtBase.month, dtBase.day, 24, dtBase.minute,
dtBase.second, dtBase.millisecond);
Expect.equals(dtBase.year, dt.year);
Expect.equals(dtBase.month, dt.month);
@@ -510,7 +510,7 @@
Expect.equals(dtBase.millisecond, dt.millisecond);
print(" >>> Hour-");
- dt = new Date(dtBase.year, dtBase.month, dtBase.day, -24, dtBase.minute,
+ dt = new DateTime(dtBase.year, dtBase.month, dtBase.day, -24, dtBase.minute,
dtBase.second, dtBase.millisecond);
Expect.equals(dtBase.year, dt.year);
Expect.equals(dtBase.month, dt.month);
@@ -522,7 +522,7 @@
// Day
print(" >>> Day+");
- dt = new Date(dtBase.year, dtBase.month, 31, dtBase.hour, dtBase.minute,
+ dt = new DateTime(dtBase.year, dtBase.month, 31, dtBase.hour, dtBase.minute,
dtBase.second, dtBase.millisecond);
Expect.equals(dtBase.year, dt.year);
Expect.equals(dtBase.month + 1, dt.month);
@@ -533,7 +533,7 @@
Expect.equals(dtBase.millisecond, dt.millisecond);
print(" >>> Day-");
- dt = new Date(dtBase.year, dtBase.month, -30, dtBase.hour, dtBase.minute,
+ dt = new DateTime(dtBase.year, dtBase.month, -30, dtBase.hour, dtBase.minute,
dtBase.second, dtBase.millisecond);
Expect.equals(dtBase.year, dt.year);
Expect.equals(dtBase.month - 1, dt.month);
@@ -545,7 +545,7 @@
// Month
print(" >>> Month+");
- dt = new Date(dtBase.year, 13, dtBase.day, dtBase.hour, dtBase.minute,
+ dt = new DateTime(dtBase.year, 13, dtBase.day, dtBase.hour, dtBase.minute,
dtBase.second, dtBase.millisecond);
Expect.equals(dtBase.year + 1, dt.year);
Expect.equals(1, dt.month);
@@ -556,7 +556,7 @@
Expect.equals(dtBase.millisecond, dt.millisecond);
print(" >>> Month-");
- dt = new Date(dtBase.year, -11, dtBase.day, dtBase.hour, dtBase.minute,
+ dt = new DateTime(dtBase.year, -11, dtBase.day, dtBase.hour, dtBase.minute,
dtBase.second, dtBase.millisecond);
Expect.equals(dtBase.year - 1, dt.year);
Expect.equals(1, dt.month);
@@ -568,8 +568,8 @@
// Flowing all the way up the chain.
print(" >>> Flow+");
- var dtBase1 = new Date(2012, 12, 31, 23, 59, 59, 999);
- var dtTick = new Date(dtBase1.year, dtBase1.month, dtBase1.day,
+ var dtBase1 = new DateTime(2012, 12, 31, 23, 59, 59, 999);
+ var dtTick = new DateTime(dtBase1.year, dtBase1.month, dtBase1.day,
dtBase1.hour, dtBase1.minute, dtBase1.second,
dtBase1.millisecond + 1);
Expect.equals(dtBase1.year + 1, dtTick.year);
@@ -581,8 +581,8 @@
Expect.equals(0, dtTick.millisecond);
print(" >>> Flow-");
- dtBase1 = new Date(2012, 1, 1, 0, 0, 0, 0);
- dtTick = new Date(dtBase1.year, dtBase1.month, dtBase1.day, dtBase1.hour,
+ dtBase1 = new DateTime(2012, 1, 1, 0, 0, 0, 0);
+ dtTick = new DateTime(dtBase1.year, dtBase1.month, dtBase1.day, dtBase1.hour,
dtBase1.minute, dtBase1.second, dtBase1.millisecond - 1);
Expect.equals(dtBase1.year - 1, dtTick.year);
Expect.equals(12, dtTick.month);
@@ -593,7 +593,7 @@
Expect.equals(999, dtTick.millisecond);
print(" >>> extra underflow");
- dtTick = new Date(dtBase1.year, dtBase1.month, dtBase1.day, -17520,
+ dtTick = new DateTime(dtBase1.year, dtBase1.month, dtBase1.day, -17520,
dtBase1.minute, dtBase1.second, dtBase1.millisecond);
Expect.equals(dtBase1.year - 2, dtTick.year);
Expect.equals(dtBase1.month, dtTick.month);
@@ -605,23 +605,23 @@
}
static void testDateStrings() {
- // TODO(floitsch): Clean up the Date API that deals with strings.
- var dt1 = new Date.fromString("2011-05-11 18:58:35Z");
+ // TODO(floitsch): Clean up the DateTime API that deals with strings.
+ var dt1 = DateTime.parse("2011-05-11 18:58:35Z");
Expect.equals(1305140315000, dt1.millisecondsSinceEpoch);
Expect.isTrue(dt1.isUtc);
- dt1 = new Date.fromString("20110511 18:58:35z");
+ dt1 = DateTime.parse("20110511 18:58:35z");
Expect.equals(1305140315000, dt1.millisecondsSinceEpoch);
Expect.isTrue(dt1.isUtc);
- dt1 = new Date.fromString("+20110511 18:58:35z");
+ dt1 = DateTime.parse("+20110511 18:58:35z");
Expect.equals(1305140315000, dt1.millisecondsSinceEpoch);
Expect.isTrue(dt1.isUtc);
var str = dt1.toString();
- var dt2 = new Date.fromString(str);
+ var dt2 = DateTime.parse(str);
Expect.equals(true, dt1 == dt2);
var dt3 = dt1.toUtc();
str = dt3.toString();
Expect.equals("2011-05-11 18:58:35.000Z", str);
- var dt4 = new Date.fromString("-1234-01-01 00:00:00Z");
+ var dt4 = DateTime.parse("-1234-01-01 00:00:00Z");
Expect.equals(-1234, dt4.year);
Expect.equals(1, dt4.month);
Expect.equals(1, dt4.day);
@@ -630,7 +630,7 @@
Expect.equals(0, dt4.second);
Expect.equals(0, dt4.millisecond);
Expect.isTrue(dt4.isUtc);
- var dt5 = new Date.fromString("0099-01-02");
+ var dt5 = DateTime.parse("0099-01-02");
Expect.equals(99, dt5.year);
Expect.equals(1, dt5.month);
Expect.equals(2, dt5.day);
@@ -639,19 +639,19 @@
Expect.equals(0, dt5.second);
Expect.equals(0, dt5.millisecond);
Expect.isFalse(dt5.isUtc);
- var dt6 = new Date.fromString("2012-01-01 00:00:10.012");
+ var dt6 = DateTime.parse("2012-01-01 00:00:10.012");
Expect.equals(12, dt6.millisecond);
- dt6 = new Date.fromString("2012-01-01 00:00:10.003");
+ dt6 = DateTime.parse("2012-01-01 00:00:10.003");
Expect.equals(3, dt6.millisecond);
- dt6 = new Date.fromString("2012-01-01 00:00:10.5");
+ dt6 = DateTime.parse("2012-01-01 00:00:10.5");
Expect.equals(500, dt6.millisecond);
- dt6 = new Date.fromString("2012-01-01 00:00:10.003Z");
+ dt6 = DateTime.parse("2012-01-01 00:00:10.003Z");
Expect.equals(3, dt6.millisecond);
- dt6 = new Date.fromString("2012-01-01 00:00:10.5z");
+ dt6 = DateTime.parse("2012-01-01 00:00:10.5z");
Expect.equals(500, dt6.millisecond);
- var dt7 = new Date.fromString("2011-05-11T18:58:35Z");
+ var dt7 = DateTime.parse("2011-05-11T18:58:35Z");
Expect.equals(1305140315000, dt7.millisecondsSinceEpoch);
- var dt8 = new Date.fromString("-1234-01-01T00:00:00Z");
+ var dt8 = DateTime.parse("-1234-01-01T00:00:00Z");
Expect.equals(-1234, dt8.year);
Expect.equals(1, dt8.month);
Expect.equals(1, dt8.day);
@@ -660,7 +660,7 @@
Expect.equals(0, dt8.second);
Expect.equals(0, dt8.millisecond);
Expect.isTrue(dt8.isUtc);
- var dt9 = new Date.fromString("-1234-01-01T00:00:00");
+ var dt9 = DateTime.parse("-1234-01-01T00:00:00");
Expect.equals(-1234, dt9.year);
Expect.equals(1, dt9.month);
Expect.equals(1, dt9.day);
@@ -669,7 +669,7 @@
Expect.equals(0, dt9.second);
Expect.equals(0, dt9.millisecond);
Expect.isFalse(dt9.isUtc);
- var dt10 = new Date.fromString("-12340101");
+ var dt10 = DateTime.parse("-12340101");
Expect.equals(-1234, dt10.year);
Expect.equals(1, dt10.month);
Expect.equals(1, dt10.day);
@@ -678,7 +678,7 @@
Expect.equals(0, dt10.second);
Expect.equals(0, dt10.millisecond);
Expect.isFalse(dt10.isUtc);
- dt1 = new Date.fromString("2012-02-27 13:27:00");
+ dt1 = DateTime.parse("2012-02-27 13:27:00");
Expect.equals(2012, dt1.year);
Expect.equals(2, dt1.month);
Expect.equals(27, dt1.day);
@@ -687,7 +687,7 @@
Expect.equals(0, dt1.second);
Expect.equals(0, dt1.millisecond);
Expect.equals(false, dt1.isUtc);
- dt1 = new Date.fromString("2012-02-27 13:27:00.423z");
+ dt1 = DateTime.parse("2012-02-27 13:27:00.423z");
Expect.equals(2012, dt1.year);
Expect.equals(2, dt1.month);
Expect.equals(27, dt1.day);
@@ -696,7 +696,7 @@
Expect.equals(0, dt1.second);
Expect.equals(423, dt1.millisecond);
Expect.equals(true, dt1.isUtc);
- dt1 = new Date.fromString("20120227 13:27:00");
+ dt1 = DateTime.parse("20120227 13:27:00");
Expect.equals(2012, dt1.year);
Expect.equals(2, dt1.month);
Expect.equals(27, dt1.day);
@@ -705,7 +705,7 @@
Expect.equals(0, dt1.second);
Expect.equals(0, dt1.millisecond);
Expect.equals(false, dt1.isUtc);
- dt1 = new Date.fromString("20120227T132700");
+ dt1 = DateTime.parse("20120227T132700");
Expect.equals(2012, dt1.year);
Expect.equals(2, dt1.month);
Expect.equals(27, dt1.day);
@@ -714,7 +714,7 @@
Expect.equals(0, dt1.second);
Expect.equals(0, dt1.millisecond);
Expect.equals(false, dt1.isUtc);
- dt1 = new Date.fromString("20120227");
+ dt1 = DateTime.parse("20120227");
Expect.equals(2012, dt1.year);
Expect.equals(2, dt1.month);
Expect.equals(27, dt1.day);
@@ -723,7 +723,7 @@
Expect.equals(0, dt1.second);
Expect.equals(0, dt1.millisecond);
Expect.equals(false, dt1.isUtc);
- dt1 = new Date.fromString("2012-02-27T14Z");
+ dt1 = DateTime.parse("2012-02-27T14Z");
Expect.equals(2012, dt1.year);
Expect.equals(2, dt1.month);
Expect.equals(27, dt1.day);
@@ -732,7 +732,7 @@
Expect.equals(0, dt1.second);
Expect.equals(0, dt1.millisecond);
Expect.equals(true, dt1.isUtc);
- dt1 = new Date.fromString("-123450101 00:00:00 Z");
+ dt1 = DateTime.parse("-123450101 00:00:00 Z");
Expect.equals(-12345, dt1.year);
Expect.equals(1, dt1.month);
Expect.equals(1, dt1.day);
@@ -745,7 +745,7 @@
// here), we round.
// If (eventually) we support more than just millisecond this test could
// fail. Please update the test in this case.
- dt1 = new Date.fromString("1999-01-02 23:59:59.99951");
+ dt1 = DateTime.parse("1999-01-02 23:59:59.99951");
Expect.equals(1999, dt1.year);
Expect.equals(1, dt1.month);
Expect.equals(3, dt1.day);
@@ -754,7 +754,7 @@
Expect.equals(0, dt1.second);
Expect.equals(0, dt1.millisecond);
Expect.equals(false, dt1.isUtc);
- dt1 = new Date.fromString("1999-01-02 23:58:59.99951Z");
+ dt1 = DateTime.parse("1999-01-02 23:58:59.99951Z");
Expect.equals(1999, dt1.year);
Expect.equals(1, dt1.month);
Expect.equals(2, dt1.day);
@@ -763,7 +763,7 @@
Expect.equals(0, dt1.second);
Expect.equals(0, dt1.millisecond);
Expect.equals(true, dt1.isUtc);
- dt1 = new Date.fromString("0009-09-09 09:09:09.009Z");
+ dt1 = DateTime.parse("0009-09-09 09:09:09.009Z");
Expect.equals(9, dt1.year);
Expect.equals(9, dt1.month);
Expect.equals(9, dt1.day);
@@ -776,33 +776,33 @@
static void testWeekday() {
// 2011-10-06 is Summertime.
- var d = new Date(2011, 10, 6, 0, 45, 37, 0);
- Expect.equals(Date.THU, d.weekday);
- d = new Date.utc(2011, 10, 6, 0, 45, 37, 0);
- Expect.equals(Date.THU, d.weekday);
- d = new Date(2011, 10, 5, 23, 45, 37, 0);
- Expect.equals(Date.WED, d.weekday);
- d = new Date.utc(2011, 10, 5, 23, 45, 37, 0);
- Expect.equals(Date.WED, d.weekday);
+ var d = new DateTime(2011, 10, 6, 0, 45, 37, 0);
+ Expect.equals(DateTime.THU, d.weekday);
+ d = new DateTime.utc(2011, 10, 6, 0, 45, 37, 0);
+ Expect.equals(DateTime.THU, d.weekday);
+ d = new DateTime(2011, 10, 5, 23, 45, 37, 0);
+ Expect.equals(DateTime.WED, d.weekday);
+ d = new DateTime.utc(2011, 10, 5, 23, 45, 37, 0);
+ Expect.equals(DateTime.WED, d.weekday);
// 1970-01-01 is Wintertime.
- d = new Date(1970, 1, 1, 0, 0, 0, 1);
- Expect.equals(Date.THU, d.weekday);
- d = new Date.utc(1970, 1, 1, 0, 0, 0, 1);
- Expect.equals(Date.THU, d.weekday);
- d = new Date.utc(1969, 12, 31, 23, 59, 59, 999);
- Expect.equals(Date.WED, d.weekday);
- d = new Date(1969, 12, 31, 23, 59, 59, 999);
- Expect.equals(Date.WED, d.weekday);
- d = new Date(2011, 10, 4, 23, 45, 37, 0);
- Expect.equals(Date.TUE, d.weekday);
- d = new Date(2011, 10, 3, 23, 45, 37, 0);
- Expect.equals(Date.MON, d.weekday);
- d = new Date(2011, 10, 2, 23, 45, 37, 0);
- Expect.equals(Date.SUN, d.weekday);
- d = new Date(2011, 10, 1, 23, 45, 37, 0);
- Expect.equals(Date.SAT, d.weekday);
- d = new Date(2011, 9, 30, 23, 45, 37, 0);
- Expect.equals(Date.FRI, d.weekday);
+ d = new DateTime(1970, 1, 1, 0, 0, 0, 1);
+ Expect.equals(DateTime.THU, d.weekday);
+ d = new DateTime.utc(1970, 1, 1, 0, 0, 0, 1);
+ Expect.equals(DateTime.THU, d.weekday);
+ d = new DateTime.utc(1969, 12, 31, 23, 59, 59, 999);
+ Expect.equals(DateTime.WED, d.weekday);
+ d = new DateTime(1969, 12, 31, 23, 59, 59, 999);
+ Expect.equals(DateTime.WED, d.weekday);
+ d = new DateTime(2011, 10, 4, 23, 45, 37, 0);
+ Expect.equals(DateTime.TUE, d.weekday);
+ d = new DateTime(2011, 10, 3, 23, 45, 37, 0);
+ Expect.equals(DateTime.MON, d.weekday);
+ d = new DateTime(2011, 10, 2, 23, 45, 37, 0);
+ Expect.equals(DateTime.SUN, d.weekday);
+ d = new DateTime(2011, 10, 1, 23, 45, 37, 0);
+ Expect.equals(DateTime.SAT, d.weekday);
+ d = new DateTime(2011, 9, 30, 23, 45, 37, 0);
+ Expect.equals(DateTime.FRI, d.weekday);
}
static void testMain() {
diff --git a/tests/corelib/has_next_iterator_test.dart b/tests/corelib/has_next_iterator_test.dart
index 803bfd0..299e11d 100644
--- a/tests/corelib/has_next_iterator_test.dart
+++ b/tests/corelib/has_next_iterator_test.dart
@@ -2,6 +2,9 @@
// 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 hasNextIterator.test;
+import 'dart:collection';
+
main() {
var it = new HasNextIterator([].iterator);
Expect.isFalse(it.hasNext);
diff --git a/tests/corelib/is_operator_basic_types_test.dart b/tests/corelib/is_operator_basic_types_test.dart
index 0e62b23..e0771bb 100644
--- a/tests/corelib/is_operator_basic_types_test.dart
+++ b/tests/corelib/is_operator_basic_types_test.dart
@@ -60,6 +60,6 @@
check([[], 'string', null]);
// Try to make it even harder.
- var string = new String.fromCharCodes([new Date.now().year % 100 + 1]);
+ var string = new String.fromCharCodes([new DateTime.now().year % 100 + 1]);
check([string.charCodes, string, null]);
}
diff --git a/tests/corelib/iterable_mapping_test.dart b/tests/corelib/iterable_mapping_test.dart
new file mode 100644
index 0000000..4cb7b97
--- /dev/null
+++ b/tests/corelib/iterable_mapping_test.dart
@@ -0,0 +1,55 @@
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+main() {
+ List<int> list1 = <int>[1, 2, 3];
+ List<int> list2 = const <int>[4, 5];
+ List<String> list3 = <String>[];
+ Set<int> set1 = new Set<int>();
+ set1.addAll([11, 12, 13]);
+ Set set2 = new Set();
+
+ Iterable mapped = list1.mappedBy((x) => x + 1);
+ Expect.isTrue(mapped is List);
+ Expect.listEquals([2, 3, 4], mapped);
+
+ mapped = mapped.mappedBy((x) => x + 1);
+ Expect.isTrue(mapped is List);
+ Expect.listEquals([3, 4, 5], mapped);
+
+ mapped = list2.mappedBy((x) => x + 1);
+ Expect.isTrue(mapped is List);
+ Expect.listEquals([5, 6], mapped);
+
+ mapped = mapped.mappedBy((x) => x + 1);
+ Expect.isTrue(mapped is List);
+ Expect.listEquals([6, 7], mapped);
+
+ mapped = list3.mappedBy((x) => x + 1);
+ Expect.isTrue(mapped is List);
+ Expect.listEquals([], mapped);
+
+ mapped = mapped.mappedBy((x) => x + 1);
+ Expect.isTrue(mapped is List);
+ Expect.listEquals([], mapped);
+
+ var expected = new Set<int>()..addAll([12, 13, 14]);
+ mapped = set1.mappedBy((x) => x + 1);
+ Expect.isFalse(mapped is List);
+ Expect.setEquals(expected, mapped.toSet());
+
+ expected = new Set<int>()..addAll([13, 14, 15]);
+ mapped = mapped.mappedBy((x) => x + 1);
+ Expect.isFalse(mapped is List);
+ Expect.setEquals(expected, mapped.toSet());
+
+ mapped = set2.mappedBy((x) => x + 1);
+ Expect.isFalse(mapped is List);
+ Expect.listEquals([], mapped.toList());
+
+ mapped = mapped.mappedBy((x) => x + 1);
+ Expect.isFalse(mapped is List);
+ Expect.listEquals([], mapped.toList());
+
+}
\ No newline at end of file
diff --git a/tests/corelib/iterable_skip_test.dart b/tests/corelib/iterable_skip_test.dart
index 63e6ef4..fff6db7 100644
--- a/tests/corelib/iterable_skip_test.dart
+++ b/tests/corelib/iterable_skip_test.dart
@@ -13,6 +13,7 @@
Set set2 = new Set();
Iterable<int> skip0 = list1.skip(0);
+ Expect.isTrue(skip0 is List);
Iterator<int> it = skip0.iterator;
Expect.isNull(it.current);
Expect.isTrue(it.moveNext());
@@ -25,6 +26,8 @@
Expect.isNull(it.current);
Iterable<int> skip1 = list1.skip(1);
+ Expect.isTrue(skip1 is List);
+ Expect.isTrue(skip1.skip(2).skip(1) is List);
it = skip1.iterator;
Expect.isNull(it.current);
Expect.isTrue(it.moveNext());
@@ -35,6 +38,8 @@
Expect.isNull(it.current);
Iterable<int> skip2 = list1.skip(2);
+ Expect.isTrue(skip2 is List);
+ Expect.isTrue(skip2.skip(2).skip(1) is List);
it = skip2.iterator;
Expect.isNull(it.current);
Expect.isTrue(it.moveNext());
@@ -43,12 +48,16 @@
Expect.isNull(it.current);
Iterable<int> skip3 = list1.skip(3);
+ Expect.isTrue(skip3 is List);
+ Expect.isTrue(skip3.skip(2).skip(1) is List);
it = skip3.iterator;
Expect.isNull(it.current);
Expect.isFalse(it.moveNext());
Expect.isNull(it.current);
Iterable<int> skip4 = list1.skip(4);
+ Expect.isTrue(skip4 is List);
+ Expect.isTrue(skip4.skip(2).skip(1) is List);
it = skip4.iterator;
Expect.isNull(it.current);
Expect.isFalse(it.moveNext());
@@ -93,6 +102,8 @@
Expect.isNull(it.current);
skip0 = list2.skip(0);
+ Expect.isTrue(skip0 is List);
+ Expect.isTrue(skip0.skip(2).skip(1) is List);
it = skip0.iterator;
Expect.isNull(it.current);
Expect.isTrue(it.moveNext());
@@ -103,6 +114,8 @@
Expect.isNull(it.current);
skip1 = list2.skip(1);
+ Expect.isTrue(skip1 is List);
+ Expect.isTrue(skip1.skip(2).skip(1) is List);
it = skip1.iterator;
Expect.isNull(it.current);
Expect.isTrue(it.moveNext());
@@ -111,24 +124,32 @@
Expect.isNull(it.current);
skip2 = list2.skip(2);
+ Expect.isTrue(skip2 is List);
+ Expect.isTrue(skip2.skip(2).skip(1) is List);
it = skip2.iterator;
Expect.isNull(it.current);
Expect.isFalse(it.moveNext());
Expect.isNull(it.current);
skip3 = list2.skip(3);
+ Expect.isTrue(skip3 is List);
+ Expect.isTrue(skip3.skip(2).skip(1) is List);
it = skip3.iterator;
Expect.isNull(it.current);
Expect.isFalse(it.moveNext());
Expect.isNull(it.current);
Iterable<String> skip02 = list3.skip(0);
+ Expect.isTrue(skip02 is List);
+ Expect.isTrue(skip02.skip(2).skip(1) is List);
Iterator<String> it2 = skip02.iterator;
Expect.isNull(it2.current);
Expect.isFalse(it2.moveNext());
Expect.isNull(it2.current);
Iterable<String> skip12 = list3.skip(1);
+ Expect.isTrue(skip12 is List);
+ Expect.isTrue(skip12.skip(2).skip(1) is List);
it2 = skip12.iterator;
Expect.isNull(it2.current);
Expect.isFalse(it2.moveNext());
diff --git a/tests/corelib/iterable_take_test.dart b/tests/corelib/iterable_take_test.dart
index 3910769..c775c52 100644
--- a/tests/corelib/iterable_take_test.dart
+++ b/tests/corelib/iterable_take_test.dart
@@ -13,12 +13,16 @@
Set set2 = new Set();
Iterable<int> take0 = list1.take(0);
+ Expect.isTrue(take0 is List);
+ Expect.isTrue(take0.take(2).take(1) is List);
Iterator<int> it = take0.iterator;
Expect.isNull(it.current);
Expect.isFalse(it.moveNext());
Expect.isNull(it.current);
Iterable<int> take1 = list1.take(1);
+ Expect.isTrue(take1 is List);
+ Expect.isTrue(take1.take(2).take(1) is List);
it = take1.iterator;
Expect.isNull(it.current);
Expect.isTrue(it.moveNext());
@@ -28,6 +32,8 @@
Iterable<int> take2 = list1.take(2);
it = take2.iterator;
+ Expect.isTrue(take2 is List);
+ Expect.isTrue(take2.take(2).take(1) is List);
Expect.isNull(it.current);
Expect.isTrue(it.moveNext());
Expect.equals(1, it.current);
@@ -37,6 +43,8 @@
Expect.isNull(it.current);
Iterable<int> take3 = list1.take(3);
+ Expect.isTrue(take3 is List);
+ Expect.isTrue(take3.take(2).take(1) is List);
it = take3.iterator;
Expect.isNull(it.current);
Expect.isTrue(it.moveNext());
@@ -49,6 +57,8 @@
Expect.isNull(it.current);
Iterable<int> take4 = list1.take(4);
+ Expect.isTrue(take4 is List);
+ Expect.isTrue(take4.take(2).take(1) is List);
it = take4.iterator;
Expect.isNull(it.current);
Expect.isTrue(it.moveNext());
@@ -105,12 +115,16 @@
Expect.isNull(it.current);
take0 = list2.take(0);
+ Expect.isTrue(take0 is List);
+ Expect.isTrue(take0.take(2).take(1) is List);
it = take0.iterator;
Expect.isNull(it.current);
Expect.isFalse(it.moveNext());
Expect.isNull(it.current);
take1 = list2.take(1);
+ Expect.isTrue(take1 is List);
+ Expect.isTrue(take1.take(2).take(1) is List);
it = take1.iterator;
Expect.isNull(it.current);
Expect.isTrue(it.moveNext());
@@ -119,6 +133,8 @@
Expect.isNull(it.current);
take2 = list2.take(2);
+ Expect.isTrue(take2 is List);
+ Expect.isTrue(take2.take(2).take(1) is List);
it = take2.iterator;
Expect.isNull(it.current);
Expect.isTrue(it.moveNext());
@@ -129,6 +145,8 @@
Expect.isNull(it.current);
take3 = list2.take(3);
+ Expect.isTrue(take3 is List);
+ Expect.isTrue(take3.take(2).take(1) is List);
it = take3.iterator;
Expect.isNull(it.current);
Expect.isTrue(it.moveNext());
@@ -139,12 +157,16 @@
Expect.isNull(it.current);
Iterable<String> take02 = list3.take(0);
+ Expect.isTrue(take02 is List);
+ Expect.isTrue(take02.take(2).take(1) is List);
Iterator<String> it2 = take02.iterator;
Expect.isNull(it2.current);
Expect.isFalse(it2.moveNext());
Expect.isNull(it2.current);
Iterable<String> take12 = list3.take(1);
+ Expect.isTrue(take12 is List);
+ Expect.isTrue(take12.take(2).take(1) is List);
it2 = take12.iterator;
Expect.isNull(it2.current);
Expect.isFalse(it2.moveNext());
diff --git a/tests/corelib/linked_hash_map_test.dart b/tests/corelib/linked_hash_map_test.dart
index ba39eed..4de0b3e 100644
--- a/tests/corelib/linked_hash_map_test.dart
+++ b/tests/corelib/linked_hash_map_test.dart
@@ -3,6 +3,8 @@
// BSD-style license that can be found in the LICENSE file.
// Dart test for linked hash-maps.
+library linkedHashMap.test;
+import 'dart:collection' show LinkedHashMap;
class LinkedHashMapTest {
static void testMain() {
diff --git a/tests/corelib/list_iterators_test.dart b/tests/corelib/list_iterators_test.dart
index 0be3cf8..c20e5eb 100644
--- a/tests/corelib/list_iterators_test.dart
+++ b/tests/corelib/list_iterators_test.dart
@@ -5,6 +5,7 @@
class ListIteratorsTest {
static void checkListIterator(List a) {
Iterator it = a.iterator;
+ Expect.isNull(it.current);
for (int i = 0; i < a.length; i++) {
Expect.isTrue(it.moveNext());
var elem = it.current;
@@ -27,27 +28,18 @@
// This is mostly undefined behavior.
Iterator it = g.iterator;
Expect.isTrue(it.moveNext());
- g.removeLast();
Expect.equals(1, it.current);
Expect.isTrue(it.moveNext());
g[1] = 49;
// The iterator keeps the last value.
Expect.equals(2, it.current);
+ Expect.isTrue(it.moveNext());
g.removeLast();
// The iterator keeps the last value.
- Expect.equals(2, it.current);
- Expect.isFalse(it.moveNext());
- Expect.isNull(it.current);
-
- g.clear();
- g.addAll([10, 20]);
- int sum = 0;
- for (var elem in g) {
- sum += elem;
- // Iterator must realize that g has no more elements.
- g.removeLast();
- }
- Expect.equals(10, sum);
+ Expect.equals(3, it.current);
+ Expect.throws(it.moveNext, (e) => e is ConcurrentModificationError);
+ // No progress when throwing.
+ Expect.equals(3, it.current);
}
}
diff --git a/tests/corelib/list_reversed_test.dart b/tests/corelib/list_reversed_test.dart
new file mode 100644
index 0000000..03b99ce
--- /dev/null
+++ b/tests/corelib/list_reversed_test.dart
@@ -0,0 +1,40 @@
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+
+main() {
+ testOperations();
+}
+
+void testOperations() {
+ // Comparison lists.
+ List l = const [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
+ List r = const [10, 9, 8, 7, 6, 5, 4, 3, 2, 1];
+ // A base list that starts out like l.
+ List base = l.toList();
+ // A lazy reverse of base.
+ List reversed = base.reversed;
+
+ Expect.listEquals(r, reversed);
+ Expect.listEquals(l, reversed.reversed);
+ for (int i = 0; i < r.length; i++) {
+ Expect.equals(r[i], reversed[i]);
+ }
+ Expect.equals(4, base.indexOf(5));
+ Expect.equals(5, reversed.indexOf(5));
+
+ // Combinations of start and end relative to start/end of list.
+ List subr = [8, 7, 6, 5, 4, 3];
+ Expect.listEquals(subr, reversed.skip(2).take(6));
+ Expect.listEquals(subr, reversed.take(8).skip(2));
+ Expect.listEquals(subr, reversed.reversed.skip(2).take(6).reversed);
+ Expect.listEquals(subr, reversed.reversed.take(8).skip(2).reversed);
+ Expect.listEquals(subr, reversed.take(8).reversed.take(6).reversed);
+ Expect.listEquals(subr, reversed.reversed.take(8).reversed.take(6));
+ Expect.listEquals(subr, reversed.reversed.skip(2).reversed.skip(2));
+ Expect.listEquals(subr, reversed.skip(2).reversed.skip(2).reversed);
+
+ // Reverse const list.
+ Expect.listEquals(r, l.reversed);
+}
diff --git a/tests/corelib/map_from_test.dart b/tests/corelib/map_from_test.dart
index 8c8a5bc..bc47e9d 100644
--- a/tests/corelib/map_from_test.dart
+++ b/tests/corelib/map_from_test.dart
@@ -2,6 +2,9 @@
// 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 map.from.test;
+import 'dart:collection';
+
main() {
testWithConstMap();
testWithNonConstMap();
diff --git a/tests/corelib/queue_first_test.dart b/tests/corelib/queue_first_test.dart
index 209d591..93bc265 100644
--- a/tests/corelib/queue_first_test.dart
+++ b/tests/corelib/queue_first_test.dart
@@ -2,6 +2,10 @@
// 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 queue.first.test;
+
+import 'dart:collection' show Queue;
+
main() {
Queue<int> queue1 = new Queue<int>();
queue1..add(11)
diff --git a/tests/corelib/queue_iterator_test.dart b/tests/corelib/queue_iterator_test.dart
index ca1d9ab..3b7e3a9 100644
--- a/tests/corelib/queue_iterator_test.dart
+++ b/tests/corelib/queue_iterator_test.dart
@@ -2,6 +2,10 @@
// 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 queue.iterator.test;
+
+import 'dart:collection' show Queue;
+
class QueueIteratorTest {
static testMain() {
testSmallQueue();
diff --git a/tests/corelib/queue_last_test.dart b/tests/corelib/queue_last_test.dart
index 39983ba..58096d9 100644
--- a/tests/corelib/queue_last_test.dart
+++ b/tests/corelib/queue_last_test.dart
@@ -2,6 +2,9 @@
// 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 queue.last.test;
+import 'dart:collection' show Queue;
+
main() {
Queue<int> queue1 = new Queue<int>();
queue1..add(11)
diff --git a/tests/corelib/queue_single_test.dart b/tests/corelib/queue_single_test.dart
index 077c507..533cde6 100644
--- a/tests/corelib/queue_single_test.dart
+++ b/tests/corelib/queue_single_test.dart
@@ -2,6 +2,9 @@
// 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 queue.single.test;
+import 'dart:collection' show Queue;
+
main() {
Queue<int> queue1 = new Queue<int>();
queue1.add(42);
diff --git a/tests/corelib/queue_test.dart b/tests/corelib/queue_test.dart
index 953721b..11f6e3c 100644
--- a/tests/corelib/queue_test.dart
+++ b/tests/corelib/queue_test.dart
@@ -2,7 +2,9 @@
// 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 queue_test;
+library queue.test;
+
+import 'dart:collection';
class QueueTest {
diff --git a/tests/html/canvas_pixel_array_type_alias_test.dart b/tests/html/canvas_pixel_array_type_alias_test.dart
index 9fef8ab..bcde1f4 100644
--- a/tests/html/canvas_pixel_array_type_alias_test.dart
+++ b/tests/html/canvas_pixel_array_type_alias_test.dart
@@ -28,10 +28,10 @@
test('CreateImageData', () {
ImageData image = context.createImageData(canvas.width,
canvas.height);
- Uint8ClampedArray data = image.data;
+ List<int> data = image.data;
// It is legal for the dart2js compiler to believe the type of the native
// ImageData.data and elides the check, so check the type explicitly:
- expect(confuseType(data) is Uint8ClampedArray, isTrue,
+ expect(confuseType(data) is List<int>, isTrue,
reason: 'canvas array type');
expect(data, hasLength(40000));
@@ -43,7 +43,7 @@
});
}
-void checkPixel(Uint8ClampedArray data, int offset, List<int> rgba)
+void checkPixel(List<int> data, int offset, List<int> rgba)
{
offset *= 4;
for (var i = 0; i < 4; ++i) {
diff --git a/tests/html/canvas_test.dart b/tests/html/canvas_test.dart
index 56994f0..79c48cb 100644
--- a/tests/html/canvas_test.dart
+++ b/tests/html/canvas_test.dart
@@ -18,7 +18,7 @@
test('CreateImageData', () {
ImageData image = context.createImageData(canvas.width,
canvas.height);
- Uint8ClampedArray data = image.data;
+ List<int> data = image.data;
expect(data, hasLength(40000));
checkPixel(data, 0, [0, 0, 0, 0]);
@@ -49,7 +49,7 @@
});
}
-void checkPixel(Uint8ClampedArray data, int offset, List<int> rgba)
+void checkPixel(List<int> data, int offset, List<int> rgba)
{
offset *= 4;
for (var i = 0; i < 4; ++i) {
diff --git a/tests/html/canvasrenderingcontext2d_test.dart b/tests/html/canvasrenderingcontext2d_test.dart
index 1e77f6c..6b88843 100644
--- a/tests/html/canvasrenderingcontext2d_test.dart
+++ b/tests/html/canvasrenderingcontext2d_test.dart
@@ -8,7 +8,7 @@
import 'dart:html';
// Some rounding errors in the browsers.
-checkPixel(Uint8ClampedArray pixel, List<int> expected) {
+checkPixel(List<int> pixel, List<int> expected) {
expect(pixel[0], closeTo(expected[0], 1));
expect(pixel[1], closeTo(expected[1], 1));
expect(pixel[2], closeTo(expected[2], 1));
@@ -23,7 +23,7 @@
var context = canvas.context2d;
- Uint8ClampedArray readPixel() {
+ List<int> readPixel() {
var imageData = context.getImageData(2, 2, 1, 1);
return imageData.data;
}
diff --git a/tests/html/documentfragment_test.dart b/tests/html/documentfragment_test.dart
index 304216f..326fa41 100644
--- a/tests/html/documentfragment_test.dart
+++ b/tests/html/documentfragment_test.dart
@@ -80,30 +80,6 @@
// });
});
- test('Unsupported operations throw errors', () {
- var emptyFragment = new DocumentFragment();
- expectUnsupported(() => emptyFragment.attributes = {});
- expectUnsupported(() => emptyFragment.classes = []);
- expectUnsupported(() => emptyFragment.classes.add('foo'));
- expectUnsupported(() => emptyFragment.dataAttributes = {});
- expectUnsupported(() => emptyFragment.contentEditable = "true");
- expectUnsupported(() => emptyFragment.dir);
- expectUnsupported(() => emptyFragment.dir = "ltr");
- expectUnsupported(() => emptyFragment.draggable = true);
- expectUnsupported(() => emptyFragment.hidden = true);
- expectUnsupported(() => emptyFragment.id = "foo");
- expectUnsupported(() => emptyFragment.lang);
- expectUnsupported(() => emptyFragment.lang = "en");
- expectUnsupported(() => emptyFragment.scrollLeft = 10);
- expectUnsupported(() => emptyFragment.scrollTop = 10);
- expectUnsupported(() => emptyFragment.spellcheck = true);
- expectUnsupported(() => emptyFragment.translate = true);
- expectUnsupported(() => emptyFragment.tabIndex = 5);
- expectUnsupported(() => emptyFragment.title = "foo");
- expectUnsupported(() => emptyFragment.webkitdropzone = "foo");
- expectUnsupported(() => emptyFragment.webkitRegionOverflow = "foo");
- });
-
group('children', () {
var fragment;
var children;
@@ -193,155 +169,8 @@
var fragment = new DocumentFragment();
fragment.nodes.addAll([new Text("foo"), new Element.html("<A>bar</A>")]);
expect(fragment.innerHtml, "foo<a>bar</a>");
- expect(fragment.outerHtml, "foo<a>bar</a>");
});
- group('insertAdjacentElement', () {
- getFragment() => new DocumentFragment.html("<a>foo</a>");
-
- test('beforeBegin does nothing', () {
- var fragment = getFragment();
- expect(fragment.insertAdjacentElement("beforeBegin",
- new Element.tag("b")), isNull);
- expect(fragment.innerHtml, "<a>foo</a>");
- });
-
- test('afterEnd does nothing', () {
- var fragment = getFragment();
- expect(fragment.insertAdjacentElement("afterEnd",
- new Element.tag("b")), isNull);
- expect(fragment.innerHtml, "<a>foo</a>");
- });
-
- test('afterBegin inserts the element', () {
- var fragment = getFragment();
- var el = new Element.tag("b");
- expect(fragment.insertAdjacentElement("afterBegin", el), equals(el));
- expect(fragment.innerHtml, "<b></b><a>foo</a>");
- });
-
- test('beforeEnd inserts the element', () {
- var fragment = getFragment();
- var el = new Element.tag("b");
- expect(fragment.insertAdjacentElement("beforeEnd", el), equals(el));
- expect(fragment.innerHtml, "<a>foo</a><b></b>");
- });
- });
-
- group('insertAdjacentText', () {
- getFragment() => new DocumentFragment.html("<a>foo</a>");
-
- test('beforeBegin does nothing', () {
- var fragment = getFragment();
- fragment.insertAdjacentText("beforeBegin", "foo");
- expect(fragment.innerHtml, "<a>foo</a>");
- });
-
- test('afterEnd does nothing', () {
- var fragment = getFragment();
- fragment.insertAdjacentText("afterEnd", "foo");
- expect(fragment.innerHtml, "<a>foo</a>");
- });
-
- test('afterBegin inserts the text', () {
- var fragment = getFragment();
- fragment.insertAdjacentText("afterBegin", "foo");
- expect(fragment.innerHtml, "foo<a>foo</a>");
- });
-
- test('beforeEnd inserts the text', () {
- var fragment = getFragment();
- fragment.insertAdjacentText("beforeEnd", "foo");
- expect(fragment.innerHtml, "<a>foo</a>foo");
- });
- });
-
- group('insertAdjacentHtml', () {
- getFragment() => new DocumentFragment.html("<a>foo</a>");
-
- test('beforeBegin does nothing', () {
- var fragment = getFragment();
- fragment.insertAdjacentHtml("beforeBegin", "foo<br>");
- expect(fragment.innerHtml, "<a>foo</a>");
- });
-
- test('afterEnd does nothing', () {
- var fragment = getFragment();
- fragment.insertAdjacentHtml("afterEnd", "<br>foo");
- expect(fragment.innerHtml, "<a>foo</a>");
- });
-
- test('afterBegin inserts the HTML', () {
- var fragment = getFragment();
- fragment.insertAdjacentHtml("afterBegin", "foo<br>");
- expect(fragment.innerHtml, "foo<br><a>foo</a>");
- });
-
- test('beforeEnd inserts the HTML', () {
- var fragment = getFragment();
- fragment.insertAdjacentHtml("beforeEnd", "<br>foo");
- expect(fragment.innerHtml, "<a>foo</a><br>foo");
- });
- });
-
- // Just test that these methods don't throw errors
- test("no-op methods don't throw errors", () {
- var fragment = new DocumentFragment();
- fragment.on.click.add((e) => null);
- fragment.blur();
- fragment.focus();
- fragment.click();
- fragment.scrollByLines(2);
- fragment.scrollByPages(2);
- fragment.scrollIntoView();
- fragment.webkitRequestFullScreen(2);
- });
-
- test('default values', () {
- var fragment = new DocumentFragment();
- expect(fragment.contentEditable, "false");
- expect(fragment.tabIndex, -1);
- expect(fragment.id, "");
- expect(fragment.title, "");
- expect(fragment.tagName, "");
- expect(fragment.webkitdropzone, "");
- expect(fragment.webkitRegionOverflow, "");
- expect(fragment.isContentEditable, isFalse);
- expect(fragment.draggable, isFalse);
- expect(fragment.hidden, isFalse);
- expect(fragment.spellcheck, isFalse);
- expect(fragment.translate, isFalse);
- expect(fragment.nextElementSibling, isNull);
- expect(fragment.previousElementSibling, isNull);
- expect(fragment.offsetParent, isNull);
- expect(fragment.parent, isNull);
- expect(fragment.attributes.isEmpty, isTrue);
- expect(fragment.classes.isEmpty, isTrue);
- expect(fragment.dataAttributes.isEmpty, isTrue);
- });
-
- test('style', () {
- var fragment = new DocumentFragment();
- var style = fragment.style;
- expectEmptyStyleDeclaration(style);
- fragment.computedStyle.then(expectAsync1((computedStyle) {
- expectEmptyStyleDeclaration(computedStyle);
- }));
- });
-
- // TODO(nweiz): re-enable when const is better supported in dartc and/or frog
- // test('const fields are immutable', () {
- // var fragment = new DocumentFragment();
- // assertConstError(() => fragment.attributes['title'] = 'foo');
- // assertConstError(() => fragment.dataAttributes['title'] = 'foo');
- // fragment.rect.then((ElementRect rect) {
- // assertConstError(() => rect.clientRects.add(null));
- // callbackDone();
- // });
- // // Issue 174: #classes is currently not const
- // // assertConstError(() => fragment.classes.add('foo'));
- // });
-
test('query searches the fragment', () {
var fragment = new DocumentFragment.html(
"<div class='foo'><a>foo</a><b>bar</b></div>");
diff --git a/tests/html/event_customevent_test.dart b/tests/html/event_customevent_test.dart
index ce80b55..2f50627 100644
--- a/tests/html/event_customevent_test.dart
+++ b/tests/html/event_customevent_test.dart
@@ -27,7 +27,8 @@
useHtmlConfiguration();
eventTest('CustomEvent.initCustomEvent', () {
- return new CustomEvent('foo', false, false, 'detail');
+ return new CustomEvent('foo', canBubble: false, cancelable: false,
+ detail: 'detail');
},
(ev) { expect(ev.detail, equals('detail')); });
}
diff --git a/tests/html/events_test.dart b/tests/html/events_test.dart
index ccd03e5..11a9623 100644
--- a/tests/html/events_test.dart
+++ b/tests/html/events_test.dart
@@ -54,7 +54,6 @@
});
test('InitMouseEvent', () {
DivElement div = new Element.tag('div');
- MouseEvent event = document.$dom_createEvent('MouseEvent');
- event.$dom_initMouseEvent('zebra', true, true, window, 0, 1, 2, 3, 4, false, false, false, false, 0, div);
+ MouseEvent event = new MouseEvent('zebra', relatedTarget: div);
});
}
diff --git a/tests/html/exceptions_test.dart b/tests/html/exceptions_test.dart
index e4bbe6b..5521d29 100644
--- a/tests/html/exceptions_test.dart
+++ b/tests/html/exceptions_test.dart
@@ -10,7 +10,7 @@
final event = new Event('Event');
// Intentionally do not initialize it!
try {
- document.$dom_dispatchEvent(event);
+ document.dispatchEvent(event);
} on EventException catch (e) {
expect(e.name, DomException.UNSPECIFIED_EVENT_TYPE);
}
diff --git a/tests/html/fileapi_test.dart b/tests/html/fileapi_test.dart
index df40fd0..a2d23d5 100644
--- a/tests/html/fileapi_test.dart
+++ b/tests/html/fileapi_test.dart
@@ -30,7 +30,7 @@
});
}
- group('unsupported throws', () {
+ group('unsupported_throws', () {
test('requestFileSystem', () {
var expectation = FileSystem.supported ? returnsNormally : throws;
expect(() {
diff --git a/tests/html/history_test.dart b/tests/html/history_test.dart
index bee3323..6f4eb3a 100644
--- a/tests/html/history_test.dart
+++ b/tests/html/history_test.dart
@@ -22,6 +22,12 @@
});
});
+ group('supported_HashChangeEvent', () {
+ test('supported', () {
+ expect(HashChangeEvent.supported, true);
+ });
+ });
+
var expectation = History.supportsState ? returnsNormally : throws;
group('history', () {
@@ -66,5 +72,22 @@
expect(window.location.href.endsWith('foo=baz'), isTrue);
}, expectation);
});
+
+ test('popstatevent', () {
+ expect(() {
+ var event = new Event.eventType('PopStateEvent', 'popstate');
+ expect(event is PopStateEvent, true);
+ }, expectation);
+ });
+
+ test('hashchangeevent', () {
+ var expectation = HashChangeEvent.supported ? returnsNormally : throws;
+ expect(() {
+ var event = new HashChangeEvent('change', oldUrl:'old', newUrl: 'new');
+ expect(event is HashChangeEvent, true);
+ expect(event.oldUrl, 'old');
+ expect(event.newUrl, 'new');
+ }, expectation);
+ });
});
}
diff --git a/tests/html/html.status b/tests/html/html.status
index 150e3b4..36b8e1a 100644
--- a/tests/html/html.status
+++ b/tests/html/html.status
@@ -19,14 +19,18 @@
input_element_test/supported_datetime-local: Fail
input_element_test/supported_month: Fail
input_element_test/supported_week: Fail
+speechrecognition_test/supported: Pass, Fail # Chrome stable does not support it.
shadow_dom_test/supported: Fail
css_test: Pass, Fail # Issue 7978
+speechrecognition_test/types: Pass, Fail
[ $runtime == chrome || $runtime == drt]
-audiobuffersourcenode_test: Pass, Fail # AudiobufferSourceNode is flaky on Chrome and Dartium.
+audiobuffersourcenode_test: Pass, Fail, Timeout # AudiobufferSourceNode is flaky on Chrome and Dartium - filed issue 8021 for the timeout.
+audiocontext_test: Pass, Timeout # Issue 8021.
[ $compiler == none && ($runtime == drt || $runtime == dartium) ]
request_animation_frame_test: Skip # drt hangs; requestAnimationFrame not implemented
+transferables_test: Pass, Fail # Issue 8026
[ $compiler == none && ($runtime == drt || $runtime == dartium) && $system == windows]
websql_test: Skip # Issue 4941: stderr contains a backtrace.
@@ -56,6 +60,7 @@
element_types_test/supported_shadow: Fail
form_data_test: Fail # TODO(efortuna): Issue 7875.
fileapi_test/supported: Fail
+history_test/supported_HashChangeEvent: Fail
inner_frame_test: Skip
input_element_test/supported_date: Fail
input_element_test/supported_datetime: Fail
@@ -65,13 +70,16 @@
input_element_test/supported_week: Fail
isolates_test: Skip
measurement_test: Fail, Pass
-media_stream_test/supported: Fail
+media_stream_test/supported_media: Fail
+media_stream_test/supported_MediaStreamEvent: Fail
+media_stream_test/supported_MediaStreamTrackEvent: Fail
messageevent_test: Fail
mutationobserver_test/supported: Fail
native_gc_test: Fail, Pass # BUG(7774): Untriaged.
notifications_test/supported: Fail
serialized_script_value_test: Fail
shadow_dom_test/supported: Fail
+speechrecognition_test/supported: Fail
storage_test: Fail, Pass
svgelement_test/additionalConstructors: Fail
svgelement2_test: Fail
@@ -80,6 +88,7 @@
websocket_test/websocket: Fail # TODO(efortuna): Issue 7875.
window_open_test: Skip
xhr_cross_origin_test: Fail # TODO(efortuna): Issue 7875.
+xhr_test/supported_HttpRequestProgressEvent: Fail
xsltprocessor_test: Fail
[ $runtime == ie9 ]
@@ -112,6 +121,7 @@
dom_constructors_test: Fail
element_test/matches: Fail # IE9 does not support matches
fileapi_test/supported: Fail
+history_test/supported_HashChangeEvent: Fail
history_test/supported_state: Fail
indexeddb_1_test/supported: Fail
input_element_test/supported_date: Fail
@@ -126,13 +136,16 @@
input_element_test/supported_time: Fail
input_element_test/supported_url: Fail
input_element_test/supported_week: Fail
-media_stream_test/supported: Fail
+media_stream_test/supported_media: Fail
+media_stream_test/supported_MediaStreamEvent: Fail
+media_stream_test/supported_MediaStreamTrackEvent: Fail
messageevent_test: Fail
mutationobserver_test/supported: Fail
notifications_test/supported: Fail
postmessage_structured_test: Skip # BUG(5685): times out.
serialized_script_value_test: Fail
shadow_dom_test/supported: Fail
+speechrecognition_test/supported: Fail
svg_3_test: Fail
svgelement_test/additionalConstructors: Fail
svgelement2_test: Fail
@@ -142,29 +155,59 @@
xsltprocessor_test: Skip # BUG(4016)
isolates_test: Skip # BUG(4016)
xhr_test: Skip # BUG(4016)
+xhr_test/supported_HttpRequestProgressEvent: Fail
xhr_cross_origin_test: Fail # Issue 6016.
[ $runtime == safari ]
-# TODO(ahe, efortuna): These tests need to be retriaged now that we're testing
-# with Safari 6.
-audiocontext_test: Crash, Fail # Issue: 7414
-element_test/elements: Crash, Fail # Issue: 7414
element_types_test/supported_content: Fail
element_types_test/supported_datalist: Fail
+element_types_test/supported_details: Fail
+element_types_test/supported_embed: Fail
+element_types_test/supported_keygen: Fail
+element_types_test/supported_meter: Fail
+element_types_test/supported_object: Fail
+element_types_test/supported_output: Fail
+element_types_test/supported_progress: Fail
element_types_test/supported_shadow: Fail
-performance_api_test/supported: Fail
+element_types_test/supported_track: Pass, Fail
+fileapi_test/supported: Fail
indexeddb_1_test/supported: Fail
input_element_test/supported_date: Fail
-input_element_test/supported_datetime: Fail
input_element_test/supported_datetime-local: Fail
+input_element_test/supported_datetime: Fail
+input_element_test/supported_email: Fail
input_element_test/supported_month: Fail, Crash
+input_element_test/supported_number: Fail
input_element_test/supported_range: Fail, Crash # TODO(efortuna): Please triage this failure.
input_element_test/supported_time: Fail, Crash
+input_element_test/supported_url: Fail
input_element_test/supported_week: Fail, Crash
-fileapi_test/supported: Fail
-media_stream_test/supported: Fail
-node_test: Skip # Issue 6457
+media_stream_test/supported_media: Fail
+media_stream_test/supported_MediaStreamEvent: Fail
+media_stream_test/supported_MediaStreamTrackEvent: Fail
+notifications_test/supported: Fail # Issue: 7414
+performance_api_test/supported: Fail
shadow_dom_test/supported: Fail
+speechrecognition_test/supported: Fail
+
+audiocontext_test: Crash, Fail # Issue: 7414
+datalistelement_test: Fail # Issue: 7414
+element_test/elements: Crash, Fail # Issue: 7414
+element_types_test/constructors: Fail
+fileapi_test/getDirectory: Fail # Issue: 7414
+fileapi_test/getFile: Pass, Fail # Issue: 7414
+fileapi_test/unsupported_throws: Fail # Issue: 7414
+input_element_test/constructors: Fail # Issue: 7414
+input_element_test/supported_tel: Pass, Fail # Issue: 7414
+media_stream_test/constructors: Pass, Fail # Issue: 7414
+node_test: Skip # Issue 6457
+notifications_test/unsupported_throws: Fail # Issue: 7414
+notifications_test/webkitNotifications: Fail # Issue: 7414
+performance_api_test/performance: Fail # Issue: 7414
+shadow_dom_test/ShadowDOM_tests: Fail # Issue: 7414
+wheelevent_test: Fail # Issue: 7414
+speechrecognition_test/types: Pass, Fail
+
[ $runtime == opera ]
document_test/supports_cssCanvasContext: Fail
@@ -194,6 +237,7 @@
notifications_test/supported: Fail
performance_api_test/supported: Fail
serialized_script_value_test: Fail
+speechrecognition_test/supported: Fail
svg_3_test: Fail
svgelement_test/additionalConstructors: Fail
svgelement2_test: Fail
@@ -229,15 +273,18 @@
input_element_test/supported_week: Fail
input_element_test/supported_number: Fail
input_element_test/supported_range: Fail
+media_stream_test/supported_MediaStreamEvent: Fail
+media_stream_test/supported_MediaStreamTrackEvent: Fail
notifications_test/supported: Fail
shadow_dom_test/supported: Fail
+speechrecognition_test/supported: Fail
# Interfaces not implemented: SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGStylable
svg_3_test: Fail
svgelement_test/additionalConstructors: Fail
svgelement2_test: Fail
transferables_test: Fail # Issue 3392.
websql_test: Fail # FF does not support web SQL
-wheelevent_test: Skip # Times out on FF 16. Issue 7943
+xhr_test/supported_HttpRequestProgressEvent: Fail
[ $runtime == ie9 && ($system == linux || $system == macos) ]
*: Skip
diff --git a/tests/html/indexeddb_1_test.dart b/tests/html/indexeddb_1_test.dart
index c9d7c5f..f9ae43f 100644
--- a/tests/html/indexeddb_1_test.dart
+++ b/tests/html/indexeddb_1_test.dart
@@ -165,6 +165,7 @@
test('test2', testReadWrite(123, 12345, equals(12345)));
test('test3', testReadWrite(123, [1, 2, 3], equals([1, 2, 3])));
test('test4', testReadWrite(123, [2, 3, 4], equals([2, 3, 4])));
+ test('test4', testReadWrite(123, false, equals(false)));
}
tests_typed() {
@@ -172,6 +173,7 @@
test('test2', testReadWriteTyped(123, 12345, equals(12345)));
test('test3', testReadWriteTyped(123, [1, 2, 3], equals([1, 2, 3])));
test('test4', testReadWriteTyped(123, [2, 3, 4], equals([2, 3, 4])));
+ test('test4', testReadWriteTyped(123, false, equals(false)));
}
main() {
@@ -190,7 +192,7 @@
var expectation = idb.IdbFactory.supported ? returnsNormally : throws;
expect(() {
- var db = window.indexedDB;
+ var db = html.window.indexedDB;
}, expectation);
});
diff --git a/tests/html/instance_of_test.dart b/tests/html/instance_of_test.dart
index dd4355b..30572c8 100644
--- a/tests/html/instance_of_test.dart
+++ b/tests/html/instance_of_test.dart
@@ -20,10 +20,10 @@
var isCanvasElement =
predicate((x) => x is CanvasElement, 'is a CanvasElement');
var isImageData = predicate((x) => x is ImageData, 'is an ImageData');
- //var isCanvasPixelArray =
- // predicate((x) => x is CanvasPixelArray, 'is a CanvasPixelArray');
- var isUint8ClampedArray =
- predicate((x) => x is Uint8ClampedArray, 'is a Uint8ClampedArray');
+ //var isUint8ClampedArray =
+ // predicate((x) => x is Uint8ClampedArray, 'is a Uint8ClampedArray');
+ var isIntList =
+ predicate((x) => x is List<int>, 'is a List<int>');
useHtmlConfiguration();
test('Instanceof', () {
@@ -60,7 +60,7 @@
expect(bytes, isNot(isElement));
expect(bytes, isNot(isCanvasElement));
expect(bytes, isNot(isImageData));
- expect(bytes, isUint8ClampedArray);
+ expect(bytes, isIntList);
// FIXME: Ensure this is an SpanElement when we next update
// WebKit IDL.
diff --git a/tests/html/keyboard_event_test.dart b/tests/html/keyboard_event_test.dart
index 55005592..0fe4fdb 100644
--- a/tests/html/keyboard_event_test.dart
+++ b/tests/html/keyboard_event_test.dart
@@ -15,7 +15,7 @@
}
test('keyboardEvent constructor', () {
- var event = new KeyboardEvent('keyup', document.window);
+ var event = new KeyboardEvent('keyup');
});
test('keys', () {
// This test currently is pretty much a no-op because we
diff --git a/tests/html/media_stream_test.dart b/tests/html/media_stream_test.dart
index 1e97511..2c6635a 100644
--- a/tests/html/media_stream_test.dart
+++ b/tests/html/media_stream_test.dart
@@ -10,12 +10,40 @@
main() {
useHtmlIndividualConfiguration();
- group('supported', () {
+ group('supported_media', () {
test('supported', () {
expect(MediaStream.supported, true);
});
});
- // No additional tests right now since this API prompts for user input to
- // continue.
+ group('supported_MediaStreamEvent', () {
+ test('supported', () {
+ expect(MediaStreamEvent.supported, true);
+ });
+ });
+
+ group('supported_MediaStreamTrackEvent', () {
+ test('supported', () {
+ expect(MediaStreamTrackEvent.supported, true);
+ });
+ });
+
+ group('constructors', () {
+ test('MediaStreamEvent', () {
+ var expectation = MediaStreamEvent.supported ? returnsNormally : throws;
+ expect(() {
+ var event = new Event.eventType('MediaStreamEvent', 'media');
+ expect(event is MediaStreamEvent, isTrue);
+ }, expectation);
+ });
+
+ test('MediaStreamTrackEvent', () {
+ var expectation =
+ MediaStreamTrackEvent.supported ? returnsNormally : throws;
+ expect(() {
+ var event = new Event.eventType('MediaStreamTrackEvent', 'media');
+ expect(event is MediaStreamTrackEvent, isTrue);
+ }, expectation);
+ });
+ });
}
diff --git a/tests/html/messageevent_test.dart b/tests/html/messageevent_test.dart
index 102f324..9ed4288 100644
--- a/tests/html/messageevent_test.dart
+++ b/tests/html/messageevent_test.dart
@@ -7,8 +7,9 @@
useHtmlConfiguration();
test('MessageEvent.initMessageEvent', () {
- final event = document.$dom_createEvent('MessageEvent');
- event.initMessageEvent('type', false, true, 'data', 'origin', 'lastEventId', window, []);
+ final event = new MessageEvent('type', cancelable: true, data: 'data',
+ origin: 'origin', lastEventId: 'lastEventId');
+
expect(event.type, equals('type'));
expect(event.bubbles, isFalse);
expect(event.cancelable, isTrue);
diff --git a/tests/html/mutationobserver_test.dart b/tests/html/mutationobserver_test.dart
index e23a04c..1886a57 100644
--- a/tests/html/mutationobserver_test.dart
+++ b/tests/html/mutationobserver_test.dart
@@ -129,5 +129,15 @@
div1.nodes.add(div2);
}, expectation);
});
+
+ test('mutation event', () {
+ // Bug 8076 that not all optional params are optional in Dartium.
+ var event = new MutationEvent('something', prevValue: 'prev',
+ newValue: 'new', attrName: 'attr');
+ expect(event is MutationEvent, isTrue);
+ expect(event.prevValue, 'prev');
+ expect(event.newValue, 'new');
+ expect(event.attrName, 'attr');
+ });
});
}
diff --git a/tests/html/notifications_test.dart b/tests/html/notifications_test.dart
index 8561257..796680f 100644
--- a/tests/html/notifications_test.dart
+++ b/tests/html/notifications_test.dart
@@ -12,7 +12,7 @@
});
});
- group('unsupported throws', () {
+ group('unsupported_throws', () {
test('createNotification', () {
var expectation = NotificationCenter.supported ? returnsNormally : throws;
expect(() { window.notifications.createNotification; }, expectation);
diff --git a/tests/html/serialized_script_value_test.dart b/tests/html/serialized_script_value_test.dart
index efb20d0..afbf04c 100644
--- a/tests/html/serialized_script_value_test.dart
+++ b/tests/html/serialized_script_value_test.dart
@@ -5,9 +5,10 @@
import 'utils.dart';
serializationTest(name, value) => test(name, () {
- // To check how value is serialized and deserialized, we create a MessageEvent.
- final event = document.$dom_createEvent('MessageEvent');
- event.initMessageEvent('', false, false, value, '', '', window, []);
+ // To check how value is serialized and deserialized, we create a
+ // MessageEvent.
+ final event =
+ new MessageEvent('', data: value, origin: '', lastEventId: '');
verifyGraph(value, event.data);
});
diff --git a/tests/html/shadow_dom_test.dart b/tests/html/shadow_dom_test.dart
index c6c21ce..7f6112e 100644
--- a/tests/html/shadow_dom_test.dart
+++ b/tests/html/shadow_dom_test.dart
@@ -16,7 +16,7 @@
});
});
- group('ShadowDOM tests', () {
+ group('ShadowDOM_tests', () {
var div1, div2, shadowRoot, paragraph1, paragraph2;
diff --git a/tests/html/speechrecognition_test.dart b/tests/html/speechrecognition_test.dart
new file mode 100644
index 0000000..b44e6f5
--- /dev/null
+++ b/tests/html/speechrecognition_test.dart
@@ -0,0 +1,43 @@
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library speech_recognition_test;
+import '../../pkg/unittest/lib/unittest.dart';
+import '../../pkg/unittest/lib/html_individual_config.dart';
+import 'dart:html';
+
+main() {
+ useHtmlIndividualConfiguration();
+
+ group('supported', () {
+ test('supported', () {
+ expect(SpeechRecognition.supported, true);
+ });
+ });
+
+ group('types', () {
+ var expectation = SpeechRecognition.supported ? returnsNormally : throws;
+
+ test('SpeechRecognition', () {
+ expect(() {
+ new SpeechRecognition();
+ }, expectation);
+ });
+
+ test('SpeechRecognitionEvent', () {
+ expect(() {
+ var e = new Event.eventType('SpeechRecognitionEvent', 'speech');
+ expect(e is SpeechRecognitionEvent, true);
+ }, expectation);
+ });
+
+ test('SpeechRecognitionError', () {
+ expect(() {
+ var e = new Event.eventType('SpeechRecognitionError', 'speech');
+ expect(e is SpeechRecognitionError, true);
+ }, expectation);
+ });
+ });
+}
+
diff --git a/tests/html/storage_test.dart b/tests/html/storage_test.dart
index cb00f86..5f09e20 100644
--- a/tests/html/storage_test.dart
+++ b/tests/html/storage_test.dart
@@ -16,4 +16,13 @@
final stored = window.localStorage[key];
expect(stored, value);
});
+
+ test('event', () {
+ // Bug 8076 that not all optional params are optional in Dartium.
+ var event = new StorageEvent('something', oldValue: 'old', newValue: 'new',
+ url: 'url', key: 'key');
+ expect(event is StorageEvent, isTrue);
+ expect(event.oldValue, 'old');
+ expect(event.newValue, 'new');
+ });
}
diff --git a/tests/html/streams_test.dart b/tests/html/streams_test.dart
index a0f3a71..07d77a6 100644
--- a/tests/html/streams_test.dart
+++ b/tests/html/streams_test.dart
@@ -17,7 +17,7 @@
// Causes an event on a to be fired.
void pulse() {
var event = new Event('focus');
- _a.$dom_dispatchEvent(event);
+ _a.dispatchEvent(event);
}
}
diff --git a/tests/html/wheelevent_test.dart b/tests/html/wheelevent_test.dart
index fed10deb..b4c3c9b 100644
--- a/tests/html/wheelevent_test.dart
+++ b/tests/html/wheelevent_test.dart
@@ -36,16 +36,10 @@
expect(e.deltaY, 240);
}));
var event = new WheelEvent(wheelEvent,
- window,
- 0,
- 240,
- 0,
- 100,
- 200,
- 10,
- 20,
- 0);
- element.$dom_dispatchEvent(event);
+ deltaX: 0,
+ deltaY: 240,
+ screenX: 100);
+ element.dispatchEvent(event);
});
test('wheelEvent Stream', () {
@@ -56,15 +50,9 @@
expect(e.deltaY, 240);
}));
var event = new WheelEvent(wheelEvent,
- window,
- 0,
- 240,
- 0,
- 100,
- 200,
- 10,
- 20,
- 0);
- element.$dom_dispatchEvent(event);
+ deltaX: 0,
+ deltaY: 240,
+ screenX: 100);
+ element.dispatchEvent(event);
});
}
diff --git a/tests/html/xhr_test.dart b/tests/html/xhr_test.dart
index 0db7f4f..c5d16a3 100644
--- a/tests/html/xhr_test.dart
+++ b/tests/html/xhr_test.dart
@@ -4,13 +4,13 @@
library XHRTest;
import '../../pkg/unittest/lib/unittest.dart';
-import '../../pkg/unittest/lib/html_config.dart';
+import '../../pkg/unittest/lib/html_individual_config.dart';
import 'dart:html';
import 'dart:json' as json;
main() {
- useHtmlConfiguration();
- var url = "../../../../tests/html/xhr_cross_origin_data.txt";
+ useHtmlIndividualConfiguration();
+ var url = "/tests/html/xhr_cross_origin_data.txt";
void validate200Response(xhr) {
expect(xhr.status, equals(200));
@@ -25,53 +25,70 @@
expect(xhr.responseText, equals(''));
}
- test('XHR No file', () {
- HttpRequest xhr = new HttpRequest();
- xhr.open("GET", "NonExistingFile", true);
- xhr.on.readyStateChange.add(expectAsyncUntil1((event) {
- if (xhr.readyState == HttpRequest.DONE) {
+ group('supported_HttpRequestProgressEvent', () {
+ test('supported', () {
+ expect(HttpRequestProgressEvent.supported, isTrue);
+ });
+ });
+
+ group('xhr', () {
+ test('XHR No file', () {
+ HttpRequest xhr = new HttpRequest();
+ xhr.open("GET", "NonExistingFile", true);
+ xhr.on.readyStateChange.add(expectAsyncUntil1((event) {
+ if (xhr.readyState == HttpRequest.DONE) {
+ validate404(xhr);
+ }
+ }, () => xhr.readyState == HttpRequest.DONE));
+ xhr.send();
+ });
+
+ test('XHR file', () {
+ var xhr = new HttpRequest();
+ xhr.open('GET', url, true);
+ xhr.on.readyStateChange.add(expectAsyncUntil1((e) {
+ if (xhr.readyState == HttpRequest.DONE) {
+ validate200Response(xhr);
+ }
+ }, () => xhr.readyState == HttpRequest.DONE));
+ xhr.send();
+ });
+
+ test('XHR.get No file', () {
+ new HttpRequest.get("NonExistingFile", expectAsync1((xhr) {
+ expect(xhr.readyState, equals(HttpRequest.DONE));
validate404(xhr);
- }
- }, () => xhr.readyState == HttpRequest.DONE));
- xhr.send();
- });
+ }));
+ });
- test('XHR file', () {
- var xhr = new HttpRequest();
- xhr.open('GET', url, true);
- xhr.on.readyStateChange.add(expectAsyncUntil1((e) {
- if (xhr.readyState == HttpRequest.DONE) {
+ test('XHR.get file', () {
+ var xhr = new HttpRequest.get(url, expectAsync1((event) {
+ expect(event.readyState, equals(HttpRequest.DONE));
+ validate200Response(event);
+ }));
+ });
+
+ test('XHR.getWithCredentials No file', () {
+ new HttpRequest.getWithCredentials("NonExistingFile", expectAsync1((xhr) {
+ expect(xhr.readyState, equals(HttpRequest.DONE));
+ validate404(xhr);
+ }));
+ });
+
+ test('XHR.getWithCredentials file', () {
+ new HttpRequest.getWithCredentials(url, expectAsync1((xhr) {
+ expect(xhr.readyState, equals(HttpRequest.DONE));
validate200Response(xhr);
- }
- }, () => xhr.readyState == HttpRequest.DONE));
- xhr.send();
- });
+ }));
+ });
- test('XHR.get No file', () {
- new HttpRequest.get("NonExistingFile", expectAsync1((xhr) {
- expect(xhr.readyState, equals(HttpRequest.DONE));
- validate404(xhr);
- }));
- });
-
- test('XHR.get file', () {
- var xhr = new HttpRequest.get(url, expectAsync1((event) {
- expect(event.readyState, equals(HttpRequest.DONE));
- validate200Response(event);
- }));
- });
-
- test('XHR.getWithCredentials No file', () {
- new HttpRequest.getWithCredentials("NonExistingFile", expectAsync1((xhr) {
- expect(xhr.readyState, equals(HttpRequest.DONE));
- validate404(xhr);
- }));
- });
-
- test('XHR.getWithCredentials file', () {
- new HttpRequest.getWithCredentials(url, expectAsync1((xhr) {
- expect(xhr.readyState, equals(HttpRequest.DONE));
- validate200Response(xhr);
- }));
+ test('HttpRequestProgressEvent', () {
+ var expectation = HttpRequestProgressEvent.supported ?
+ returnsNormally : throws;
+ expect(() {
+ var event = new Event.eventType('XMLHttpRequestProgressEvent', '');
+ expect(event is HttpRequestProgressEvent, isTrue);
+ }, expectation);
+ });
});
}
diff --git a/tests/isolate/isolate.status b/tests/isolate/isolate.status
index 5d3f8f1..b3faa8c 100644
--- a/tests/isolate/isolate.status
+++ b/tests/isolate/isolate.status
@@ -8,6 +8,7 @@
serialization_test: Skip # tests dart2js-specific serialization code
spawn_uri_test: Fail, OK # test uses a ".js" suffix that is bogus on vm.
compute_this_script_browser_test: Skip # browser specific test
+ports_compilation_browser_test: Skip # browser specific test
timer_not_available_test: Fail, OK # only meant to test when there is no way to
# implement timer (currently only in d8)
timer_isolate_test: Skip # See Issue 4997
@@ -76,12 +77,6 @@
# TODO(efortuna): Investigate.
timer_test: Fail, Pass
-[ $arch == simarm ]
-*: Skip
-
-[ $arch == arm ]
-*: Skip
-
[ $compiler == dart2js && $browser ]
spawn_uri_test: Skip # dart2js does not support spawnUri yet
spawn_uri_negative_test: Skip # ditto
@@ -115,5 +110,17 @@
[ $compiler == none ]
isolate_negative_test: Skip # Bug 6890
-[ $compiler == dart2js && $runtime == ff && $system == windows ]
+[ $compiler == dart2js && $runtime == ff && ($system == windows || $system == linux) ]
mandel_isolate_test: Pass, Fail, Timeout # Issue 7952
+
+[ $arch == arm ]
+*: Skip
+
+[ $arch == simarm ]
+*: Skip
+
+[ $arch == mips ]
+*: Skip
+
+[ $arch == simmips ]
+*: Skip
diff --git a/tests/isolate/multiple_timer_test.dart b/tests/isolate/multiple_timer_test.dart
index 15e16ed..941c81e 100644
--- a/tests/isolate/multiple_timer_test.dart
+++ b/tests/isolate/multiple_timer_test.dart
@@ -22,28 +22,28 @@
int _message;
void timeoutHandler1(Timer timer) {
- int endTime = (new Date.now()).millisecondsSinceEpoch;
+ int endTime = (new DateTime.now()).millisecondsSinceEpoch;
expect(endTime - _startTime1, greaterThanOrEqualTo(TIMEOUT1));
expect(_order[_message], 0);
_message++;
}
void timeoutHandler2(Timer timer) {
- int endTime = (new Date.now()).millisecondsSinceEpoch;
+ int endTime = (new DateTime.now()).millisecondsSinceEpoch;
expect(endTime - _startTime2, greaterThanOrEqualTo(TIMEOUT2));
expect(_order[_message], 1);
_message++;
}
void timeoutHandler3(Timer timer) {
- int endTime = (new Date.now()).millisecondsSinceEpoch;
+ int endTime = (new DateTime.now()).millisecondsSinceEpoch;
expect(endTime - _startTime3, greaterThanOrEqualTo(TIMEOUT3));
expect(_order[_message], 2);
_message++;
}
void timeoutHandler4(Timer timer) {
- int endTime = (new Date.now()).millisecondsSinceEpoch;
+ int endTime = (new DateTime.now()).millisecondsSinceEpoch;
expect(endTime - _startTime4, greaterThanOrEqualTo(TIMEOUT4));
expect(_order[_message], 3);
_message++;
@@ -56,13 +56,13 @@
_order[3] = 1;
_message = 0;
- _startTime1 = (new Date.now()).millisecondsSinceEpoch;
+ _startTime1 = (new DateTime.now()).millisecondsSinceEpoch;
new Timer(TIMEOUT1, expectAsync1(timeoutHandler1));
- _startTime2 = (new Date.now()).millisecondsSinceEpoch;
+ _startTime2 = (new DateTime.now()).millisecondsSinceEpoch;
new Timer(TIMEOUT2, expectAsync1(timeoutHandler2));
- _startTime3 = (new Date.now()).millisecondsSinceEpoch;
+ _startTime3 = (new DateTime.now()).millisecondsSinceEpoch;
new Timer(TIMEOUT3, expectAsync1(timeoutHandler3));
- _startTime4 = (new Date.now()).millisecondsSinceEpoch;
+ _startTime4 = (new DateTime.now()).millisecondsSinceEpoch;
new Timer(TIMEOUT4, expectAsync1(timeoutHandler4));
});
}
diff --git a/tests/isolate/ports_compilation_browser_test.dart b/tests/isolate/ports_compilation_browser_test.dart
new file mode 100644
index 0000000..5ab16ab
--- /dev/null
+++ b/tests/isolate/ports_compilation_browser_test.dart
@@ -0,0 +1,42 @@
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Regression test for dart2js that used to crash when compiling
+// [foo]. See http://code.google.com/p/dart/issues/detail?id=7448.
+
+library ports_compilation;
+import 'dart:html';
+import 'dart:isolate';
+import '../../pkg/unittest/lib/unittest.dart';
+import '../../pkg/unittest/lib/html_config.dart';
+
+void foo() {
+ // Create a "SendPortSync" object and access one of its members.
+ SendPortSync s_port;
+ s_port.callSync;
+
+ // Create a "ReceivePortSync" object (with the constructor) and
+ // access one of its members.
+ var r_port = new ReceivePortSync();
+ r_port.receive;
+
+ // Call getComputedStyle() from the HTML library.
+ query("").getComputedStyle("");
+}
+
+int inscrutable(int x) => x == 0 ? 0 : x | inscrutable(x & (x - 1));
+
+void main() {
+ // Generate the call, but don't execute it.
+ if (inscrutable(1) != 1) foo();
+ useHtmlConfiguration();
+ bar();
+ // Also generate it here in case the compiler's worklist goes from
+ // last seen to first seen.
+ if (inscrutable(1) != 1) foo();
+}
+
+bar() {
+ test('compile', () { });
+}
diff --git a/tests/isolate/timer_isolate_test.dart b/tests/isolate/timer_isolate_test.dart
index 4dfc95a..c9ae80c 100644
--- a/tests/isolate/timer_isolate_test.dart
+++ b/tests/isolate/timer_isolate_test.dart
@@ -25,12 +25,12 @@
port.receive(expectAsync2((msg, _) {
expect("timer_fired", msg);
- int endTime = (new Date.now()).millisecondsSinceEpoch;
+ int endTime = (new DateTime.now()).millisecondsSinceEpoch;
expect(endTime - startTime, greaterThanOrEqualTo(TIMEOUT));
port.close();
}));
- startTime = (new Date.now()).millisecondsSinceEpoch;
+ startTime = (new DateTime.now()).millisecondsSinceEpoch;
var sendPort = spawnFunction(createTimer);
sendPort.send("sendPort", port.toSendPort());
});
diff --git a/tests/isolate/timer_repeat_test.dart b/tests/isolate/timer_repeat_test.dart
index d13e988..48b962b 100644
--- a/tests/isolate/timer_repeat_test.dart
+++ b/tests/isolate/timer_repeat_test.dart
@@ -15,10 +15,10 @@
int iteration;
void timeoutHandler(Timer timer) {
- int endTime = (new Date.now()).millisecondsSinceEpoch;
+ int endTime = (new DateTime.now()).millisecondsSinceEpoch;
iteration++;
if (iteration < ITERATIONS) {
- startTime = (new Date.now()).millisecondsSinceEpoch;
+ startTime = (new DateTime.now()).millisecondsSinceEpoch;
} else {
expect(iteration, ITERATIONS);
timer.cancel();
@@ -28,7 +28,7 @@
main() {
test("timer_repeat", () {
iteration = 0;
- startTime = new Date.now().millisecondsSinceEpoch;
+ startTime = new DateTime.now().millisecondsSinceEpoch;
timer = new Timer.repeating(TIMEOUT,
expectAsync1(timeoutHandler, count: ITERATIONS));
});
diff --git a/tests/isolate/timer_test.dart b/tests/isolate/timer_test.dart
index 86f6753..aafa23d 100644
--- a/tests/isolate/timer_test.dart
+++ b/tests/isolate/timer_test.dart
@@ -16,12 +16,12 @@
int iteration;
void timeoutHandler(Timer timer) {
- int endTime = (new Date.now()).millisecondsSinceEpoch;
+ int endTime = (new DateTime.now()).millisecondsSinceEpoch;
expect(endTime - startTime, greaterThanOrEqualTo(timeout));
if (iteration < ITERATIONS) {
iteration++;
timeout = timeout - DECREASE;
- startTime = (new Date.now()).millisecondsSinceEpoch;
+ startTime = (new DateTime.now()).millisecondsSinceEpoch;
new Timer(timeout, expectAsync1(timeoutHandler));
}
}
@@ -30,7 +30,7 @@
test("timeout test", () {
iteration = 0;
timeout = STARTTIMEOUT;
- startTime = (new Date.now()).millisecondsSinceEpoch;
+ startTime = (new DateTime.now()).millisecondsSinceEpoch;
new Timer(timeout, expectAsync1(timeoutHandler));
});
}
diff --git a/tests/language/argument_definition4_test.dart b/tests/language/argument_definition4_test.dart
new file mode 100644
index 0000000..f58157f
--- /dev/null
+++ b/tests/language/argument_definition4_test.dart
@@ -0,0 +1,80 @@
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+test1(bool passed, {a: 42}) {
+ if (passed) {
+ Expect.equals(54, a);
+ Expect.isTrue(?a);
+ } else {
+ Expect.equals(42, a);
+ Expect.isFalse(?a);
+ }
+ Expect.isTrue(?passed);
+}
+
+test2() {
+ var closure = (passed, {a: 42}) {
+ if (passed) {
+ Expect.equals(54, a);
+ Expect.isTrue(?a);
+ } else {
+ Expect.equals(42, a);
+ Expect.isFalse(?a);
+ }
+ Expect.isTrue(?passed);
+ };
+ closure(true, a:54);
+ closure(false);
+}
+
+class A {
+ test3(bool passed, {a: 42}) {
+ if (passed) {
+ Expect.equals(54, a);
+ Expect.isTrue(?a);
+ } else {
+ Expect.equals(42, a);
+ Expect.isFalse(?a);
+ }
+ Expect.isTrue(?passed);
+ }
+}
+
+
+test4(bool passed, {a}) {
+ if (passed) {
+ Expect.equals(54, a);
+ Expect.isTrue(?a);
+ } else {
+ Expect.equals(null, a);
+ Expect.isFalse(?a);
+ }
+ Expect.isTrue(?passed);
+}
+
+int inscrutable(int x) => x == 0 ? 0 : x | inscrutable(x & (x - 1));
+
+main() {
+ test1(true, a:54);
+ test1(false);
+ test2();
+ new A().test3(true, a:54);
+ new A().test3(false);
+
+ var things = [test1, test2, new A().test3];
+
+ var closure = things[inscrutable(0)];
+ closure(true, a:54);
+ closure(false);
+
+ closure = things[inscrutable(1)];
+ closure();
+
+ closure = things[inscrutable(2)];
+ closure(true, a:54);
+ closure(false);
+
+ test4(true, a:54);
+ test4(false);
+}
diff --git a/tests/language/argument_definition5_test.dart b/tests/language/argument_definition5_test.dart
new file mode 100644
index 0000000..331499a
--- /dev/null
+++ b/tests/language/argument_definition5_test.dart
@@ -0,0 +1,31 @@
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+var x = "";
+
+test(String str, [onError(String)]) {
+ return (() {
+ try {
+ throw "";
+ } catch(e) {
+ if (?onError) {
+ onError(str);
+ } else {
+ x = "${str} error";
+ }
+ }
+ });
+}
+
+ignoreError(String str) {
+ x = "${str} error ignored";
+}
+
+main() {
+ Expect.equals("", x);
+ test("test")();
+ Expect.equals("test error", x);
+ test("test", ignoreError)();
+ Expect.equals("test error ignored", x);
+}
diff --git a/tests/language/cascade_in_initializer_list_test.dart b/tests/language/cascade_in_initializer_list_test.dart
new file mode 100644
index 0000000..99f2261
--- /dev/null
+++ b/tests/language/cascade_in_initializer_list_test.dart
@@ -0,0 +1,21 @@
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+class A {
+ foo() {}
+ bar() {}
+}
+
+class B {
+ var x;
+ final y;
+
+ B(a) : x = a..foo()..bar(), y = a..foo()..bar() {}
+}
+
+main() {
+ var a = new A(), b = new B(a);
+ Expect.equals(a, b.x);
+ Expect.equals(a, b.y);
+}
diff --git a/tests/language/fixed_length_test.dart b/tests/language/fixed_length_test.dart
new file mode 100644
index 0000000..27be71f
--- /dev/null
+++ b/tests/language/fixed_length_test.dart
@@ -0,0 +1,23 @@
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Regression test for https://code.google.com/p/dart/issues/detail?id=7994.
+
+void main() {
+ Expect.equals(-1, foo());
+}
+
+int foo() {
+ var list = new List<int>.fixedLength(1024);
+
+ for(int i = 0; i < list.length; i++) list[i] = -i;
+
+ for(int n = list.length; n > 1; n--) {
+ for(int i = 0; i < n - 1; i++) {
+ if (list[i] > list[i + 1]) {
+ return list[i + 1];
+ }
+ }
+ }
+}
diff --git a/tests/language/internal_library_test.dart b/tests/language/internal_library_test.dart
new file mode 100644
index 0000000..55eacd0
--- /dev/null
+++ b/tests/language/internal_library_test.dart
@@ -0,0 +1,17 @@
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Test that a private library cannot be accessed from outside the platform.
+
+library internal_library_test;
+
+import 'dart:core'; // This loads 'dart:_foreign_helper' and 'patch:core'.
+import 'dart:_foreign_helper'; /// 01: compile-time error
+
+part 'dart:_foreign_helper'; /// 02: compile-time error
+
+void main() {
+ JS('int', '0'); /// 01: continued
+ JS('int', '0'); /// 02: continued
+}
\ No newline at end of file
diff --git a/tests/language/issue4157508_test.dart b/tests/language/issue4157508_test.dart
index 54a938a..af08c9d 100644
--- a/tests/language/issue4157508_test.dart
+++ b/tests/language/issue4157508_test.dart
@@ -4,7 +4,7 @@
class Issue4157508Test {
Issue4157508Test(var v) {
- var d = new Date.fromMillisecondsSinceEpoch(v, isUtc: true);
+ var d = new DateTime.fromMillisecondsSinceEpoch(v, isUtc: true);
}
static void testMain() {
diff --git a/tests/language/language.status b/tests/language/language.status
index 99653af..43ca19a 100644
--- a/tests/language/language.status
+++ b/tests/language/language.status
@@ -60,10 +60,20 @@
mixin_is_test: Fail
mixin_method_test: Fail
mixin_naming_test: Fail
-
mixin_extends_field_test: Fail
mixin_extends_is_test: Fail
mixin_extends_method_test: Fail
+mixin_mixin_test: Fail
+mixin_illegal_syntax_test/none: Fail
+mixin_illegal_superclass_test/none: Fail
+mixin_illegal_constructor_test/none: Fail
+mixin_illegal_static_access_test: Fail
+mixin_illegal_super_use_test/none: Fail
+mixin_implements_test: Fail
+mixin_type_parameters_mixin_test: Fail
+mixin_type_parameters_super_test: Fail
+mixin_type_parameters_mixin_extends_test: Fail
+mixin_type_parameters_super_extends_test: Fail
[ $compiler == none && ($system == macos || $system == linux) && $arch == ia32 && $checked ]
gc_test: Skip # Issue 1487, flaky.
@@ -282,7 +292,8 @@
# test issue 7523 (const declared without type, so not-a-function warning should not be reported)
call_through_getter_test: Fail
-
+mixin_illegal_cycles_test/01: Fail # issue 8027
+mixin_illegal_cycles_test/02: Fail # issue 8027
#
# Add new dartc annotations above in alphabetical order
@@ -321,12 +332,6 @@
[ $browser ]
-[ $arch == simarm ]
-*: Skip
-
-[ $arch == arm ]
-*: Skip
-
[ $compiler == dart2dart ]
built_in_identifier_prefix_test: Fail # Inherited from dart2js.
const_factory_redirection_test: Fail # http://dartbug.com/6894
@@ -349,15 +354,24 @@
many_overridden_no_such_method_test: Fail, Pass, OK # Fails in minified mode, test depends on method names.
overridden_no_such_method_test: Fail, Pass, OK # Fails in minified mode, test depends on method names.
-# Mixins aren't unparsed the right way yet.
-mixin_field_test: Fail # http://dartbug.com/7972
-mixin_is_test: Fail # http://dartbug.com/7972
-mixin_method_test: Fail # http://dartbug.com/7972
-mixin_naming_test: Fail # http://dartbug.com/7972
-
-mixin_extends_field_test: Fail # http://dartbug.com/7972
-mixin_extends_is_test: Fail # http://dartbug.com/7972
-mixin_extends_method_test: Fail # http://dartbug.com/7972
+# Mixins fail on the VM.
+mixin_field_test: Fail # VM issue
+mixin_is_test: Fail # VM issue
+mixin_method_test: Fail # VM issue
+mixin_naming_test: Fail # VM issue
+mixin_extends_field_test: Fail # VM issue
+mixin_extends_is_test: Fail # VM issue
+mixin_extends_method_test: Fail # VM issue
+mixin_mixin_test: Fail # VM issue
+mixin_illegal_syntax_test/none: Fail # VM issue
+mixin_illegal_superclass_test/none: Fail # VM issue
+mixin_illegal_constructor_test/none: Fail # VM issue
+mixin_illegal_super_use_test/none: Fail # VM issue
+mixin_implements_test: Fail # VM issue
+mixin_type_parameters_mixin_test: Fail # VM issue
+mixin_type_parameters_super_test: Fail # VM issue
+mixin_type_parameters_mixin_extends_test: Fail # VM issue
+mixin_type_parameters_super_extends_test: Fail # VM issue
# Malformed types not handled as unresolved:
import_core_prefix_test: Fail
@@ -432,6 +446,7 @@
argument_definition_test/*: Skip # Not implemented.
argument_definition2_test: Skip # Not implemented. Fails in minified tests.
argument_definition3_test: Skip # Not implemented. Fails in minified tests.
+argument_definition4_test: Skip # Not implemented. Fails in minified tests.
const_var_test: Pass, Fail # Map literals take 2 type arguments.
map_literal3_test: Fail # Map literals take 2 type arguments.
class_cycle_negative_test: Fail, OK # Bad test: assumes eager loading.
@@ -553,3 +568,15 @@
invocation_mirror_test: Fail, OK # hardcoded names.
invocation_mirror2_test: Fail, OK # hardcoded names.
super_call4_test: Fail, OK # hardcoded names.
+
+[ $arch == arm ]
+*: Skip
+
+[ $arch == simarm ]
+*: Skip
+
+[ $arch == mips ]
+*: Skip
+
+[ $arch == simmips ]
+*: Skip
diff --git a/tests/language/language_dart2js.status b/tests/language/language_dart2js.status
index 88e22f0..0f9ec67 100644
--- a/tests/language/language_dart2js.status
+++ b/tests/language/language_dart2js.status
@@ -202,6 +202,13 @@
switch_label_test: Fail # error: target of continue is not a loop or switch case
+# Failing tests for mixin type parameters.
+mixin_type_parameters_mixin_test: Fail # http://dartbug.com/8116
+mixin_type_parameters_super_test: Fail # http://dartbug.com/8116
+mixin_type_parameters_mixin_extends_test: Fail # http://dartbug.com/8116
+mixin_type_parameters_super_extends_test: Fail # http://dartbug.com/8116
+
+
# External tests.
external_test/01: Fail
external_test/02: Fail
@@ -356,6 +363,7 @@
method_invocation_test: Fail # Uncaught error: Instance of 'TypeError'
null_pointer_exception_test: Fail # Uncaught error: Instance of 'TypeError'
string_interpolate_npe_test: Fail # Uncaught error: Instance of 'TypeError'
+arithmetic_test: Fail # Issue: 7414
[ $runtime == opera ]
null_access_error_test: Fail # Issue: 7413
diff --git a/tests/language/math_vm_test.dart b/tests/language/math_vm_test.dart
index cde27ef..96e88bc 100644
--- a/tests/language/math_vm_test.dart
+++ b/tests/language/math_vm_test.dart
@@ -37,8 +37,15 @@
Expect.equals(false, testSqrt(const FakeNumber()));
}
}
+
+testDoublePow() {
+ Expect.equals((1 << 32).toDouble(), pow(2.0, 32));
+}
+
+
main() {
for (int i = 0; i < 200; i++) {
MathTest.testMain();
+ testDoublePow();
}
}
diff --git a/tests/language/mixin_illegal_constructor_test.dart b/tests/language/mixin_illegal_constructor_test.dart
new file mode 100644
index 0000000..c3891ad
--- /dev/null
+++ b/tests/language/mixin_illegal_constructor_test.dart
@@ -0,0 +1,55 @@
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+class M0 {
+ factory M0(a,b,c) => null;
+ factory M0.named() => null;
+}
+
+class M1 {
+ M1();
+}
+
+class M2 {
+ M2.named();
+}
+
+typedef C0 = Object with M0;
+typedef C1 = Object with M1; /// 01: compile-time error
+typedef C2 = Object with M2; /// 02: compile-time error
+typedef C3 = Object with M0, M1; /// 03: compile-time error
+typedef C4 = Object with M1, M0; /// 04: compile-time error
+typedef C5 = Object with M0, M2; /// 05: compile-time error
+typedef C6 = Object with M2, M0; /// 06: compile-time error
+
+class D0 extends Object with M0 { }
+class D1 extends Object with M1 { } /// 07: compile-time error
+class D2 extends Object with M2 { } /// 08: compile-time error
+class D3 extends Object with M0, M1 { } /// 09: compile-time error
+class D4 extends Object with M1, M0 { } /// 10: compile-time error
+class D5 extends Object with M0, M2 { } /// 11: compile-time error
+class D6 extends Object with M2, M0 { } /// 12: compile-time error
+
+main() {
+ new C0();
+ new C1(); /// 01: continued
+ new C2(); /// 02: continued
+ new C3(); /// 03: continued
+ new C4(); /// 04: continued
+ new C5(); /// 05: continued
+ new C6(); /// 06: continued
+
+ new D0();
+ new D1(); /// 07: continued
+ new D2(); /// 08: continued
+ new D3(); /// 09: continued
+ new D4(); /// 10: continued
+ new D5(); /// 11: continued
+ new D6(); /// 12: continued
+
+ new C0(1,2,3); /// 13: static type warning, runtime error
+ new C0.named(); /// 14: static type warning, runtime error
+ new D0(1,2,3); /// 15: static type warning, runtime error
+ new D0.named(); /// 16: static type warning, runtime error
+}
diff --git a/tests/language/mixin_illegal_cycles_test.dart b/tests/language/mixin_illegal_cycles_test.dart
new file mode 100644
index 0000000..472581f
--- /dev/null
+++ b/tests/language/mixin_illegal_cycles_test.dart
@@ -0,0 +1,39 @@
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+class M { }
+class M0 extends Object with M0 { } /// 01: compile-time error
+typedef M1 = Object with M1; /// 02: compile-time error
+
+typedef M2 = Object with M3; /// 03: compile-time error
+typedef M3 = Object with M2; /// 03: continued
+
+typedef M4 = Object with M5; /// 04: compile-time error
+typedef M5 = Object with M6; /// 04: continued
+typedef M6 = Object with M4; /// 04: continued
+
+class M7 extends Object with M8 { } /// 05: compile-time error
+class M8 extends Object with M7 { } /// 05: continued
+
+typedef M9 = Object with M91; /// 06: compile-time error
+typedef M91 = Object with M92; /// 06: continued
+typedef M92 = Object with M91; /// 06: continued
+
+main() {
+ new M0(); /// 01: continued
+
+ new M1(); /// 02: continued
+
+ new M2(); /// 03: continued
+ new M3(); /// 03: continued
+
+ new M4(); /// 04: continued
+ new M5(); /// 04: continued
+ new M6(); /// 04: continued
+
+ new M7(); /// 05: continued
+ new M8(); /// 05: continued
+
+ new M9(); /// 06: continued
+}
diff --git a/tests/language/mixin_illegal_static_access_test.dart b/tests/language/mixin_illegal_static_access_test.dart
new file mode 100644
index 0000000..46390c2
--- /dev/null
+++ b/tests/language/mixin_illegal_static_access_test.dart
@@ -0,0 +1,21 @@
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+class S {
+ static foo() => 42;
+}
+
+class M {
+ static bar() => 87;
+}
+
+typedef C = S with M;
+
+main() {
+ Expect.equals(42, S.foo());
+ Expect.equals(87, M.bar());
+
+ Expect.throws(() => C.foo(), (e) => e is NoSuchMethodError);
+ Expect.throws(() => C.bar(), (e) => e is NoSuchMethodError);
+}
diff --git a/tests/language/mixin_illegal_super_use_test.dart b/tests/language/mixin_illegal_super_use_test.dart
new file mode 100644
index 0000000..414b2f2
--- /dev/null
+++ b/tests/language/mixin_illegal_super_use_test.dart
@@ -0,0 +1,69 @@
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+class M {
+}
+
+class P0 {
+ foo() {
+ super.toString(); /// 01: compile-time error
+ super.foo(); /// 02: compile-time error
+ super.bar = 100; /// 03: compile-time error
+
+ void inner() {
+ super.toString(); /// 04: compile-time error
+ super.foo(); /// 05: compile-time error
+ super.bar = 100; /// 06: compile-time error
+ }
+ inner();
+
+ (() {
+ super.toString(); /// 07: compile-time error
+ super.foo(); /// 08: compile-time error
+ super.bar = 100; /// 09: compile-time error
+ })();
+
+ return 42;
+ }
+}
+
+class P1 {
+ bar() {
+ super.toString(); /// 10: compile-time error
+ return 87;
+ }
+
+ // The test method is strategically placed here to try to force the
+ // P1 class and its bar method to be resolved before resolving the
+ // mixin applications.
+ test() {
+ new C();
+ var d = new D();
+ var e = new E();
+ var f = new F();
+ Expect.equals(42, d.foo());
+ Expect.equals(87, e.bar());
+ Expect.equals(99, f.baz());
+ }
+}
+
+class P2 {
+ baz() {
+ super.toString(); /// 11: compile-time error
+ return 99;
+ }
+}
+
+typedef C = Object with M;
+typedef D = Object with P0;
+typedef E = Object with M, P1;
+typedef F = Object with P2, M;
+
+main() {
+ var p1 = new P1();
+ var p2 = new P2();
+ Expect.equals(87, p1.bar());
+ p1.test();
+ Expect.equals(99, p2.baz());
+}
diff --git a/tests/language/mixin_illegal_superclass_test.dart b/tests/language/mixin_illegal_superclass_test.dart
new file mode 100644
index 0000000..34069fd
--- /dev/null
+++ b/tests/language/mixin_illegal_superclass_test.dart
@@ -0,0 +1,121 @@
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+class S0 { }
+class S1 extends Object { }
+class S2 extends S0 { }
+
+class M0 { }
+class M1 extends Object { }
+class M2 extends M0 { }
+
+typedef C00 = S0 with M0;
+typedef C01 = S0 with M1;
+typedef C02 = S0 with M2; /// 01: compile-time error
+typedef C03 = S0 with M0, M1;
+typedef C04 = S0 with M0, M2; /// 02: compile-time error
+typedef C05 = S0 with M2, M0; /// 03: compile-time error
+typedef C06 = S0 with M1, M2; /// 04: compile-time error
+typedef C07 = S0 with M2, M1; /// 05: compile-time error
+
+typedef C10 = S1 with M0;
+typedef C11 = S1 with M1;
+typedef C12 = S1 with M2; /// 06: compile-time error
+typedef C13 = S1 with M0, M1;
+typedef C14 = S1 with M0, M2; /// 07: compile-time error
+typedef C15 = S1 with M2, M0; /// 08: compile-time error
+typedef C16 = S1 with M1, M2; /// 09: compile-time error
+typedef C17 = S1 with M2, M1; /// 10: compile-time error
+
+typedef C20 = S2 with M0;
+typedef C21 = S2 with M1;
+typedef C22 = S2 with M2; /// 11: compile-time error
+typedef C23 = S2 with M0, M1;
+typedef C24 = S2 with M0, M2; /// 12: compile-time error
+typedef C25 = S2 with M2, M0; /// 13: compile-time error
+typedef C26 = S2 with M1, M2; /// 14: compile-time error
+typedef C27 = S2 with M2, M1; /// 15: compile-time error
+
+class D00 extends S0 with M0 { }
+class D01 extends S0 with M1 { }
+class D02 extends S0 with M2 { } /// 16: compile-time error
+class D03 extends S0 with M0, M1 { }
+class D04 extends S0 with M0, M2 { } /// 17: compile-time error
+class D05 extends S0 with M2, M0 { } /// 18: compile-time error
+class D06 extends S0 with M1, M2 { } /// 19: compile-time error
+class D07 extends S0 with M2, M1 { } /// 20: compile-time error
+
+class D10 extends S1 with M0 { }
+class D11 extends S1 with M1 { }
+class D12 extends S1 with M2 { } /// 21: compile-time error
+class D13 extends S1 with M0, M1 { }
+class D14 extends S1 with M0, M2 { } /// 22: compile-time error
+class D15 extends S1 with M2, M0 { } /// 23: compile-time error
+class D16 extends S1 with M1, M2 { } /// 24: compile-time error
+class D17 extends S1 with M2, M1 { } /// 25: compile-time error
+
+class D20 extends S2 with M0 { }
+class D21 extends S2 with M1 { }
+class D22 extends S2 with M2 { } /// 26: compile-time error
+class D23 extends S2 with M0, M1 { }
+class D24 extends S2 with M0, M2 { } /// 27: compile-time error
+class D25 extends S2 with M2, M0 { } /// 28: compile-time error
+class D26 extends S2 with M1, M2 { } /// 29: compile-time error
+class D27 extends S2 with M2, M1 { } /// 30: compile-time error
+
+main() {
+ new C00();
+ new C01();
+ new C02(); /// 01: continued
+ new C03();
+ new C04(); /// 02: continued
+ new C05(); /// 03: continued
+ new C06(); /// 04: continued
+ new C07(); /// 05: continued
+
+ new C10();
+ new C11();
+ new C12(); /// 06: continued
+ new C13();
+ new C14(); /// 07: continued
+ new C15(); /// 08: continued
+ new C16(); /// 09: continued
+ new C17(); /// 10: continued
+
+ new C20();
+ new C21();
+ new C22(); /// 11: continued
+ new C23();
+ new C24(); /// 12: continued
+ new C25(); /// 13: continued
+ new C26(); /// 14: continued
+ new C27(); /// 15: continued
+
+ new D00();
+ new D01();
+ new D02(); /// 16: continued
+ new D03();
+ new D04(); /// 17: continued
+ new D05(); /// 18: continued
+ new D06(); /// 19: continued
+ new D07(); /// 20: continued
+
+ new D10();
+ new D11();
+ new D12(); /// 21: continued
+ new D13();
+ new D14(); /// 22: continued
+ new D15(); /// 23: continued
+ new D16(); /// 24: continued
+ new D17(); /// 25: continued
+
+ new D20();
+ new D21();
+ new D22(); /// 26: continued
+ new D23();
+ new D24(); /// 27: continued
+ new D25(); /// 28: continued
+ new D26(); /// 29: continued
+ new D27(); /// 30: continued
+}
diff --git a/tests/language/mixin_illegal_syntax_test.dart b/tests/language/mixin_illegal_syntax_test.dart
new file mode 100644
index 0000000..34bf336
--- /dev/null
+++ b/tests/language/mixin_illegal_syntax_test.dart
@@ -0,0 +1,54 @@
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+class S { }
+class G<T> { }
+class M { }
+
+typedef T0 = abstract S with M;
+typedef T1 = final S with M; /// 01: compile-time error
+typedef T2 = var S with M; /// 02: compile-time error
+typedef T3 = const S with M; /// 03: compile-time error
+typedef T4 = static S with M; /// 04: compile-time error
+typedef T5 = external S with M; /// 05: compile-time error
+typedef T6 = G<int> with M;
+typedef T7 = G<Map<String,int>> with M;
+
+class C0 extends abstract S with M { } /// 06: compile-time error
+class C1 extends final S with M { } /// 07: compile-time error
+class C2 extends var S with M { } /// 08: compile-time error
+class C3 extends const S with M { } /// 09: compile-time error
+class C4 extends static S with M { } /// 10: compile-time error
+class C5 extends external S with M { } /// 11: compile-time error
+class C6 extends G<int> with M { }
+class C7 extends G<Map<String,int>> with M { }
+
+class D0 extends S with M
+ implements M /// 12: compile-time error
+ implements M { }
+
+class D1 extends T0 { }
+
+main() {
+ new T0(); /// 13: static type warning, runtime error
+ new T1(); /// 01: continued
+ new T2(); /// 02: continued
+ new T3(); /// 03: continued
+ new T4(); /// 04: continued
+ new T5(); /// 05: continued
+ new T6();
+ new T7();
+
+ new C0(); /// 06: continued
+ new C1(); /// 07: continued
+ new C2(); /// 08: continued
+ new C3(); /// 09: continued
+ new C4(); /// 10: continued
+ new C5(); /// 11: continued
+ new C6();
+ new C7();
+
+ new D0(); /// 12: continued
+ new D1();
+}
diff --git a/tests/language/mixin_implements_test.dart b/tests/language/mixin_implements_test.dart
new file mode 100644
index 0000000..8df1d9e
--- /dev/null
+++ b/tests/language/mixin_implements_test.dart
@@ -0,0 +1,76 @@
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+abstract class I0 {
+ foo();
+}
+
+abstract class I1 {
+ bar();
+}
+
+abstract class I2 implements I0, I1 {
+}
+
+class M {
+ foo() => 42;
+ bar() => 87;
+}
+
+typedef C0 = Object with M;
+typedef C1 = Object with M implements I0;
+typedef C2 = Object with M implements I1;
+typedef C3 = Object with M implements I0, I1;
+typedef C4 = Object with M implements I1, I0;
+typedef C5 = Object with M implements I2;
+
+main() {
+ var c0 = new C0();
+ Expect.equals(42, c0.foo());
+ Expect.equals(87, c0.bar());
+ Expect.isTrue(c0 is M);
+ Expect.isFalse(c0 is I0);
+ Expect.isFalse(c0 is I1);
+ Expect.isFalse(c0 is I2);
+
+ var c1 = new C1();
+ Expect.equals(42, c1.foo());
+ Expect.equals(87, c1.bar());
+ Expect.isTrue(c1 is M);
+ Expect.isTrue(c1 is I0);
+ Expect.isFalse(c1 is I1);
+ Expect.isFalse(c1 is I2);
+
+ var c2 = new C2();
+ Expect.equals(42, c2.foo());
+ Expect.equals(87, c2.bar());
+ Expect.isTrue(c2 is M);
+ Expect.isFalse(c2 is I0);
+ Expect.isTrue(c2 is I1);
+ Expect.isFalse(c1 is I2);
+
+ var c3 = new C3();
+ Expect.equals(42, c3.foo());
+ Expect.equals(87, c3.bar());
+ Expect.isTrue(c3 is M);
+ Expect.isTrue(c3 is I0);
+ Expect.isTrue(c3 is I1);
+ Expect.isFalse(c1 is I2);
+
+ var c4 = new C4();
+ Expect.equals(42, c4.foo());
+ Expect.equals(87, c4.bar());
+ Expect.isTrue(c4 is M);
+ Expect.isTrue(c4 is I0);
+ Expect.isTrue(c4 is I1);
+ Expect.isFalse(c1 is I2);
+
+ var c5 = new C5();
+ Expect.equals(42, c5.foo());
+ Expect.equals(87, c5.bar());
+ Expect.isTrue(c5 is M);
+ Expect.isTrue(c5 is I0);
+ Expect.isTrue(c5 is I1);
+ Expect.isTrue(c5 is I2);
+}
diff --git a/tests/language/mixin_mixin_test.dart b/tests/language/mixin_mixin_test.dart
new file mode 100644
index 0000000..f6d2f35
--- /dev/null
+++ b/tests/language/mixin_mixin_test.dart
@@ -0,0 +1,18 @@
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+class M1 { foo() => 42; }
+typedef M2 = Object with M1;
+
+class S { }
+typedef C = S with M2;
+
+main() {
+ var c = new C();
+ Expect.isTrue(c is S);
+ Expect.isTrue(c is M1);
+ Expect.isTrue(c is M2);
+ Expect.isTrue(c is C);
+ Expect.equals(42, c.foo());
+}
diff --git a/tests/language/mixin_type_parameters_mixin_extends_test.dart b/tests/language/mixin_type_parameters_mixin_extends_test.dart
new file mode 100644
index 0000000..6db5188
--- /dev/null
+++ b/tests/language/mixin_type_parameters_mixin_extends_test.dart
@@ -0,0 +1,126 @@
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+class M<T> {
+ bool matches(o) {
+ bool isChecked = checkUsingIs(o);
+ if (checkedMode) {
+ Expect.equals(isChecked, checkUsingCheckedMode(o));
+ }
+ return isChecked;
+ }
+
+ bool checkUsingIs(o) {
+ return o is T;
+ }
+
+ bool checkUsingCheckedMode(o) {
+ try {
+ T x = o;
+ } on Error {
+ return false;
+ }
+ return true;
+ }
+
+ static final bool checkedMode = computeCheckedMode();
+ static bool computeCheckedMode() {
+ try {
+ int x = "foo";
+ } on Error {
+ return true;
+ }
+ return false;
+ }
+}
+
+class S {
+}
+
+class C0<T> extends S with M { }
+class C1<T> extends S with M<T> { }
+class C2<T> extends S with M<int> { }
+class C3 extends S with M<String> { }
+
+main() {
+ var c0 = new C0();
+ Expect.isTrue(c0 is M);
+ Expect.isTrue(c0 is M<int>);
+ Expect.isTrue(c0 is M<String>);
+ Expect.isTrue(c0.matches(c0));
+ Expect.isTrue(c0.matches(42));
+ Expect.isTrue(c0.matches("hello"));
+
+ var c0_int = new C0<int>();
+ Expect.isTrue(c0_int is M);
+ Expect.isTrue(c0_int is M<int>);
+ Expect.isTrue(c0_int is M<String>);
+ Expect.isTrue(c0_int.matches(c0));
+ Expect.isTrue(c0_int.matches(42));
+ Expect.isTrue(c0_int.matches("hello"));
+
+ var c0_String = new C0<String>();
+ Expect.isTrue(c0_String is M);
+ Expect.isTrue(c0_String is M<int>);
+ Expect.isTrue(c0_String is M<String>);
+ Expect.isTrue(c0_String.matches(c0));
+ Expect.isTrue(c0_String.matches(42));
+ Expect.isTrue(c0_String.matches("hello"));
+
+ var c1 = new C1();
+ Expect.isTrue(c1 is M);
+ Expect.isTrue(c1 is M<int>);
+ Expect.isTrue(c1 is M<String>);
+ Expect.isTrue(c1.matches(c1));
+ Expect.isTrue(c1.matches(42));
+ Expect.isTrue(c1.matches("hello"));
+
+ var c1_int = new C1<int>();
+ Expect.isTrue(c1_int is M);
+ Expect.isTrue(c1_int is M<int>);
+ Expect.isFalse(c1_int is M<String>);
+ Expect.isFalse(c1_int.matches(c1));
+ Expect.isTrue(c1_int.matches(42));
+ Expect.isFalse(c1_int.matches("hello"));
+
+ var c1_String = new C1<String>();
+ Expect.isTrue(c1_String is M);
+ Expect.isFalse(c1_String is M<int>);
+ Expect.isTrue(c1_String is M<String>);
+ Expect.isFalse(c1_String.matches(c1));
+ Expect.isFalse(c1_String.matches(42));
+ Expect.isTrue(c1_String.matches("hello"));
+
+ var c2 = new C2();
+ Expect.isTrue(c2 is M);
+ Expect.isTrue(c2 is M<int>);
+ Expect.isFalse(c2 is M<String>);
+ Expect.isFalse(c2.matches(c2));
+ Expect.isTrue(c2.matches(42));
+ Expect.isFalse(c2.matches("hello"));
+
+ var c2_int = new C2<int>();
+ Expect.isTrue(c2_int is M);
+ Expect.isTrue(c2_int is M<int>);
+ Expect.isFalse(c2_int is M<String>);
+ Expect.isFalse(c2_int.matches(c2));
+ Expect.isTrue(c2_int.matches(42));
+ Expect.isFalse(c2_int.matches("hello"));
+
+ var c2_String = new C2<String>();
+ Expect.isTrue(c2_String is M);
+ Expect.isTrue(c2_String is M<int>);
+ Expect.isFalse(c2_String is M<String>);
+ Expect.isFalse(c2_String.matches(c2));
+ Expect.isTrue(c2_String.matches(42));
+ Expect.isFalse(c2_String.matches("hello"));
+
+ var c3 = new C3();
+ Expect.isTrue(c3 is M);
+ Expect.isFalse(c3 is M<int>);
+ Expect.isTrue(c3 is M<String>);
+ Expect.isFalse(c3.matches(c2));
+ Expect.isFalse(c3.matches(42));
+ Expect.isTrue(c3.matches("hello"));
+}
diff --git a/tests/language/mixin_type_parameters_mixin_test.dart b/tests/language/mixin_type_parameters_mixin_test.dart
new file mode 100644
index 0000000..fa9e49b
--- /dev/null
+++ b/tests/language/mixin_type_parameters_mixin_test.dart
@@ -0,0 +1,126 @@
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+class M<T> {
+ bool matches(o) {
+ bool isChecked = checkUsingIs(o);
+ if (checkedMode) {
+ Expect.equals(isChecked, checkUsingCheckedMode(o));
+ }
+ return isChecked;
+ }
+
+ bool checkUsingIs(o) {
+ return o is T;
+ }
+
+ bool checkUsingCheckedMode(o) {
+ try {
+ T x = o;
+ } on Error {
+ return false;
+ }
+ return true;
+ }
+
+ static final bool checkedMode = computeCheckedMode();
+ static bool computeCheckedMode() {
+ try {
+ int x = "foo";
+ } on Error {
+ return true;
+ }
+ return false;
+ }
+}
+
+class S {
+}
+
+typedef C0<T> = S with M;
+typedef C1<T> = S with M<T>;
+typedef C2<T> = S with M<int>;
+typedef C3 = S with M<String>;
+
+main() {
+ var c0 = new C0();
+ Expect.isTrue(c0 is M);
+ Expect.isTrue(c0 is M<int>);
+ Expect.isTrue(c0 is M<String>);
+ Expect.isTrue(c0.matches(c0));
+ Expect.isTrue(c0.matches(42));
+ Expect.isTrue(c0.matches("hello"));
+
+ var c0_int = new C0<int>();
+ Expect.isTrue(c0_int is M);
+ Expect.isTrue(c0_int is M<int>);
+ Expect.isTrue(c0_int is M<String>);
+ Expect.isTrue(c0_int.matches(c0));
+ Expect.isTrue(c0_int.matches(42));
+ Expect.isTrue(c0_int.matches("hello"));
+
+ var c0_String = new C0<String>();
+ Expect.isTrue(c0_String is M);
+ Expect.isTrue(c0_String is M<int>);
+ Expect.isTrue(c0_String is M<String>);
+ Expect.isTrue(c0_String.matches(c0));
+ Expect.isTrue(c0_String.matches(42));
+ Expect.isTrue(c0_String.matches("hello"));
+
+ var c1 = new C1();
+ Expect.isTrue(c1 is M);
+ Expect.isTrue(c1 is M<int>);
+ Expect.isTrue(c1 is M<String>);
+ Expect.isTrue(c1.matches(c1));
+ Expect.isTrue(c1.matches(42));
+ Expect.isTrue(c1.matches("hello"));
+
+ var c1_int = new C1<int>();
+ Expect.isTrue(c1_int is M);
+ Expect.isTrue(c1_int is M<int>);
+ Expect.isFalse(c1_int is M<String>);
+ Expect.isFalse(c1_int.matches(c1));
+ Expect.isTrue(c1_int.matches(42));
+ Expect.isFalse(c1_int.matches("hello"));
+
+ var c1_String = new C1<String>();
+ Expect.isTrue(c1_String is M);
+ Expect.isFalse(c1_String is M<int>);
+ Expect.isTrue(c1_String is M<String>);
+ Expect.isFalse(c1_String.matches(c1));
+ Expect.isFalse(c1_String.matches(42));
+ Expect.isTrue(c1_String.matches("hello"));
+
+ var c2 = new C2();
+ Expect.isTrue(c2 is M);
+ Expect.isTrue(c2 is M<int>);
+ Expect.isFalse(c2 is M<String>);
+ Expect.isFalse(c2.matches(c2));
+ Expect.isTrue(c2.matches(42));
+ Expect.isFalse(c2.matches("hello"));
+
+ var c2_int = new C2<int>();
+ Expect.isTrue(c2_int is M);
+ Expect.isTrue(c2_int is M<int>);
+ Expect.isFalse(c2_int is M<String>);
+ Expect.isFalse(c2_int.matches(c2));
+ Expect.isTrue(c2_int.matches(42));
+ Expect.isFalse(c2_int.matches("hello"));
+
+ var c2_String = new C2<String>();
+ Expect.isTrue(c2_String is M);
+ Expect.isTrue(c2_String is M<int>);
+ Expect.isFalse(c2_String is M<String>);
+ Expect.isFalse(c2_String.matches(c2));
+ Expect.isTrue(c2_String.matches(42));
+ Expect.isFalse(c2_String.matches("hello"));
+
+ var c3 = new C3();
+ Expect.isTrue(c3 is M);
+ Expect.isFalse(c3 is M<int>);
+ Expect.isTrue(c3 is M<String>);
+ Expect.isFalse(c3.matches(c2));
+ Expect.isFalse(c3.matches(42));
+ Expect.isTrue(c3.matches("hello"));
+}
diff --git a/tests/language/mixin_type_parameters_super_extends_test.dart b/tests/language/mixin_type_parameters_super_extends_test.dart
new file mode 100644
index 0000000..d05fd7a
--- /dev/null
+++ b/tests/language/mixin_type_parameters_super_extends_test.dart
@@ -0,0 +1,126 @@
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+class S<T> {
+ bool matches(o) {
+ bool isChecked = checkUsingIs(o);
+ if (checkedMode) {
+ Expect.equals(isChecked, checkUsingCheckedMode(o));
+ }
+ return isChecked;
+ }
+
+ bool checkUsingIs(o) {
+ return o is T;
+ }
+
+ bool checkUsingCheckedMode(o) {
+ try {
+ T x = o;
+ } on Error {
+ return false;
+ }
+ return true;
+ }
+
+ static final bool checkedMode = computeCheckedMode();
+ static bool computeCheckedMode() {
+ try {
+ int x = "foo";
+ } on Error {
+ return true;
+ }
+ return false;
+ }
+}
+
+class M {
+}
+
+class C0<T> extends S with M { }
+class C1<T> extends S<T> with M { }
+class C2<T> extends S<int> with M { }
+class C3 extends S<String> with M { }
+
+main() {
+ var c0 = new C0();
+ Expect.isTrue(c0 is S);
+ Expect.isTrue(c0 is S<int>);
+ Expect.isTrue(c0 is S<String>);
+ Expect.isTrue(c0.matches(c0));
+ Expect.isTrue(c0.matches(42));
+ Expect.isTrue(c0.matches("hello"));
+
+ var c0_int = new C0<int>();
+ Expect.isTrue(c0_int is S);
+ Expect.isTrue(c0_int is S<int>);
+ Expect.isTrue(c0_int is S<String>);
+ Expect.isTrue(c0_int.matches(c0));
+ Expect.isTrue(c0_int.matches(42));
+ Expect.isTrue(c0_int.matches("hello"));
+
+ var c0_String = new C0<String>();
+ Expect.isTrue(c0_String is S);
+ Expect.isTrue(c0_String is S<int>);
+ Expect.isTrue(c0_String is S<String>);
+ Expect.isTrue(c0_String.matches(c0));
+ Expect.isTrue(c0_String.matches(42));
+ Expect.isTrue(c0_String.matches("hello"));
+
+ var c1 = new C1();
+ Expect.isTrue(c1 is S);
+ Expect.isTrue(c1 is S<int>);
+ Expect.isTrue(c1 is S<String>);
+ Expect.isTrue(c1.matches(c1));
+ Expect.isTrue(c1.matches(42));
+ Expect.isTrue(c1.matches("hello"));
+
+ var c1_int = new C1<int>();
+ Expect.isTrue(c1_int is S);
+ Expect.isTrue(c1_int is S<int>);
+ Expect.isFalse(c1_int is S<String>);
+ Expect.isFalse(c1_int.matches(c1));
+ Expect.isTrue(c1_int.matches(42));
+ Expect.isFalse(c1_int.matches("hello"));
+
+ var c1_String = new C1<String>();
+ Expect.isTrue(c1_String is S);
+ Expect.isFalse(c1_String is S<int>);
+ Expect.isTrue(c1_String is S<String>);
+ Expect.isFalse(c1_String.matches(c1));
+ Expect.isFalse(c1_String.matches(42));
+ Expect.isTrue(c1_String.matches("hello"));
+
+ var c2 = new C2();
+ Expect.isTrue(c2 is S);
+ Expect.isTrue(c2 is S<int>);
+ Expect.isFalse(c2 is S<String>);
+ Expect.isFalse(c2.matches(c2));
+ Expect.isTrue(c2.matches(42));
+ Expect.isFalse(c2.matches("hello"));
+
+ var c2_int = new C2<int>();
+ Expect.isTrue(c2_int is S);
+ Expect.isTrue(c2_int is S<int>);
+ Expect.isFalse(c2_int is S<String>);
+ Expect.isFalse(c2_int.matches(c2));
+ Expect.isTrue(c2_int.matches(42));
+ Expect.isFalse(c2_int.matches("hello"));
+
+ var c2_String = new C2<String>();
+ Expect.isTrue(c2_String is S);
+ Expect.isTrue(c2_String is S<int>);
+ Expect.isFalse(c2_String is S<String>);
+ Expect.isFalse(c2_String.matches(c2));
+ Expect.isTrue(c2_String.matches(42));
+ Expect.isFalse(c2_String.matches("hello"));
+
+ var c3 = new C3();
+ Expect.isTrue(c3 is S);
+ Expect.isFalse(c3 is S<int>);
+ Expect.isTrue(c3 is S<String>);
+ Expect.isFalse(c3.matches(c2));
+ Expect.isFalse(c3.matches(42));
+ Expect.isTrue(c3.matches("hello"));
+}
diff --git a/tests/language/mixin_type_parameters_super_test.dart b/tests/language/mixin_type_parameters_super_test.dart
new file mode 100644
index 0000000..5c4b660
--- /dev/null
+++ b/tests/language/mixin_type_parameters_super_test.dart
@@ -0,0 +1,126 @@
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+class S<T> {
+ bool matches(o) {
+ bool isChecked = checkUsingIs(o);
+ if (checkedMode) {
+ Expect.equals(isChecked, checkUsingCheckedMode(o));
+ }
+ return isChecked;
+ }
+
+ bool checkUsingIs(o) {
+ return o is T;
+ }
+
+ bool checkUsingCheckedMode(o) {
+ try {
+ T x = o;
+ } on Error {
+ return false;
+ }
+ return true;
+ }
+
+ static final bool checkedMode = computeCheckedMode();
+ static bool computeCheckedMode() {
+ try {
+ int x = "foo";
+ } on Error {
+ return true;
+ }
+ return false;
+ }
+}
+
+class M {
+}
+
+typedef C0<T> = S with M;
+typedef C1<T> = S<T> with M;
+typedef C2<T> = S<int> with M;
+typedef C3 = S<String> with M;
+
+main() {
+ var c0 = new C0();
+ Expect.isTrue(c0 is S);
+ Expect.isTrue(c0 is S<int>);
+ Expect.isTrue(c0 is S<String>);
+ Expect.isTrue(c0.matches(c0));
+ Expect.isTrue(c0.matches(42));
+ Expect.isTrue(c0.matches("hello"));
+
+ var c0_int = new C0<int>();
+ Expect.isTrue(c0_int is S);
+ Expect.isTrue(c0_int is S<int>);
+ Expect.isTrue(c0_int is S<String>);
+ Expect.isTrue(c0_int.matches(c0));
+ Expect.isTrue(c0_int.matches(42));
+ Expect.isTrue(c0_int.matches("hello"));
+
+ var c0_String = new C0<String>();
+ Expect.isTrue(c0_String is S);
+ Expect.isTrue(c0_String is S<int>);
+ Expect.isTrue(c0_String is S<String>);
+ Expect.isTrue(c0_String.matches(c0));
+ Expect.isTrue(c0_String.matches(42));
+ Expect.isTrue(c0_String.matches("hello"));
+
+ var c1 = new C1();
+ Expect.isTrue(c1 is S);
+ Expect.isTrue(c1 is S<int>);
+ Expect.isTrue(c1 is S<String>);
+ Expect.isTrue(c1.matches(c1));
+ Expect.isTrue(c1.matches(42));
+ Expect.isTrue(c1.matches("hello"));
+
+ var c1_int = new C1<int>();
+ Expect.isTrue(c1_int is S);
+ Expect.isTrue(c1_int is S<int>);
+ Expect.isFalse(c1_int is S<String>);
+ Expect.isFalse(c1_int.matches(c1));
+ Expect.isTrue(c1_int.matches(42));
+ Expect.isFalse(c1_int.matches("hello"));
+
+ var c1_String = new C1<String>();
+ Expect.isTrue(c1_String is S);
+ Expect.isFalse(c1_String is S<int>);
+ Expect.isTrue(c1_String is S<String>);
+ Expect.isFalse(c1_String.matches(c1));
+ Expect.isFalse(c1_String.matches(42));
+ Expect.isTrue(c1_String.matches("hello"));
+
+ var c2 = new C2();
+ Expect.isTrue(c2 is S);
+ Expect.isTrue(c2 is S<int>);
+ Expect.isFalse(c2 is S<String>);
+ Expect.isFalse(c2.matches(c2));
+ Expect.isTrue(c2.matches(42));
+ Expect.isFalse(c2.matches("hello"));
+
+ var c2_int = new C2<int>();
+ Expect.isTrue(c2_int is S);
+ Expect.isTrue(c2_int is S<int>);
+ Expect.isFalse(c2_int is S<String>);
+ Expect.isFalse(c2_int.matches(c2));
+ Expect.isTrue(c2_int.matches(42));
+ Expect.isFalse(c2_int.matches("hello"));
+
+ var c2_String = new C2<String>();
+ Expect.isTrue(c2_String is S);
+ Expect.isTrue(c2_String is S<int>);
+ Expect.isFalse(c2_String is S<String>);
+ Expect.isFalse(c2_String.matches(c2));
+ Expect.isTrue(c2_String.matches(42));
+ Expect.isFalse(c2_String.matches("hello"));
+
+ var c3 = new C3();
+ Expect.isTrue(c3 is S);
+ Expect.isFalse(c3 is S<int>);
+ Expect.isTrue(c3 is S<String>);
+ Expect.isFalse(c3.matches(c2));
+ Expect.isFalse(c3.matches(42));
+ Expect.isTrue(c3.matches("hello"));
+}
diff --git a/tests/language/namer2_test.dart b/tests/language/namer2_test.dart
new file mode 100644
index 0000000..1f911b82
--- /dev/null
+++ b/tests/language/namer2_test.dart
@@ -0,0 +1,22 @@
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Test that user field names cannot clash with internal names of the
+// dart2js compiler.
+
+class A<T> {
+ var $isA;
+ var $eq;
+ var $builtinTypeInfo;
+}
+
+main() {
+ var c = [new A()];
+ Expect.isTrue(c[0] is A);
+ Expect.isTrue(c[0] == c[0]);
+
+ c = [new A<int>()];
+ c[0].$builtinTypeInfo = 42;
+ Expect.isTrue(c[0] is! A<String>);
+}
diff --git a/tests/language/no_such_method2_test.dart b/tests/language/no_such_method2_test.dart
new file mode 100644
index 0000000..f30ae45
--- /dev/null
+++ b/tests/language/no_such_method2_test.dart
@@ -0,0 +1,31 @@
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Regression test for https://code.google.com/p/dart/issues/detail?id=7697.
+// dart2js used to optimize [noSuchMethod] based on the user-provided
+// argument, and forget that the runtime might call it with its own
+// [InvocationMirror] implementation.
+
+class Hey {
+ foo() => noSuchMethod(new FakeInvocationMirror());
+ noSuchMethod(x) => x;
+}
+
+class You extends Hey {
+ // We used to think this method is always called with a
+ // FakeInvocationMirror instance, but it's also called with the
+ // internal mirror implementation.
+ noSuchMethod(x) => x.isGetter;
+}
+
+class FakeInvocationMirror implements InvocationMirror {
+ final bool isGetter = false;
+}
+
+main() {
+ var x = new Hey();
+ Expect.isTrue(x.foo() is FakeInvocationMirror);
+ var y = [new You()];
+ Expect.isTrue(y[0].bar);
+}
diff --git a/tests/language/string_interpolation_and_buffer.dart b/tests/language/string_interpolation_and_buffer.dart
index 2e25375..1ce359d 100644
--- a/tests/language/string_interpolation_and_buffer.dart
+++ b/tests/language/string_interpolation_and_buffer.dart
@@ -56,6 +56,25 @@
return 'Success';
}
+ initBuffer(object) {
+ var sb;
+ if (checkedMode && object != null) {
+ try {
+ sb = new StringBuffer(wrap(object));
+ } on TypeError {
+ return 'Error';
+ }
+ } else {
+ try {
+ sb = new StringBuffer(wrap(object));
+ } on ArgumentError {
+ return 'Error';
+ }
+ Expect.isTrue(sb.toString() is String);
+ }
+ return 'Success';
+ }
+
Expect.equals('Error', interpolate(null));
Expect.equals('Success', interpolate(""));
Expect.equals('Success', interpolate("string"));
@@ -69,4 +88,11 @@
Expect.equals('Error', buffer([]));
Expect.equals('Error', buffer([1]));
Expect.equals('Error', buffer(new Object()));
+
+ Expect.equals('Error', initBuffer(null));
+ Expect.equals('Success', initBuffer(""));
+ Expect.equals('Success', initBuffer("string"));
+ Expect.equals('Error', initBuffer([]));
+ Expect.equals('Error', initBuffer([1]));
+ Expect.equals('Error', initBuffer(new Object()));
}
diff --git a/tests/language/type_error_test.dart b/tests/language/type_error_test.dart
index 60784dc..c1eca89 100644
--- a/tests/language/type_error_test.dart
+++ b/tests/language/type_error_test.dart
@@ -121,7 +121,7 @@
/// Defeat optimizations of type checks.
wrap(e) {
- if (new Date.now().year == 1980) return null;
+ if (new DateTime.now().year == 1980) return null;
return e;
}
diff --git a/tests/lib/async/future_test.dart b/tests/lib/async/future_test.dart
index f79c564..373a131 100644
--- a/tests/lib/async/future_test.dart
+++ b/tests/lib/async/future_test.dart
@@ -518,6 +518,45 @@
completer.completeError(error);
}
+testChainedFutureValue() {
+ final completer = new Completer();
+ final future = completer.future;
+ var port = new ReceivePort();
+
+ future.then((v) => new Future.immediate(v * 2))
+ .then((v) {
+ Expect.equals(42, v);
+ port.close();
+ });
+ completer.complete(21);
+}
+
+testChainedFutureValueDelay() {
+ final completer = new Completer();
+ final future = completer.future;
+ var port = new ReceivePort();
+
+ future.then((v) => new Future.delayed(10, () => v * 2))
+ .then((v) {
+ Expect.equals(42, v);
+ port.close();
+ });
+ completer.complete(21);
+}
+
+testChainedFutureError() {
+ final completer = new Completer();
+ final future = completer.future;
+ var port = new ReceivePort();
+
+ future.then((v) => new Future.immediateError("Fehler"))
+ .then((v) { Expect.fail("unreachable!"); }, onError: (e) {
+ Expect.equals("Fehler", e.error);
+ port.close();
+ });
+ completer.complete(21);
+}
+
main() {
testImmediate();
testNeverComplete();
@@ -554,5 +593,9 @@
testFutureCatchThrowsAsync();
testFutureWhenThrowsAsync();
testFutureCatchRethrowsAsync();
+
+ testChainedFutureValue();
+ testChainedFutureValueDelay();
+ testChainedFutureError();
}
diff --git a/tests/lib/async/merge_stream_test.dart b/tests/lib/async/merge_stream_test.dart
index c454dca..924f5d3 100644
--- a/tests/lib/async/merge_stream_test.dart
+++ b/tests/lib/async/merge_stream_test.dart
@@ -11,9 +11,9 @@
testSupercedeStream() {
{ // Simple case of superceding lower priority streams.
- StreamController s1 = new StreamController.multiSubscription();
- StreamController s2 = new StreamController.multiSubscription();
- StreamController s3 = new StreamController.multiSubscription();
+ StreamController s1 = new StreamController.broadcast();
+ StreamController s2 = new StreamController.broadcast();
+ StreamController s3 = new StreamController.broadcast();
Stream merge = new Stream.superceding([s1.stream, s2.stream, s3.stream]);
Events expected = new Events()..add(1)..add(2)..add(3)..add(4)..close();
Events actual = new Events.capture(merge);
@@ -28,9 +28,9 @@
}
{ // Superceding more than one stream at a time.
- StreamController s1 = new StreamController.multiSubscription();
- StreamController s2 = new StreamController.multiSubscription();
- StreamController s3 = new StreamController.multiSubscription();
+ StreamController s1 = new StreamController.broadcast();
+ StreamController s2 = new StreamController.broadcast();
+ StreamController s3 = new StreamController.broadcast();
Stream merge = new Stream.superceding([s1.stream, s2.stream, s3.stream]);
Events expected = new Events()..add(1)..add(2)..close();
Events actual = new Events.capture(merge);
@@ -43,9 +43,9 @@
}
{ // Closing a stream before superceding it.
- StreamController s1 = new StreamController.multiSubscription();
- StreamController s2 = new StreamController.multiSubscription();
- StreamController s3 = new StreamController.multiSubscription();
+ StreamController s1 = new StreamController.broadcast();
+ StreamController s2 = new StreamController.broadcast();
+ StreamController s3 = new StreamController.broadcast();
Stream merge = new Stream.superceding([s1.stream, s2.stream, s3.stream]);
Events expected = new Events()..add(1)..add(2)..add(3)..close();
Events actual = new Events.capture(merge);
@@ -59,9 +59,9 @@
}
{ // Errors from all non-superceded streams are forwarded.
- StreamController s1 = new StreamController.multiSubscription();
- StreamController s2 = new StreamController.multiSubscription();
- StreamController s3 = new StreamController.multiSubscription();
+ StreamController s1 = new StreamController.broadcast();
+ StreamController s2 = new StreamController.broadcast();
+ StreamController s3 = new StreamController.broadcast();
Stream merge = new Stream.superceding([s1.stream, s2.stream, s3.stream]);
Events expected =
new Events()..add(1)..error("1")..error("2")..error("3")
@@ -83,9 +83,9 @@
}
test("Pausing on a superceding stream", () {
- StreamController s1 = new StreamController.multiSubscription();
- StreamController s2 = new StreamController.multiSubscription();
- StreamController s3 = new StreamController.multiSubscription();
+ StreamController s1 = new StreamController.broadcast();
+ StreamController s2 = new StreamController.broadcast();
+ StreamController s3 = new StreamController.broadcast();
Stream merge = new Stream.superceding([s1.stream, s2.stream, s3.stream]);
Events expected = new Events()..add(1)..add(2)..add(3);
Events actual = new Events.capture(merge);
@@ -114,9 +114,9 @@
void testCyclicStream() {
test("Simple case of superceding lower priority streams", () {
- StreamController s1 = new StreamController.multiSubscription();
- StreamController s2 = new StreamController.multiSubscription();
- StreamController s3 = new StreamController.multiSubscription();
+ StreamController s1 = new StreamController.broadcast();
+ StreamController s2 = new StreamController.broadcast();
+ StreamController s3 = new StreamController.broadcast();
Stream merge = new Stream.cyclic([s1.stream, s2.stream, s3.stream]);
Events expected =
new Events()..add(1)..add(2)..add(3)..add(4)..add(5)..add(6)..close();
@@ -139,9 +139,9 @@
});
test("Cyclic merge with errors", () {
- StreamController s1 = new StreamController.multiSubscription();
- StreamController s2 = new StreamController.multiSubscription();
- StreamController s3 = new StreamController.multiSubscription();
+ StreamController s1 = new StreamController.broadcast();
+ StreamController s2 = new StreamController.broadcast();
+ StreamController s3 = new StreamController.broadcast();
Stream merge = new Stream.cyclic([s1.stream, s2.stream, s3.stream]);
Events expected =
new Events()..add(1)..error("1")..add(2)..add(3)..error("2")
diff --git a/tests/lib/async/slow_consumer2_test.dart b/tests/lib/async/slow_consumer2_test.dart
index 8b59aaa..d842d33 100644
--- a/tests/lib/async/slow_consumer2_test.dart
+++ b/tests/lib/async/slow_consumer2_test.dart
@@ -48,20 +48,24 @@
}
}
-class DataProvider extends StreamController {
+class DataProvider {
final int chunkSize;
final int bytesPerSecond;
int sentCount = 0;
int targetCount;
+ StreamController controller;
DataProvider(int this.bytesPerSecond, int this.targetCount, this.chunkSize) {
+ controller = new StreamController(onPauseStateChange: onPauseStateChange);
new Timer(0, (_) => send());
}
+ Stream get stream => controller.stream;
+
send() {
- if (isPaused) return;
+ if (controller.isPaused) return;
if (sentCount == targetCount) {
- close();
+ controller.close();
return;
}
int listSize = chunkSize;
@@ -70,9 +74,9 @@
listSize -= sentCount - targetCount;
sentCount = targetCount;
}
- add(new List.fixedLength(listSize));
+ controller.add(new List.fixedLength(listSize));
int ms = listSize * 1000 ~/ bytesPerSecond;
- if (!isPaused) new Timer(ms, (_) => send());
+ if (!controller.isPaused) new Timer(ms, (_) => send());
}
onPauseStateChange() {
@@ -93,7 +97,7 @@
// file). If the consumer doesn't pause the data-provider it will run out of
// heap-space.
- new DataProvider(800 * MB, 100 * MB, 1 * MB)
+ new DataProvider(800 * MB, 100 * MB, 1 * MB).stream
.pipe(new SlowConsumer(200 * MB, 5 * MB))
.then((count) {
port.close();
diff --git a/tests/lib/async/slow_consumer_test.dart b/tests/lib/async/slow_consumer_test.dart
index 11c087d..027924e 100644
--- a/tests/lib/async/slow_consumer_test.dart
+++ b/tests/lib/async/slow_consumer_test.dart
@@ -41,20 +41,24 @@
}
}
-class DataProvider extends StreamController {
+class DataProvider {
final int chunkSize;
final int bytesPerSecond;
int sentCount = 0;
int targetCount;
+ StreamController controller;
DataProvider(int this.bytesPerSecond, int this.targetCount, this.chunkSize) {
+ controller = new StreamController(onPauseStateChange: onPauseStateChange);
new Timer(0, (_) => send());
}
+ Stream get stream => controller.stream;
+
send() {
- if (isPaused) return;
+ if (controller.isPaused) return;
if (sentCount == targetCount) {
- close();
+ controller.close();
return;
}
int listSize = chunkSize;
@@ -63,9 +67,9 @@
listSize -= sentCount - targetCount;
sentCount = targetCount;
}
- add(new List.fixedLength(listSize));
+ controller.add(new List.fixedLength(listSize));
int ms = listSize * 1000 ~/ bytesPerSecond;
- if (!isPaused) new Timer(ms, (_) => send());
+ if (!controller.isPaused) new Timer(ms, (_) => send());
}
onPauseStateChange() {
@@ -85,7 +89,7 @@
// file). If the consumer doesn't pause the data-provider it will run out of
// heap-space.
- new DataProvider(800 * MB, 100 * MB, 1 * MB)
+ new DataProvider(800 * MB, 100 * MB, 1 * MB).stream
.pipe(new SlowConsumer(200 * MB))
.then((count) {
port.close();
diff --git a/tests/lib/async/stream_controller_async_test.dart b/tests/lib/async/stream_controller_async_test.dart
index 2ce7557..d35e0c1 100644
--- a/tests/lib/async/stream_controller_async_test.dart
+++ b/tests/lib/async/stream_controller_async_test.dart
@@ -13,8 +13,9 @@
testController() {
// Test reduce
test("StreamController.reduce", () {
- StreamController c = new StreamController.multiSubscription();
- c.reduce(0, (a,b) => a + b)
+ StreamController c = new StreamController.broadcast();
+ Stream stream = c.stream;
+ stream.reduce(0, (a,b) => a + b)
.then(expectAsync1((int v) {
Expect.equals(42, v);
}));
@@ -24,16 +25,18 @@
});
test("StreamController.reduce throws", () {
- StreamController c = new StreamController.multiSubscription();
- c.reduce(0, (a,b) { throw "Fnyf!"; })
+ StreamController c = new StreamController.broadcast();
+ Stream stream = c.stream;
+ stream.reduce(0, (a,b) { throw "Fnyf!"; })
.catchError(expectAsync1((e) { Expect.equals("Fnyf!", e.error); }));
c.add(42);
});
test("StreamController.pipeInto", () {
- StreamController c = new StreamController.multiSubscription();
+ StreamController c = new StreamController.broadcast();
var list = <int>[];
- c.pipeInto(new CollectionSink<int>(list))
+ Stream stream = c.stream;
+ stream.pipeInto(new CollectionSink<int>(list))
.whenComplete(expectAsync0(() {
Expect.listEquals(<int>[1,2,9,3,9], list);
}));
@@ -49,7 +52,8 @@
testSingleController() {
test("Single-subscription StreamController.reduce", () {
StreamController c = new StreamController();
- c.reduce(0, (a,b) => a + b)
+ Stream stream = c.stream;
+ stream.reduce(0, (a,b) => a + b)
.then(expectAsync1((int v) { Expect.equals(42, v); }));
c.add(10);
c.add(32);
@@ -58,7 +62,8 @@
test("Single-subscription StreamController.reduce throws", () {
StreamController c = new StreamController();
- c.reduce(0, (a,b) { throw "Fnyf!"; })
+ Stream stream = c.stream;
+ stream.reduce(0, (a,b) { throw "Fnyf!"; })
.catchError(expectAsync1((e) { Expect.equals("Fnyf!", e.error); }));
c.add(42);
});
@@ -66,7 +71,8 @@
test("Single-subscription StreamController.pipeInto", () {
StreamController c = new StreamController();
var list = <int>[];
- c.pipeInto(new CollectionSink<int>(list))
+ Stream stream = c.stream;
+ stream.pipeInto(new CollectionSink<int>(list))
.whenComplete(expectAsync0(() {
Expect.listEquals(<int>[1,2,9,3,9], list);
}));
@@ -152,21 +158,21 @@
test("firstMatching", () {
StreamController c = new StreamController();
- Future f = c.firstMatching((x) => (x % 3) == 0);
+ Future f = c.stream.firstMatching((x) => (x % 3) == 0);
f.then(expectAsync1((v) { Expect.equals(9, v); }));
sentEvents.replay(c);
});
test("firstMatching 2", () {
StreamController c = new StreamController();
- Future f = c.firstMatching((x) => (x % 4) == 0);
+ Future f = c.stream.firstMatching((x) => (x % 4) == 0);
f.catchError(expectAsync1((e) {}));
sentEvents.replay(c);
});
test("firstMatching 3", () {
StreamController c = new StreamController();
- Future f = c.firstMatching((x) => (x % 4) == 0, defaultValue: () => 999);
+ Future f = c.stream.firstMatching((x) => (x % 4) == 0, defaultValue: () => 999);
f.then(expectAsync1((v) { Expect.equals(999, v); }));
sentEvents.replay(c);
});
@@ -174,49 +180,49 @@
test("lastMatching", () {
StreamController c = new StreamController();
- Future f = c.lastMatching((x) => (x % 3) == 0);
+ Future f = c.stream.lastMatching((x) => (x % 3) == 0);
f.then(expectAsync1((v) { Expect.equals(87, v); }));
sentEvents.replay(c);
});
test("lastMatching 2", () {
StreamController c = new StreamController();
- Future f = c.lastMatching((x) => (x % 4) == 0);
+ Future f = c.stream.lastMatching((x) => (x % 4) == 0);
f.catchError(expectAsync1((e) {}));
sentEvents.replay(c);
});
test("lastMatching 3", () {
StreamController c = new StreamController();
- Future f = c.lastMatching((x) => (x % 4) == 0, defaultValue: () => 999);
+ Future f = c.stream.lastMatching((x) => (x % 4) == 0, defaultValue: () => 999);
f.then(expectAsync1((v) { Expect.equals(999, v); }));
sentEvents.replay(c);
});
test("singleMatching", () {
StreamController c = new StreamController();
- Future f = c.singleMatching((x) => (x % 9) == 0);
+ Future f = c.stream.singleMatching((x) => (x % 9) == 0);
f.then(expectAsync1((v) { Expect.equals(9, v); }));
sentEvents.replay(c);
});
test("singleMatching 2", () {
StreamController c = new StreamController();
- Future f = c.singleMatching((x) => (x % 3) == 0); // Matches both 9 and 87..
+ Future f = c.stream.singleMatching((x) => (x % 3) == 0); // Matches both 9 and 87..
f.catchError(expectAsync1((e) { Expect.isTrue(e.error is StateError); }));
sentEvents.replay(c);
});
test("first", () {
StreamController c = new StreamController();
- Future f = c.first;
+ Future f = c.stream.first;
f.then(expectAsync1((v) { Expect.equals(7, v);}));
sentEvents.replay(c);
});
test("first empty", () {
StreamController c = new StreamController();
- Future f = c.first;
+ Future f = c.stream.first;
f.catchError(expectAsync1((e) { Expect.isTrue(e.error is StateError); }));
Events emptyEvents = new Events()..close();
emptyEvents.replay(c);
@@ -224,7 +230,7 @@
test("first error", () {
StreamController c = new StreamController();
- Future f = c.first;
+ Future f = c.stream.first;
f.catchError(expectAsync1((e) { Expect.equals("error", e.error); }));
Events errorEvents = new Events()..error("error")..close();
errorEvents.replay(c);
@@ -232,7 +238,7 @@
test("first error 2", () {
StreamController c = new StreamController();
- Future f = c.first;
+ Future f = c.stream.first;
f.catchError(expectAsync1((e) { Expect.equals("error", e.error); }));
Events errorEvents = new Events()..error("error")..error("error2")..close();
errorEvents.replay(c);
@@ -240,14 +246,14 @@
test("last", () {
StreamController c = new StreamController();
- Future f = c.last;
+ Future f = c.stream.last;
f.then(expectAsync1((v) { Expect.equals(87, v);}));
sentEvents.replay(c);
});
test("last empty", () {
StreamController c = new StreamController();
- Future f = c.last;
+ Future f = c.stream.last;
f.catchError(expectAsync1((e) { Expect.isTrue(e.error is StateError); }));
Events emptyEvents = new Events()..close();
emptyEvents.replay(c);
@@ -255,7 +261,7 @@
test("last error", () {
StreamController c = new StreamController();
- Future f = c.last;
+ Future f = c.stream.last;
f.catchError(expectAsync1((e) { Expect.equals("error", e.error); }));
Events errorEvents = new Events()..error("error")..close();
errorEvents.replay(c);
@@ -263,7 +269,7 @@
test("last error 2", () {
StreamController c = new StreamController();
- Future f = c.last;
+ Future f = c.stream.last;
f.catchError(expectAsync1((e) { Expect.equals("error", e.error); }));
Events errorEvents = new Events()..error("error")..error("error2")..close();
errorEvents.replay(c);
@@ -271,14 +277,14 @@
test("elementAt", () {
StreamController c = new StreamController();
- Future f = c.elementAt(2);
+ Future f = c.stream.elementAt(2);
f.then(expectAsync1((v) { Expect.equals(13, v);}));
sentEvents.replay(c);
});
test("elementAt 2", () {
StreamController c = new StreamController();
- Future f = c.elementAt(20);
+ Future f = c.stream.elementAt(20);
f.catchError(expectAsync1((e) { Expect.isTrue(e.error is StateError); }));
sentEvents.replay(c);
});
@@ -287,7 +293,7 @@
testPause() {
test("pause event-unpause", () {
StreamController c = new StreamController();
- Events actualEvents = new Events.capture(c);
+ Events actualEvents = new Events.capture(c.stream);
Events expectedEvents = new Events();
expectedEvents.add(42);
c.add(42);
@@ -305,7 +311,7 @@
test("pause twice event-unpause", () {
StreamController c = new StreamController();
- Events actualEvents = new Events.capture(c);
+ Events actualEvents = new Events.capture(c.stream);
Events expectedEvents = new Events();
expectedEvents.add(42);
c.add(42);
@@ -327,7 +333,7 @@
test("pause twice direct-unpause", () {
StreamController c = new StreamController();
- Events actualEvents = new Events.capture(c);
+ Events actualEvents = new Events.capture(c.stream);
Events expectedEvents = new Events();
expectedEvents.add(42);
c.add(42);
@@ -349,7 +355,7 @@
test("pause twice direct-event-unpause", () {
StreamController c = new StreamController();
- Events actualEvents = new Events.capture(c);
+ Events actualEvents = new Events.capture(c.stream);
Events expectedEvents = new Events();
expectedEvents.add(42);
c.add(42);
@@ -372,7 +378,7 @@
test("pause twice direct-unpause", () {
StreamController c = new StreamController();
- Events actualEvents = new Events.capture(c);
+ Events actualEvents = new Events.capture(c.stream);
Events expectedEvents = new Events();
expectedEvents.add(42);
c.add(42);
diff --git a/tests/lib/async/stream_controller_test.dart b/tests/lib/async/stream_controller_test.dart
index 313ccef..9dd7509 100644
--- a/tests/lib/async/stream_controller_test.dart
+++ b/tests/lib/async/stream_controller_test.dart
@@ -10,58 +10,58 @@
testMultiController() {
// Test normal flow.
- var c = new StreamController.multiSubscription();
+ var c = new StreamController.broadcast();
Events expectedEvents = new Events()
..add(42)
..add("dibs")
..error("error!")
..error("error too!")
..close();
- Events actualEvents = new Events.capture(c);
+ Events actualEvents = new Events.capture(c.stream);
expectedEvents.replay(c);
Expect.listEquals(expectedEvents.events, actualEvents.events);
// Test automatic unsubscription on error.
- c = new StreamController.multiSubscription();
+ c = new StreamController.broadcast();
expectedEvents = new Events()..add(42)..error("error");
- actualEvents = new Events.capture(c, unsubscribeOnError: true);
+ actualEvents = new Events.capture(c.stream, unsubscribeOnError: true);
Events sentEvents =
new Events()..add(42)..error("error")..add("Are you there?");
sentEvents.replay(c);
Expect.listEquals(expectedEvents.events, actualEvents.events);
// Test manual unsubscription.
- c = new StreamController.multiSubscription();
+ c = new StreamController.broadcast();
expectedEvents = new Events()..add(42)..error("error")..add(37);
- actualEvents = new Events.capture(c, unsubscribeOnError: false);
+ actualEvents = new Events.capture(c.stream, unsubscribeOnError: false);
expectedEvents.replay(c);
actualEvents.subscription.cancel();
c.add("Are you there"); // Not sent to actualEvents.
Expect.listEquals(expectedEvents.events, actualEvents.events);
// Test filter.
- c = new StreamController.multiSubscription();
+ c = new StreamController.broadcast();
expectedEvents = new Events()
..add("a string")..add("another string")..close();
sentEvents = new Events()
..add("a string")..add(42)..add("another string")..close();
- actualEvents = new Events.capture(c.where((v) => v is String));
+ actualEvents = new Events.capture(c.stream.where((v) => v is String));
sentEvents.replay(c);
Expect.listEquals(expectedEvents.events, actualEvents.events);
// Test map.
- c = new StreamController.multiSubscription();
+ c = new StreamController.broadcast();
expectedEvents = new Events()..add("abab")..error("error")..close();
sentEvents = new Events()..add("ab")..error("error")..close();
- actualEvents = new Events.capture(c.mappedBy((v) => "$v$v"));
+ actualEvents = new Events.capture(c.stream.mappedBy((v) => "$v$v"));
sentEvents.replay(c);
Expect.listEquals(expectedEvents.events, actualEvents.events);
// Test handleError.
- c = new StreamController.multiSubscription();
+ c = new StreamController.broadcast();
expectedEvents = new Events()..add("ab")..error("[foo]");
sentEvents = new Events()..add("ab")..error("foo")..add("ab")..close();
- actualEvents = new Events.capture(c.handleError((v) {
+ actualEvents = new Events.capture(c.stream.handleError((v) {
if (v.error is String) {
throw new AsyncError("[${v.error}]",
"other stack");
@@ -73,13 +73,13 @@
// reduce is tested asynchronously and therefore not in this file.
// Test expand
- c = new StreamController.multiSubscription();
+ c = new StreamController.broadcast();
sentEvents = new Events()..add(3)..add(2)..add(4)..close();
expectedEvents = new Events()..add(1)..add(2)..add(3)
..add(1)..add(2)
..add(1)..add(2)..add(3)..add(4)
..close();
- actualEvents = new Events.capture(c.expand((v) {
+ actualEvents = new Events.capture(c.stream.expand((v) {
var l = [];
for (int i = 0; i < v; i++) l.add(i + 1);
return l;
@@ -88,22 +88,23 @@
Expect.listEquals(expectedEvents.events, actualEvents.events);
// Test transform.
- c = new StreamController.multiSubscription();
+ c = new StreamController.broadcast();
sentEvents = new Events()..add("a")..error(42)..add("b")..close();
expectedEvents =
new Events()..error("a")..add(42)..error("b")..add("foo")..close();
- actualEvents = new Events.capture(c.transform(new StreamTransformer.from(
- onData: (v, s) { s.signalError(new AsyncError(v)); },
- onError: (e, s) { s.add(e.error); },
- onDone: (s) {
- s.add("foo");
- s.close();
- })));
+ actualEvents = new Events.capture(c.stream.transform(
+ new StreamTransformer.from(
+ onData: (v, s) { s.signalError(new AsyncError(v)); },
+ onError: (e, s) { s.add(e.error); },
+ onDone: (s) {
+ s.add("foo");
+ s.close();
+ })));
sentEvents.replay(c);
Expect.listEquals(expectedEvents.events, actualEvents.events);
// Test multiple filters.
- c = new StreamController.multiSubscription();
+ c = new StreamController.broadcast();
sentEvents = new Events()..add(42)
..add("snugglefluffy")
..add(7)
@@ -112,7 +113,7 @@
..close();
expectedEvents = new Events()..add(42)..error("not FormatException");
actualEvents = new Events.capture(
- c.where((v) => v is String)
+ c.stream.where((v) => v is String)
.mappedBy((v) => int.parse(v))
.handleError((v) {
if (v.error is! FormatException) throw v;
@@ -123,7 +124,7 @@
Expect.listEquals(expectedEvents.events, actualEvents.events);
// Test subscription changes while firing.
- c = new StreamController.multiSubscription();
+ c = new StreamController.broadcast();
var sink = c.sink;
var stream = c.stream;
var counter = 0;
@@ -157,14 +158,14 @@
..error("error!")
..error("error too!")
..close();
- Events actualEvents = new Events.capture(c);
+ Events actualEvents = new Events.capture(c.stream);
expectedEvents.replay(c);
Expect.listEquals(expectedEvents.events, actualEvents.events);
// Test automatic unsubscription on error.
c = new StreamController();
expectedEvents = new Events()..add(42)..error("error");
- actualEvents = new Events.capture(c, unsubscribeOnError: true);
+ actualEvents = new Events.capture(c.stream, unsubscribeOnError: true);
Events sentEvents =
new Events()..add(42)..error("error")..add("Are you there?");
sentEvents.replay(c);
@@ -173,7 +174,7 @@
// Test manual unsubscription.
c = new StreamController();
expectedEvents = new Events()..add(42)..error("error")..add(37);
- actualEvents = new Events.capture(c, unsubscribeOnError: false);
+ actualEvents = new Events.capture(c.stream, unsubscribeOnError: false);
expectedEvents.replay(c);
actualEvents.subscription.cancel();
c.add("Are you there"); // Not sent to actualEvents.
@@ -185,7 +186,7 @@
..add("a string")..add("another string")..close();
sentEvents = new Events()
..add("a string")..add(42)..add("another string")..close();
- actualEvents = new Events.capture(c.where((v) => v is String));
+ actualEvents = new Events.capture(c.stream.where((v) => v is String));
sentEvents.replay(c);
Expect.listEquals(expectedEvents.events, actualEvents.events);
@@ -193,7 +194,7 @@
c = new StreamController();
expectedEvents = new Events()..add("abab")..error("error")..close();
sentEvents = new Events()..add("ab")..error("error")..close();
- actualEvents = new Events.capture(c.mappedBy((v) => "$v$v"));
+ actualEvents = new Events.capture(c.stream.mappedBy((v) => "$v$v"));
sentEvents.replay(c);
Expect.listEquals(expectedEvents.events, actualEvents.events);
@@ -201,7 +202,7 @@
c = new StreamController();
expectedEvents = new Events()..add("ab")..error("[foo]");
sentEvents = new Events()..add("ab")..error("foo")..add("ab")..close();
- actualEvents = new Events.capture(c.handleError((v) {
+ actualEvents = new Events.capture(c.stream.handleError((v) {
if (v.error is String) {
throw new AsyncError("[${v.error}]",
"other stack");
@@ -219,7 +220,7 @@
..add(1)..add(2)
..add(1)..add(2)..add(3)..add(4)
..close();
- actualEvents = new Events.capture(c.expand((v) {
+ actualEvents = new Events.capture(c.stream.expand((v) {
var l = [];
for (int i = 0; i < v; i++) l.add(i + 1);
return l;
@@ -230,7 +231,7 @@
// pipe is tested asynchronously and therefore not in this file.
c = new StreamController();
var list = <int>[];
- c.pipeInto(new CollectionSink<int>(list))
+ c.stream.pipeInto(new CollectionSink<int>(list))
.whenComplete(() { Expect.listEquals(<int>[1,2,9,3,9], list); });
c.add(1);
c.add(2);
@@ -244,13 +245,14 @@
sentEvents = new Events()..add("a")..error(42)..add("b")..close();
expectedEvents =
new Events()..error("a")..add(42)..error("b")..add("foo")..close();
- actualEvents = new Events.capture(c.transform(new StreamTransformer.from(
- onData: (v, s) { s.signalError(new AsyncError(v)); },
- onError: (e, s) { s.add(e.error); },
- onDone: (s) {
- s.add("foo");
- s.close();
- })));
+ actualEvents = new Events.capture(c.stream.transform(
+ new StreamTransformer.from(
+ onData: (v, s) { s.signalError(new AsyncError(v)); },
+ onError: (e, s) { s.add(e.error); },
+ onDone: (s) {
+ s.add("foo");
+ s.close();
+ })));
sentEvents.replay(c);
Expect.listEquals(expectedEvents.events, actualEvents.events);
@@ -264,7 +266,7 @@
..close();
expectedEvents = new Events()..add(42)..error("not FormatException");
actualEvents = new Events.capture(
- c.where((v) => v is String)
+ c.stream.where((v) => v is String)
.mappedBy((v) => int.parse(v))
.handleError((v) {
if (v.error is! FormatException) throw v;
@@ -291,46 +293,46 @@
var c = new StreamController();
Events expectedEvents = new Events()..add(3)..close();
- Events actualEvents = new Events.capture(c.skip(2));
+ Events actualEvents = new Events.capture(c.stream.skip(2));
sentEvents.replay(c);
Expect.listEquals(expectedEvents.events, actualEvents.events);
c = new StreamController();
expectedEvents = new Events()..close();
- actualEvents = new Events.capture(c.skip(3));
+ actualEvents = new Events.capture(c.stream.skip(3));
sentEvents.replay(c);
Expect.listEquals(expectedEvents.events, actualEvents.events);
c = new StreamController();
expectedEvents = new Events()..close();
- actualEvents = new Events.capture(c.skip(7));
+ actualEvents = new Events.capture(c.stream.skip(7));
sentEvents.replay(c);
Expect.listEquals(expectedEvents.events, actualEvents.events);
c = new StreamController();
expectedEvents = sentEvents;
- actualEvents = new Events.capture(c.skip(0));
+ actualEvents = new Events.capture(c.stream.skip(0));
sentEvents.replay(c);
Expect.listEquals(expectedEvents.events, actualEvents.events);
c = new StreamController();
expectedEvents = new Events()..add(3)..close();
- actualEvents = new Events.capture(c.skipWhile((x) => x <= 2));
+ actualEvents = new Events.capture(c.stream.skipWhile((x) => x <= 2));
sentEvents.replay(c);
Expect.listEquals(expectedEvents.events, actualEvents.events);
c = new StreamController();
expectedEvents = new Events()..add(1)..add(2)..close();
- actualEvents = new Events.capture(c.take(2));
+ actualEvents = new Events.capture(c.stream.take(2));
sentEvents.replay(c);
Expect.listEquals(expectedEvents.events, actualEvents.events);
c = new StreamController();
expectedEvents = new Events()..add(1)..add(2)..close();
- actualEvents = new Events.capture(c.takeWhile((x) => x <= 2));
+ actualEvents = new Events.capture(c.stream.takeWhile((x) => x <= 2));
sentEvents.replay(c);
Expect.listEquals(expectedEvents.events, actualEvents.events);
@@ -339,7 +341,7 @@
..add(1)..add(1)..add(2)..add(1)..add(2)..add(2)..add(2)..close();
expectedEvents = new Events()
..add(1)..add(2)..add(1)..add(2)..close();
- actualEvents = new Events.capture(c.distinct());
+ actualEvents = new Events.capture(c.stream.distinct());
sentEvents.replay(c);
Expect.listEquals(expectedEvents.events, actualEvents.events);
@@ -349,7 +351,7 @@
expectedEvents = new Events()
..add(5)..add(4)..add(3)..add(1)..close();
// Use 'distinct' as a filter with access to the previously emitted event.
- actualEvents = new Events.capture(c.distinct((a, b) => a < b));
+ actualEvents = new Events.capture(c.stream.distinct((a, b) => a < b));
sentEvents.replay(c);
Expect.listEquals(expectedEvents.events, actualEvents.events);
}
diff --git a/tests/lib/async/stream_min_max_test.dart b/tests/lib/async/stream_min_max_test.dart
index e8b123e..67c9f01 100644
--- a/tests/lib/async/stream_min_max_test.dart
+++ b/tests/lib/async/stream_min_max_test.dart
@@ -18,13 +18,13 @@
testMinMax(name, iterable, min, max, [int compare(a, b)]) {
test("$name-min", () {
StreamController c = new StreamController();
- Future f = c.min(compare);
+ Future f = c.stream.min(compare);
f.then(expectAsync1((v) { Expect.equals(min, v);}));
new Events.fromIterable(iterable).replay(c);
});
test("$name-max", () {
StreamController c = new StreamController();
- Future f = c.max(compare);
+ Future f = c.stream.max(compare);
f.then(expectAsync1((v) { Expect.equals(max, v);}));
new Events.fromIterable(iterable).replay(c);
});
diff --git a/tests/lib/async/stream_single_test.dart b/tests/lib/async/stream_single_test.dart
index eadce7f..a3348b5 100644
--- a/tests/lib/async/stream_single_test.dart
+++ b/tests/lib/async/stream_single_test.dart
@@ -13,21 +13,21 @@
main() {
test("single", () {
StreamController c = new StreamController();
- Future f = c.single;
+ Future f = c.stream.single;
f.then(expectAsync1((v) { Expect.equals(42, v);}));
new Events.fromIterable([42]).replay(c);
});
test("single empty", () {
StreamController c = new StreamController();
- Future f = c.single;
+ Future f = c.stream.single;
f.catchError(expectAsync1((e) { Expect.isTrue(e.error is StateError); }));
new Events.fromIterable([]).replay(c);
});
test("single error", () {
StreamController c = new StreamController();
- Future f = c.single;
+ Future f = c.stream.single;
f.catchError(expectAsync1((e) { Expect.equals("error", e.error); }));
Events errorEvents = new Events()..error("error")..close();
errorEvents.replay(c);
@@ -35,7 +35,7 @@
test("single error 2", () {
StreamController c = new StreamController();
- Future f = c.single;
+ Future f = c.stream.single;
f.catchError(expectAsync1((e) { Expect.equals("error", e.error); }));
Events errorEvents = new Events()..error("error")..error("error2")..close();
errorEvents.replay(c);
@@ -43,7 +43,7 @@
test("single error 3", () {
StreamController c = new StreamController();
- Future f = c.single;
+ Future f = c.stream.single;
f.catchError(expectAsync1((e) { Expect.equals("error", e.error); }));
Events errorEvents = new Events()..add(499)..error("error")..close();
errorEvents.replay(c);
diff --git a/tests/lib/async/stream_single_to_multi_subscriber_test.dart b/tests/lib/async/stream_single_to_multi_subscriber_test.dart
index 3feb049..2b814b7 100644
--- a/tests/lib/async/stream_single_to_multi_subscriber_test.dart
+++ b/tests/lib/async/stream_single_to_multi_subscriber_test.dart
@@ -13,7 +13,7 @@
main() {
test("tomulti 1", () {
StreamController c = new StreamController<int>();
- Stream<int> multi = c.stream.asMultiSubscriberStream();
+ Stream<int> multi = c.stream.asBroadcastStream();
// Listen twice.
multi.listen(expectAsync1((v) => Expect.equals(42, v)));
multi.listen(expectAsync1((v) => Expect.equals(42, v)));
@@ -22,7 +22,7 @@
test("tomulti 2", () {
StreamController c = new StreamController<int>();
- Stream<int> multi = c.stream.asMultiSubscriberStream();
+ Stream<int> multi = c.stream.asBroadcastStream();
Events expected = new Events.fromIterable([1, 2, 3, 4, 5]);
Events actual1 = new Events.capture(multi);
Events actual2 = new Events.capture(multi);
@@ -36,8 +36,8 @@
});
test("tomulti no-op", () {
- StreamController c = new StreamController<int>.multiSubscription();
- Stream<int> multi = c.stream.asMultiSubscriberStream();
+ StreamController c = new StreamController<int>.broadcast();
+ Stream<int> multi = c.stream.asBroadcastStream();
Events expected = new Events.fromIterable([1, 2, 3, 4, 5]);
Events actual1 = new Events.capture(multi);
Events actual2 = new Events.capture(multi);
diff --git a/tests/lib/lib.status b/tests/lib/lib.status
index a7e4c34..c429be3 100644
--- a/tests/lib/lib.status
+++ b/tests/lib/lib.status
@@ -28,3 +28,15 @@
[ $runtime == vm && $arch == x64 ]
async/slow_consumer2_test: Fail # Issue 7726
+
+[ $arch == arm ]
+*: Skip
+
+[ $arch == simarm ]
+*: Skip
+
+[ $arch == mips ]
+*: Skip
+
+[ $arch == simmips ]
+*: Skip
diff --git a/tests/standalone/io/file_test.dart b/tests/standalone/io/file_test.dart
index 348791e..4d7093d 100644
--- a/tests/standalone/io/file_test.dart
+++ b/tests/standalone/io/file_test.dart
@@ -1153,16 +1153,16 @@
static void testLastModified() {
var port = new ReceivePort();
new File(new Options().executable).lastModified().then((modified) {
- Expect.isTrue(modified is Date);
- Expect.isTrue(modified < new Date.now());
+ Expect.isTrue(modified is DateTime);
+ Expect.isTrue(modified < new DateTime.now());
port.close();
});
}
static void testLastModifiedSync() {
var modified = new File(new Options().executable).lastModifiedSync();
- Expect.isTrue(modified is Date);
- Expect.isTrue(modified < new Date.now());
+ Expect.isTrue(modified is DateTime);
+ Expect.isTrue(modified < new DateTime.now());
}
// Test that opens the same file for writing then for appending to test
diff --git a/tests/standalone/io/http_advanced_test.dart b/tests/standalone/io/http_advanced_test.dart
index cb8245f..d6e1ad4 100644
--- a/tests/standalone/io/http_advanced_test.dart
+++ b/tests/standalone/io/http_advanced_test.dart
@@ -118,7 +118,7 @@
// Set the "Expires" header using the expires property.
void _expires1Handler(HttpRequest request, HttpResponse response) {
- Date date = new Date.utc(1999, Date.JUN, 11, 18, 46, 53, 0);
+ DateTime date = new DateTime.utc(1999, DateTime.JUN, 11, 18, 46, 53, 0);
response.headers.expires = date;
Expect.equals(date, response.headers.expires);
response.outputStream.close();
@@ -127,7 +127,7 @@
// Set the "Expires" header.
void _expires2Handler(HttpRequest request, HttpResponse response) {
response.headers.set("Expires", "Fri, 11 Jun 1999 18:46:53 GMT");
- Date date = new Date.utc(1999, Date.JUN, 11, 18, 46, 53, 0);
+ DateTime date = new DateTime.utc(1999, DateTime.JUN, 11, 18, 46, 53, 0);
Expect.equals(date, response.headers.expires);
response.outputStream.close();
}
@@ -160,7 +160,7 @@
Expect.equals(0, request.cookies.length);
Cookie cookie1 = new Cookie("name1", "value1");
- Date date = new Date.utc(2014, Date.JAN, 5, 23, 59, 59, 0);
+ DateTime date = new DateTime.utc(2014, DateTime.JAN, 5, 23, 59, 59, 0);
cookie1.expires = date;
cookie1.domain = "www.example.com";
cookie1.httpOnly = true;
@@ -311,7 +311,7 @@
Expect.equals(HttpStatus.OK, response.statusCode);
Expect.equals("Fri, 11 Jun 1999 18:46:53 GMT",
response.headers["expires"][0]);
- Expect.equals(new Date.utc(1999, Date.JUN, 11, 18, 46, 53, 0),
+ Expect.equals(new DateTime.utc(1999, DateTime.JUN, 11, 18, 46, 53, 0),
response.headers.expires);
response.inputStream.onData = response.inputStream.read;
response.inputStream.onClosed = () {
@@ -405,7 +405,7 @@
response.cookies.forEach((cookie) {
if (cookie.name == "name1") {
Expect.equals("value1", cookie.value);
- Date date = new Date.utc(2014, Date.JAN, 5, 23, 59, 59, 0);
+ DateTime date = new DateTime.utc(2014, DateTime.JAN, 5, 23, 59, 59, 0);
Expect.equals(date, cookie.expires);
Expect.equals("www.example.com", cookie.domain);
Expect.isTrue(cookie.httpOnly);
diff --git a/tests/standalone/io/http_auth_test.dart b/tests/standalone/io/http_auth_test.dart
index efd5a52..5e42d92 100644
--- a/tests/standalone/io/http_auth_test.dart
+++ b/tests/standalone/io/http_auth_test.dart
@@ -78,7 +78,7 @@
HttpClientConnection conn =
client.getUrl(
- new Uri.fromString(
+ Uri.parse(
"http://username:password@127.0.0.1:${server.port}/"));
conn.onResponse = (HttpClientResponse response) {
response.inputStream.onData = response.inputStream.read;
@@ -108,10 +108,10 @@
for (int i = 0; i < 5; i++) {
futures.add(
makeRequest(
- new Uri.fromString("http://127.0.0.1:${server.port}/test$i")));
+ Uri.parse("http://127.0.0.1:${server.port}/test$i")));
futures.add(
makeRequest(
- new Uri.fromString("http://127.0.0.1:${server.port}/test$i/xxx")));
+ Uri.parse("http://127.0.0.1:${server.port}/test$i/xxx")));
}
Future.wait(futures).then((_) {
server.shutdown();
@@ -136,7 +136,7 @@
for (int i = 0; i < 5; i++) {
client.addCredentials(
- new Uri.fromString("http://127.0.0.1:${server.port}/test$i"),
+ Uri.parse("http://127.0.0.1:${server.port}/test$i"),
"realm",
new HttpClientBasicCredentials("test$i", "test$i"));
}
@@ -145,10 +145,10 @@
for (int i = 0; i < 5; i++) {
futures.add(
makeRequest(
- new Uri.fromString("http://127.0.0.1:${server.port}/test$i")));
+ Uri.parse("http://127.0.0.1:${server.port}/test$i")));
futures.add(
makeRequest(
- new Uri.fromString("http://127.0.0.1:${server.port}/test$i/xxx")));
+ Uri.parse("http://127.0.0.1:${server.port}/test$i/xxx")));
}
Future.wait(futures).then((_) {
server.shutdown();
@@ -192,10 +192,10 @@
for (int i = 0; i < 5; i++) {
futures.add(
makeRequest(
- new Uri.fromString("http://127.0.0.1:${server.port}/test$i")));
+ Uri.parse("http://127.0.0.1:${server.port}/test$i")));
futures.add(
makeRequest(
- new Uri.fromString(
+ Uri.parse(
"http://127.0.0.1:${server.port}/test$i/xxx")));
}
return futures;
@@ -203,7 +203,7 @@
Future.wait(makeRequests()).then((_) {
makeRequest(
- new Uri.fromString(
+ Uri.parse(
"http://127.0.0.1:${server.port}/passwdchg")).then((_) {
passwordChanged = true;
Future.wait(makeRequests()).then((_) {
@@ -219,14 +219,14 @@
client.authenticate = (Uri url, String scheme, String realm) {
client.addCredentials(
- new Uri.fromString("http://127.0.0.1/basic"),
+ Uri.parse("http://127.0.0.1/basic"),
"test",
new HttpClientBasicCredentials("test", "test"));
return new Future.immediate(true);
};
HttpClientConnection conn =
- client.getUrl(new Uri.fromString("http://127.0.0.1/basic/test"));
+ client.getUrl(Uri.parse("http://127.0.0.1/basic/test"));
conn.onResponse = (HttpClientResponse response) {
Expect.equals(HttpStatus.OK, response.statusCode);
response.inputStream.onData = () => response.inputStream.read();
@@ -242,14 +242,14 @@
client.authenticate = (Uri url, String scheme, String realm) {
print("url: $url, scheme: $scheme, realm: $realm");
client.addCredentials(
- new Uri.fromString("http://127.0.0.1/digest"),
+ Uri.parse("http://127.0.0.1/digest"),
"test",
new HttpClientDigestCredentials("test", "test"));
return new Future.immediate(true);
};
HttpClientConnection conn =
- client.getUrl(new Uri.fromString("http://127.0.0.1/digest/test"));
+ client.getUrl(Uri.parse("http://127.0.0.1/digest/test"));
conn.onResponse = (HttpClientResponse response) {
Expect.equals(HttpStatus.OK, response.statusCode);
response.inputStream.onData = () => response.inputStream.read();
diff --git a/tests/standalone/io/http_client_test.dart b/tests/standalone/io/http_client_test.dart
index ca1daef..698090a 100644
--- a/tests/standalone/io/http_client_test.dart
+++ b/tests/standalone/io/http_client_test.dart
@@ -30,7 +30,7 @@
HttpClient client = new HttpClient();
void testUrl(String url) {
- var requestUri = new Uri.fromString(url);
+ var requestUri = Uri.parse(url);
var conn = client.getUrl(requestUri);
conn.onRequest = (HttpClientRequest request) {
@@ -62,7 +62,7 @@
void testInvalidUrl() {
HttpClient client = new HttpClient();
Expect.throws(
- () => client.getUrl(new Uri.fromString('ftp://www.google.com')));
+ () => client.getUrl(Uri.parse('ftp://www.google.com')));
}
void testBadHostName() {
diff --git a/tests/standalone/io/http_connection_close_test.dart b/tests/standalone/io/http_connection_close_test.dart
index 67106e6..9ae055f 100644
--- a/tests/standalone/io/http_connection_close_test.dart
+++ b/tests/standalone/io/http_connection_close_test.dart
@@ -52,7 +52,7 @@
server.listen("127.0.0.1", 0, backlog: 5);
server.defaultRequestHandler = (var request, var response) {
timer = new Timer.repeating(10, (_) {
- Date now = new Date.now();
+ DateTime now = new DateTime.now();
try {
response.outputStream.writeString(
'data:${now.millisecondsSinceEpoch}\n\n');
@@ -65,7 +65,7 @@
var client = new HttpClient();
var connection =
- client.getUrl(new Uri.fromString("http://127.0.0.1:${server.port}"));
+ client.getUrl(Uri.parse("http://127.0.0.1:${server.port}"));
connection.onResponse = (resp) {
int bytes = 0;
resp.inputStream.onData = () {
diff --git a/tests/standalone/io/http_date_test.dart b/tests/standalone/io/http_date_test.dart
index d4bc058..c5b36e2 100644
--- a/tests/standalone/io/http_date_test.dart
+++ b/tests/standalone/io/http_date_test.dart
@@ -16,19 +16,19 @@
part "../../../sdk/lib/io/http_utils.dart";
void testParseHttpDate() {
- Date date;
- date = new Date.utc(1999, Date.JUN, 11, 18, 46, 53, 0);
+ DateTime date;
+ date = new DateTime.utc(1999, DateTime.JUN, 11, 18, 46, 53, 0);
Expect.equals(date, _HttpUtils.parseDate("Fri, 11 Jun 1999 18:46:53 GMT"));
Expect.equals(date, _HttpUtils.parseDate("Friday, 11-Jun-1999 18:46:53 GMT"));
Expect.equals(date, _HttpUtils.parseDate("Fri Jun 11 18:46:53 1999"));
- date = new Date.utc(1970, Date.JAN, 1, 0, 0, 0, 0);
+ date = new DateTime.utc(1970, DateTime.JAN, 1, 0, 0, 0, 0);
Expect.equals(date, _HttpUtils.parseDate("Thu, 1 Jan 1970 00:00:00 GMT"));
Expect.equals(date,
_HttpUtils.parseDate("Thursday, 1-Jan-1970 00:00:00 GMT"));
Expect.equals(date, _HttpUtils.parseDate("Thu Jan 1 00:00:00 1970"));
- date = new Date.utc(2012, Date.MAR, 5, 23, 59, 59, 0);
+ date = new DateTime.utc(2012, DateTime.MAR, 5, 23, 59, 59, 0);
Expect.equals(date, _HttpUtils.parseDate("Mon, 5 Mar 2012 23:59:59 GMT"));
Expect.equals(date, _HttpUtils.parseDate("Monday, 5-Mar-2012 23:59:59 GMT"));
Expect.equals(date, _HttpUtils.parseDate("Mon Mar 5 23:59:59 2012"));
@@ -42,17 +42,17 @@
int minutes,
int seconds,
String expectedFormatted) {
- Date date;
+ DateTime date;
String formatted;
- date = new Date.utc(year, month, day, hours, minutes, seconds, 0);
+ date = new DateTime.utc(year, month, day, hours, minutes, seconds, 0);
formatted = _HttpUtils.formatDate(date);
Expect.equals(expectedFormatted, formatted);
Expect.equals(date, _HttpUtils.parseDate(formatted));
}
- test(1999, Date.JUN, 11, 18, 46, 53, "Fri, 11 Jun 1999 18:46:53 GMT");
- test(1970, Date.JAN, 1, 0, 0, 0, "Thu, 1 Jan 1970 00:00:00 GMT");
- test(2012, Date.MAR, 5, 23, 59, 59, "Mon, 5 Mar 2012 23:59:59 GMT");
+ test(1999, DateTime.JUN, 11, 18, 46, 53, "Fri, 11 Jun 1999 18:46:53 GMT");
+ test(1970, DateTime.JAN, 1, 0, 0, 0, "Thu, 1 Jan 1970 00:00:00 GMT");
+ test(2012, DateTime.MAR, 5, 23, 59, 59, "Mon, 5 Mar 2012 23:59:59 GMT");
}
void testParseHttpDateFailures() {
@@ -96,15 +96,15 @@
int minutes,
int seconds,
String formatted) {
- Date date = new Date.utc(year, month, day, hours, minutes, seconds, 0);
+ DateTime date = new DateTime.utc(year, month, day, hours, minutes, seconds, 0);
Expect.equals(date, _HttpUtils.parseCookieDate(formatted));
}
- test(2012, Date.JUN, 19, 14, 15, 01, "tue, 19-jun-12 14:15:01 gmt");
- test(2021, Date.JUN, 09, 10, 18, 14, "Wed, 09-Jun-2021 10:18:14 GMT");
- test(2021, Date.JAN, 13, 22, 23, 01, "Wed, 13-Jan-2021 22:23:01 GMT");
- test(2013, Date.JAN, 15, 21, 47, 38, "Tue, 15-Jan-2013 21:47:38 GMT");
- test(1970, Date.JAN, 01, 00, 00, 01, "Thu, 01-Jan-1970 00:00:01 GMT");
+ test(2012, DateTime.JUN, 19, 14, 15, 01, "tue, 19-jun-12 14:15:01 gmt");
+ test(2021, DateTime.JUN, 09, 10, 18, 14, "Wed, 09-Jun-2021 10:18:14 GMT");
+ test(2021, DateTime.JAN, 13, 22, 23, 01, "Wed, 13-Jan-2021 22:23:01 GMT");
+ test(2013, DateTime.JAN, 15, 21, 47, 38, "Tue, 15-Jan-2013 21:47:38 GMT");
+ test(1970, DateTime.JAN, 01, 00, 00, 01, "Thu, 01-Jan-1970 00:00:01 GMT");
}
void main() {
diff --git a/tests/standalone/io/http_headers_test.dart b/tests/standalone/io/http_headers_test.dart
index 444b0fd..826bd81 100644
--- a/tests/standalone/io/http_headers_test.dart
+++ b/tests/standalone/io/http_headers_test.dart
@@ -54,9 +54,9 @@
}
void testDate() {
- Date date1 = new Date.utc(1999, Date.JUN, 11, 18, 46, 53, 0);
+ DateTime date1 = new DateTime.utc(1999, DateTime.JUN, 11, 18, 46, 53, 0);
String httpDate1 = "Fri, 11 Jun 1999 18:46:53 GMT";
- Date date2 = new Date.utc(2000, Date.AUG, 16, 12, 34, 56, 0);
+ DateTime date2 = new DateTime.utc(2000, DateTime.AUG, 16, 12, 34, 56, 0);
String httpDate2 = "Wed, 16 Aug 2000 12:34:56 GMT";
_HttpHeaders headers = new _HttpHeaders();
@@ -80,9 +80,9 @@
}
void testExpires() {
- Date date1 = new Date.utc(1999, Date.JUN, 11, 18, 46, 53, 0);
+ DateTime date1 = new DateTime.utc(1999, DateTime.JUN, 11, 18, 46, 53, 0);
String httpDate1 = "Fri, 11 Jun 1999 18:46:53 GMT";
- Date date2 = new Date.utc(2000, Date.AUG, 16, 12, 34, 56, 0);
+ DateTime date2 = new DateTime.utc(2000, DateTime.AUG, 16, 12, 34, 56, 0);
String httpDate2 = "Wed, 16 Aug 2000 12:34:56 GMT";
_HttpHeaders headers = new _HttpHeaders();
@@ -106,9 +106,9 @@
}
void testIfModifiedSince() {
- Date date1 = new Date.utc(1999, Date.JUN, 11, 18, 46, 53, 0);
+ DateTime date1 = new DateTime.utc(1999, DateTime.JUN, 11, 18, 46, 53, 0);
String httpDate1 = "Fri, 11 Jun 1999 18:46:53 GMT";
- Date date2 = new Date.utc(2000, Date.AUG, 16, 12, 34, 56, 0);
+ DateTime date2 = new DateTime.utc(2000, DateTime.AUG, 16, 12, 34, 56, 0);
String httpDate2 = "Wed, 16 Aug 2000 12:34:56 GMT";
_HttpHeaders headers = new _HttpHeaders();
@@ -319,7 +319,7 @@
Cookie cookie;
cookie = new Cookie("name", "value");
Expect.equals("name=value", cookie.toString());
- Date date = new Date.utc(2014, Date.JAN, 5, 23, 59, 59, 0);
+ DateTime date = new DateTime.utc(2014, DateTime.JAN, 5, 23, 59, 59, 0);
cookie.expires = date;
checkCookie(cookie, "name=value"
"; Expires=Sun, 5 Jan 2014 23:59:59 GMT");
diff --git a/tests/standalone/io/http_proxy_test.dart b/tests/standalone/io/http_proxy_test.dart
index 8232769..9d3190c 100644
--- a/tests/standalone/io/http_proxy_test.dart
+++ b/tests/standalone/io/http_proxy_test.dart
@@ -72,7 +72,7 @@
requestCount++;
// Open the connection from the proxy.
HttpClientConnection conn =
- client.openUrl(request.method, new Uri.fromString(request.path));
+ client.openUrl(request.method, Uri.parse(request.path));
conn.onRequest = (HttpClientRequest clientRequest) {
// Forward all headers.
request.headers.forEach((String name, List<String> values) {
@@ -118,17 +118,17 @@
// HttpClientConnection onError.
client.findProxy = (Uri uri) => "XXX";
Expect.throws(
- () => client.getUrl(new Uri.fromString("http://www.google.com/test")),
+ () => client.getUrl(Uri.parse("http://www.google.com/test")),
(e) => e is HttpException);
client.findProxy = (Uri uri) => "PROXY www.google.com";
Expect.throws(
- () => client.getUrl(new Uri.fromString("http://www.google.com/test")),
+ () => client.getUrl(Uri.parse("http://www.google.com/test")),
(e) => e is HttpException);
client.findProxy = (Uri uri) => "PROXY www.google.com:http";
Expect.throws(
- () => client.getUrl(new Uri.fromString("http://www.google.com/test")),
+ () => client.getUrl(Uri.parse("http://www.google.com/test")),
(e) => e is HttpException);
}
@@ -147,7 +147,7 @@
for (int i = 0; i < proxy.length; i++) {
HttpClientConnection conn =
- client.getUrl(new Uri.fromString("http://127.0.0.1:${server.port}/$i"));
+ client.getUrl(Uri.parse("http://127.0.0.1:${server.port}/$i"));
conn.onRequest = (HttpClientRequest clientRequest) {
String content = "$i$i$i";
clientRequest.contentLength = content.length;
@@ -191,7 +191,7 @@
for (int i = 0; i < proxy.length; i++) {
HttpClientConnection conn =
client.postUrl(
- new Uri.fromString("http://127.0.0.1:${server.port}/$i"));
+ Uri.parse("http://127.0.0.1:${server.port}/$i"));
conn.onRequest = (HttpClientRequest clientRequest) {
String content = "$i$i$i";
clientRequest.outputStream.writeString(content);
@@ -238,7 +238,7 @@
for (int i = 0; i < proxy.length; i++) {
HttpClientConnection conn =
- client.getUrl(new Uri.fromString("http://127.0.0.1:${server.port}/$i"));
+ client.getUrl(Uri.parse("http://127.0.0.1:${server.port}/$i"));
conn.onRequest = (HttpClientRequest clientRequest) {
String content = "$i$i$i";
clientRequest.contentLength = content.length;
@@ -280,7 +280,7 @@
for (int i = 0; i < proxy.length; i++) {
HttpClientConnection conn =
- client.getUrl(new Uri.fromString("http://127.0.0.1:${server.port}/$i"));
+ client.getUrl(Uri.parse("http://127.0.0.1:${server.port}/$i"));
conn.onRequest = (HttpClientRequest clientRequest) {
String content = "$i$i$i";
clientRequest.contentLength = content.length;
diff --git a/tests/standalone/io/http_redirect_test.dart b/tests/standalone/io/http_redirect_test.dart
index ec1bb08..0b2f133 100644
--- a/tests/standalone/io/http_redirect_test.dart
+++ b/tests/standalone/io/http_redirect_test.dart
@@ -148,7 +148,7 @@
int redirectCount = 0;
HttpClientConnection conn =
- client.getUrl(new Uri.fromString("http://127.0.0.1:${server.port}/1"));
+ client.getUrl(Uri.parse("http://127.0.0.1:${server.port}/1"));
conn.followRedirects = false;
conn.onResponse = (HttpClientResponse response) {
response.inputStream.onData = response.inputStream.read;
@@ -173,7 +173,7 @@
int redirectCount = 0;
HttpClientConnection conn =
- client.getUrl(new Uri.fromString("http://127.0.0.1:${server.port}/src"));
+ client.getUrl(Uri.parse("http://127.0.0.1:${server.port}/src"));
conn.followRedirects = false;
conn.onRequest = (HttpClientRequest request) {
request.headers.add("X-Request-Header", "value");
@@ -218,7 +218,7 @@
HttpClientConnection conn =
client.getUrl(
- new Uri.fromString("http://127.0.0.1:${server.port}/redirect"));
+ Uri.parse("http://127.0.0.1:${server.port}/redirect"));
conn.onRequest = onRequest;
conn.onResponse = onResponse;
conn.onError = (e) => Expect.fail("Error not expected ($e)");
@@ -247,7 +247,7 @@
};
HttpClientConnection conn =
- client.getUrl(new Uri.fromString("http://127.0.0.1:${server.port}/src"));
+ client.getUrl(Uri.parse("http://127.0.0.1:${server.port}/src"));
conn.onRequest = onRequest;
conn.onResponse = onResponse;
conn.onError = (e) => Expect.fail("Error not expected ($e)");
@@ -277,7 +277,7 @@
HttpClientConnection conn =
client.postUrl(
- new Uri.fromString("http://127.0.0.1:${server.port}/301src"));
+ Uri.parse("http://127.0.0.1:${server.port}/301src"));
conn.onRequest = onRequest;
conn.onResponse = onResponse;
conn.onError = (e) => Expect.fail("Error not expected ($e)");
@@ -309,7 +309,7 @@
HttpClientConnection conn =
client.postUrl(
- new Uri.fromString("http://127.0.0.1:${server.port}/303src"));
+ Uri.parse("http://127.0.0.1:${server.port}/303src"));
conn.onRequest = onRequest;
conn.onResponse = onResponse;
conn.onError = (e) => Expect.fail("Error not expected ($e)");
@@ -320,7 +320,7 @@
HttpClient client = new HttpClient();
HttpClientConnection conn =
- client.getUrl(new Uri.fromString("http://127.0.0.1:${server.port}/1"));
+ client.getUrl(Uri.parse("http://127.0.0.1:${server.port}/1"));
conn.onResponse = (HttpClientResponse response) {
response.inputStream.onData = () => Expect.fail("Response not expected");
response.inputStream.onClosed = () => Expect.fail("Response not expected");
@@ -339,7 +339,7 @@
int redirectCount = 0;
HttpClientConnection conn =
- client.getUrl(new Uri.fromString("http://127.0.0.1:${server.port}/A"));
+ client.getUrl(Uri.parse("http://127.0.0.1:${server.port}/A"));
conn.onResponse = (HttpClientResponse response) {
response.inputStream.onData = () => Expect.fail("Response not expected");
response.inputStream.onClosed = () => Expect.fail("Response not expected");
diff --git a/tests/standalone/io/http_stream_close_test.dart b/tests/standalone/io/http_stream_close_test.dart
index 4ccb668..9f444a6 100644
--- a/tests/standalone/io/http_stream_close_test.dart
+++ b/tests/standalone/io/http_stream_close_test.dart
@@ -35,7 +35,7 @@
};
var connection = client.postUrl(
- new Uri.fromString("http://127.0.0.1:${server.port}"));
+ Uri.parse("http://127.0.0.1:${server.port}"));
connection.onError = (e) { throw e; };
connection.onRequest = (request) {
request.contentLength = "hello!".length;
diff --git a/tests/standalone/io/https_client_certificate_test.dart b/tests/standalone/io/https_client_certificate_test.dart
index ec79cac..67162a5 100644
--- a/tests/standalone/io/https_client_certificate_test.dart
+++ b/tests/standalone/io/https_client_certificate_test.dart
@@ -47,7 +47,7 @@
client.clientCertificate = options['certificateName'];
var completer = new Completer();
HttpClientConnection conn =
- client.getUrl(new Uri.fromString(
+ client.getUrl(Uri.parse(
"https://$HOST_NAME:${server.port}/$sendCertificate"));
conn.onRequest = (HttpClientRequest request) {
request.outputStream.close();
diff --git a/tests/standalone/io/https_client_test.dart b/tests/standalone/io/https_client_test.dart
index 6535e48..847249f 100644
--- a/tests/standalone/io/https_client_test.dart
+++ b/tests/standalone/io/https_client_test.dart
@@ -12,7 +12,7 @@
HttpClient client = new HttpClient();
void testUrl(String url) {
- var requestUri = new Uri.fromString(url);
+ var requestUri = Uri.parse(url);
var conn = client.getUrl(requestUri);
conn.onRequest = (HttpClientRequest request) {
@@ -43,7 +43,7 @@
void testBadHostName() {
HttpClient client = new HttpClient();
HttpClientConnection connection = client.getUrl(
- new Uri.fromString("https://some.bad.host.name.7654321/"));
+ Uri.parse("https://some.bad.host.name.7654321/"));
connection.onRequest = (HttpClientRequest request) {
Expect.fail("Should not open a request on bad hostname");
};
diff --git a/tests/standalone/io/https_server_test.dart b/tests/standalone/io/https_server_test.dart
index 8e4cf2d..1da8854 100644
--- a/tests/standalone/io/https_server_test.dart
+++ b/tests/standalone/io/https_server_test.dart
@@ -34,7 +34,7 @@
HttpClient client = new HttpClient();
HttpClientConnection conn =
- client.getUrl(new Uri.fromString("https://$HOST_NAME:${server.port}/"));
+ client.getUrl(Uri.parse("https://$HOST_NAME:${server.port}/"));
conn.onRequest = (HttpClientRequest request) {
request.outputStream.close();
};
diff --git a/tests/standalone/io/regress_6521_test.dart b/tests/standalone/io/regress_6521_test.dart
index 9d393b7..cd625ee 100644
--- a/tests/standalone/io/regress_6521_test.dart
+++ b/tests/standalone/io/regress_6521_test.dart
@@ -22,7 +22,7 @@
var connection = client.openUrl(
"POST",
- new Uri.fromString("http://localhost:${server.port}/"));
+ Uri.parse("http://localhost:${server.port}/"));
connection.onRequest = (request) {
// Keep a reference to the client request object.
clientRequest = request;
diff --git a/tests/standalone/io/regress_7097_test.dart b/tests/standalone/io/regress_7097_test.dart
index ee10822..214f92b 100644
--- a/tests/standalone/io/regress_7097_test.dart
+++ b/tests/standalone/io/regress_7097_test.dart
@@ -39,7 +39,7 @@
Future makeRequest(int n) {
var completer = new Completer();
- var url = new Uri.fromString("http://localhost:${server.port}");
+ var url = Uri.parse("http://localhost:${server.port}");
var connection = client.openUrl("POST", url);
connection.onRequest = (HttpClientRequest request) {
request.contentLength = n + 1;
diff --git a/tests/standalone/io/secure_builtin_roots_test.dart b/tests/standalone/io/secure_builtin_roots_test.dart
index 386dd75..0881ab3 100644
--- a/tests/standalone/io/secure_builtin_roots_test.dart
+++ b/tests/standalone/io/secure_builtin_roots_test.dart
@@ -11,7 +11,7 @@
HttpClient client = new HttpClient();
void testUrl(String url) {
- var requestUri = new Uri.fromString(url);
+ var requestUri = Uri.parse(url);
var conn = client.getUrl(requestUri);
conn.onRequest = (HttpClientRequest request) {
diff --git a/tests/standalone/io/secure_no_builtin_roots_test.dart b/tests/standalone/io/secure_no_builtin_roots_test.dart
index 596ab5e..40dbe21 100644
--- a/tests/standalone/io/secure_no_builtin_roots_test.dart
+++ b/tests/standalone/io/secure_no_builtin_roots_test.dart
@@ -11,7 +11,7 @@
HttpClient client = new HttpClient();
void testUrl(String url) {
- var requestUri = new Uri.fromString(url);
+ var requestUri = Uri.parse(url);
var conn = client.getUrl(requestUri);
conn.onRequest = (HttpClientRequest request) {
diff --git a/tests/standalone/io/secure_socket_bad_certificate_test.dart b/tests/standalone/io/secure_socket_bad_certificate_test.dart
index f6bc1fc..e3a2616 100644
--- a/tests/standalone/io/secure_socket_bad_certificate_test.dart
+++ b/tests/standalone/io/secure_socket_bad_certificate_test.dart
@@ -53,8 +53,8 @@
(e) => e is TypeError || e is SocketIOException);
secure.onBadCertificate = (X509Certificate certificate) {
Expect.isTrue(certificate.subject.contains("O=Google Inc"));
- Expect.isTrue(certificate.startValidity < new Date.now());
- Expect.isTrue(certificate.endValidity > new Date.now());
+ Expect.isTrue(certificate.startValidity < new DateTime.now());
+ Expect.isTrue(certificate.endValidity > new DateTime.now());
return acceptCertificate;
};
secure.onData = () {
diff --git a/tests/standalone/io/skipping_dart2js_compilations_test.dart b/tests/standalone/io/skipping_dart2js_compilations_test.dart
index e8c4e75..9409fc0 100644
--- a/tests/standalone/io/skipping_dart2js_compilations_test.dart
+++ b/tests/standalone/io/skipping_dart2js_compilations_test.dart
@@ -123,7 +123,7 @@
class TestCompletedHandler {
FileUtils fileUtils;
- Date _expectedTimestamp;
+ DateTime _expectedTimestamp;
bool _shouldHaveRun;
TestCompletedHandler(FileUtils this.fileUtils, bool this._shouldHaveRun);
diff --git a/tests/standalone/io/test_runner_exit_code_script.dart b/tests/standalone/io/test_runner_exit_code_script.dart
index 3bdbb9a..7e2542d 100644
--- a/tests/standalone/io/test_runner_exit_code_script.dart
+++ b/tests/standalone/io/test_runner_exit_code_script.dart
@@ -11,7 +11,7 @@
main() {
var progressType = new Options().arguments[0];
// Build a progress indicator.
- var startTime = new Date.now();
+ var startTime = new DateTime.now();
var progress =
new ProgressIndicator.fromName(progressType, startTime, false);
if (progressType == 'buildbot') {
@@ -31,7 +31,7 @@
progress.allTestsKnown();
progress.start(testCase);
new CommandOutput.fromCase(testCase, dummyCommand, 1, false, false, [], [],
- new Date.now().difference(startTime), false);
+ new DateTime.now().difference(startTime), false);
progress.done(testCase);
progress.allDone();
}
diff --git a/tests/standalone/io/web_socket_no_secure_test.dart b/tests/standalone/io/web_socket_no_secure_test.dart
index 1edf224..7aae7a3 100644
--- a/tests/standalone/io/web_socket_no_secure_test.dart
+++ b/tests/standalone/io/web_socket_no_secure_test.dart
@@ -42,7 +42,7 @@
WebSocketClientConnection createClient(int port,
{bool followRedirects,
String method: "GET"}) {
- HttpClientConnection conn = client.openUrl(method, new Uri.fromString(
+ HttpClientConnection conn = client.openUrl(method, Uri.parse(
'${secure ? "https" : "http"}://$HOST_NAME:$port/'));
if (followRedirects != null) {
conn.followRedirects = followRedirects;
diff --git a/tests/standalone/io/web_socket_secure_test.dart b/tests/standalone/io/web_socket_secure_test.dart
index 707e469..cb78bd3 100644
--- a/tests/standalone/io/web_socket_secure_test.dart
+++ b/tests/standalone/io/web_socket_secure_test.dart
@@ -38,7 +38,7 @@
// Connect web socket over HTTPS.
var conn = new WebSocketClientConnection(
client.getUrl(
- new Uri.fromString("https://$HOST_NAME:${server.port}/")));
+ Uri.parse("https://$HOST_NAME:${server.port}/")));
conn.onOpen = () {
conn.send("hello");
};
diff --git a/tests/standalone/io/web_socket_test.dart b/tests/standalone/io/web_socket_test.dart
index 95d56c9..2520992c 100644
--- a/tests/standalone/io/web_socket_test.dart
+++ b/tests/standalone/io/web_socket_test.dart
@@ -39,7 +39,7 @@
WebSocketClientConnection createClient(int port,
{bool followRedirects,
String method: "GET"}) {
- HttpClientConnection conn = client.openUrl(method, new Uri.fromString(
+ HttpClientConnection conn = client.openUrl(method, Uri.parse(
'${secure ? "https" : "http"}://$HOST_NAME:$port/'));
if (followRedirects != null) {
conn.followRedirects = followRedirects;
diff --git a/tests/standalone/standalone.status b/tests/standalone/standalone.status
index 83fe0a1..fdcfa9d 100644
--- a/tests/standalone/standalone.status
+++ b/tests/standalone/standalone.status
@@ -19,6 +19,9 @@
io/file_fuzz_test: Skip
io/directory_fuzz_test: Skip
+[ $runtime == vm && $system == macos && $arch == x64 ]
+io/regress_7191_test: Pass, Timeout # http://dartbug.com/8091
+
[ $runtime == vm && $system == macos ]
# This test fails with "Too many open files" on the Mac OS buildbot.
# This is expected as MacOS by default runs with a very low number
@@ -76,13 +79,6 @@
[ $compiler == frog ]
*: Skip
-[ $arch == arm ]
-*: Skip
-
-
-[ $arch == simarm ]
-*: Skip
-
[ $compiler == dart2js ]
number_identity_test: Skip # Bigints and int/double diff. not supported.
typed_array_test: Skip # This is a VM test
@@ -116,3 +112,15 @@
[ $compiler == dart2dart ]
# Skip until we stabilize language tests.
*: Skip
+
+[ $arch == arm ]
+*: Skip
+
+[ $arch == simarm ]
+*: Skip
+
+[ $arch == mips ]
+*: Skip
+
+[ $arch == simmips ]
+*: Skip
diff --git a/tests/utils/dummy_compiler_test.dart b/tests/utils/dummy_compiler_test.dart
index 9f16859..5bd9dce 100644
--- a/tests/utils/dummy_compiler_test.dart
+++ b/tests/utils/dummy_compiler_test.dart
@@ -79,11 +79,16 @@
}
main() {
- String code = compile(new Uri.fromComponents(scheme: 'main'),
- new Uri.fromComponents(scheme: 'lib', path: '/'),
- new Uri.fromComponents(scheme: 'package', path: '/'),
- provider, handler).value;
- if (code == null) {
- throw 'Compilation failed';
- }
+ Future<String> result =
+ compile(new Uri.fromComponents(scheme: 'main'),
+ new Uri.fromComponents(scheme: 'lib', path: '/'),
+ new Uri.fromComponents(scheme: 'package', path: '/'),
+ provider, handler);
+ result.then((String code) {
+ if (code == null) {
+ throw 'Compilation failed';
+ }
+ }, onError: (AsyncError e) {
+ throw 'Compilation failed';
+ });
}
diff --git a/tests/utils/recursive_import_test.dart b/tests/utils/recursive_import_test.dart
index 7820774..2665143 100644
--- a/tests/utils/recursive_import_test.dart
+++ b/tests/utils/recursive_import_test.dart
@@ -81,14 +81,19 @@
}
}
- String code = compile(new Uri.fromComponents(scheme: 'main'),
- new Uri.fromComponents(scheme: 'lib', path: '/'),
- new Uri.fromComponents(scheme: 'package', path: '/'),
- provider, handler).value;
- Expect.isNull(code);
- Expect.isTrue(10 < count);
- // Two warnings for each time RECURSIVE_MAIN is read, except the
- // first time.
- Expect.equals(2 * (count - 1), warningCount);
- Expect.equals(1, errorCount);
+ Future<String> result =
+ compile(new Uri.fromComponents(scheme: 'main'),
+ new Uri.fromComponents(scheme: 'lib', path: '/'),
+ new Uri.fromComponents(scheme: 'package', path: '/'),
+ provider, handler);
+ result.then((String code) {
+ Expect.isNull(code);
+ Expect.isTrue(10 < count);
+ // Two warnings for each time RECURSIVE_MAIN is read, except the
+ // first time.
+ Expect.equals(2 * (count - 1), warningCount);
+ Expect.equals(1, errorCount);
+ }, onError: (AsyncError e) {
+ throw 'Compilation failed';
+ });
}
diff --git a/tests/utils/uri_test.dart b/tests/utils/uri_test.dart
index d72b308..2aa688e 100644
--- a/tests/utils/uri_test.dart
+++ b/tests/utils/uri_test.dart
@@ -8,9 +8,9 @@
import 'dart:uri';
testUri(String uri, bool isAbsolute) {
- Expect.equals(isAbsolute, new Uri.fromString(uri).isAbsolute());
+ Expect.equals(isAbsolute, Uri.parse(uri).isAbsolute());
Expect.equals(isAbsolute, new Uri(uri).isAbsolute());
- Expect.stringEquals(uri, new Uri.fromString(uri).toString());
+ Expect.stringEquals(uri, Uri.parse(uri).toString());
Expect.stringEquals(uri, new Uri(uri).toString());
// Test equals and hashCode members.
@@ -113,7 +113,7 @@
path: "/a/b/c/",
query: null,
fragment: null).toString());
- Expect.stringEquals("file://", new Uri.fromString("file:").toString());
+ Expect.stringEquals("file://", Uri.parse("file:").toString());
Expect.stringEquals("file://", new Uri("file:").toString());
Expect.stringEquals("/a/g", removeDotSegments("/a/b/c/./../../g"));
Expect.stringEquals("mid/6", removeDotSegments("mid/content=5/../6"));
@@ -127,25 +127,25 @@
Expect.stringEquals("a/b/e/", removeDotSegments("./a/b/./c/d/../../e/././."));
final urisSample = "http://a/b/c/d;p?q";
- Uri baseFromString = new Uri.fromString(urisSample);
+ Uri baseFromString = Uri.parse(urisSample);
testUriPerRFCs(baseFromString);
Uri base = new Uri(urisSample);
testUriPerRFCs(base);
Expect.stringEquals(
"http://example.com",
- new Uri.fromString("http://example.com/a/b/c").origin);
+ Uri.parse("http://example.com/a/b/c").origin);
Expect.stringEquals(
"https://example.com",
- new Uri.fromString("https://example.com/a/b/c").origin);
+ Uri.parse("https://example.com/a/b/c").origin);
Expect.stringEquals(
"http://example.com:1234",
- new Uri.fromString("http://example.com:1234/a/b/c").origin);
+ Uri.parse("http://example.com:1234/a/b/c").origin);
Expect.stringEquals(
"https://example.com:1234",
- new Uri.fromString("https://example.com:1234/a/b/c").origin);
+ Uri.parse("https://example.com:1234/a/b/c").origin);
Expect.throws(
- () => new Uri.fromString("http:").origin,
+ () => Uri.parse("http:").origin,
(e) { return e is ArgumentError; },
"origin for uri with empty domain should fail");
Expect.throws(
@@ -182,11 +182,11 @@
(e) { return e is ArgumentError; },
"origin for uri with empty domain should fail");
Expect.throws(
- () => new Uri.fromString("http://:80").origin,
+ () => Uri.parse("http://:80").origin,
(e) { return e is ArgumentError; },
"origin for uri with empty domain should fail");
Expect.throws(
- () => new Uri.fromString("file://localhost/test.txt").origin,
+ () => Uri.parse("file://localhost/test.txt").origin,
(e) { return e is ArgumentError; },
"origin for non-http/https uri should fail");
diff --git a/tests/utils/utils.status b/tests/utils/utils.status
index 4a5fd4c..bea35e0 100644
--- a/tests/utils/utils.status
+++ b/tests/utils/utils.status
@@ -2,13 +2,6 @@
# 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(floitsch): dart2js is currently broken because of the iterator change.
-dummy_compiler_test: Pass, Fail
-recursive_import_test: Pass, Fail
-
-[ $arch == simarm ]
-*: Skip
-
[ $compiler == dart2js ]
dummy_compiler_test: Slow, Pass
recursive_import_test: Slow, Pass
@@ -32,3 +25,15 @@
*: Skip
[ $compiler == dartc ]
+
+[ $arch == arm ]
+*: Skip
+
+[ $arch == simarm ]
+*: Skip
+
+[ $arch == mips ]
+*: Skip
+
+[ $arch == simmips ]
+*: Skip
diff --git a/tools/VERSION b/tools/VERSION
index 63bf0e7..2a2b2cb 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -1,4 +1,4 @@
MAJOR 0
MINOR 3
-BUILD 1
-PATCH 3
+BUILD 2
+PATCH 0
diff --git a/tools/bots/compiler.py b/tools/bots/compiler.py
index 02d6ecb..a995bcc 100644
--- a/tools/bots/compiler.py
+++ b/tools/bots/compiler.py
@@ -22,7 +22,7 @@
DART2JS_BUILDER = (
r'dart2js-(linux|mac|windows)(-(jsshell))?-(debug|release)(-(checked|host-checked))?(-(host-checked))?(-(minified))?-?(\d*)-?(\d*)')
WEB_BUILDER = (
- r'dart2js-(ie9|ie10|ff|safari|chrome|opera)-(win7|win8|mac|linux)(-(all|html))?(-(\d+)-(\d+))?')
+ r'dart2js-(ie9|ie10|ff|safari|chrome|opera)-(win7|win8|mac10\.8|mac10\.7|linux)(-(all|html))?(-(\d+)-(\d+))?')
def GetBuildInfo(builder_name, is_buildbot):
@@ -79,13 +79,16 @@
if system == 'windows':
system = 'win7'
+ # We have both 10.8 and 10.7 bots, functionality is the same.
+ if system == 'mac10.8' or system == 'mac10.7':
+ system = 'mac'
+
if (system == 'win7' and platform.system() != 'Windows') or (
system == 'mac' and platform.system() != 'Darwin') or (
system == 'linux' and platform.system() != 'Linux'):
print ('Error: You cannot emulate a buildbot with a platform different '
'from your own.')
return None
-
return bot.BuildInfo(compiler, runtime, mode, system, checked, host_checked,
minified, shard_index, total_shards, is_buildbot,
test_set)
diff --git a/tools/copy_dart.py b/tools/copy_dart.py
index 10ed442..b60ad89 100755
--- a/tools/copy_dart.py
+++ b/tools/copy_dart.py
@@ -123,7 +123,7 @@
mergefiles([normjoin(dirname(lib), s) for s in library.sources], f)
for suffix in library.imports:
- m = re.match(r'[\'"]([^\'"]+)[\'"](\s+as\s+\w+)?$', suffix)
+ m = re.match(r'[\'"]([^\'"]+)[\'"](\s+as\s+\w+)?.*$', suffix)
uri = m.group(1)
if not uri.startswith('dart:'):
worklist.append(normjoin(dirname(lib), uri));
diff --git a/tools/dom/docs/bin/docs.dart b/tools/dom/docs/bin/docs.dart
new file mode 100644
index 0000000..6972432
--- /dev/null
+++ b/tools/dom/docs/bin/docs.dart
@@ -0,0 +1,32 @@
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/**
+ * This program reads the HTML libraries from [LIB_PATH] and outputs their
+ * documentation to [JSON_PATH].
+ */
+
+import 'dart:io';
+import 'dart:async';
+
+import '../lib/docs.dart';
+
+final Path json_path = scriptDir.append('../docs.json').canonicalize();
+final Path lib_path = scriptDir.append('../../../../sdk/').canonicalize();
+
+main() {
+ print('Converting HTML docs from $lib_path to $json_path.');
+
+ var anyErrors = convert(lib_path, json_path);
+
+ print('Converted HTML docs ${anyErrors ? "with $anyErrors" : "without"}'
+ ' errors.');
+}
+
+/**
+ * Gets the full path to the directory containing the entrypoint of the current
+ * script.
+ */
+Path get scriptDir =>
+ new Path(new Options().script).directoryPath;
\ No newline at end of file
diff --git a/tools/dom/docs/docs.json b/tools/dom/docs/docs.json
new file mode 100644
index 0000000..9e26dfe
--- /dev/null
+++ b/tools/dom/docs/docs.json
@@ -0,0 +1 @@
+{}
\ No newline at end of file
diff --git a/tools/dom/docs/lib/docs.dart b/tools/dom/docs/lib/docs.dart
new file mode 100644
index 0000000..69d9854
--- /dev/null
+++ b/tools/dom/docs/lib/docs.dart
@@ -0,0 +1,166 @@
+/**
+ * A library for extracting the documentation from the various HTML libraries
+ * ([dart:html], [dart:svg], [dart:web_audio], [dart:indexed_db]) and saving
+ * those documentation comments to a JSON file.
+ */
+
+library docs;
+
+import '../../../../sdk/lib/_internal/compiler/implementation/mirrors/mirrors.dart';
+import '../../../../sdk/lib/_internal/dartdoc/lib/src/json_serializer.dart';
+import '../../../../sdk/lib/_internal/dartdoc/lib/dartdoc.dart';
+import '../../../../utils/apidoc/lib/metadata.dart';
+import 'dart:async';
+import 'dart:io';
+
+/// The various HTML libraries.
+const List<String> HTML_LIBRARY_NAMES = const ['dart:html',
+ 'dart:svg',
+ 'dart:web_audio',
+ 'dart:indexed_db'];
+/**
+ * Converts the libraries in [HTML_LIBRARY_NAMES] to a json file at [jsonPath]
+ * given the library path at [libPath].
+ *
+ * The json output looks like:
+ * {
+ * $library_name: {
+ * $interface_name: {
+ * comment: "$comment"
+ * members: {
+ * $member: [
+ * $comment1,
+ * ...
+ * ],
+ * ...
+ * }
+ * },
+ * ...
+ * },
+ * ...
+ * }
+ *
+ * Returns `true` if any errors were encountered, `false` otherwise.
+ */
+bool convert(Path libPath, Path jsonPath) {
+ var paths = <Path>[];
+ for (var libraryName in HTML_LIBRARY_NAMES) {
+ paths.add(new Path(libraryName));
+ }
+
+ // TODO(amouravski): Account for errors in compilation.
+ final compilation = new Compilation.library(paths, libPath, null,
+ ['--preserve-comments']);
+
+ var convertedJson = _generateJsonFromLibraries(compilation);
+
+ var anyErrors = _exportJsonToFile(convertedJson, jsonPath);
+
+ return anyErrors;
+}
+
+bool _exportJsonToFile(Map convertedJson, Path jsonPath) {
+ final jsonFile = new File.fromPath(jsonPath);
+ var writeJson = prettySerialize(convertedJson);
+
+ var outputStream = jsonFile.openOutputStream();
+ outputStream.writeString(writeJson);
+
+ return false;
+}
+
+Map _generateJsonFromLibraries(Compilation compilation) {
+ var convertedJson = {};
+
+ // Sort the libraries by name (not key).
+ var sortedLibraries = new List<LibraryMirror>.from(
+ compilation.mirrors.libraries.values.where(
+ (e) => HTML_LIBRARY_NAMES.indexOf(e.uri.toString()) >= 0))
+ ..sort((x, y) =>
+ x.uri.toString().toUpperCase().compareTo(
+ y.uri.toString().toUpperCase()));
+
+ for (LibraryMirror libMirror in sortedLibraries) {
+ print('Extracting documentation from ${libMirror.displayName}.');
+
+ var libraryJson = {};
+ var sortedClasses = _sortAndFilterMirrors(
+ libMirror.classes.values.toList());
+
+ for (ClassMirror classMirror in sortedClasses) {
+ var classJson = {};
+ var sortedMembers = _sortAndFilterMirrors(
+ classMirror.members.values.toList());
+
+ var membersJson = {};
+ for (var memberMirror in sortedMembers) {
+ var memberDomName = domNames(memberMirror)[0];
+ var memberComment = computeUntrimmedCommentAsList(memberMirror);
+
+ // Remove interface name from Dom Name.
+ if (memberDomName.indexOf('.') >= 0) {
+ memberDomName = memberDomName.slice(memberDomName.indexOf('.') + 1);
+ }
+
+ if (!memberComment.isEmpty) {
+ membersJson.putIfAbsent(memberDomName, () => memberComment);
+ }
+ }
+
+ var classComment = computeUntrimmedCommentAsList(classMirror);
+ if (!classComment.isEmpty) {
+ classJson.putIfAbsent('comment', () => classComment);
+ }
+ if (!membersJson.isEmpty) {
+ classJson.putIfAbsent('members', () =>
+ membersJson);
+ }
+
+ if (!classJson.isEmpty) {
+ libraryJson.putIfAbsent(domNames(classMirror)[0], () =>
+ classJson);
+ }
+ }
+
+ if (!libraryJson.isEmpty) {
+ convertedJson.putIfAbsent(libMirror.displayName, () =>
+ libraryJson);
+ }
+ }
+
+ return convertedJson;
+}
+
+List<DeclarationMirror> _sortAndFilterMirrors(List<DeclarationMirror> mirrors) {
+ // Filter out mirrors that are private, or which are not part of this docs
+ // process. That is, ones without the DocsEditable annotation.
+ var filteredMirrors = mirrors.where((DeclarationMirror c) =>
+ !domNames(c).isEmpty &&
+ !c.displayName.startsWith('_') &&
+ (findMetadata(c.metadata, 'DocsEditable') != null))
+ .toList();
+
+ filteredMirrors.sort((x, y) =>
+ domNames(x)[0].toUpperCase().compareTo(
+ domNames(y)[0].toUpperCase()));
+
+ return filteredMirrors;
+}
+
+/// Given the class mirror, returns the names found or an empty list.
+List<String> domNames(DeclarationMirror mirror) {
+ var domNameMetadata = findMetadata(mirror.metadata, 'DomName');
+
+ if (domNameMetadata != null) {
+ var domNames = <String>[];
+ var tags = deprecatedFutureValue(domNameMetadata.getField('name'));
+ for (var s in tags.reflectee.split(',')) {
+ domNames.add(s.trim());
+ }
+
+ if (domNames.length == 1 && domNames[0] == 'none') return <String>[];
+ return domNames;
+ } else {
+ return <String>[];
+ }
+}
\ No newline at end of file
diff --git a/tools/dom/idl/dart/dart.idl b/tools/dom/idl/dart/dart.idl
index c73a508..e823e52 100644
--- a/tools/dom/idl/dart/dart.idl
+++ b/tools/dom/idl/dart/dart.idl
@@ -61,7 +61,7 @@
[Supplemental]
interface ImageData {
- readonly attribute Uint8ClampedArray data;
+ [Custom] readonly attribute int[] data;
};
[Supplemental]
@@ -327,7 +327,7 @@
[Custom] Dictionary item(in unsigned long index);
};
-[Supplemental]
+[Supplemental, CustomConstructor, Constructor(in DOMString url)]
interface WebSocket {
// Suppress the default since it has non-standard return type and add
// overrides.
diff --git a/tools/dom/scripts/dartgenerator.py b/tools/dom/scripts/dartgenerator.py
index 5fb409c..1704de2 100755
--- a/tools/dom/scripts/dartgenerator.py
+++ b/tools/dom/scripts/dartgenerator.py
@@ -148,17 +148,6 @@
else:
database.DeleteInterface(interface.id)
- # Ugly temporary hack
- websocket_interface = database.GetInterface('WebSocket')
- def make_object(**fields):
- o = type('Anon', (object,), {})()
- for k, v in fields.items(): setattr(o, k, v)
- o.ext_attrs = {}
- return o
- arg = make_object(id = 'url', type = make_object(id = 'DOMString'))
- websocket_interface.ext_attrs['Constructor'] = make_object(arguments = [arg])
- websocket_interface.ext_attrs['CustomConstructor'] = True
-
self.FilterMembersWithUnidentifiedTypes(database)
def Generate(self, database, super_database, generate_interface):
diff --git a/tools/dom/scripts/generator.py b/tools/dom/scripts/generator.py
index 265eab9..bc65b11 100644
--- a/tools/dom/scripts/generator.py
+++ b/tools/dom/scripts/generator.py
@@ -7,9 +7,16 @@
Dart APIs from the IDL database."""
import copy
+import json
+import os
import re
from htmlrenamer import html_interface_renames
+# Set up json file for retrieving comments.
+_current_dir = os.path.dirname(__file__)
+_json_path = os.path.join(_current_dir, '..', 'docs', 'docs.json')
+_dom_json = json.load(open(_json_path))
+
_pure_interfaces = set([
# TODO(sra): DOMStringMap should be a class implementing Map<String,String>.
'DOMStringMap',
@@ -514,124 +521,161 @@
dart2js_annotations = {
- 'CanvasRenderingContext2D.createImageData':
+ 'CanvasRenderingContext2D.createImageData': [
"@Creates('ImageData|=Object')",
+ ],
- 'CanvasRenderingContext2D.getImageData':
+ 'CanvasRenderingContext2D.getImageData': [
"@Creates('ImageData|=Object')",
+ ],
- 'CanvasRenderingContext2D.webkitGetImageDataHD':
+ 'CanvasRenderingContext2D.webkitGetImageDataHD': [
"@Creates('ImageData|=Object')",
+ ],
- 'CanvasRenderingContext2D.fillStyle':
- "@Creates('String|CanvasGradient|CanvasPattern') "
+ 'CanvasRenderingContext2D.fillStyle': [
+ "@Creates('String|CanvasGradient|CanvasPattern')",
"@Returns('String|CanvasGradient|CanvasPattern')",
+ ],
- 'CanvasRenderingContext2D.strokeStyle':
- "@Creates('String|CanvasGradient|CanvasPattern') "
+ 'CanvasRenderingContext2D.strokeStyle': [
+ "@Creates('String|CanvasGradient|CanvasPattern')",
"@Returns('String|CanvasGradient|CanvasPattern')",
+ ],
# Methods returning Window can return a local window, or a cross-frame
# window (=Object) that needs wrapping.
- 'DOMWindow':
- "@Creates('Window|=Object') @Returns('Window|=Object')",
+ 'DOMWindow': [
+ "@Creates('Window|=Object')",
+ "@Returns('Window|=Object')",
+ ],
- 'DOMWindow.openDatabase': "@Creates('Database') @Creates('DatabaseSync')",
+ 'DOMWindow.openDatabase': [
+ "@Creates('Database')",
+ "@Creates('DatabaseSync')",
+ ],
# Cross-frame windows are EventTargets.
- '-EventTarget':
- "@Creates('EventTarget|=Object') @Returns('EventTarget|=Object')",
+ '-EventTarget': [
+ "@Creates('EventTarget|=Object')",
+ "@Returns('EventTarget|=Object')",
+ ],
# To be in callback with the browser-created Event, we had to have called
# addEventListener on the target, so we avoid
- 'Event.currentTarget':
- "@Creates('Null') @Returns('EventTarget|=Object')",
+ 'Event.currentTarget': [
+ "@Creates('Null')",
+ "@Returns('EventTarget|=Object')",
+ ],
# Only nodes in the DOM bubble and have target !== currentTarget.
- 'Event.target':
- "@Creates('Node') @Returns('EventTarget|=Object')",
+ 'Event.target': [
+ "@Creates('Node')",
+ "@Returns('EventTarget|=Object')",
+ ],
- 'MouseEvent.relatedTarget':
- "@Creates('Node') @Returns('EventTarget|=Object')",
+ 'MouseEvent.relatedTarget': [
+ "@Creates('Node')",
+ "@Returns('EventTarget|=Object')",
+ ],
# Touch targets are Elements in a Document, or the Document.
- 'Touch.target':
- "@Creates('Element|Document') @Returns('Element|Document')",
+ 'Touch.target': [
+ "@Creates('Element|Document')",
+ "@Returns('Element|Document')",
+ ],
- 'FileReader.result': "@Creates('String|ArrayBuffer|Null')",
+ 'FileReader.result': ["@Creates('String|ArrayBuffer|Null')"],
# Rather than have the result of an IDBRequest as a union over all possible
# results, we mark the result as instantiating any classes, and mark
# each operation with the classes that it could cause to be asynchronously
# instantiated.
- 'IDBRequest.result': "@Creates('Null')",
+ 'IDBRequest.result': ["@Creates('Null')"],
# The source is usually a participant in the operation that generated the
# IDBRequest.
- 'IDBRequest.source': "@Creates('Null')",
+ 'IDBRequest.source': ["@Creates('Null')"],
- 'IDBFactory.open': "@Creates('Database')",
+ 'IDBFactory.open': ["@Creates('Database')"],
- 'IDBObjectStore.put': "@_annotation_Creates_IDBKey",
- 'IDBObjectStore.add': "@_annotation_Creates_IDBKey",
- 'IDBObjectStore.get': "@annotation_Creates_SerializedScriptValue",
- 'IDBObjectStore.openCursor': "@Creates('Cursor')",
+ 'IDBObjectStore.put': ["@_annotation_Creates_IDBKey"],
+ 'IDBObjectStore.add': ["@_annotation_Creates_IDBKey"],
+ 'IDBObjectStore.get': ["@annotation_Creates_SerializedScriptValue"],
+ 'IDBObjectStore.openCursor': ["@Creates('Cursor')"],
- 'IDBIndex.get': "@annotation_Creates_SerializedScriptValue",
- 'IDBIndex.getKey':
- "@annotation_Creates_SerializedScriptValue "
+ 'IDBIndex.get': ["@annotation_Creates_SerializedScriptValue"],
+ 'IDBIndex.getKey': [
+ "@annotation_Creates_SerializedScriptValue",
# The source is the object store behind the index.
"@Creates('ObjectStore')",
- 'IDBIndex.openCursor': "@Creates('Cursor')",
- 'IDBIndex.openKeyCursor': "@Creates('Cursor')",
+ ],
+ 'IDBIndex.openCursor': ["@Creates('Cursor')"],
+ 'IDBIndex.openKeyCursor': ["@Creates('Cursor')"],
- 'IDBCursorWithValue.value':
- '@annotation_Creates_SerializedScriptValue '
+ 'IDBCursorWithValue.value': [
+ '@annotation_Creates_SerializedScriptValue',
'@annotation_Returns_SerializedScriptValue',
+ ],
- 'IDBCursor.key': "@_annotation_Creates_IDBKey @_annotation_Returns_IDBKey",
+ 'IDBCursor.key': [
+ "@_annotation_Creates_IDBKey",
+ "@_annotation_Returns_IDBKey",
+ ],
- '+IDBRequest': "@Returns('Request') @Creates('Request')",
+ '+IDBRequest': [
+ "@Returns('Request')",
+ "@Creates('Request')",
+ ],
- '+IDBOpenDBRequest': "@Returns('Request') @Creates('Request')",
- '+IDBVersionChangeRequest': "@Returns('Request') @Creates('Request')",
+ '+IDBOpenDBRequest': [
+ "@Returns('Request')",
+ "@Creates('Request')",
+ ],
+ '+IDBVersionChangeRequest': [
+ "@Returns('Request')",
+ "@Creates('Request')",
+ ],
+ 'MessageEvent.ports': ["@Creates('=List')"],
- 'MessageEvent.ports': "@Creates('=List')",
-
- 'MessageEvent.data':
- "@annotation_Creates_SerializedScriptValue "
+ 'MessageEvent.data': [
+ "@annotation_Creates_SerializedScriptValue",
"@annotation_Returns_SerializedScriptValue",
- 'PopStateEvent.state':
- "@annotation_Creates_SerializedScriptValue "
+ ],
+ 'PopStateEvent.state': [
+ "@annotation_Creates_SerializedScriptValue",
"@annotation_Returns_SerializedScriptValue",
- 'SerializedScriptValue':
- "@annotation_Creates_SerializedScriptValue "
+ ],
+ 'SerializedScriptValue': [
+ "@annotation_Creates_SerializedScriptValue",
"@annotation_Returns_SerializedScriptValue",
+ ],
- 'SQLResultSetRowList.item': "@Creates('=Object')",
+ 'SQLResultSetRowList.item': ["@Creates('=Object')"],
- 'XMLHttpRequest.response':
+ 'XMLHttpRequest.response': [
"@Creates('ArrayBuffer|Blob|Document|=Object|=List|String|num')",
+ ],
}
# Placeholder to add experimental flag, implementation for this is
# pending in a separate CL.
dart_annotations = {
- 'Element.webkitMatchesSelector': ['@Experimental()'],
+ 'Element.webkitMatchesSelector': ['@Experimental'],
}
_indexed_db_annotations = [
"@SupportedBrowser(SupportedBrowser.CHROME)",
"@SupportedBrowser(SupportedBrowser.FIREFOX, '15')",
"@SupportedBrowser(SupportedBrowser.IE, '10')",
- "@Experimental()",
+ "@Experimental",
]
_file_system_annotations = [
"@SupportedBrowser(SupportedBrowser.CHROME)",
- "@Experimental()",
+ "@Experimental",
]
_all_but_ie9_annotations = [
@@ -644,7 +688,7 @@
_webkit_experimental_annotations = [
"@SupportedBrowser(SupportedBrowser.CHROME)",
"@SupportedBrowser(SupportedBrowser.SAFARI)",
- "@Experimental()",
+ "@Experimental",
]
_history_annotations = _all_but_ie9_annotations
@@ -655,6 +699,11 @@
"@SupportedBrowser(SupportedBrowser.IE)",
]
+_speech_recognition_annotations = [
+ "@SupportedBrowser(SupportedBrowser.CHROME, '25')",
+ "@Experimental",
+]
+
# Annotations to be placed on generated members.
# The table is indexed as:
# INTERFACE: annotations to be added to the interface declaration
@@ -676,15 +725,20 @@
'DOMWindow.webkitResolveLocalFileSystemURL': _file_system_annotations,
'Element.webkitCreateShadowRoot': [
"@SupportedBrowser(SupportedBrowser.CHROME, '25')",
- "@Experimental()",
+ "@Experimental",
],
'FileSystem': _file_system_annotations,
'FileSystemSync': _file_system_annotations,
+ 'HashChangeEvent': [
+ "@SupportedBrowser(SupportedBrowser.CHROME)",
+ "@SupportedBrowser(SupportedBrowser.FIREFOX)",
+ "@SupportedBrowser(SupportedBrowser.SAFARI)",
+ ],
'History.pushState': _history_annotations,
'History.replaceState': _history_annotations,
'HTMLContentElement': [
"@SupportedBrowser(SupportedBrowser.CHROME, '25')",
- "@Experimental()",
+ "@Experimental",
],
'HTMLDataListElement': _all_but_ie9_annotations,
'HTMLDetailsElement': _webkit_experimental_annotations,
@@ -712,7 +766,7 @@
'HTMLProgressElement': _all_but_ie9_annotations,
'HTMLShadowElement': [
"@SupportedBrowser(SupportedBrowser.CHROME, '25')",
- "@Experimental()",
+ "@Experimental",
],
'HTMLTrackElement': [
"@SupportedBrowser(SupportedBrowser.CHROME)",
@@ -721,21 +775,56 @@
],
'IDBFactory': _indexed_db_annotations,
'IDBDatabase': _indexed_db_annotations,
+ 'MutationObserver': [
+ "@SupportedBrowser(SupportedBrowser.CHROME)",
+ "@SupportedBrowser(SupportedBrowser.FIREFOX)",
+ "@SupportedBrowser(SupportedBrowser.SAFARI)",
+ "@Experimental",
+ ],
'NotificationCenter': _webkit_experimental_annotations,
'Performance': _performance_annotations,
+ 'PopStateEvent': _history_annotations,
'ShadowRoot': [
"@SupportedBrowser(SupportedBrowser.CHROME, '25')",
- "@Experimental()",
+ "@Experimental",
],
+ 'SpeechRecognition': _speech_recognition_annotations,
+ 'SpeechRecognitionAlternative': _speech_recognition_annotations,
+ 'SpeechRecognitionError': _speech_recognition_annotations,
+ 'SpeechRecognitionEvent': _speech_recognition_annotations,
+ 'SpeechRecognitionResult': _speech_recognition_annotations,
'WebSocket': _all_but_ie9_annotations,
'WorkerContext.indexedDB': _indexed_db_annotations,
'WorkerContext.webkitRequestFileSystem': _file_system_annotations,
'WorkerContext.webkitRequestFileSystemSync': _file_system_annotations,
'WorkerContext.webkitResolveLocalFileSystemSyncURL': _file_system_annotations,
'WorkerContext.webkitResolveLocalFileSystemURL': _file_system_annotations,
+ 'XMLHttpRequestProgressEvent': _webkit_experimental_annotations,
}
-def FindCommonAnnotations(interface_name, member_name=None):
+def GetComments(interface_name, member_name=None, library_name=None):
+ """ Finds all comments for the interface or member and returns a list. """
+
+ # Add documentation from JSON.
+ comments = []
+
+ if library_name in _dom_json and interface_name in _dom_json[library_name]:
+ if member_name and (member_name in
+ _dom_json[library_name][interface_name]['members']):
+ comments = _dom_json[library_name][interface_name]['members'][member_name]
+ elif 'comment' in _dom_json[library_name][interface_name]:
+ comments = _dom_json[library_name][interface_name]['comment']
+
+ return comments
+
+def GetAnnotationsAndComments(interface_name, member_name=None,
+ library_name=None):
+ annotations = GetComments(interface_name, member_name, library_name)
+ annotations.extend(FindCommonAnnotations(interface_name, member_name,
+ library_name))
+ return annotations
+
+def FindCommonAnnotations(interface_name, member_name=None, library_name=None):
""" Finds annotations common between dart2js and dartium.
"""
if member_name:
@@ -743,25 +832,30 @@
else:
key = interface_name
- annotations = ["@DocsEditable",
- "@DomName('" + key + "')",]
+ annotations = ["@DomName('" + key + "')"]
+
+ # Only add this for members, so we don't add DocsEditable to templated classes
+ # (they get it from the default class template)
+ if member_name:
+ annotations.append('@DocsEditable');
+
if (dart_annotations.get(key) != None):
annotations.extend(dart_annotations.get(key))
return annotations
-def FindDart2JSAnnotations(idl_type, interface_name, member_name):
+def FindDart2JSAnnotationsAndComments(idl_type, interface_name, member_name,
+ library_name=None):
""" Finds all annotations for Dart2JS members- including annotations for
both dart2js and dartium.
"""
- annotations = FindCommonAnnotations(interface_name, member_name)
- if annotations:
- annotations = ' '.join(annotations)
+ annotations = GetAnnotationsAndComments(interface_name, member_name,
+ library_name)
ann2 = _FindDart2JSSpecificAnnotations(idl_type, interface_name, member_name)
if ann2:
if annotations:
- annotations = annotations + ' ' + ann2
+ annotations.extend(ann2)
else:
annotations = ann2
return annotations
@@ -773,6 +867,13 @@
else:
return False
+def FormatAnnotationsAndComments(annotations, indentation):
+ if annotations:
+ newline = '\n%s' % indentation
+ result = newline.join(annotations) + newline
+ return result
+ return ''
+
def _FindDart2JSSpecificAnnotations(idl_type, interface_name, member_name):
""" Finds dart2js-specific annotations. This does not include ones shared with
dartium.
@@ -781,10 +882,10 @@
if ann1:
ann2 = dart2js_annotations.get('+' + idl_type)
if ann2:
- return ann2 + ' ' + ann1
+ return ann2 + ann1
ann2 = dart2js_annotations.get(idl_type)
if ann2:
- return ann2 + ' ' + ann1
+ return ann2 + ann1
return ann1
ann2 = dart2js_annotations.get('-' + idl_type)
diff --git a/tools/dom/scripts/htmldartgenerator.py b/tools/dom/scripts/htmldartgenerator.py
index b813f7f..6ff883a 100644
--- a/tools/dom/scripts/htmldartgenerator.py
+++ b/tools/dom/scripts/htmldartgenerator.py
@@ -42,6 +42,7 @@
"\n @DocsEditable"
"\n @DomName('EventTarget.addEventListener, "
"EventTarget.removeEventListener, EventTarget.dispatchEvent')"
+ "\n @deprecated"
"\n $TYPE get on =>\n new $TYPE(this);\n",
TYPE=events_class_name)
@@ -176,13 +177,41 @@
self.EmitOperation(info, method_name)
def _GenerateDispatcherBody(self,
- emitter,
operations,
parameter_names,
+ declaration,
generate_call,
is_optional,
can_omit_type_check=lambda type, pos: False):
+ body_emitter = self._members_emitter.Emit(
+ '\n'
+ ' $DECLARATION {\n'
+ '$!BODY'
+ ' }\n',
+ DECLARATION=declaration)
+
+ version = [0]
+ def GenerateCall(operation, argument_count, checks):
+ if checks:
+ (stmts_emitter, call_emitter) = body_emitter.Emit(
+ ' if ($CHECKS) {\n$!STMTS$!CALL }\n',
+ INDENT=' ',
+ CHECKS=' && '.join(checks))
+ else:
+ (stmts_emitter, call_emitter) = body_emitter.Emit(
+ '$!STMTS$!CALL',
+ INDENT=' ');
+
+ if operation.type.id == 'void':
+ call_emitter = call_emitter.Emit('$(INDENT)$!CALL;\n$(INDENT)return;\n')
+ else:
+ call_emitter = call_emitter.Emit('$(INDENT)return $!CALL;\n')
+
+ version[0] += 1
+ generate_call(
+ stmts_emitter, call_emitter, version[0], operation, argument_count)
+
def GenerateChecksAndCall(operation, argument_count):
checks = []
for i in range(0, argument_count):
@@ -198,7 +227,7 @@
# optional argument could have been passed by name, leaving 'holes'.
checks.extend(['!?%s' % name for name in parameter_names[argument_count:]])
- generate_call(operation, argument_count, checks)
+ GenerateCall(operation, argument_count, checks)
# TODO: Optimize the dispatch to avoid repeated checks.
if len(operations) > 1:
@@ -207,7 +236,7 @@
if is_optional(operation, argument):
GenerateChecksAndCall(operation, position)
GenerateChecksAndCall(operation, len(operation.arguments))
- emitter.Emit(
+ body_emitter.Emit(
' throw new ArgumentError("Incorrect number or type of arguments");'
'\n');
else:
@@ -223,9 +252,9 @@
# y is optional in WebCore, while z is not.
# In this case, if y was actually passed, we'd like to emit foo(x, y, z) invocation,
# not foo(x, y).
- generate_call(operation, argument_count, [check])
+ GenerateCall(operation, argument_count, [check])
argument_count = position
- generate_call(operation, argument_count, [])
+ GenerateCall(operation, argument_count, [])
def AdditionalImplementedInterfaces(self):
# TODO: Include all implemented interfaces, including other Lists.
diff --git a/tools/dom/scripts/htmleventgenerator.py b/tools/dom/scripts/htmleventgenerator.py
index 10aaca0..fd180ec 100644
--- a/tools/dom/scripts/htmleventgenerator.py
+++ b/tools/dom/scripts/htmleventgenerator.py
@@ -6,6 +6,7 @@
"""This module provides functionality to generate dart:html event classes."""
import logging
+from generator import GetAnnotationsAndComments, FormatAnnotationsAndComments
_logger = logging.getLogger('dartgenerator')
@@ -209,7 +210,8 @@
'*.ended': ('ended', 'Event'),
'*.error': ('error', 'Event'),
'*.focus': ('focus', 'Event'),
- '*.hashchange': ('hashChange', 'HashChangeEvent'),
+ # Should be HashChangeEvent, but IE does not support it.
+ '*.hashchange': ('hashChange', 'Event'),
'*.input': ('input', 'Event'),
'*.invalid': ('invalid', 'Event'),
'*.keydown': ('keyDown', 'KeyboardEvent'),
@@ -381,7 +383,7 @@
self._template_loader = template_loader
def EmitStreamProviders(self, interface, custom_events,
- members_emitter):
+ members_emitter, library_name):
events = self._GetEvents(interface, custom_events)
if not events:
return
@@ -393,16 +395,20 @@
if self._GetEventRedirection(interface, html_name, event_type):
continue
+ annotations = FormatAnnotationsAndComments(
+ GetAnnotationsAndComments(interface.id, dom_name, library_name), ' ')
+
members_emitter.Emit(
"\n"
- " static const EventStreamProvider<$TYPE> $(NAME)Event = "
- "const EventStreamProvider<$TYPE>('$DOM_NAME');\n",
+ " $(ANNOTATIONS)static const EventStreamProvider<$TYPE> "
+ "$(NAME)Event = const EventStreamProvider<$TYPE>('$DOM_NAME');\n",
+ ANNOTATIONS=annotations,
NAME=html_name,
DOM_NAME=dom_name,
TYPE=event_type)
def EmitStreamGetters(self, interface, custom_events,
- members_emitter):
+ members_emitter, library_name):
events = self._GetEvents(interface, custom_events)
if not events:
return
@@ -418,9 +424,14 @@
else:
provider = html_name + 'Event'
+ annotations = FormatAnnotationsAndComments(
+ GetAnnotationsAndComments(interface.id, dom_name, library_name), ' ')
+
members_emitter.Emit(
"\n"
- " Stream<$TYPE> get $(NAME) => $PROVIDER.forTarget(this);\n",
+ " $(ANNOTATIONS)Stream<$TYPE> get $(NAME) => "
+ "$PROVIDER.forTarget(this);\n",
+ ANNOTATIONS=annotations,
NAME=getter_name,
PROVIDER=provider,
TYPE=event_type)
@@ -530,6 +541,7 @@
template = (self._template_loader.TryLoad(template_file) or
'\n'
'@DocsEditable\n'
+ '@deprecated\n'
'class $CLASSNAME extends $SUPER {\n'
' @DocsEditable\n'
' $CLASSNAME(EventTarget _ptr) : super(_ptr);\n'
diff --git a/tools/dom/scripts/htmlrenamer.py b/tools/dom/scripts/htmlrenamer.py
index 53488dd..8d49ed7 100644
--- a/tools/dom/scripts/htmlrenamer.py
+++ b/tools/dom/scripts/htmlrenamer.py
@@ -49,7 +49,9 @@
# but need to be exposed internally to implement dart:html on top of a standard
# browser.
_private_html_members = monitored.Set('htmlrenamer._private_html_members', [
+ 'CompositionEvent.initCompositionEvent',
'CustomEvent.initCustomEvent',
+ 'DeviceOrientationEvent.initDeviceOrientationEvent',
'Document.createElement',
'Document.createElementNS',
'Document.createEvent',
@@ -110,11 +112,13 @@
'ElementTraversal.lastElementChild',
'Event.initEvent',
'EventTarget.addEventListener',
- 'EventTarget.dispatchEvent',
'EventTarget.removeEventListener',
+ 'HashChangeEvent.initHashChangeEvent',
'KeyboardEvent.initKeyboardEvent',
'KeyboardEvent.keyIdentifier',
+ 'MessageEvent.initMessageEvent',
'MouseEvent.initMouseEvent',
+ 'MutationEvent.initMutationEvent',
'Node.appendChild',
'Node.attributes',
'Node.childNodes',
@@ -133,6 +137,9 @@
'Storage.length',
'Storage.removeItem',
'Storage.setItem',
+ 'StorageEvent.initStorageEvent',
+ 'TextEvent.initTextEvent',
+ 'TouchEvent.initTouchEvent',
'UIEvent.charCode',
'UIEvent.initUIEvent',
'UIEvent.keyCode',
@@ -402,6 +409,7 @@
'HTMLTitleElement.text',
'HTMLUListElement.compact',
'HTMLUListElement.type',
+ 'MessageEvent.webkitInitMessageEvent',
'Node.compareDocumentPosition',
'Node.get:ATTRIBUTE_NODE',
'Node.get:CDATA_SECTION_NODE',
diff --git a/tools/dom/scripts/systemhtml.py b/tools/dom/scripts/systemhtml.py
index 465645d..08156fa 100644
--- a/tools/dom/scripts/systemhtml.py
+++ b/tools/dom/scripts/systemhtml.py
@@ -74,6 +74,7 @@
'ArrayBuffer': "JS('bool', 'typeof window.ArrayBuffer != \"undefined\"')",
'DOMApplicationCache': "JS('bool', '!!(window.applicationCache)')",
'DOMFileSystem': "JS('bool', '!!(window.webkitRequestFileSystem)')",
+ 'HashChangeEvent': "Event._isTypeSupported('HashChangeEvent')",
'HTMLContentElement': "Element.isTagSupported('content')",
'HTMLDataListElement': "Element.isTagSupported('datalist')",
'HTMLDetailsElement': "Element.isTagSupported('details')",
@@ -87,8 +88,14 @@
'HTMLProgressElement': "Element.isTagSupported('progress')",
'HTMLShadowElement': "Element.isTagSupported('shadow')",
'HTMLTrackElement': "Element.isTagSupported('track')",
+ 'MediaStreamEvent': "Event._isTypeSupported('MediaStreamEvent')",
+ 'MediaStreamTrackEvent': "Event._isTypeSupported('MediaStreamTrackEvent')",
'NotificationCenter': "JS('bool', '!!(window.webkitNotifications)')",
'Performance': "JS('bool', '!!(window.performance)')",
+ 'SpeechRecognition': "JS('bool', '!!(window.SpeechRecognition || "
+ "window.webkitSpeechRecognition)')",
+ 'XMLHttpRequestProgressEvent':
+ "Event._isTypeSupported('XMLHttpRequestProgressEvent')",
'WebSocket': "JS('bool', 'typeof window.WebSocket != \"undefined\"')",
}
@@ -394,15 +401,14 @@
if implements:
implements_str = ' implements ' + ', '.join(set(implements))
- annotations = FindCommonAnnotations(self._interface.doc_js_name)
- annotations_str = ''
- if annotations:
- annotations_str = '\n' + '\n'.join(annotations)
+ annotations = FormatAnnotationsAndComments(
+ GetAnnotationsAndComments(self._interface.doc_js_name,
+ library_name=self._library_name), '')
self._implementation_members_emitter = implementation_emitter.Emit(
self._backend.ImplementationTemplate(),
LIBRARYNAME=self._library_name,
- ANNOTATIONS=annotations_str,
+ ANNOTATIONS=annotations,
CLASSNAME=self._interface_type_info.implementation_name(),
EXTENDS=' extends %s' % base_class if base_class else '',
IMPLEMENTS=implements_str,
@@ -414,7 +420,8 @@
self._event_generator.EmitStreamProviders(
self._interface,
self._backend.CustomJSMembers(),
- self._implementation_members_emitter)
+ self._implementation_members_emitter,
+ self._library_name)
self._backend.AddConstructors(
constructors, factory_provider, factory_constructor_name)
@@ -437,7 +444,8 @@
self._event_generator.EmitStreamGetters(
self._interface,
[],
- self._implementation_members_emitter)
+ self._implementation_members_emitter,
+ self._library_name)
self._backend.FinishInterface()
def _ImplementationEmitter(self):
@@ -468,6 +476,7 @@
self._renamer = options.renamer
self._interface_type_info = self._type_registry.TypeInfo(self._interface.id)
self._current_secondary_parent = None
+ self._library_name = self._renamer.GetLibraryName(self._interface)
def ImplementsMergedMembers(self):
return True
@@ -514,6 +523,7 @@
'AudioContext',
'Blob',
'MutationObserver',
+ 'SpeechRecognition',
]
if self._interface.doc_js_name in WITH_CUSTOM_STATIC_FACTORY:
@@ -791,35 +801,16 @@
else:
return self._NarrowInputType(type_name) if type_name else 'dynamic'
- body = self._members_emitter.Emit(
- '\n'
- ' $MODIFIERS$TYPE $(HTML_NAME)($PARAMS) {\n'
- '$!BODY'
- ' }\n',
- MODIFIERS='static ' if info.IsStatic() else '',
- TYPE=return_type,
- HTML_NAME=html_name,
- PARAMS=info.ParametersDeclaration(InputType))
-
parameter_names = [param_info.name for param_info in info.param_infos]
parameter_types = [InputType(param_info.type_id)
for param_info in info.param_infos]
operations = info.operations
- method_version = [0]
temp_version = [0]
- def GenerateCall(operation, argument_count, checks):
- if checks:
- (stmts_emitter, call_emitter) = body.Emit(
- ' if ($CHECKS) {\n$!STMTS$!CALL }\n',
- INDENT=' ',
- CHECKS=' &&\n '.join(checks))
- else:
- (stmts_emitter, call_emitter) = body.Emit('$!A$!B', INDENT=' ');
-
- method_version[0] += 1
- target = '_%s_%d' % (html_name, method_version[0]);
+ def GenerateCall(
+ stmts_emitter, call_emitter, version, operation, argument_count):
+ target = '_%s_%d' % (html_name, version);
arguments = []
target_parameters = []
for position, arg in enumerate(operation.arguments[:argument_count]):
@@ -862,11 +853,7 @@
if output_conversion:
call = '%s(%s)' % (output_conversion.function_name, call)
- if operation.type.id == 'void':
- call_emitter.Emit('$(INDENT)$CALL;\n$(INDENT)return;\n',
- CALL=call)
- else:
- call_emitter.Emit('$(INDENT)return $CALL;\n', CALL=call)
+ call_emitter.Emit(call)
self._members_emitter.Emit(
' $RENAME$ANNOTATIONS$MODIFIERS$TYPE$TARGET($PARAMS) native;\n',
@@ -877,10 +864,15 @@
TARGET=target,
PARAMS=', '.join(target_parameters))
+ declaration = '%s%s %s(%s)' % (
+ 'static ' if info.IsStatic() else '',
+ return_type,
+ html_name,
+ info.ParametersDeclaration(InputType))
self._GenerateDispatcherBody(
- body,
operations,
parameter_names,
+ declaration,
GenerateCall,
self._IsOptional,
can_omit_type_check=lambda type, pos: type == parameter_types[pos])
@@ -923,19 +915,20 @@
return "@JSName('%s')\n " % idl_name
return ''
- def _Annotations(self, idl_type, idl_member_name):
- out = ''
- annotations = FindDart2JSAnnotations(idl_type, self._interface.id,
- idl_member_name)
- if annotations:
- out = '%s\n ' % annotations
+ def _Annotations(self, idl_type, idl_member_name, indent=' '):
+ anns = FindDart2JSAnnotationsAndComments(idl_type, self._interface.id,
+ idl_member_name, self._library_name)
+
if not AnyConversionAnnotations(idl_type, self._interface.id,
idl_member_name):
return_type = self.SecureOutputType(idl_type)
native_type = self._NarrowToImplementationType(idl_type)
if native_type != return_type:
- out += "@Returns('%s') @Creates('%s')\n " % (native_type, native_type)
- return out
+ anns = anns + [
+ "@Returns('%s')" % native_type,
+ "@Creates('%s')" % native_type,
+ ]
+ return FormatAnnotationsAndComments(anns, indent);
def CustomJSMembers(self):
return _js_custom_members
diff --git a/tools/dom/scripts/systemnative.py b/tools/dom/scripts/systemnative.py
index 891b287..08d6708 100644
--- a/tools/dom/scripts/systemnative.py
+++ b/tools/dom/scripts/systemnative.py
@@ -113,7 +113,7 @@
def NativeSpec(self):
return ''
- def StartInterface(self, memebers_emitter):
+ def StartInterface(self, members_emitter):
# Create emitters for c++ implementation.
if not IsPureInterface(self._interface.id):
self._cpp_header_emitter = self._cpp_library_emitter.CreateHeaderEmitter(
@@ -125,7 +125,7 @@
self._cpp_impl_emitter = emitter.Emitter()
self._interface_type_info = self._TypeInfo(self._interface.id)
- self._members_emitter = memebers_emitter
+ self._members_emitter = members_emitter
self._cpp_declarations_emitter = emitter.Emitter()
self._cpp_impl_includes = set()
self._cpp_definitions_emitter = emitter.Emitter()
@@ -280,6 +280,10 @@
self._AddSetter(attribute, html_name)
def _AddGetter(self, attr, html_name):
+ # Temporary hack to force dart:scalarlist clamped array for ImageData.data.
+ # TODO(antonm): solve in principled way.
+ if self._interface.id == 'ImageData' and html_name == 'data':
+ html_name = '_data'
type_info = self._TypeInfo(attr.type.id)
dart_declaration = '%s get %s' % (
self.SecureOutputType(attr.type.id), html_name)
@@ -451,33 +455,13 @@
def _GenerateDispatcher(self, operations, dart_declaration, parameter_names):
- body = self._members_emitter.Emit(
- '\n'
- ' $DECLARATION {\n'
- '$!BODY'
- ' }\n',
- DECLARATION=dart_declaration)
-
- version = [1]
- def GenerateCall(operation, argument_count, checks):
- if checks:
- if operation.type.id != 'void':
- template = ' if ($CHECKS) {\n return $CALL;\n }\n'
- else:
- template = ' if ($CHECKS) {\n $CALL;\n return;\n }\n'
- else:
- if operation.type.id != 'void':
- template = ' return $CALL;\n'
- else:
- template = ' $CALL;\n'
-
- overload_name = '%s_%s' % (operation.id, version[0])
- version[0] += 1
+ def GenerateCall(
+ stmts_emitter, call_emitter, version, operation, argument_count):
+ overload_name = '_%s_%s' % (operation.id, version)
argument_list = ', '.join(parameter_names[:argument_count])
- call = '_%s(%s)' % (overload_name, argument_list)
- body.Emit(template, CHECKS=' && '.join(checks), CALL=call)
+ call_emitter.Emit('$NAME($ARGS)', NAME=overload_name, ARGS=argument_list)
- dart_declaration = '%s%s _%s(%s)' % (
+ dart_declaration = '%s%s %s(%s)' % (
'static ' if operation.is_static else '',
self.SecureOutputType(operation.type.id),
overload_name, argument_list)
@@ -487,9 +471,9 @@
self._GenerateOperationNativeCallback(operation, operation.arguments[:argument_count], cpp_callback_name)
self._GenerateDispatcherBody(
- body,
operations,
parameter_names,
+ dart_declaration,
GenerateCall,
self._IsArgumentOptionalInWebCore)
@@ -749,18 +733,15 @@
def _GenerateNativeBinding(self, idl_name, argument_count, dart_declaration,
native_suffix, is_custom):
- annotations = FindCommonAnnotations(self._interface.id, idl_name)
- if annotations:
- annotation_str = '\n ' + '\n '.join(annotations)
- else:
- annotation_str = ''
+ annotations = FormatAnnotationsAndComments(
+ GetAnnotationsAndComments(self._interface.id, idl_name), ' ')
native_binding = '%s_%s_%s' % (self._interface.id, idl_name, native_suffix)
self._members_emitter.Emit(
- '$ANNOTATIONS'
- '\n $DART_DECLARATION native "$NATIVE_BINDING";\n',
+ '\n'
+ ' $ANNOTATIONS$DART_DECLARATION native "$NATIVE_BINDING";\n',
DOMINTERFACE=self._interface.id,
- ANNOTATIONS=annotation_str,
+ ANNOTATIONS=annotations,
DART_DECLARATION=dart_declaration,
NATIVE_BINDING=native_binding)
diff --git a/tools/dom/src/Isolates.dart b/tools/dom/src/Isolates.dart
index 116ca4f..3e4f507 100644
--- a/tools/dom/src/Isolates.dart
+++ b/tools/dom/src/Isolates.dart
@@ -217,8 +217,9 @@
get _isolateId => ReceivePortSync._isolateId;
void _dispatchEvent(String receiver, var message) {
- var event = new CustomEvent(receiver, false, false, json.stringify(message));
- window.$dom_dispatchEvent(event);
+ var event = new CustomEvent(receiver, canBubble: false, cancelable:false,
+ detail: json.stringify(message));
+ window.dispatchEvent(event);
}
String _getPortSyncEventData(CustomEvent event) => event.detail;
diff --git a/tools/dom/src/shared_FactoryProviders.dart b/tools/dom/src/shared_FactoryProviders.dart
index dd4bb4a..0355ba9 100644
--- a/tools/dom/src/shared_FactoryProviders.dart
+++ b/tools/dom/src/shared_FactoryProviders.dart
@@ -4,38 +4,6 @@
part of html;
-class _CustomEventFactoryProvider {
- static CustomEvent createCustomEvent(String type, [bool canBubble = true,
- bool cancelable = true, Object detail = null]) {
- final CustomEvent e = document.$dom_createEvent("CustomEvent");
- e.$dom_initCustomEvent(type, canBubble, cancelable, detail);
- return e;
- }
-}
-
-class _EventFactoryProvider {
- static Event createEvent(String type, [bool canBubble = true,
- bool cancelable = true]) {
- final Event e = document.$dom_createEvent("Event");
- e.$dom_initEvent(type, canBubble, cancelable);
- return e;
- }
-}
-
-class _MouseEventFactoryProvider {
- static MouseEvent createMouseEvent(String type, Window view, int detail,
- int screenX, int screenY, int clientX, int clientY, int button,
- [bool canBubble = true, bool cancelable = true, bool ctrlKey = false,
- bool altKey = false, bool shiftKey = false, bool metaKey = false,
- EventTarget relatedTarget = null]) {
- final e = document.$dom_createEvent("MouseEvent");
- e.$dom_initMouseEvent(type, canBubble, cancelable, view, detail,
- screenX, screenY, clientX, clientY, ctrlKey, altKey, shiftKey, metaKey,
- button, relatedTarget);
- return e;
- }
-}
-
class _CssStyleDeclarationFactoryProvider {
static CssStyleDeclaration createCssStyleDeclaration_css(String css) {
final style = new Element.tag('div').style;
diff --git a/tools/dom/templates/dart2js_impl.darttemplate b/tools/dom/templates/dart2js_impl.darttemplate
index 068aa00..39e363c 100644
--- a/tools/dom/templates/dart2js_impl.darttemplate
+++ b/tools/dom/templates/dart2js_impl.darttemplate
@@ -4,6 +4,6 @@
part of $LIBRARYNAME;
-$ANNOTATIONS
-class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
+@DocsEditable
+$(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
$!MEMBERS}
diff --git a/tools/dom/templates/html/dart2js/chrome_dart2js.darttemplate b/tools/dom/templates/html/dart2js/chrome_dart2js.darttemplate
index 0e2723a..b41466f 100644
--- a/tools/dom/templates/html/dart2js/chrome_dart2js.darttemplate
+++ b/tools/dom/templates/html/dart2js/chrome_dart2js.darttemplate
@@ -7,4 +7,6 @@
library chrome;
+import 'dart:_foreign_helper' show JS;
+
part '$AUXILIARY_DIR/chrome/sample.dart';
diff --git a/tools/dom/templates/html/dart2js/html_dart2js.darttemplate b/tools/dom/templates/html/dart2js/html_dart2js.darttemplate
index c9f3130..1094cf7 100644
--- a/tools/dom/templates/html/dart2js/html_dart2js.darttemplate
+++ b/tools/dom/templates/html/dart2js/html_dart2js.darttemplate
@@ -18,6 +18,9 @@
// Not actually used, but imported since dart:html can generate these objects.
import 'dart:svg' as svg;
import 'dart:web_audio' as web_audio;
+import 'dart:_js_helper' show convertDartClosureToJS, Creates, JavaScriptIndexingBehavior, JSName, Null, Returns;
+import 'dart:_isolate_helper' show IsolateNatives;
+import 'dart:_foreign_helper' show JS;
$!GENERATED_DART_FILES
diff --git a/tools/dom/templates/html/dart2js/impl_ArrayBuffer.darttemplate b/tools/dom/templates/html/dart2js/impl_ArrayBuffer.darttemplate
index fcc61ab..121ed9b 100644
--- a/tools/dom/templates/html/dart2js/impl_ArrayBuffer.darttemplate
+++ b/tools/dom/templates/html/dart2js/impl_ArrayBuffer.darttemplate
@@ -3,8 +3,8 @@
// BSD-style license that can be found in the LICENSE file.
part of $LIBRARYNAME;
-$ANNOTATIONS
-class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
+
+$(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
$!MEMBERS
@DomName('ArrayBuffer.slice')
ArrayBuffer slice(int begin, [int end]) {
diff --git a/tools/dom/templates/html/dart2js/impl_AudioBufferSourceNode.darttemplate b/tools/dom/templates/html/dart2js/impl_AudioBufferSourceNode.darttemplate
index a954da5..e67365c 100644
--- a/tools/dom/templates/html/dart2js/impl_AudioBufferSourceNode.darttemplate
+++ b/tools/dom/templates/html/dart2js/impl_AudioBufferSourceNode.darttemplate
@@ -3,8 +3,8 @@
// BSD-style license that can be found in the LICENSE file.
part of web_audio;
-$ANNOTATIONS
-class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
+
+$(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
// TODO(efortuna): Remove these methods when Chrome stable also uses start
// instead of noteOn.
diff --git a/tools/dom/templates/html/dart2js/impl_Console.darttemplate b/tools/dom/templates/html/dart2js/impl_Console.darttemplate
index 1753495..eb4f5e5 100644
--- a/tools/dom/templates/html/dart2js/impl_Console.darttemplate
+++ b/tools/dom/templates/html/dart2js/impl_Console.darttemplate
@@ -3,8 +3,8 @@
// BSD-style license that can be found in the LICENSE file.
part of html;
-$ANNOTATIONS
-class Console {
+
+$(ANNOTATIONS)class Console {
static Console safeConsole = new Console();
diff --git a/tools/dom/templates/html/dart2js/impl_ElementEvents.darttemplate b/tools/dom/templates/html/dart2js/impl_ElementEvents.darttemplate
index 6ca992f..dd355c6 100644
--- a/tools/dom/templates/html/dart2js/impl_ElementEvents.darttemplate
+++ b/tools/dom/templates/html/dart2js/impl_ElementEvents.darttemplate
@@ -4,6 +4,7 @@
part of html;
+@deprecated
class $CLASSNAME extends $SUPER {
$CLASSNAME(EventTarget _ptr) : super(_ptr);
$!MEMBERS
diff --git a/tools/dom/templates/html/dart2js/impl_HTMLTableElement.darttemplate b/tools/dom/templates/html/dart2js/impl_HTMLTableElement.darttemplate
index 653914c..261fffd 100644
--- a/tools/dom/templates/html/dart2js/impl_HTMLTableElement.darttemplate
+++ b/tools/dom/templates/html/dart2js/impl_HTMLTableElement.darttemplate
@@ -3,8 +3,8 @@
// BSD-style license that can be found in the LICENSE file.
part of html;
-$ANNOTATIONS
-class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
+
+$(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
$!MEMBERS
Element createTBody() {
diff --git a/tools/dom/templates/html/dart2js/impl_IDBDatabase.darttemplate b/tools/dom/templates/html/dart2js/impl_IDBDatabase.darttemplate
index 7af98dc..e2b870c 100644
--- a/tools/dom/templates/html/dart2js/impl_IDBDatabase.darttemplate
+++ b/tools/dom/templates/html/dart2js/impl_IDBDatabase.darttemplate
@@ -3,8 +3,8 @@
// BSD-style license that can be found in the LICENSE file.
part of indexed_db;
-$ANNOTATIONS
-class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
+
+$(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
Transaction transaction(storeName_OR_storeNames, String mode) {
if (mode != 'readonly' && mode != 'readwrite') {
diff --git a/tools/dom/templates/html/dart2js/impl_KeyboardEvent.darttemplate b/tools/dom/templates/html/dart2js/impl_KeyboardEvent.darttemplate
index 3ba329c..7c4b25a 100644
--- a/tools/dom/templates/html/dart2js/impl_KeyboardEvent.darttemplate
+++ b/tools/dom/templates/html/dart2js/impl_KeyboardEvent.darttemplate
@@ -3,14 +3,16 @@
// BSD-style license that can be found in the LICENSE file.
-@DomName('KeyboardEvent')
-class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
+$(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
- factory $CLASSNAME(String type, Window view,
- [bool canBubble = true, bool cancelable = true,
- String keyIdentifier = "", int keyLocation = 1, bool ctrlKey = false,
- bool altKey = false, bool shiftKey = false, bool metaKey = false,
- bool altGraphKey = false]) {
+ factory $CLASSNAME(String type,
+ {Window view, bool canBubble: true, bool cancelable: true,
+ String keyIdentifier: "", int keyLocation: 1, bool ctrlKey: false,
+ bool altKey: false, bool shiftKey: false, bool metaKey: false,
+ bool altGraphKey: false}) {
+ if (view == null) {
+ view = window;
+ }
final e = document.$dom_createEvent("KeyboardEvent");
e.$dom_initKeyboardEvent(type, canBubble, cancelable, view, keyIdentifier,
keyLocation, ctrlKey, altKey, shiftKey, metaKey, altGraphKey);
diff --git a/tools/dom/templates/html/dart2js/impl_MouseEvent.darttemplate b/tools/dom/templates/html/dart2js/impl_MouseEvent.darttemplate
index cc18046..ed29b0f 100644
--- a/tools/dom/templates/html/dart2js/impl_MouseEvent.darttemplate
+++ b/tools/dom/templates/html/dart2js/impl_MouseEvent.darttemplate
@@ -3,18 +3,23 @@
// BSD-style license that can be found in the LICENSE file.
part of html;
-$ANNOTATIONS
-class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
- factory $CLASSNAME(String type, Window view, int detail, int screenX,
- int screenY, int clientX, int clientY, int button, [bool canBubble = true,
- bool cancelable = true, bool ctrlKey = false, bool altKey = false,
- bool shiftKey = false, bool metaKey = false,
- EventTarget relatedTarget = null]) =>
- _$(CLASSNAME)FactoryProvider.create$CLASSNAME(
- type, view, detail, screenX, screenY,
- clientX, clientY, button, canBubble, cancelable,
- ctrlKey, altKey, shiftKey, metaKey,
- relatedTarget);
+
+$(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
+ factory $CLASSNAME(String type,
+ {Window view, int detail: 0, int screenX: 0, int screenY: 0,
+ int clientX: 0, int clientY: 0, int button: 0, bool canBubble: true,
+ bool cancelable: true, bool ctrlKey: false, bool altKey: false,
+ bool shiftKey: false, bool metaKey: false, EventTarget relatedTarget}) {
+
+ if (view == null) {
+ view = window;
+ }
+ var event = document.$dom_createEvent('MouseEvent');
+ event.$dom_initMouseEvent(type, canBubble, cancelable, view, detail,
+ screenX, screenY, clientX, clientY, ctrlKey, altKey, shiftKey, metaKey,
+ button, relatedTarget);
+ return event;
+ }
$!MEMBERS
int get offsetX {
diff --git a/tools/dom/templates/html/dart2js/impl_SpeechRecognition.darttemplate b/tools/dom/templates/html/dart2js/impl_SpeechRecognition.darttemplate
new file mode 100644
index 0000000..599b50c
--- /dev/null
+++ b/tools/dom/templates/html/dart2js/impl_SpeechRecognition.darttemplate
@@ -0,0 +1,13 @@
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+part of $LIBRARYNAME;
+
+$(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
+$!MEMBERS
+ static SpeechRecognition _create() {
+ return JS('SpeechRecognition',
+ 'new (window.SpeechRecognition || window.webkitSpeechRecognition)()');
+ }
+}
diff --git a/tools/dom/templates/html/dart2js/impl_URL.darttemplate b/tools/dom/templates/html/dart2js/impl_URL.darttemplate
index c7b29c8..8188c31 100644
--- a/tools/dom/templates/html/dart2js/impl_URL.darttemplate
+++ b/tools/dom/templates/html/dart2js/impl_URL.darttemplate
@@ -3,8 +3,8 @@
// BSD-style license that can be found in the LICENSE file.
part of html;
-$ANNOTATIONS
-class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
+
+$(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
static String createObjectUrl(blob_OR_source_OR_stream) =>
JS('String',
diff --git a/tools/dom/templates/html/dart2js/impl_Window.darttemplate b/tools/dom/templates/html/dart2js/impl_Window.darttemplate
index e353769..037ef2d 100644
--- a/tools/dom/templates/html/dart2js/impl_Window.darttemplate
+++ b/tools/dom/templates/html/dart2js/impl_Window.darttemplate
@@ -3,8 +3,8 @@
// BSD-style license that can be found in the LICENSE file.
part of html;
-$ANNOTATIONS
-class $CLASSNAME$EXTENDS$IMPLEMENTS native "@*DOMWindow" {
+
+$(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS native "@*DOMWindow" {
Document get document => JS('Document', '#.document', this);
@@ -131,7 +131,7 @@
@SupportedBrowser(SupportedBrowser.CHROME, '23.0')
@SupportedBrowser(SupportedBrowser.FIREFOX, '15.0')
@SupportedBrowser(SupportedBrowser.IE, '10.0')
- @Experimental()
+ @Experimental
IdbFactory get indexedDB =>
JS('IdbFactory',
'#.indexedDB || #.webkitIndexedDB || #.mozIndexedDB',
diff --git a/tools/dom/templates/html/dart2js/impl_WorkerContext.darttemplate b/tools/dom/templates/html/dart2js/impl_WorkerContext.darttemplate
index 1bba286..4461917 100644
--- a/tools/dom/templates/html/dart2js/impl_WorkerContext.darttemplate
+++ b/tools/dom/templates/html/dart2js/impl_WorkerContext.darttemplate
@@ -3,8 +3,8 @@
// BSD-style license that can be found in the LICENSE file.
part of html;
-$ANNOTATIONS
-class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
+
+$(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
$!MEMBERS
/**
@@ -16,7 +16,7 @@
@SupportedBrowser(SupportedBrowser.CHROME, '23.0')
@SupportedBrowser(SupportedBrowser.FIREFOX, '15.0')
@SupportedBrowser(SupportedBrowser.IE, '10.0')
- @Experimental()
+ @Experimental
IdbFactory get indexedDB =>
JS('IdbFactory',
'#.indexedDB || #.webkitIndexedDB || #.mozIndexedDB',
diff --git a/tools/dom/templates/html/dart2js/indexed_db_dart2js.darttemplate b/tools/dom/templates/html/dart2js/indexed_db_dart2js.darttemplate
index 10b5d3b..8dc5ad5 100644
--- a/tools/dom/templates/html/dart2js/indexed_db_dart2js.darttemplate
+++ b/tools/dom/templates/html/dart2js/indexed_db_dart2js.darttemplate
@@ -10,6 +10,8 @@
import 'dart:async';
import 'dart:html';
import 'dart:html_common';
+import 'dart:_js_helper' show Creates, Returns, JSName, Null;
+import 'dart:_foreign_helper' show JS;
$!GENERATED_DART_FILES
@@ -97,7 +99,7 @@
return false; // number, string.
}
if (containsDate(nativeKey)) {
- throw new UnimplementedError('Key containing Date');
+ throw new UnimplementedError('Key containing DateTime');
}
// TODO: Cache conversion somewhere?
return nativeKey;
@@ -124,6 +126,6 @@
}
-const String _idbKey = '=List|=Object|num|String'; // TODO(sra): Add Date.
+const String _idbKey = '=List|=Object|num|String'; // TODO(sra): Add DateTime.
const _annotation_Creates_IDBKey = const Creates(_idbKey);
const _annotation_Returns_IDBKey = const Returns(_idbKey);
diff --git a/tools/dom/templates/html/dart2js/svg_dart2js.darttemplate b/tools/dom/templates/html/dart2js/svg_dart2js.darttemplate
index bdf3a55..bb5a01d 100644
--- a/tools/dom/templates/html/dart2js/svg_dart2js.darttemplate
+++ b/tools/dom/templates/html/dart2js/svg_dart2js.darttemplate
@@ -5,8 +5,12 @@
import 'dart:async';
import 'dart:collection';
+import 'dart:collection-dev';
import 'dart:html';
import 'dart:html_common';
+import 'dart:_js_helper' show Creates, Returns, JavaScriptIndexingBehavior, JSName;
+import 'dart:_foreign_helper' show JS;
+
part '$AUXILIARY_DIR/shared_SVGFactoryProviders.dart';
diff --git a/tools/dom/templates/html/dart2js/web_audio_dart2js.darttemplate b/tools/dom/templates/html/dart2js/web_audio_dart2js.darttemplate
index e7863d1..4812b82 100644
--- a/tools/dom/templates/html/dart2js/web_audio_dart2js.darttemplate
+++ b/tools/dom/templates/html/dart2js/web_audio_dart2js.darttemplate
@@ -4,7 +4,10 @@
library web_audio;
import 'dart:async';
+import 'dart:collection';
+import 'dart:collection-dev';
import 'dart:html';
import 'dart:html_common';
+import 'dart:_foreign_helper' show JS;
$!GENERATED_DART_FILES
diff --git a/tools/dom/templates/html/dartium/dart_implementation.darttemplate b/tools/dom/templates/html/dartium/dart_implementation.darttemplate
index 9da79a1..f0c067d 100644
--- a/tools/dom/templates/html/dartium/dart_implementation.darttemplate
+++ b/tools/dom/templates/html/dartium/dart_implementation.darttemplate
@@ -5,7 +5,8 @@
// WARNING: Do not edit - generated code.
part of $LIBRARYNAME;
-$ANNOTATIONS
-class $CLASSNAME$EXTENDS$IMPLEMENTS {
+
+@DocsEditable
+$(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS {
$!MEMBERS
}
diff --git a/tools/dom/templates/html/dartium/impl_KeyboardEvent.darttemplate b/tools/dom/templates/html/dartium/impl_KeyboardEvent.darttemplate
index d438f09..2f30bd1 100644
--- a/tools/dom/templates/html/dartium/impl_KeyboardEvent.darttemplate
+++ b/tools/dom/templates/html/dartium/impl_KeyboardEvent.darttemplate
@@ -1,16 +1,19 @@
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
+part of $LIBRARYNAME;
-@DomName('KeyboardEvent')
-class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
+$(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
- factory $CLASSNAME(String type, Window view,
- [bool canBubble = true, bool cancelable = true,
- String keyIdentifier = "", int keyLocation = 1, bool ctrlKey = false,
- bool altKey = false, bool shiftKey = false, bool metaKey = false,
- bool altGraphKey = false]) {
+ factory $CLASSNAME(String type,
+ {Window view, bool canBubble: true, bool cancelable: true,
+ String keyIdentifier: "", int keyLocation: 1, bool ctrlKey: false,
+ bool altKey: false, bool shiftKey: false, bool metaKey: false,
+ bool altGraphKey: false}) {
+ if (view == null) {
+ view = window;
+ }
final e = document.$dom_createEvent("KeyboardEvent");
e.$dom_initKeyboardEvent(type, canBubble, cancelable, view, keyIdentifier,
keyLocation, ctrlKey, altKey, shiftKey, metaKey, altGraphKey);
@@ -19,7 +22,7 @@
@DomName('KeyboardEvent.keyCode')
int get keyCode => $dom_keyCode;
-
+
@DomName('KeyboardEvent.charCode')
int get charCode => $dom_charCode;
$!MEMBERS
diff --git a/tools/dom/templates/html/dartium/impl_MouseEvent.darttemplate b/tools/dom/templates/html/dartium/impl_MouseEvent.darttemplate
index 428e3cf..d3de585 100644
--- a/tools/dom/templates/html/dartium/impl_MouseEvent.darttemplate
+++ b/tools/dom/templates/html/dartium/impl_MouseEvent.darttemplate
@@ -5,17 +5,22 @@
// WARNING: Do not edit - generated code.
part of html;
-$ANNOTATIONS
-class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
- factory $CLASSNAME(String type, Window view, int detail, int screenX,
- int screenY, int clientX, int clientY, int button, [bool canBubble = true,
- bool cancelable = true, bool ctrlKey = false, bool altKey = false,
- bool shiftKey = false, bool metaKey = false,
- EventTarget relatedTarget = null]) =>
- _$(CLASSNAME)FactoryProvider.create$CLASSNAME(
- type, view, detail, screenX, screenY,
- clientX, clientY, button, canBubble, cancelable,
- ctrlKey, altKey, shiftKey, metaKey,
- relatedTarget);
+
+$(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
+ factory $CLASSNAME(String type,
+ {Window view, int detail: 0, int screenX: 0, int screenY: 0,
+ int clientX: 0, int clientY: 0, int button: 0, bool canBubble: true,
+ bool cancelable: true, bool ctrlKey: false, bool altKey: false,
+ bool shiftKey: false, bool metaKey: false, EventTarget relatedTarget}) {
+
+ if (view == null) {
+ view = window;
+ }
+ var event = document.$dom_createEvent('MouseEvent');
+ event.$dom_initMouseEvent(type, canBubble, cancelable, view, detail,
+ screenX, screenY, clientX, clientY, ctrlKey, altKey, shiftKey, metaKey,
+ button, relatedTarget);
+ return event;
+ }
$!MEMBERS
}
diff --git a/tools/dom/templates/html/dartium/impl_Window.darttemplate b/tools/dom/templates/html/dartium/impl_Window.darttemplate
index 6eb575e..381e58b 100644
--- a/tools/dom/templates/html/dartium/impl_Window.darttemplate
+++ b/tools/dom/templates/html/dartium/impl_Window.darttemplate
@@ -3,8 +3,8 @@
// BSD-style license that can be found in the LICENSE file.
part of html;
-$ANNOTATIONS
-class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
+
+$(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
/**
* Executes a [callback] after the next batch of browser layout measurements
diff --git a/tools/dom/templates/html/dartium/svg_dartium.darttemplate b/tools/dom/templates/html/dartium/svg_dartium.darttemplate
index b223c22..70af41e 100644
--- a/tools/dom/templates/html/dartium/svg_dartium.darttemplate
+++ b/tools/dom/templates/html/dartium/svg_dartium.darttemplate
@@ -5,6 +5,7 @@
import 'dart:async';
import 'dart:collection';
+import 'dart:collection-dev';
import 'dart:html';
import 'dart:html_common';
import 'dart:nativewrappers';
diff --git a/tools/dom/templates/html/dartium/web_audio_dartium.darttemplate b/tools/dom/templates/html/dartium/web_audio_dartium.darttemplate
index 1359de2..f4526bb 100644
--- a/tools/dom/templates/html/dartium/web_audio_dartium.darttemplate
+++ b/tools/dom/templates/html/dartium/web_audio_dartium.darttemplate
@@ -4,7 +4,10 @@
library web_audio;
import 'dart:async';
+import 'dart:collection';
+import 'dart:collection-dev';
import 'dart:html';
+import 'dart:html_common';
import 'dart:nativewrappers';
$!GENERATED_DART_FILES
diff --git a/tools/dom/templates/html/impl/impl_AudioContext.darttemplate b/tools/dom/templates/html/impl/impl_AudioContext.darttemplate
index dbddaae..9c30422 100644
--- a/tools/dom/templates/html/impl/impl_AudioContext.darttemplate
+++ b/tools/dom/templates/html/impl/impl_AudioContext.darttemplate
@@ -3,8 +3,8 @@
// BSD-style license that can be found in the LICENSE file.
part of web_audio;
-$ANNOTATIONS
-class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
+
+$(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
$!MEMBERS
$if DART2JS
static AudioContext _create() => JS('AudioContext',
diff --git a/tools/dom/templates/html/impl/impl_Blob.darttemplate b/tools/dom/templates/html/impl/impl_Blob.darttemplate
index 5cf4673..12554be 100644
--- a/tools/dom/templates/html/impl/impl_Blob.darttemplate
+++ b/tools/dom/templates/html/impl/impl_Blob.darttemplate
@@ -3,8 +3,8 @@
// BSD-style license that can be found in the LICENSE file.
part of html;
-$ANNOTATIONS
-class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
+
+$(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
$!MEMBERS
$if DART2JS
static Blob _create([List blobParts = null, String type, String endings]) {
diff --git a/tools/dom/templates/html/impl/impl_CSSStyleDeclaration.darttemplate b/tools/dom/templates/html/impl/impl_CSSStyleDeclaration.darttemplate
index 37a1905..0212570 100644
--- a/tools/dom/templates/html/impl/impl_CSSStyleDeclaration.darttemplate
+++ b/tools/dom/templates/html/impl/impl_CSSStyleDeclaration.darttemplate
@@ -20,8 +20,8 @@
}
return _cachedBrowserPrefix;
}
-$ANNOTATIONS
-class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
+
+$(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
factory $CLASSNAME() => _$(CLASSNAME)FactoryProvider.create$CLASSNAME();
factory $CLASSNAME.css(String css) =>
_$(CLASSNAME)FactoryProvider.create$(CLASSNAME)_css(css);
diff --git a/tools/dom/templates/html/impl/impl_CanvasRenderingContext2D.darttemplate b/tools/dom/templates/html/impl/impl_CanvasRenderingContext2D.darttemplate
index 8014159..fb76557 100644
--- a/tools/dom/templates/html/impl/impl_CanvasRenderingContext2D.darttemplate
+++ b/tools/dom/templates/html/impl/impl_CanvasRenderingContext2D.darttemplate
@@ -3,8 +3,8 @@
// BSD-style license that can be found in the LICENSE file.
part of html;
-$ANNOTATIONS
-class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
+
+$(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
$!MEMBERS
/**
diff --git a/tools/dom/templates/html/impl/impl_CompositionEvent.darttemplate b/tools/dom/templates/html/impl/impl_CompositionEvent.darttemplate
new file mode 100644
index 0000000..64b5298
--- /dev/null
+++ b/tools/dom/templates/html/impl/impl_CompositionEvent.darttemplate
@@ -0,0 +1,21 @@
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+part of html;
+
+$(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
+ factory $CLASSNAME(String type,
+ {bool canBubble: false, bool cancelable: false, Window view,
+ String data}) {
+ if (view == null) {
+ view = window;
+ }
+ var e = document.$dom_createEvent("CompositionEvent");
+ e.$dom_initCompositionEvent(type, canBubble, cancelable, view, data);
+ return e;
+ }
+$!MEMBERS
+}
diff --git a/tools/dom/templates/html/impl/impl_CustomEvent.darttemplate b/tools/dom/templates/html/impl/impl_CustomEvent.darttemplate
index e44d430..2d2b6c0 100644
--- a/tools/dom/templates/html/impl/impl_CustomEvent.darttemplate
+++ b/tools/dom/templates/html/impl/impl_CustomEvent.darttemplate
@@ -5,10 +5,15 @@
// WARNING: Do not edit - generated code.
part of html;
-$ANNOTATIONS
-class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
- factory $CLASSNAME(String type, [bool canBubble = true, bool cancelable = true,
- Object detail]) => _$(CLASSNAME)FactoryProvider.create$CLASSNAME(
- type, canBubble, cancelable, detail);
+
+$(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
+ factory $CLASSNAME(String type,
+ {bool canBubble: true, bool cancelable: true, Object detail}) {
+
+ final CustomEvent e = document.$dom_createEvent("CustomEvent");
+ e.$dom_initCustomEvent(type, canBubble, cancelable, detail);
+
+ return e;
+ }
$!MEMBERS
}
diff --git a/tools/dom/templates/html/impl/impl_DeviceOrientationEvent.darttemplate b/tools/dom/templates/html/impl/impl_DeviceOrientationEvent.darttemplate
new file mode 100644
index 0000000..221c014
--- /dev/null
+++ b/tools/dom/templates/html/impl/impl_DeviceOrientationEvent.darttemplate
@@ -0,0 +1,19 @@
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+part of html;
+$ANNOTATIONS
+class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
+ factory $CLASSNAME(String type,
+ {bool canBubble: true, bool cancelable: true, num alpha: 0, num beta: 0,
+ num gamma: 0, bool absolute: false}) {
+ var e = document.$dom_createEvent("DeviceOrientationEvent");
+ e.$dom_initDeviceOrientationEvent(type, canBubble, cancelable, alpha, beta,
+ gamma, absolute);
+ return e;
+ }
+$!MEMBERS
+}
diff --git a/tools/dom/templates/html/impl/impl_Document.darttemplate b/tools/dom/templates/html/impl/impl_Document.darttemplate
index 1f8c502..f707aac 100644
--- a/tools/dom/templates/html/impl/impl_Document.darttemplate
+++ b/tools/dom/templates/html/impl/impl_Document.darttemplate
@@ -3,7 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
part of html;
-$ANNOTATIONS
+
/**
* The base class for all documents.
*
@@ -13,7 +13,7 @@
* If you aren't comfortable with DOM concepts, see the Dart tutorial
* [Target 2: Connect Dart & HTML](http://www.dartlang.org/docs/tutorials/connect-dart-html/).
*/
-class $CLASSNAME extends Node $NATIVESPEC
+$(ANNOTATIONS)class $CLASSNAME extends Node $NATIVESPEC
{
$!MEMBERS
diff --git a/tools/dom/templates/html/impl/impl_DocumentFragment.darttemplate b/tools/dom/templates/html/impl/impl_DocumentFragment.darttemplate
index 6c56346..d9af150 100644
--- a/tools/dom/templates/html/impl/impl_DocumentFragment.darttemplate
+++ b/tools/dom/templates/html/impl/impl_DocumentFragment.darttemplate
@@ -4,22 +4,7 @@
part of html;
-Future<CssStyleDeclaration> _emptyStyleFuture() {
- return _createMeasurementFuture(() => new Element.tag('div').style,
- new Completer<CssStyleDeclaration>());
-}
-
-class _FrozenCssClassSet extends CssClassSet {
- void writeClasses(Set s) {
- throw new UnsupportedError(
- 'frozen class set cannot be modified');
- }
- Set<String> readClasses() => new Set<String>();
-
- bool get frozen => true;
-}
-$ANNOTATIONS
-class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
+$(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
factory $CLASSNAME() => _$(CLASSNAME)FactoryProvider.createDocumentFragment();
factory $CLASSNAME.html(String html) =>
@@ -70,8 +55,6 @@
return e.innerHtml;
}
- String get outerHtml => innerHtml;
-
// TODO(nweiz): Do we want to support some variant of innerHtml for XML and/or
// SVG strings?
void set innerHtml(String value) {
@@ -85,186 +68,16 @@
this.nodes.addAll(nodes);
}
- Node _insertAdjacentNode(String where, Node node) {
- switch (where.toLowerCase()) {
- case "beforebegin": return null;
- case "afterend": return null;
- case "afterbegin":
- var first = this.nodes.length > 0 ? this.nodes[0] : null;
- this.insertBefore(node, first);
- return node;
- case "beforeend":
- this.nodes.add(node);
- return node;
- default:
- throw new ArgumentError("Invalid position ${where}");
- }
- }
-
- Element insertAdjacentElement(String where, Element element)
- => this._insertAdjacentNode(where, element);
-
- void insertAdjacentText(String where, String text) {
- this._insertAdjacentNode(where, new Text(text));
- }
-
- void insertAdjacentHtml(String where, String text) {
- this._insertAdjacentNode(where, new DocumentFragment.html(text));
- }
-
void append(Element element) {
this.children.add(element);
}
void appendText(String text) {
- this.insertAdjacentText('beforeend', text);
+ this.nodes.add(new Text(text));
}
void appendHtml(String text) {
- this.insertAdjacentHtml('beforeend', text);
- }
-
- // If we can come up with a semi-reasonable default value for an Element
- // getter, we'll use it. In general, these return the same values as an
- // element that has no parent.
- String get contentEditable => "false";
- bool get isContentEditable => false;
- bool get draggable => false;
- bool get hidden => false;
- bool get spellcheck => false;
- bool get translate => false;
- int get tabIndex => -1;
- String get id => "";
- String get title => "";
- String get tagName => "";
- String get webkitdropzone => "";
- String get webkitRegionOverflow => "";
- Element get $m_firstElementChild {
- if (children.length > 0) {
- return children[0];
- }
- return null;
- }
- Element get $m_lastElementChild => children.last;
- Element get nextElementSibling => null;
- Element get previousElementSibling => null;
- Element get offsetParent => null;
- Element get parent => null;
- Map<String, String> get attributes => const {};
- CssClassSet get classes => new _FrozenCssClassSet();
- Map<String, String> get dataAttributes => const {};
- CssStyleDeclaration get style => new Element.tag('div').style;
- Future<CssStyleDeclaration> get computedStyle =>
- _emptyStyleFuture();
- Future<CssStyleDeclaration> getComputedStyle(String pseudoElement) =>
- _emptyStyleFuture();
-
- // Imperative Element methods are made into no-ops, as they are on parentless
- // elements.
- void blur() {}
- void focus() {}
- void click() {}
- void scrollByLines(int lines) {}
- void scrollByPages(int pages) {}
- void scrollIntoView([bool centerIfNeeded]) {}
- void webkitRequestFullScreen(int flags) {}
- void webkitRequestFullscreen() {}
-
- // Setters throw errors rather than being no-ops because we aren't going to
- // retain the values that were set, and erroring out seems clearer.
- void set attributes(Map<String, String> value) {
- throw new UnsupportedError(
- "Attributes can't be set for document fragments.");
- }
-
- void set classes(Collection<String> value) {
- throw new UnsupportedError(
- "Classes can't be set for document fragments.");
- }
-
- void set dataAttributes(Map<String, String> value) {
- throw new UnsupportedError(
- "Data attributes can't be set for document fragments.");
- }
-
- void set contentEditable(String value) {
- throw new UnsupportedError(
- "Content editable can't be set for document fragments.");
- }
-
- String get dir {
- throw new UnsupportedError(
- "Document fragments don't support text direction.");
- }
-
- void set dir(String value) {
- throw new UnsupportedError(
- "Document fragments don't support text direction.");
- }
-
- void set draggable(bool value) {
- throw new UnsupportedError(
- "Draggable can't be set for document fragments.");
- }
-
- void set hidden(bool value) {
- throw new UnsupportedError(
- "Hidden can't be set for document fragments.");
- }
-
- void set id(String value) {
- throw new UnsupportedError(
- "ID can't be set for document fragments.");
- }
-
- String get lang {
- throw new UnsupportedError(
- "Document fragments don't support language.");
- }
-
- void set lang(String value) {
- throw new UnsupportedError(
- "Document fragments don't support language.");
- }
-
- void set scrollLeft(int value) {
- throw new UnsupportedError(
- "Document fragments don't support scrolling.");
- }
-
- void set scrollTop(int value) {
- throw new UnsupportedError(
- "Document fragments don't support scrolling.");
- }
-
- void set spellcheck(bool value) {
- throw new UnsupportedError(
- "Spellcheck can't be set for document fragments.");
- }
-
- void set translate(bool value) {
- throw new UnsupportedError(
- "Spellcheck can't be set for document fragments.");
- }
-
- void set tabIndex(int value) {
- throw new UnsupportedError(
- "Tab index can't be set for document fragments.");
- }
-
- void set title(String value) {
- throw new UnsupportedError(
- "Title can't be set for document fragments.");
- }
-
- void set webkitdropzone(String value) {
- throw new UnsupportedError(
- "WebKit drop zone can't be set for document fragments.");
- }
-
- void set webkitRegionOverflow(String value) {
- throw new UnsupportedError(
- "WebKit region overflow can't be set for document fragments.");
+ this.nodes.add(new DocumentFragment.html(text));
}
$!MEMBERS
diff --git a/tools/dom/templates/html/impl/impl_Element.darttemplate b/tools/dom/templates/html/impl/impl_Element.darttemplate
index 3cc72d0..b554609 100644
--- a/tools/dom/templates/html/impl/impl_Element.darttemplate
+++ b/tools/dom/templates/html/impl/impl_Element.darttemplate
@@ -137,6 +137,9 @@
}
}
+ List<Element> get reversed =>
+ new ReversedListView<Element>(this, 0, null);
+
void sort([int compare(Element a, Element b)]) {
throw new UnsupportedError('TODO(jacobr): should we impl?');
}
@@ -160,19 +163,19 @@
}
void removeAll(Iterable elements) {
- Collections.removeAll(this, elements);
+ IterableMixinWorkaround.removeAll(this, elements);
}
void retainAll(Iterable elements) {
- Collections.retainAll(this, elements);
+ IterableMixinWorkaround.retainAll(this, elements);
}
void removeMatching(bool test(Element element)) {
- Collections.removeMatching(this, test);
+ IterableMixinWorkaround.removeMatching(this, test);
}
void retainMatching(bool test(Element element)) {
- Collections.retainMatching(this, test);
+ IterableMixinWorkaround.retainMatching(this, test);
}
void removeRange(int start, int rangeLength) {
@@ -359,6 +362,9 @@
throw new UnsupportedError('');
}
+ List<Element> get reversed =>
+ new ReversedListView<Element>(this, 0, null);
+
void sort([int compare(Element a, Element b)]) {
throw new UnsupportedError('');
}
@@ -496,7 +502,7 @@
/**
* An abstract class, which all HTML elements extend.
*/
-abstract class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
+$(ANNOTATIONS)abstract class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
/**
* Creates an HTML element from a valid fragment of HTML.
@@ -890,7 +896,7 @@
/**
* Checks if this element matches the CSS selectors.
*/
- @Experimental()
+ @Experimental
bool matches(String selectors) {
if (JS('bool', '!!#.matches', this)) {
return JS('bool', '#.matches(#)', this, selectors);
diff --git a/tools/dom/templates/html/impl/impl_Event.darttemplate b/tools/dom/templates/html/impl/impl_Event.darttemplate
index 8e0adcd..b9b7b4c 100644
--- a/tools/dom/templates/html/impl/impl_Event.darttemplate
+++ b/tools/dom/templates/html/impl/impl_Event.darttemplate
@@ -5,15 +5,45 @@
// WARNING: Do not edit - generated code.
part of html;
-$ANNOTATIONS
-class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
+
+$(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
// In JS, canBubble and cancelable are technically required parameters to
// init*Event. In practice, though, if they aren't provided they simply
// default to false (since that's Boolean(undefined)).
//
// Contrary to JS, we default canBubble and cancelable to true, since that's
// what people want most of the time anyway.
- factory $CLASSNAME(String type, [bool canBubble = true, bool cancelable = true]) =>
- _$(CLASSNAME)FactoryProvider.create$CLASSNAME(type, canBubble, cancelable);
+ factory $CLASSNAME(String type,
+ {bool canBubble: true, bool cancelable: true}) {
+ return new Event.eventType('Event', type, canBubble: canBubble,
+ cancelable: canBubble);
+ }
+
+ /**
+ * Creates a new Event object of the specified type.
+ *
+ * This is analogous to document.createEvent.
+ * Normally events should be created via their constructors, if available.
+ *
+ * var e = new Event.type('MouseEvent', 'mousedown', true, true);
+ */
+ factory Event.eventType(String type, String name, {bool canBubble: true,
+ bool cancelable: true}) {
+ final Event e = document.$dom_createEvent(type);
+ e.$dom_initEvent(name, canBubble, cancelable);
+ return e;
+ }
$!MEMBERS
+
+ /**
+ * Checks to see if the event class is supported by the current platform.
+ */
+ static bool _isTypeSupported(String eventType) {
+ // Browsers throw for unsupported event names.
+ try {
+ var e = document.$dom_createEvent(eventType);
+ return e is Event;
+ } catch (_) { }
+ return false;
+ }
}
diff --git a/tools/dom/templates/html/impl/impl_EventTarget.darttemplate b/tools/dom/templates/html/impl/impl_EventTarget.darttemplate
index a6c4383..f0bf5ce 100644
--- a/tools/dom/templates/html/impl/impl_EventTarget.darttemplate
+++ b/tools/dom/templates/html/impl/impl_EventTarget.darttemplate
@@ -10,7 +10,7 @@
* Events can either be accessed by string name (using the indexed getter) or by
* getters exposed by subclasses. Use the getters exposed by subclasses when
* possible for better compile-time type checks.
- *
+ *
* Using an indexed getter:
* events['mouseover'].add((e) => print("Mouse over!"));
*
@@ -53,7 +53,7 @@
}
bool dispatch(Event evt) {
- return _ptr.$dom_dispatchEvent(evt);
+ return _ptr.dispatchEvent(evt);
}
void _add(EventListener listener, bool useCapture) {
@@ -64,7 +64,7 @@
_ptr.$dom_removeEventListener(_type, listener, useCapture);
}
}
-$ANNOTATIONS
+
/**
* Base class for all browser objects that support events.
*
@@ -72,8 +72,8 @@
* [$dom_addEventListener], [$dom_dispatchEvent], and
* [$dom_removeEventListener]) for compile-time type checks and a more concise
* API.
- */
-class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
+ */
+$(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
@DomName('EventTarget.addEventListener, EventTarget.removeEventListener, EventTarget.dispatchEvent')
Events get on => new Events(this);
diff --git a/tools/dom/templates/html/impl/impl_HTMLCanvasElement.darttemplate b/tools/dom/templates/html/impl/impl_HTMLCanvasElement.darttemplate
index d0de325..50c46d1 100644
--- a/tools/dom/templates/html/impl/impl_HTMLCanvasElement.darttemplate
+++ b/tools/dom/templates/html/impl/impl_HTMLCanvasElement.darttemplate
@@ -3,8 +3,8 @@
// BSD-style license that can be found in the LICENSE file.
part of html;
-$ANNOTATIONS
-class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
+
+$(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
$!MEMBERS
$if DART2JS
diff --git a/tools/dom/templates/html/impl/impl_HTMLDocument.darttemplate b/tools/dom/templates/html/impl/impl_HTMLDocument.darttemplate
index 95644ff..422278a 100644
--- a/tools/dom/templates/html/impl/impl_HTMLDocument.darttemplate
+++ b/tools/dom/templates/html/impl/impl_HTMLDocument.darttemplate
@@ -5,8 +5,8 @@
// WARNING: Do not edit - generated code.
part of html;
-$ANNOTATIONS
-class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
+
+$(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
$!MEMBERS
@DomName('Document.body')
BodyElement get body => document.$dom_body;
@@ -63,7 +63,7 @@
*/
@SupportedBrowser(SupportedBrowser.CHROME)
@SupportedBrowser(SupportedBrowser.SAFARI)
- @Experimental()
+ @Experimental
@DomName('Document.getCSSCanvasContext')
CanvasRenderingContext getCssCanvasContext(String contextId, String name,
int width, int height) {
diff --git a/tools/dom/templates/html/impl/impl_HTMLInputElement.darttemplate b/tools/dom/templates/html/impl/impl_HTMLInputElement.darttemplate
index 8b49685..deced63 100644
--- a/tools/dom/templates/html/impl/impl_HTMLInputElement.darttemplate
+++ b/tools/dom/templates/html/impl/impl_HTMLInputElement.darttemplate
@@ -3,8 +3,8 @@
// BSD-style license that can be found in the LICENSE file.
part of $LIBRARYNAME;
-$ANNOTATIONS
-class $CLASSNAME$EXTENDS implements
+
+$(ANNOTATIONS)class $CLASSNAME$EXTENDS implements
HiddenInputElement,
SearchInputElement,
TextInputElement,
@@ -309,12 +309,12 @@
* Use [supported] to check if this is supported on the current platform.
*/
@SupportedBrowser(SupportedBrowser.CHROME, '25')
-@Experimental()
+@Experimental
abstract class DateTimeInputElement implements RangeInputElementBase {
factory DateTimeInputElement() => new InputElement(type: 'datetime');
@DomName('HTMLInputElement.valueAsDate')
- Date valueAsDate;
+ DateTime valueAsDate;
@DomName('HTMLInputElement.readOnly')
bool readOnly;
@@ -334,12 +334,12 @@
* Use [supported] to check if this is supported on the current platform.
*/
@SupportedBrowser(SupportedBrowser.CHROME, '25')
-@Experimental()
+@Experimental
abstract class DateInputElement implements RangeInputElementBase {
factory DateInputElement() => new InputElement(type: 'date');
@DomName('HTMLInputElement.valueAsDate')
- Date valueAsDate;
+ DateTime valueAsDate;
@DomName('HTMLInputElement.readOnly')
bool readOnly;
@@ -359,12 +359,12 @@
* Use [supported] to check if this is supported on the current platform.
*/
@SupportedBrowser(SupportedBrowser.CHROME, '25')
-@Experimental()
+@Experimental
abstract class MonthInputElement implements RangeInputElementBase {
factory MonthInputElement() => new InputElement(type: 'month');
@DomName('HTMLInputElement.valueAsDate')
- Date valueAsDate;
+ DateTime valueAsDate;
@DomName('HTMLInputElement.readOnly')
bool readOnly;
@@ -384,12 +384,12 @@
* Use [supported] to check if this is supported on the current platform.
*/
@SupportedBrowser(SupportedBrowser.CHROME, '25')
-@Experimental()
+@Experimental
abstract class WeekInputElement implements RangeInputElementBase {
factory WeekInputElement() => new InputElement(type: 'week');
@DomName('HTMLInputElement.valueAsDate')
- Date valueAsDate;
+ DateTime valueAsDate;
@DomName('HTMLInputElement.readOnly')
bool readOnly;
@@ -409,12 +409,12 @@
* Use [supported] to check if this is supported on the current platform.
*/
@SupportedBrowser(SupportedBrowser.CHROME)
-@Experimental()
+@Experimental
abstract class TimeInputElement implements RangeInputElementBase {
factory TimeInputElement() => new InputElement(type: 'time');
@DomName('HTMLInputElement.valueAsDate')
- Date valueAsDate;
+ DateTime valueAsDate;
@DomName('HTMLInputElement.readOnly')
bool readOnly;
@@ -435,7 +435,7 @@
* Use [supported] to check if this is supported on the current platform.
*/
@SupportedBrowser(SupportedBrowser.CHROME, '25')
-@Experimental()
+@Experimental
abstract class LocalDateTimeInputElement implements RangeInputElementBase {
factory LocalDateTimeInputElement() =>
new InputElement(type: 'datetime-local');
@@ -458,7 +458,7 @@
@SupportedBrowser(SupportedBrowser.CHROME)
@SupportedBrowser(SupportedBrowser.IE)
@SupportedBrowser(SupportedBrowser.SAFARI)
-@Experimental()
+@Experimental
abstract class NumberInputElement implements RangeInputElementBase {
factory NumberInputElement() => new InputElement(type: 'number');
@@ -485,7 +485,7 @@
*/
@SupportedBrowser(SupportedBrowser.CHROME)
@SupportedBrowser(SupportedBrowser.IE, '10')
-@Experimental()
+@Experimental
abstract class RangeInputElement implements RangeInputElementBase {
factory RangeInputElement() => new InputElement(type: 'range');
diff --git a/tools/dom/templates/html/impl/impl_HTMLSelectElement.darttemplate b/tools/dom/templates/html/impl/impl_HTMLSelectElement.darttemplate
index de3a920..e215391 100644
--- a/tools/dom/templates/html/impl/impl_HTMLSelectElement.darttemplate
+++ b/tools/dom/templates/html/impl/impl_HTMLSelectElement.darttemplate
@@ -3,22 +3,24 @@
// BSD-style license that can be found in the LICENSE file.
part of html;
-$ANNOTATIONS
-class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
+
+$(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
$!MEMBERS
// Override default options, since IE returns SelectElement itself and it
// does not operate as a List.
List<OptionElement> get options {
var options = this.children.where((e) => e is OptionElement).toList();
- return new ListView(options, 0, options.length);
+ // TODO(floitsch): find better way to create a read-only list view.
+ return options.take(options.length);
}
List<OptionElement> get selectedOptions {
// IE does not change the selected flag for single-selection items.
if (this.multiple) {
var options = this.options.where((o) => o.selected).toList();
- return new ListView(options, 0, options.length);
+ // TODO(floitsch): find better way to create a read-only list view.
+ return options.take(options.length);
} else {
return [this.options[this.selectedIndex]];
}
diff --git a/tools/dom/templates/html/impl/impl_HashChangeEvent.darttemplate b/tools/dom/templates/html/impl/impl_HashChangeEvent.darttemplate
new file mode 100644
index 0000000..515dd4a
--- /dev/null
+++ b/tools/dom/templates/html/impl/impl_HashChangeEvent.darttemplate
@@ -0,0 +1,18 @@
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+part of html;
+$ANNOTATIONS
+class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
+ factory $CLASSNAME(String type,
+ {bool canBubble: true, bool cancelable: true, String oldUrl,
+ String newUrl}) {
+ var event = document.$dom_createEvent("HashChangeEvent");
+ event.$dom_initHashChangeEvent(type, canBubble, cancelable, oldUrl, newUrl);
+ return event;
+ }
+$!MEMBERS
+}
diff --git a/tools/dom/templates/html/impl/impl_History.darttemplate b/tools/dom/templates/html/impl/impl_History.darttemplate
index 103f206..1868402 100644
--- a/tools/dom/templates/html/impl/impl_History.darttemplate
+++ b/tools/dom/templates/html/impl/impl_History.darttemplate
@@ -4,8 +4,7 @@
part of $LIBRARYNAME;
-$ANNOTATIONS
-class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
+$(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
/**
* Checks if the State APIs are supported on the current platform.
diff --git a/tools/dom/templates/html/impl/impl_IDBFactory.darttemplate b/tools/dom/templates/html/impl/impl_IDBFactory.darttemplate
index 3b2c04f..ec18dba 100644
--- a/tools/dom/templates/html/impl/impl_IDBFactory.darttemplate
+++ b/tools/dom/templates/html/impl/impl_IDBFactory.darttemplate
@@ -3,8 +3,8 @@
// BSD-style license that can be found in the LICENSE file.
part of $LIBRARYNAME;
-$ANNOTATIONS
-class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
+
+$(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
/**
* Checks to see if Indexed DB is supported on the current platform.
*/
diff --git a/tools/dom/templates/html/impl/impl_IDBKeyRange.darttemplate b/tools/dom/templates/html/impl/impl_IDBKeyRange.darttemplate
index 5f493ff..0c24dd9 100644
--- a/tools/dom/templates/html/impl/impl_IDBKeyRange.darttemplate
+++ b/tools/dom/templates/html/impl/impl_IDBKeyRange.darttemplate
@@ -3,8 +3,8 @@
// BSD-style license that can be found in the LICENSE file.
part of indexed_db;
-$ANNOTATIONS
-class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
+
+$(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
@DomName('IDBKeyRange.only')
factory KeyRange.only(/*Key*/ value) =>
_KeyRangeFactoryProvider.create$(CLASSNAME)_only(value);
diff --git a/tools/dom/templates/html/impl/impl_ImageData.darttemplate b/tools/dom/templates/html/impl/impl_ImageData.darttemplate
new file mode 100644
index 0000000..c7e0977
--- /dev/null
+++ b/tools/dom/templates/html/impl/impl_ImageData.darttemplate
@@ -0,0 +1,20 @@
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+part of $LIBRARYNAME;
+$ANNOTATIONS
+class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
+$if DARTIUM
+ List<int> __data;
+
+ List<int> get data {
+ if (__data == null) {
+ __data = _data;
+ }
+ return __data;
+ }
+$endif
+
+$!MEMBERS
+}
diff --git a/tools/dom/templates/html/impl/impl_MessageEvent.darttemplate b/tools/dom/templates/html/impl/impl_MessageEvent.darttemplate
new file mode 100644
index 0000000..8aae717
--- /dev/null
+++ b/tools/dom/templates/html/impl/impl_MessageEvent.darttemplate
@@ -0,0 +1,23 @@
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+part of html;
+
+$(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
+ factory $CLASSNAME(String type,
+ {bool canBubble: false, bool cancelable: false, Object data,
+ String origin, String lastEventId,
+ Window source, List messagePorts}) {
+ if (source == null) {
+ source = window;
+ }
+ var event = document.$dom_createEvent("MessageEvent");
+ event.$dom_initMessageEvent(type, canBubble, cancelable, data, origin,
+ lastEventId, source, messagePorts);
+ return event;
+ }
+$!MEMBERS
+}
diff --git a/tools/dom/templates/html/impl/impl_MutationEvent.darttemplate b/tools/dom/templates/html/impl/impl_MutationEvent.darttemplate
new file mode 100644
index 0000000..bcef767
--- /dev/null
+++ b/tools/dom/templates/html/impl/impl_MutationEvent.darttemplate
@@ -0,0 +1,21 @@
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+part of html;
+
+$(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
+ factory $CLASSNAME(String type,
+ {bool canBubble: false, bool cancelable: false, Node relatedNode,
+ String prevValue, String newValue, String attrName, int attrChange: 0}) {
+
+ var event = document.$dom_createEvent('MutationEvent');
+ event.$dom_initMutationEvent(type, canBubble, cancelable, relatedNode,
+ prevValue, newValue, attrName, attrChange);
+ return event;
+ }
+$!MEMBERS
+}
+
+
+
diff --git a/tools/dom/templates/html/impl/impl_MutationObserver.darttemplate b/tools/dom/templates/html/impl/impl_MutationObserver.darttemplate
index d3dfa5c..5c70356 100644
--- a/tools/dom/templates/html/impl/impl_MutationObserver.darttemplate
+++ b/tools/dom/templates/html/impl/impl_MutationObserver.darttemplate
@@ -3,12 +3,8 @@
// BSD-style license that can be found in the LICENSE file.
part of html;
-$ANNOTATIONS
-@SupportedBrowser(SupportedBrowser.CHROME)
-@SupportedBrowser(SupportedBrowser.FIREFOX)
-@SupportedBrowser(SupportedBrowser.SAFARI)
-@Experimental()
-class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
+
+$(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
$!MEMBERS
/**
* Checks to see if the mutation observer API is supported on the current
diff --git a/tools/dom/templates/html/impl/impl_Navigator.darttemplate b/tools/dom/templates/html/impl/impl_Navigator.darttemplate
index f6d7b91..9d8d8c4 100644
--- a/tools/dom/templates/html/impl/impl_Navigator.darttemplate
+++ b/tools/dom/templates/html/impl/impl_Navigator.darttemplate
@@ -3,8 +3,8 @@
// BSD-style license that can be found in the LICENSE file.
part of $LIBRARYNAME;
-$ANNOTATIONS
-class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
+
+$(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
$if DART2JS
@DomName('Navigator.language')
@@ -32,7 +32,7 @@
*/
@DomName('Navigator.webkitGetUserMedia')
@SupportedBrowser(SupportedBrowser.CHROME)
- @Experimental()
+ @Experimental
Future<LocalMediaStream> getUserMedia({bool audio: false,
bool video: false}) {
var completer = new Completer<LocalMediaStream>();
diff --git a/tools/dom/templates/html/impl/impl_Node.darttemplate b/tools/dom/templates/html/impl/impl_Node.darttemplate
index 21069d6..e23c5d8 100644
--- a/tools/dom/templates/html/impl/impl_Node.darttemplate
+++ b/tools/dom/templates/html/impl/impl_Node.darttemplate
@@ -189,6 +189,9 @@
return this[index];
}
+ List<Node> get reversed =>
+ new ReversedListView<Node>(this, 0, null);
+
// TODO(jacobr): this could be implemented for child node lists.
// The exception we throw here is misleading.
void sort([int compare(Node a, Node b)]) {
@@ -230,8 +233,8 @@
Node operator[](int index) => _this.$dom_childNodes[index];
}
-$ANNOTATIONS
-class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
+
+$(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
List<Node> get nodes {
return new _ChildNodeListLazy(this);
}
diff --git a/tools/dom/templates/html/impl/impl_Range.darttemplate b/tools/dom/templates/html/impl/impl_Range.darttemplate
index e94acda..13ab552 100644
--- a/tools/dom/templates/html/impl/impl_Range.darttemplate
+++ b/tools/dom/templates/html/impl/impl_Range.darttemplate
@@ -5,8 +5,8 @@
// WARNING: Do not edit - generated code.
part of $LIBRARYNAME;
-$ANNOTATIONS
-class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
+
+$(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
factory $CLASSNAME() => document.$dom_createRange();
$!MEMBERS
diff --git a/tools/dom/templates/html/impl/impl_SVGElement.darttemplate b/tools/dom/templates/html/impl/impl_SVGElement.darttemplate
index cf03ecf..0fbdacb 100644
--- a/tools/dom/templates/html/impl/impl_SVGElement.darttemplate
+++ b/tools/dom/templates/html/impl/impl_SVGElement.darttemplate
@@ -30,8 +30,8 @@
_element.attributes['class'] = Strings.join(list, ' ');
}
}
-$ANNOTATIONS
-class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
+
+$(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
factory $CLASSNAME.tag(String tag) =>
_$(CLASSNAME)FactoryProvider.create$(CLASSNAME)_tag(tag);
factory $CLASSNAME.svg(String svg) =>
diff --git a/tools/dom/templates/html/impl/impl_SVGSVGElement.darttemplate b/tools/dom/templates/html/impl/impl_SVGSVGElement.darttemplate
index fbfefe7..bc77c46 100644
--- a/tools/dom/templates/html/impl/impl_SVGSVGElement.darttemplate
+++ b/tools/dom/templates/html/impl/impl_SVGSVGElement.darttemplate
@@ -3,8 +3,8 @@
// BSD-style license that can be found in the LICENSE file.
part of svg;
-$ANNOTATIONS
-class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
+
+$(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
factory $CLASSNAME() => _$(CLASSNAME)FactoryProvider.createSvgSvgElement();
$!MEMBERS
diff --git a/tools/dom/templates/html/impl/impl_ShadowRoot.darttemplate b/tools/dom/templates/html/impl/impl_ShadowRoot.darttemplate
index 7fac06a..30752ce 100644
--- a/tools/dom/templates/html/impl/impl_ShadowRoot.darttemplate
+++ b/tools/dom/templates/html/impl/impl_ShadowRoot.darttemplate
@@ -5,8 +5,8 @@
// WARNING: Do not edit - generated code.
part of html;
-$ANNOTATIONS
-class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
+
+$(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
$!MEMBERS
$if DART2JS
static bool get supported =>
diff --git a/tools/dom/templates/html/impl/impl_Storage.darttemplate b/tools/dom/templates/html/impl/impl_Storage.darttemplate
index d285685..273adfd 100644
--- a/tools/dom/templates/html/impl/impl_Storage.darttemplate
+++ b/tools/dom/templates/html/impl/impl_Storage.darttemplate
@@ -3,8 +3,9 @@
// BSD-style license that can be found in the LICENSE file.
part of html;
-$ANNOTATIONS
-class $CLASSNAME$EXTENDS implements Map<String, String> $NATIVESPEC {
+
+$(ANNOTATIONS)class $CLASSNAME$EXTENDS implements Map<String, String>
+ $NATIVESPEC {
// TODO(nweiz): update this when maps support lazy iteration
bool containsValue(String value) => values.any((e) => e == value);
diff --git a/tools/dom/templates/html/impl/impl_StorageEvent.darttemplate b/tools/dom/templates/html/impl/impl_StorageEvent.darttemplate
new file mode 100644
index 0000000..72b640d
--- /dev/null
+++ b/tools/dom/templates/html/impl/impl_StorageEvent.darttemplate
@@ -0,0 +1,20 @@
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+part of html;
+
+$(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
+ factory $CLASSNAME(String type,
+ {bool canBubble: false, bool cancelable: false, String key, String oldValue,
+ String newValue, String url, Storage storageArea}) {
+
+ var e = document.$dom_createEvent("StorageEvent");
+ e.$dom_initStorageEvent(type, canBubble, cancelable, key, oldValue,
+ newValue, url, storageArea);
+ return e;
+ }
+$!MEMBERS
+}
diff --git a/tools/dom/templates/html/impl/impl_Text.darttemplate b/tools/dom/templates/html/impl/impl_Text.darttemplate
index 47d7bb7..b558e60 100644
--- a/tools/dom/templates/html/impl/impl_Text.darttemplate
+++ b/tools/dom/templates/html/impl/impl_Text.darttemplate
@@ -5,8 +5,8 @@
// WARNING: Do not edit - generated code.
part of html;
-$ANNOTATIONS
-class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
+
+$(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
factory $CLASSNAME(String data) => _$(CLASSNAME)FactoryProvider.create$CLASSNAME(data);
$!MEMBERS
}
diff --git a/tools/dom/templates/html/impl/impl_TextEvent.darttemplate b/tools/dom/templates/html/impl/impl_TextEvent.darttemplate
new file mode 100644
index 0000000..7249ce2
--- /dev/null
+++ b/tools/dom/templates/html/impl/impl_TextEvent.darttemplate
@@ -0,0 +1,20 @@
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+part of html;
+
+$(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
+ factory $CLASSNAME(String type,
+ {bool canBubble: false, bool cancelable: false, Window view, String data}) {
+ if (view == null) {
+ view = window;
+ }
+ var e = document.$dom_createEvent("TextEvent");
+ e.$dom_initTextEvent(type, canBubble, cancelable, view, data);
+ return e;
+ }
+$!MEMBERS
+}
diff --git a/tools/dom/templates/html/impl/impl_TouchEvent.darttemplate b/tools/dom/templates/html/impl/impl_TouchEvent.darttemplate
new file mode 100644
index 0000000..ea0bef9
--- /dev/null
+++ b/tools/dom/templates/html/impl/impl_TouchEvent.darttemplate
@@ -0,0 +1,24 @@
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// WARNING: Do not edit - generated code.
+
+part of html;
+
+$(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
+ factory $CLASSNAME(TouchList touches, TouchList targetTouches,
+ TouchList changedTouches, String type,
+ {Window view, int screenX: 0, int screenY: 0, int clientX: 0,
+ int clientY: 0, bool ctrlKey: false, bool altKey: false,
+ bool shiftKey: false, bool metaKey: false}) {
+ if (view == null) {
+ view = window;
+ }
+ var e = document.$dom_createEvent("TouchEvent");
+ e.$dom_initTouchEvent(touches, targetTouches, changedTouches, type, view,
+ screenX, screenY, clientX, clientY, ctrlKey, altKey, shiftKey, metaKey);
+ return e;
+ }
+$!MEMBERS
+}
diff --git a/tools/dom/templates/html/impl/impl_UIEvent.darttemplate b/tools/dom/templates/html/impl/impl_UIEvent.darttemplate
index 9aa0221..939ce85 100644
--- a/tools/dom/templates/html/impl/impl_UIEvent.darttemplate
+++ b/tools/dom/templates/html/impl/impl_UIEvent.darttemplate
@@ -5,16 +5,20 @@
// WARNING: Do not edit - generated code.
part of html;
-$ANNOTATIONS
-class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
+
+$(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
// In JS, canBubble and cancelable are technically required parameters to
// init*Event. In practice, though, if they aren't provided they simply
// default to false (since that's Boolean(undefined)).
//
// Contrary to JS, we default canBubble and cancelable to true, since that's
// what people want most of the time anyway.
- factory $CLASSNAME(String type, Window view, int detail,
- [bool canBubble = true, bool cancelable = true]) {
+ factory $CLASSNAME(String type,
+ {Window view, int detail: 0, bool canBubble: true,
+ bool cancelable: true}) {
+ if (view == null) {
+ view = window;
+ }
final e = document.$dom_createEvent("UIEvent");
e.$dom_initUIEvent(type, canBubble, cancelable, view, detail);
return e;
diff --git a/tools/dom/templates/html/impl/impl_WheelEvent.darttemplate b/tools/dom/templates/html/impl/impl_WheelEvent.darttemplate
index 215a149..a49a979 100644
--- a/tools/dom/templates/html/impl/impl_WheelEvent.darttemplate
+++ b/tools/dom/templates/html/impl/impl_WheelEvent.darttemplate
@@ -3,16 +3,19 @@
// BSD-style license that can be found in the LICENSE file.
part of html;
-$ANNOTATIONS
-class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
- factory WheelEvent(String type, Window view, int wheelDeltaX, int wheelDeltaY,
- int detail, int screenX, int screenY, int clientX, int clientY,
- int button,
- [bool canBubble = true, bool cancelable = true, bool ctrlKey = false,
- bool altKey = false, bool shiftKey = false, bool metaKey = false,
- EventTarget relatedTarget = null]) {
+$(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
+ factory WheelEvent(String type,
+ {Window view, int deltaX: 0, int deltaY: 0,
+ int detail: 0, int screenX: 0, int screenY: 0, int clientX: 0,
+ int clientY: 0, int button: 0, bool canBubble: true,
+ bool cancelable: true, bool ctrlKey: false, bool altKey: false,
+ bool shiftKey: false, bool metaKey: false, EventTarget relatedTarget}) {
+
+ if (view == null) {
+ view = window;
+ }
var eventType = 'WheelEvent';
if (_Device.isFirefox) {
eventType = 'MouseScrollEvents';
@@ -35,19 +38,19 @@
}
event._initWheelEvent(type, canBubble, cancelable, view, detail, screenX,
screenY, clientX, clientY, button, relatedTarget, modifiers.join(' '),
- wheelDeltaX, wheelDeltaY, 0, 0);
+ deltaX, deltaY, 0, 0);
} else if (event._hasInitMouseScrollEvent) {
var axis = 0;
var detail = 0;
- if (wheelDeltaX != 0 && wheelDeltaY != 0) {
+ if (deltaX != 0 && deltaY != 0) {
throw UnsupportedError(
- 'Cannot modify wheelDeltaX and wheelDeltaY simultaneously');
+ 'Cannot modify deltaX and deltaY simultaneously');
}
- if (wheelDeltaY != 0) {
- detail = wheelDeltaY;
+ if (deltaY != 0) {
+ detail = deltaY;
axis = JS('int', 'MouseScrollEvent.VERTICAL_AXIS');
- } else if (wheelDeltaX != 0) {
- detail = wheelDeltaX;
+ } else if (deltaX != 0) {
+ detail = deltaX;
axis = JS('int', 'MouseScrollEvent.HORIZONTAL_AXIS');
}
event._initMouseScrollEvent(type, canBubble, cancelable, view, detail,
@@ -59,8 +62,8 @@
event.$dom_initMouseEvent(type, canBubble, cancelable, view, detail,
screenX, screenY, clientX, clientY, ctrlKey, altKey, shiftKey,
metaKey, button, relatedTarget);
- event.$dom_initWebKitWheelEvent(wheelDeltaX,
- wheelDeltaY ~/ 120, // Chrome does an auto-convert to pixels.
+ event.$dom_initWebKitWheelEvent(deltaX,
+ deltaY ~/ 120, // Chrome does an auto-convert to pixels.
view, screenX, screenY, clientX, clientY, ctrlKey, altKey, shiftKey,
metaKey);
$if DART2JS
diff --git a/tools/dom/templates/html/impl/impl_XMLHttpRequest.darttemplate b/tools/dom/templates/html/impl/impl_XMLHttpRequest.darttemplate
index ab55590..11efa77 100644
--- a/tools/dom/templates/html/impl/impl_XMLHttpRequest.darttemplate
+++ b/tools/dom/templates/html/impl/impl_XMLHttpRequest.darttemplate
@@ -6,34 +6,33 @@
/**
* A utility for retrieving data from a URL.
- *
+ *
* HttpRequest can be used to obtain data from http, ftp, and file
- * protocols.
- *
+ * protocols.
+ *
* For example, suppose we're developing these API docs, and we
* wish to retrieve the HTML of the top-level page and print it out.
* The easiest way to do that would be:
- *
+ *
* var httpRequest = HttpRequest.get('http://api.dartlang.org',
* (request) => print(request.responseText));
- *
+ *
* **Important**: With the default behavior of this class, your
* code making the request should be served from the same origin (domain name,
* port, and application layer protocol) as the URL you are trying to access
- * with HttpRequest. However, there are ways to
+ * with HttpRequest. However, there are ways to
* [get around this restriction](http://www.dartlang.org/articles/json-web-service/#note-on-jsonp).
- *
+ *
* See also:
*
* * [Dart article on using HttpRequests](http://www.dartlang.org/articles/json-web-service/#getting-data)
* * [JS XMLHttpRequest](https://developer.mozilla.org/en-US/docs/DOM/XMLHttpRequest)
* * [Using XMLHttpRequest](https://developer.mozilla.org/en-US/docs/DOM/XMLHttpRequest/Using_XMLHttpRequest)
*/
-@DomName('XMLHttpRequest')
-class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
+$(ANNOTATIONS)class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC {
/**
* Creates a URL get request for the specified `url`.
- *
+ *
* After completing the request, the object will call the user-provided
* [onComplete] callback.
*/
@@ -45,8 +44,8 @@
* Creates a URL GET request for the specified `url` with
* credentials such a cookie (already) set in the header or
* [authorization headers](http://tools.ietf.org/html/rfc1945#section-10.2).
- *
- * After completing the request, the object will call the user-provided
+ *
+ * After completing the request, the object will call the user-provided
* [onComplete] callback.
*
* A few other details to keep in mind when using credentials:
@@ -55,7 +54,7 @@
* * The `Access-Control-Allow-Origin` header of `url` cannot contain a wildcard (*).
* * The `Access-Control-Allow-Credentials` header of `url` must be set to true.
* * If `Access-Control-Expose-Headers` has not been set to true, only a subset of all the response headers will be returned when calling [getAllRequestHeaders].
- *
+ *
* See also: [authorization headers](http://en.wikipedia.org/wiki/Basic_access_authentication).
*/
factory $CLASSNAME.getWithCredentials(String url,
diff --git a/tools/dom/templates/html/impl/pure_interface.darttemplate b/tools/dom/templates/html/impl/pure_interface.darttemplate
index 869eff2..e045b9c 100644
--- a/tools/dom/templates/html/impl/pure_interface.darttemplate
+++ b/tools/dom/templates/html/impl/pure_interface.darttemplate
@@ -3,6 +3,6 @@
// BSD-style license that can be found in the LICENSE file.
part of $LIBRARYNAME;
-$ANNOTATIONS
-abstract class $CLASSNAME$EXTENDS$IMPLEMENTS {
+
+$(ANNOTATIONS)abstract class $CLASSNAME$EXTENDS$IMPLEMENTS {
$!MEMBERS}
diff --git a/tools/dom/templates/immutable_list_mixin.darttemplate b/tools/dom/templates/immutable_list_mixin.darttemplate
index b7c8507..3a09ac5 100644
--- a/tools/dom/templates/immutable_list_mixin.darttemplate
+++ b/tools/dom/templates/immutable_list_mixin.darttemplate
@@ -26,11 +26,13 @@
void forEach(void f($E element)) => IterableMixinWorkaround.forEach(this, f);
- String join([String separator]) => IterableMixinWorkaround.joinList(this, separator);
+ String join([String separator]) =>
+ IterableMixinWorkaround.joinList(this, separator);
List mappedBy(f($E element)) => IterableMixinWorkaround.mappedByList(this, f);
- Iterable<$E> where(bool f($E element)) => IterableMixinWorkaround.where(this, f);
+ Iterable<$E> where(bool f($E element)) =>
+ IterableMixinWorkaround.where(this, f);
bool every(bool f($E element)) => IterableMixinWorkaround.every(this, f);
@@ -98,6 +100,9 @@
// clear() defined by IDL.
$endif
+ List<$E> get reversed =>
+ new ReversedListView<$E>(this, 0, null);
+
void sort([int compare($E a, $E b)]) {
throw new UnsupportedError("Cannot sort immutable List.");
}
@@ -126,9 +131,11 @@
throw new StateError("More than one element");
}
- $E min([int compare($E a, $E b)]) => IterableMixinWorkaround.min(this, compare);
+ $E min([int compare($E a, $E b)]) =>
+ IterableMixinWorkaround.min(this, compare);
- $E max([int compare($E a, $E b)]) => IterableMixinWorkaround.max(this, compare);
+ $E max([int compare($E a, $E b)]) =>
+ IterableMixinWorkaround.max(this, compare);
$E removeAt(int pos) {
throw new UnsupportedError("Cannot remove from immutable List.");
diff --git a/tools/gyp/configurations.gypi b/tools/gyp/configurations.gypi
index 0a3574f..f717f76 100644
--- a/tools/gyp/configurations.gypi
+++ b/tools/gyp/configurations.gypi
@@ -104,10 +104,7 @@
},
'DebugSIMARM': {
- # Should not inherit from Dart_Debug because Dart_simarm_Base defines
- # the optimization level to be -O3, as the simulator runs too slow
- # otherwise.
- 'inherit_from': ['Dart_Base', 'Dart_simarm_Base'],
+ 'inherit_from': ['Dart_Base', 'Dart_simarm_Base', 'Dart_Debug'],
'defines': [
'DEBUG',
],
@@ -126,10 +123,7 @@
},
'DebugSIMMIPS': {
- # Should not inherit from Dart_Debug because Dart_simmips_Base defines
- # the optimization level to be -O3, as the simulator runs too slow
- # otherwise.
- 'inherit_from': ['Dart_Base', 'Dart_simmips_Base'],
+ 'inherit_from': ['Dart_Base', 'Dart_simmips_Base', 'Dart_Debug'],
'defines': [
'DEBUG',
],
diff --git a/tools/gyp/configurations_make.gypi b/tools/gyp/configurations_make.gypi
index efe19cb..edbe56e 100644
--- a/tools/gyp/configurations_make.gypi
+++ b/tools/gyp/configurations_make.gypi
@@ -10,6 +10,7 @@
'target_defaults': {
'configurations': {
'Dart_Base': {
+ 'abstract': 1,
'cflags': [
'-Werror',
'<@(common_gcc_warning_flags)',
diff --git a/tools/gyp/configurations_xcode.gypi b/tools/gyp/configurations_xcode.gypi
index ce50d18..8ddb3dc 100644
--- a/tools/gyp/configurations_xcode.gypi
+++ b/tools/gyp/configurations_xcode.gypi
@@ -26,6 +26,7 @@
'target_defaults': {
'configurations': {
'Dart_Base': {
+ 'abstract': 1,
'xcode_settings': {
'GCC_VERSION': '<(xcode_gcc_version)',
'GCC_C_LANGUAGE_STANDARD': 'ansi',
diff --git a/tools/html_json_doc/lib/html_to_json.dart b/tools/html_json_doc/lib/html_to_json.dart
index 1a82c9e..2013640 100644
--- a/tools/html_json_doc/lib/html_to_json.dart
+++ b/tools/html_json_doc/lib/html_to_json.dart
@@ -26,6 +26,7 @@
import 'dart:json';
import 'dart:io';
+import 'dart:async';
/// True if any errors were triggered through the conversion.
diff --git a/tools/testing/dart/test_runner.dart b/tools/testing/dart/test_runner.dart
index 297d8d2..a3e72c9 100644
--- a/tools/testing/dart/test_runner.dart
+++ b/tools/testing/dart/test_runner.dart
@@ -12,6 +12,7 @@
library test_runner;
import "dart:async";
+import "dart:collection" show Queue;
// We need to use the 'io' prefix here, otherwise io.exitCode will shadow
// CommandOutput.exitCode in subclasses of CommandOutput.
import "dart:io" as io;
@@ -565,6 +566,12 @@
if (exitCode == 3) {
return !timedOut;
}
+ // If a program receives an uncaught system exception, the program
+ // terminates with the exception code as exit code.
+ // The 0x3FFFFF00 mask here tries to determine if an exception indicates
+ // a crash of the program.
+ // System exception codes can be found in 'winnt.h', for example
+ // "#define STATUS_ACCESS_VIOLATION ((DWORD) 0xC0000005)"
return (!timedOut && (exitCode < 0) && ((0x3FFFFF00 & exitCode) == 0));
}
return !timedOut && ((exitCode < 0));
diff --git a/tools/testing/dart/test_suite.dart b/tools/testing/dart/test_suite.dart
index 2b3075f..9a1f7b9 100644
--- a/tools/testing/dart/test_suite.dart
+++ b/tools/testing/dart/test_suite.dart
@@ -1774,6 +1774,7 @@
// args.add("--verbose");
if (!isBrowserRuntime(configuration['runtime'])) {
args.add("--allow-mock-compilation");
+ args.add("--categories=all");
}
}
if ((compiler == "dart2js" || compiler == "dart2dart") &&
diff --git a/utils/apidoc/apidoc.dart b/utils/apidoc/apidoc.dart
index 3bcb9ee..bba8136 100644
--- a/utils/apidoc/apidoc.dart
+++ b/utils/apidoc/apidoc.dart
@@ -155,8 +155,6 @@
final Map mdn;
- static const disqusShortname = 'dartapidocs';
-
// A set of type names (TypeMirror.simpleName values) to ignore while
// looking up information from MDN data. TODO(eub, jacobr): fix up the MDN
// import scripts so they run correctly and generate data that doesn't have
@@ -200,36 +198,10 @@
page is licensed under the <a href="$cca">Creative Commons Attribution
3.0 License</a>, and code samples are licensed under the
<a href="$bsd">BSD License</a>.</p>
- <p>
- Comments that are not specifically about the API libraries will
- be moderated and possibly deleted.
- Because we may incorporate information from comments into the
- documentation, any comment submitted here is under the same
- license as the documentation.
- </p>
<p><a href="$tos">Terms of Service</a> |
<a href="$privacy">Privacy Policy</a></p>
''';
- preFooterText =
- '''
- <div id="comments">
- <div id="disqus_thread"></div>
- <script type="text/javascript">
- /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
- var disqus_shortname = "$disqusShortname"; // required: replace example with your forum shortname
-
- /* * * DON\'T EDIT BELOW THIS LINE * * */
- (function() {
- var dsq = document.createElement("script"); dsq.type = "text/javascript"; dsq.async = true;
- dsq.src = "http://" + disqus_shortname + ".disqus.com/embed.js";
- (document.getElementsByTagName("head")[0] || document.getElementsByTagName("body")[0]).appendChild(dsq);
- })();
- </script>
- <noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
- </div> <!-- #comments -->
- ''';
-
searchEngineId = '011220921317074318178:i4mscbaxtru';
searchResultsUrl = 'http://www.dartlang.org/search.html';
}
diff --git a/utils/apidoc/html_diff.dart b/utils/apidoc/html_diff.dart
index 776ed1a..e251745 100644
--- a/utils/apidoc/html_diff.dart
+++ b/utils/apidoc/html_diff.dart
@@ -11,6 +11,7 @@
import 'dart:io';
import 'dart:async';
import '../../sdk/lib/html/html_common/metadata.dart';
+import 'lib/metadata.dart';
// TODO(rnystrom): Use "package:" URL (#4968).
import '../../sdk/lib/_internal/dartdoc/lib/dartdoc.dart';
@@ -152,7 +153,7 @@
List<String> htmlToDomTypes(ClassMirror htmlType) {
if (htmlType.simpleName == null) return <String>[];
- final domNameMetadata = _findMetadata(htmlType.metadata, 'DomName');
+ final domNameMetadata = findMetadata(htmlType.metadata, 'DomName');
if (domNameMetadata != null) {
var domNames = <String>[];
var tags = deprecatedFutureValue(domNameMetadata.getField('name'));
@@ -176,7 +177,7 @@
Set<String> htmlToDomMembers(MemberMirror htmlMember, List<String> domTypes) {
if (htmlMember.isPrivate) return new Set();
- final domNameMetadata = _findMetadata(htmlMember.metadata, 'DomName');
+ final domNameMetadata = findMetadata(htmlMember.metadata, 'DomName');
if (domNameMetadata != null) {
var domNames = <String>[];
var tags = deprecatedFutureValue(domNameMetadata.getField('name'));
@@ -233,12 +234,4 @@
}
return new Set.from([name]);
}
-
-}
-
-/// Returns the metadata for the given string or null if not found.
-InstanceMirror _findMetadata(List<InstanceMirror> metadataList, String find) {
- return metadataList.firstMatching(
- (metadata) => metadata.type.simpleName == find,
- orElse: () => null);
-}
+}
\ No newline at end of file
diff --git a/utils/apidoc/lib/metadata.dart b/utils/apidoc/lib/metadata.dart
new file mode 100644
index 0000000..e042d00
--- /dev/null
+++ b/utils/apidoc/lib/metadata.dart
@@ -0,0 +1,14 @@
+library metadata;
+
+import '../../../sdk/lib/_internal/compiler/implementation/mirrors/mirrors.dart';
+
+/// Returns the metadata for the given string or null if not found.
+InstanceMirror findMetadata(List<InstanceMirror> metadataList, String find) {
+ return metadataList.firstMatching(
+ (metadata) {
+ if (metadata is TypeInstanceMirror) {
+ return metadata.representedType.simpleName == find;
+ }
+ return metadata.type.simpleName == find;
+ }, orElse: () => null);
+}
diff --git a/utils/pub/command_lish.dart b/utils/pub/command_lish.dart
index 544fb94..59bfbbf 100644
--- a/utils/pub/command_lish.dart
+++ b/utils/pub/command_lish.dart
@@ -38,7 +38,7 @@
}
/// The URL of the server to which to upload the package.
- Uri get server => new Uri.fromString(commandOptions['server']);
+ Uri get server => Uri.parse(commandOptions['server']);
Future _publish(packageBytes) {
var cloudStorageUrl;
@@ -51,7 +51,7 @@
var url = _expectField(parameters, 'url', response);
if (url is! String) invalidServerResponse(response);
- cloudStorageUrl = new Uri.fromString(url);
+ cloudStorageUrl = Uri.parse(url);
var request = new http.MultipartRequest('POST', cloudStorageUrl);
var fields = _expectField(parameters, 'fields', response);
diff --git a/utils/pub/command_uploader.dart b/utils/pub/command_uploader.dart
index eb3cd4a..445b61e 100644
--- a/utils/pub/command_uploader.dart
+++ b/utils/pub/command_uploader.dart
@@ -38,7 +38,7 @@
}
/// The URL of the package hosting server.
- Uri get server => new Uri.fromString(commandOptions['server']);
+ Uri get server => Uri.parse(commandOptions['server']);
Future onRun() {
if (commandOptions.rest.isEmpty) {
@@ -60,7 +60,7 @@
return new Future.immediate(null).then((_) {
var package = commandOptions['package'];
- if (package != null) return new Future.immediate(package);
+ if (package != null) return package;
return Entrypoint.load(path.current, cache)
.then((entrypoint) => entrypoint.root.name);
}).then((package) {
diff --git a/utils/pub/curl_client.dart b/utils/pub/curl_client.dart
index 1681788..7001a17 100644
--- a/utils/pub/curl_client.dart
+++ b/utils/pub/curl_client.dart
@@ -161,7 +161,7 @@
var isRedirect = status >= 300 && status < 400;
var reasonPhrase =
Strings.join(statusParts.getRange(2, statusParts.length - 2), " ");
- var headers = <String>{};
+ var headers = {};
for (var line in lines) {
if (line.isEmpty) continue;
var split = split1(line, ":");
diff --git a/utils/pub/entrypoint.dart b/utils/pub/entrypoint.dart
index 4f895b3..30bfeb1 100644
--- a/utils/pub/entrypoint.dart
+++ b/utils/pub/entrypoint.dart
@@ -9,7 +9,6 @@
import 'lock_file.dart';
import 'log.dart' as log;
import 'package.dart';
-import 'root_source.dart';
import 'system_cache.dart';
import 'utils.dart';
import 'version.dart';
@@ -74,7 +73,7 @@
var future = ensureDir(dirname(packageDir)).then((_) {
return exists(packageDir);
}).then((exists) {
- if (!exists) return new Future.immediate(null);
+ if (!exists) return;
// TODO(nweiz): figure out when to actually delete the directory, and when
// we can just re-use the existing symlink.
log.fine("Deleting package directory for ${id.name} before install.");
@@ -132,7 +131,7 @@
Future _installDependencies(List<PackageId> packageVersions) {
return cleanDir(path).then((_) {
return Future.wait(packageVersions.mappedBy((id) {
- if (id.source is RootSource) return new Future.immediate(id);
+ if (id.isRoot) return new Future.immediate(id);
return install(id);
}));
}).then(_saveLockFile)
@@ -149,7 +148,7 @@
return fileExists(lockFilePath).then((exists) {
if (!exists) {
log.fine("No lock file at $lockFilePath, creating empty one.");
- return new Future<LockFile>.immediate(new LockFile.empty());
+ return new LockFile.empty();
}
return readTextFile(lockFilePath).then((text) =>
@@ -161,7 +160,7 @@
Future _saveLockFile(List<PackageId> packageIds) {
var lockFile = new LockFile.empty();
for (var id in packageIds) {
- if (id.source is! RootSource) lockFile.packages[id.name] = id;
+ if (!id.isRoot) lockFile.packages[id.name] = id;
}
var lockFilePath = join(root.dir, 'pubspec.lock');
@@ -175,7 +174,7 @@
var linkPath = join(path, root.name);
return exists(linkPath).then((exists) {
// Create the symlink if it doesn't exist.
- if (exists) return new Future.immediate(null);
+ if (exists) return;
return ensureDir(path).then(
(_) => createPackageSymlink(root.name, root.dir, linkPath,
isSelfLink: true));
@@ -192,7 +191,7 @@
var toolDir = join(root.dir, 'tool');
var webDir = join(root.dir, 'web');
return dirExists(binDir).then((exists) {
- if (!exists) return new Future.immediate(null);
+ if (!exists) return;
return _linkSecondaryPackageDir(binDir);
}).then((_) => _linkSecondaryPackageDirsRecursively(exampleDir))
.then((_) => _linkSecondaryPackageDirsRecursively(testDir))
@@ -204,13 +203,13 @@
/// subdirectories.
Future _linkSecondaryPackageDirsRecursively(String dir) {
return dirExists(dir).then((exists) {
- if (!exists) return new Future.immediate(null);
+ if (!exists) return;
return _linkSecondaryPackageDir(dir)
.then((_) => _listDirWithoutPackages(dir))
.then((files) {
return Future.wait(files.mappedBy((file) {
return dirExists(file).then((isDir) {
- if (!isDir) return new Future.immediate(null);
+ if (!isDir) return;
return _linkSecondaryPackageDir(file);
});
}));
@@ -226,7 +225,7 @@
return Future.wait(files.mappedBy((file) {
if (basename(file) == 'packages') return new Future.immediate([]);
return dirExists(file).then((isDir) {
- if (!isDir) return new Future.immediate([]);
+ if (!isDir) return [];
return _listDirWithoutPackages(file);
}).then((subfiles) {
var fileAndSubfiles = [file];
@@ -241,7 +240,7 @@
Future _linkSecondaryPackageDir(String dir) {
var to = join(dir, 'packages');
return exists(to).then((exists) {
- if (exists) return new Future.immediate(null);
+ if (exists) return;
return createSymlink(path, to);
});
}
diff --git a/utils/pub/error_group.dart b/utils/pub/error_group.dart
index a9f7861..b78ceac 100644
--- a/utils/pub/error_group.dart
+++ b/utils/pub/error_group.dart
@@ -233,9 +233,9 @@
/// Creates a new [_ErrorGroupFuture] that's a child of [_group] and wraps
/// [inner].
_ErrorGroupStream(this._group, Stream inner)
- : _controller = inner.isSingleSubscription ?
- new StreamController() :
- new StreamController.multiSubscription() {
+ : _controller = inner.isBroadcast ?
+ new StreamController.broadcast() :
+ new StreamController() {
_subscription = inner.listen(_controller.add,
onError: (e) => _group._signalError(e),
onDone: () {
diff --git a/utils/pub/git.dart b/utils/pub/git.dart
index ecbc8a0..47519c2 100644
--- a/utils/pub/git.dart
+++ b/utils/pub/git.dart
@@ -13,9 +13,7 @@
/// Tests whether or not the git command-line app is available for use.
Future<bool> get isInstalled {
if (_isGitInstalledCache != null) {
- // TODO(rnystrom): The sleep is to pump the message queue. Can use
- // Future.immediate() when #3356 is fixed.
- return sleep(0).then((_) => _isGitInstalledCache);
+ return new Future.immediate(_isGitInstalledCache);
}
return _gitCommand.then((git) => git != null);
@@ -23,9 +21,11 @@
/// Run a git process with [args] from [workingDir]. Returns the stdout as a
/// list of strings if it succeeded. Completes to an exception if it failed.
-Future<List<String>> run(List<String> args, {String workingDir}) {
+Future<List<String>> run(List<String> args,
+ {String workingDir, Map<String, String> environment}) {
return _gitCommand.then((git) {
- return runProcess(git, args, workingDir: workingDir);
+ return runProcess(git, args, workingDir: workingDir,
+ environment: environment);
}).then((result) {
if (!result.success) throw new Exception(
'Git error. Command: git ${Strings.join(args, " ")}\n'
@@ -43,13 +43,12 @@
/// Returns the name of the git command-line app, or null if Git could not be
/// found on the user's PATH.
Future<String> get _gitCommand {
- // TODO(nweiz): Just use Future.immediate once issue 3356 is fixed.
if (_gitCommandCache != null) {
- return sleep(0).then((_) => _gitCommandCache);
+ return new Future.immediate(_gitCommandCache);
}
return _tryGitCommand("git").then((success) {
- if (success) return new Future.immediate("git");
+ if (success) return "git";
// Git is sometimes installed on Windows as `git.cmd`
return _tryGitCommand("git.cmd").then((success) {
diff --git a/utils/pub/git_source.dart b/utils/pub/git_source.dart
index 0a3e2b9..477cc17 100644
--- a/utils/pub/git_source.dart
+++ b/utils/pub/git_source.dart
@@ -49,11 +49,11 @@
revisionCachePath = path;
return exists(revisionCachePath);
}).then((exists) {
- if (exists) return new Future.immediate(null);
+ if (exists) return;
return _clone(_repoCachePath(id), revisionCachePath, mirror: false);
}).then((_) {
var ref = _getEffectiveRef(id);
- if (ref == 'HEAD') return new Future.immediate(null);
+ if (ref == 'HEAD') return;
return _checkOut(revisionCachePath, ref);
}).then((_) {
return Package.load(id.name, revisionCachePath, systemCache.sources);
diff --git a/utils/pub/hosted_source.dart b/utils/pub/hosted_source.dart
index 3ae7c55..81a8057 100644
--- a/utils/pub/hosted_source.dart
+++ b/utils/pub/hosted_source.dart
@@ -73,7 +73,7 @@
// Download and extract the archive to a temp directory.
var tempDir;
return Future.wait([
- httpClient.send(new http.Request("GET", new Uri.fromString(fullUrl)))
+ httpClient.send(new http.Request("GET", Uri.parse(fullUrl)))
.then((response) => response.stream),
systemCache.createTempDir()
]).then((args) {
diff --git a/utils/pub/http.dart b/utils/pub/http.dart
index 0a2bf2e..e148418 100644
--- a/utils/pub/http.dart
+++ b/utils/pub/http.dart
@@ -50,9 +50,7 @@
var status = streamedResponse.statusCode;
// 401 responses should be handled by the OAuth2 client. It's very
// unlikely that they'll be returned by non-OAuth2 requests.
- if (status < 400 || status == 401) {
- return new Future.immediate(streamedResponse);
- }
+ if (status < 400 || status == 401) return streamedResponse;
return http.Response.fromStream(streamedResponse).then((response) {
throw new PubHttpException(response);
diff --git a/utils/pub/io.dart b/utils/pub/io.dart
index b227378..79f0a06 100644
--- a/utils/pub/io.dart
+++ b/utils/pub/io.dart
@@ -15,11 +15,6 @@
import 'log.dart' as log;
import 'utils.dart';
-bool _isGitInstalledCache;
-
-/// The cached Git command.
-String _gitCommandCache;
-
final NEWLINE_PATTERN = new RegExp("\r\n?|\n\r?");
/// Joins a number of path string parts into a single path. Handles
@@ -184,7 +179,7 @@
return dirExists(path).then((exists) {
if (exists) {
log.fine("Directory $path already exists.");
- return new Future.immediate(new Directory(path));
+ return new Directory(path);
}
return ensureDir(dirname(path)).then((_) {
@@ -411,7 +406,7 @@
'you will not be able to import any libraries from it.');
}
- return new Future.immediate(to);
+ return to;
});
}
@@ -771,65 +766,6 @@
});
}
-/// Tests whether or not the git command-line app is available for use.
-Future<bool> get isGitInstalled {
- if (_isGitInstalledCache != null) {
- // TODO(rnystrom): The sleep is to pump the message queue. Can use
- // Future.immediate() when #3356 is fixed.
- return sleep(0).then((_) => _isGitInstalledCache);
- }
-
- return _gitCommand.then((git) => git != null);
-}
-
-/// Run a git process with [args] from [workingDir].
-Future<PubProcessResult> runGit(List<String> args,
- {String workingDir, Map<String, String> environment}) {
- return _gitCommand.then((git) => runProcess(git, args,
- workingDir: workingDir, environment: environment));
-}
-
-/// Returns the name of the git command-line app, or null if Git could not be
-/// found on the user's PATH.
-Future<String> get _gitCommand {
- // TODO(nweiz): Just use Future.immediate once issue 3356 is fixed.
- if (_gitCommandCache != null) {
- return sleep(0).then((_) => _gitCommandCache);
- }
-
- return _tryGitCommand("git").then((success) {
- if (success) return new Future.immediate("git");
-
- // Git is sometimes installed on Windows as `git.cmd`
- return _tryGitCommand("git.cmd").then((success) {
- if (success) return "git.cmd";
- return null;
- });
- }).then((command) {
- _gitCommandCache = command;
- return command;
- });
-}
-
-/// Checks whether [command] is the Git command for this computer.
-Future<bool> _tryGitCommand(String command) {
- var completer = new Completer<bool>();
-
- // If "git --version" prints something familiar, git is working.
- var future = runProcess(command, ["--version"]);
-
- future.then((results) {
- var regex = new RegExp("^git version");
- completer.complete(results.stdout.length == 1 &&
- regex.hasMatch(results.stdout[0]));
- }).catchError((err) {
- // If the process failed, they probably don't have it.
- completer.complete(false);
- });
-
- return completer.future;
-}
-
/// Extracts a `.tar.gz` file from [stream] to [destination], which can be a
/// directory or a path. Returns whether or not the extraction was successful.
Future<bool> extractTarGz(InputStream stream, destination) {
@@ -1035,5 +971,5 @@
/// Gets a [Uri] for [uri], which can either already be one, or be a [String].
Uri _getUri(uri) {
if (uri is Uri) return uri;
- return new Uri.fromString(uri);
+ return Uri.parse(uri);
}
diff --git a/utils/pub/oauth2.dart b/utils/pub/oauth2.dart
index 24d798a..21565a7 100644
--- a/utils/pub/oauth2.dart
+++ b/utils/pub/oauth2.dart
@@ -33,13 +33,13 @@
/// a refresh token from the server. See the [Google OAuth2 documentation][].
///
/// [Google OAuth2 documentation]: https://developers.google.com/accounts/docs/OAuth2WebServer#offline
-final _authorizationEndpoint = new Uri.fromString(
+final _authorizationEndpoint = Uri.parse(
'https://accounts.google.com/o/oauth2/auth?access_type=offline'
'&approval_prompt=force');
/// The URL from which the pub client will request an access token once it's
/// been authorized by the user.
-final _tokenEndpoint = new Uri.fromString(
+final _tokenEndpoint = Uri.parse(
'https://accounts.google.com/o/oauth2/token');
/// The OAuth2 scopes that the pub client needs. Currently the client only needs
@@ -56,7 +56,6 @@
var credentialsFile = _credentialsFile(cache);
return fileExists(credentialsFile).then((exists) {
if (exists) return deleteFile(credentialsFile);
- return new Future.immediate(null);
});
}
@@ -97,8 +96,8 @@
Future<Client> _getClient(SystemCache cache) {
return _loadCredentials(cache).then((credentials) {
if (credentials == null) return _authorize();
- return new Future.immediate(new Client(
- _identifier, _secret, credentials, httpClient: curlClient));
+ return new Client(_identifier, _secret, credentials,
+ httpClient: curlClient);
}).then((client) {
return _saveCredentials(cache, client.credentials).then((_) => client);
});
@@ -119,7 +118,7 @@
return fileExists(path).then((credentialsExist) {
if (!credentialsExist) {
log.fine('No credentials found at $path.');
- return new Future.immediate(null);
+ return;
}
return readTextFile(_credentialsFile(cache)).then((credentialsJson) {
@@ -159,7 +158,7 @@
// Allow the tests to inject their own token endpoint URL.
var tokenEndpoint = Platform.environment['_PUB_TEST_TOKEN_ENDPOINT'];
if (tokenEndpoint != null) {
- tokenEndpoint = new Uri.fromString(tokenEndpoint);
+ tokenEndpoint = Uri.parse(tokenEndpoint);
} else {
tokenEndpoint = _tokenEndpoint;
}
@@ -194,7 +193,7 @@
server.listen('127.0.0.1', 0);
var authUrl = grant.getAuthorizationUrl(
- new Uri.fromString('http://localhost:${server.port}'), scopes: _scopes);
+ Uri.parse('http://localhost:${server.port}'), scopes: _scopes);
log.message(
'Pub needs your authorization to upload packages on your behalf.\n'
diff --git a/utils/pub/package.dart b/utils/pub/package.dart
index 70f469c..f62e2be 100644
--- a/utils/pub/package.dart
+++ b/utils/pub/package.dart
@@ -82,7 +82,8 @@
/// The name of the package being identified.
final String name;
- /// The [Source] used to look up this package given its [description].
+ /// The [Source] used to look up this package given its [description]. If
+ /// this is a root package ID, this will be `null`.
final Source source;
/// The package's version.
@@ -96,9 +97,10 @@
PackageId(this.name, this.source, this.version, this.description);
- int get hashCode => name.hashCode ^
- source.name.hashCode ^
- version.hashCode;
+ /// Whether this ID identifies the root package.
+ bool get isRoot => source == null;
+
+ int get hashCode => name.hashCode ^ source.hashCode ^ version.hashCode;
bool operator ==(other) {
if (other is! PackageId) return false;
@@ -106,11 +108,12 @@
// enough to uniquely identify the package and that we don't need to delve
// into the description.
return other.name == name &&
- other.source.name == source.name &&
+ other.source == source &&
other.version == version;
}
String toString() {
+ if (isRoot) return "$name $version (root)";
if (source.isDefault) return "$name $version";
return "$name $version from $source";
}
@@ -141,7 +144,8 @@
/// The name of the package being identified.
final String name;
- /// The [Source] used to look up the package.
+ /// The [Source] used to look up the package. If this refers to a root
+ /// package, this will be `null`.
final Source source;
/// The allowed package versions.
@@ -153,7 +157,20 @@
PackageRef(this.name, this.source, this.constraint, this.description);
- String toString() => "$name $constraint from $source ($description)";
+ /// Creates a reference to the given root package.
+ PackageRef.root(Package package)
+ : name = package.name,
+ source = null,
+ constraint = package.version,
+ description = package.name;
+
+ /// Whether this refers to the root package.
+ bool get isRoot => source == null;
+
+ String toString() {
+ if (isRoot) return "$name $constraint (root)";
+ return "$name $constraint from $source ($description)";
+ }
/// Returns a [PackageId] generated from this [PackageRef] with the given
/// concrete version.
diff --git a/utils/pub/pub.dart b/utils/pub/pub.dart
index ae6c13a..8a21ecc 100644
--- a/utils/pub/pub.dart
+++ b/utils/pub/pub.dart
@@ -23,14 +23,13 @@
import 'log.dart' as log;
import 'package.dart';
import 'pubspec.dart';
+import 'sdk.dart' as sdk;
import 'source.dart';
import 'source_registry.dart';
import 'system_cache.dart';
import 'utils.dart';
import 'version.dart';
-Version get pubVersion => new Version(0, 0, 0);
-
/// The commands that Pub understands.
Map<String, PubCommand> get pubCommands {
var commands = {
@@ -110,9 +109,6 @@
break;
}
- // TODO(nweiz): Have a fallback for this this out automatically once 1145 is
- // fixed.
- var sdkDir = Platform.environment['DART_SDK'];
var cacheDir;
if (Platform.environment.containsKey('PUB_CACHE')) {
cacheDir = Platform.environment['PUB_CACHE'];
@@ -123,7 +119,7 @@
cacheDir = '${Platform.environment['HOME']}/.pub-cache';
}
- var cache = new SystemCache.withSources(cacheDir, sdkDir);
+ var cache = new SystemCache.withSources(cacheDir);
// Select the command.
var command = pubCommands[globalOptions.rest[0]];
@@ -139,7 +135,7 @@
command.run(cache, globalOptions, commandArgs);
}
-/// Displays usage information for the app.
+/// Displays usage information for the app.
void printUsage([String description = 'Pub is a package manager for Dart.']) {
// Build up a buffer so it shows up as a single log entry.
var buffer = new StringBuffer();
@@ -175,7 +171,7 @@
}
void printVersion() {
- log.message('Pub $pubVersion');
+ log.message('Pub ${sdk.version}');
}
abstract class PubCommand {
@@ -249,16 +245,14 @@
this.entrypoint = entrypoint;
try {
var commandFuture = onRun();
- if (commandFuture == null) return new Future.immediate(true);
+ if (commandFuture == null) return true;
return commandFuture;
} catch (error, trace) {
handleError(error, trace);
- return new Future.immediate(null);
}
});
-
future
.then((_) => cache_.deleteTempDir())
.catchError((asyncError) {
@@ -283,7 +277,7 @@
/// command is synchronous, it may return `null`.
Future onRun();
- /// Displays usage information for this command.
+ /// Displays usage information for this command.
void printUsage([String description]) {
if (description == null) description = this.description;
diff --git a/utils/pub/pubspec.dart b/utils/pub/pubspec.dart
index 078b7e0..aaabdd1 100644
--- a/utils/pub/pubspec.dart
+++ b/utils/pub/pubspec.dart
@@ -22,11 +22,14 @@
/// The packages this package depends on.
final List<PackageRef> dependencies;
+ /// The environment-related metadata.
+ final PubspecEnvironment environment;
+
/// All pubspec fields. This includes the fields from which other properties
/// are derived.
final Map<String, Object> fields;
- Pubspec(this.name, this.version, this.dependencies,
+ Pubspec(this.name, this.version, this.dependencies, this.environment,
[Map<String, Object> fields])
: this.fields = fields == null ? {} : fields;
@@ -34,9 +37,10 @@
: name = null,
version = Version.none,
dependencies = <PackageRef>[],
+ environment = new PubspecEnvironment(),
fields = {};
- /// Whether or not the pubspec has no contents.
+ /// Whether or not the pubspec has no contents.
bool get isEmpty =>
name == null && version == Version.none && dependencies.isEmpty;
@@ -70,6 +74,26 @@
var dependencies = _parseDependencies(sources,
parsedPubspec['dependencies']);
+ var environmentYaml = parsedPubspec['environment'];
+ var sdkConstraint = VersionConstraint.any;
+ if (environmentYaml != null) {
+ if (environmentYaml is! Map) {
+ throw new FormatException(
+ 'The pubspec "environment" field should be a map, but was '
+ '"$environmentYaml".');
+ }
+
+ var sdkYaml = environmentYaml['sdk'];
+ if (sdkYaml is! String) {
+ throw new FormatException(
+ 'The "sdk" field of "environment" should be a string, but was '
+ '"$sdkYaml".');
+ }
+
+ sdkConstraint = new VersionConstraint.parse(sdkYaml);
+ }
+ var environment = new PubspecEnvironment(sdkConstraint);
+
// Even though the pub app itself doesn't use these fields, we validate
// them here so that users find errors early before they try to upload to
// the server:
@@ -123,7 +147,7 @@
}
}
- return new Pubspec(name, version, dependencies, parsedPubspec);
+ return new Pubspec(name, version, dependencies, environment, parsedPubspec);
}
}
@@ -181,3 +205,14 @@
return dependencies;
}
+
+/// The environment-related metadata in the pubspec. Corresponds to the data
+/// under the "environment:" key in the pubspec.
+class PubspecEnvironment {
+ /// The version constraint specifying which SDK versions this package works
+ /// with.
+ final VersionConstraint sdkVersion;
+
+ PubspecEnvironment([VersionConstraint sdk])
+ : sdkVersion = sdk != null ? sdk : VersionConstraint.any;
+}
diff --git a/utils/pub/root_source.dart b/utils/pub/root_source.dart
deleted file mode 100644
index 72e122e..0000000
--- a/utils/pub/root_source.dart
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library root_source;
-
-import 'package.dart';
-import 'pubspec.dart';
-import 'source.dart';
-
-/// A source used only for the root package when doing version resolution. It
-/// contains only the root package and is unable to install packages.
-///
-/// This source cannot be referenced from a pubspec.
-class RootSource extends Source {
- final String name = "root";
- final bool shouldCache = false;
- final Package package;
-
- RootSource(this.package);
-
- Future<Pubspec> describe(PackageId id) {
- return new Future<Pubspec>.immediate(package.pubspec);
- }
-
- Future<bool> install(PackageId id, String destPath) {
- throw new UnsupportedError("Can't install from a root source.");
- }
-}
diff --git a/utils/pub/sdk.dart b/utils/pub/sdk.dart
new file mode 100644
index 0000000..0e47acd
--- /dev/null
+++ b/utils/pub/sdk.dart
@@ -0,0 +1,57 @@
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/// Operations relative to the user's installed Dart SDK.
+library sdk;
+
+import 'dart:io';
+
+import '../../pkg/path/lib/path.dart' as path;
+import 'log.dart' as log;
+import 'version.dart';
+
+/// Matches an Eclipse-style SDK version number. This is four dotted numbers
+/// (major, minor, patch, build) with an optional suffix attached to the build
+/// number.
+final _versionPattern = new RegExp(r'^(\d+)\.(\d+)\.(\d+)\.(\d+)(.*)$');
+
+/// Gets the path to the root directory of the SDK.
+String get rootDirectory {
+ // If the environment variable was provided, use it. This is mainly used for
+ // the pub tests.
+ var dir = Platform.environment["DART_SDK"];
+ if (dir != null) {
+ log.fine("Using DART_SDK to find SDK at $dir");
+ return dir;
+ }
+
+ var pubDir = path.dirname(new Options().script);
+ dir = path.normalize(path.join(pubDir, "../../"));
+ log.fine("Located SDK at $dir");
+ return dir;
+}
+
+/// Gets the SDK's revision number formatted to be a semantic version.
+Version version = _getVersion();
+
+/// Determine the SDK's version number.
+Version _getVersion() {
+ var revisionPath = path.join(rootDirectory, "version");
+ var version = new File(revisionPath).readAsStringSync().trim();
+
+ // Given a version file like: 0.1.2.0_r17495
+ // We create a semver like: 0.1.2+0._r17495
+ var match = _versionPattern.firstMatch(version);
+ if (match == null) {
+ throw new FormatException("The Dart SDK's 'version' file was not in a "
+ "format pub could recognize. Found: $version");
+ }
+
+ var build = match[4];
+ if (match[5].length > 0) build = '$build.${match[5]}';
+
+ return new Version(
+ int.parse(match[1]), int.parse(match[2]), int.parse(match[3]),
+ build: build);
+}
\ No newline at end of file
diff --git a/utils/pub/sdk/pub b/utils/pub/sdk/pub
index efd6861..b5a33c4 100755
--- a/utils/pub/sdk/pub
+++ b/utils/pub/sdk/pub
@@ -6,6 +6,6 @@
# dart-sdk/bin has been symlinked to. On MacOS, readlink doesn't work
# with this case.
BIN_DIR="$(cd "${0%/*}" ; pwd -P)"
-export DART_SDK="$(cd "${BIN_DIR%/*}" ; pwd -P)"
+DART_SDK="$(cd "${BIN_DIR%/*}" ; pwd -P)"
exec "$BIN_DIR"/dart "$DART_SDK"/util/pub/pub.dart $@
diff --git a/utils/pub/sdk/pub.bat b/utils/pub/sdk/pub.bat
index 8d974f4..a3d9441 100644
--- a/utils/pub/sdk/pub.bat
+++ b/utils/pub/sdk/pub.bat
@@ -11,7 +11,4 @@
:: Does the string have a trailing slash? If so, remove it.
if %SCRIPTPATH:~-1%==\ set SCRIPTPATH=%SCRIPTPATH:~0,-1%
-:: Set DART_SDK so pub can find SDK packages.
-set DART_SDK=%SCRIPTPATH%\..\
-
"%SCRIPTPATH%\dart.exe" "%SCRIPTPATH%\..\util\pub\pub.dart" %*
diff --git a/utils/pub/sdk_source.dart b/utils/pub/sdk_source.dart
index 13ffa25..e0782b0 100644
--- a/utils/pub/sdk_source.dart
+++ b/utils/pub/sdk_source.dart
@@ -8,6 +8,7 @@
import 'io.dart';
import 'package.dart';
import 'pubspec.dart';
+import 'sdk.dart' as sdk;
import 'source.dart';
import 'version.dart';
@@ -16,31 +17,16 @@
final String name = "sdk";
final bool shouldCache = false;
- /// The root directory of the Dart SDK.
- final String _rootDir;
-
- String get rootDir {
- if (_rootDir != null) return _rootDir;
- throw "Pub can't find the Dart SDK. Please set the DART_SDK environment "
- "variable to the Dart SDK directory.";
- }
-
- SdkSource(this._rootDir);
-
/// SDK packages are not individually versioned. Instead, their version is
/// inferred from the revision number of the SDK itself.
Future<Pubspec> describe(PackageId id) {
- var version;
- return readTextFile(join(rootDir, "revision")).then((revision) {
- version = new Version.parse("0.0.0-r.${revision.trim()}");
- // Read the pubspec for the package's dependencies.
- return _getPackagePath(id);
- }).then((packageDir) {
+ return _getPackagePath(id).then((packageDir) {
// TODO(rnystrom): What if packageDir is null?
return Package.load(id.name, packageDir, systemCache.sources);
}).then((package) {
// Ignore the pubspec's version, and use the SDK's.
- return new Pubspec(id.name, version, package.pubspec.dependencies);
+ return new Pubspec(id.name, sdk.version, package.pubspec.dependencies,
+ package.pubspec.environment);
});
}
@@ -55,20 +41,10 @@
});
}
- /// Gets the path in the SDK to the directory containing package [id]. Looks
- /// inside both "pkg" and "lib" in the SDK. Returns `null` if the package
- /// could not be found.
+ /// Gets the path in the SDK's "pkg" directory to the directory containing
+ /// package [id]. Returns `null` if the package could not be found.
Future<String> _getPackagePath(PackageId id) {
- // Look in "pkg" first.
- var pkgPath = join(rootDir, "pkg", id.description);
- return exists(pkgPath).then((found) {
- if (found) return new Future<String>.immediate(pkgPath);
-
- // Not in "pkg", so try "lib".
- // TODO(rnystrom): Get rid of this when all SDK packages are moved from
- // "lib" to "pkg".
- var libPath = join(rootDir, "lib", id.description);
- return exists(libPath).then((found) => found ? libPath : null);
- });
+ var pkgPath = join(sdk.rootDirectory, "pkg", id.description);
+ return dirExists(pkgPath).then((found) => found ? pkgPath : null);
}
}
diff --git a/utils/pub/system_cache.dart b/utils/pub/system_cache.dart
index 3074a74..1e26554 100644
--- a/utils/pub/system_cache.dart
+++ b/utils/pub/system_cache.dart
@@ -43,9 +43,9 @@
sources = new SourceRegistry();
/// Creates a system cache and registers the standard set of sources.
- factory SystemCache.withSources(String rootDir, String sdkDir) {
+ factory SystemCache.withSources(String rootDir) {
var cache = new SystemCache(rootDir);
- cache.register(new SdkSource(sdkDir));
+ cache.register(new SdkSource());
cache.register(new GitSource());
cache.register(new HostedSource());
cache.sources.setDefault('hosted');
@@ -93,7 +93,7 @@
Future deleteTempDir() {
log.fine('Clean up system cache temp directory $tempDir.');
return dirExists(tempDir).then((exists) {
- if (!exists) return new Future.immediate(null);
+ if (!exists) return;
return deleteDir(tempDir);
});
}
diff --git a/utils/pub/utils.dart b/utils/pub/utils.dart
index aac48fe..7710ac1 100644
--- a/utils/pub/utils.dart
+++ b/utils/pub/utils.dart
@@ -143,7 +143,7 @@
/// Convert a URL query string (or `application/x-www-form-urlencoded` body)
/// into a [Map] from parameter names to values.
Map<String, String> queryToMap(String queryList) {
- var map = <String>{};
+ var map = {};
for (var pair in queryList.split("&")) {
var split = split1(pair, "=");
if (split.isEmpty) continue;
diff --git a/utils/pub/validator.dart b/utils/pub/validator.dart
index d3bc0a7..5ec0f23 100644
--- a/utils/pub/validator.dart
+++ b/utils/pub/validator.dart
@@ -53,13 +53,8 @@
new DirectoryValidator(entrypoint)
];
- // TODO(nweiz): The sleep 0 here forces us to go async. This works around
- // 3356, which causes a bug if all validators are (synchronously) using
- // Future.immediate and an error is thrown before a handler is set up.
- return sleep(0).then((_) {
- return Future.wait(
- validators.mappedBy((validator) => validator.validate()));
- }).then((_) {
+ return Future.wait(validators.mappedBy((validator) => validator.validate()))
+ .then((_) {
var errors =
flatten(validators.mappedBy((validator) => validator.errors));
var warnings =
diff --git a/utils/pub/validator/lib.dart b/utils/pub/validator/lib.dart
index c9c5aba..e679847 100644
--- a/utils/pub/validator/lib.dart
+++ b/utils/pub/validator/lib.dart
@@ -27,7 +27,7 @@
if (!libDirExists) {
errors.add('You must have a "lib" directory.\n'
"Without that, users cannot import any code from your package.");
- return new Future.immediate(null);
+ return;
}
return listDir(libDir).then((files) {
diff --git a/utils/pub/validator/name.dart b/utils/pub/validator/name.dart
index 67e2da0..eb1bc85 100644
--- a/utils/pub/validator/name.dart
+++ b/utils/pub/validator/name.dart
@@ -48,7 +48,7 @@
Future<List<String>> get _libraries {
var libDir = join(entrypoint.root.dir, "lib");
return dirExists(libDir).then((libDirExists) {
- if (!libDirExists) return new Future.immediate([]);
+ if (!libDirExists) return [];
return listDir(libDir, recursive: true);
}).then((files) {
return files
diff --git a/utils/pub/version.dart b/utils/pub/version.dart
index e7ca3d1..18e15a5 100644
--- a/utils/pub/version.dart
+++ b/utils/pub/version.dart
@@ -110,7 +110,9 @@
if (other is VersionRange) return other.intersect(this);
// Intersecting two versions only works if they are the same.
- if (other is Version) return this == other ? this : const _EmptyVersion();
+ if (other is Version) {
+ return this == other ? this : VersionConstraint.empty;
+ }
throw new ArgumentError(
'Unknown VersionConstraint type $other.');
@@ -206,8 +208,11 @@
/// version that is "2.0.0" or greater. Version objects themselves implement
/// this to match a specific version.
abstract class VersionConstraint {
+ /// A [VersionConstraint] that allows all versions.
+ static VersionConstraint any = new VersionRange();
+
/// A [VersionConstraint] that allows no versions: i.e. the empty set.
- factory VersionConstraint.empty() => const _EmptyVersion();
+ static VersionConstraint empty = const _EmptyVersion();
/// Parses a version constraint. This string is a space-separated series of
/// version parts. Each part can be one of:
@@ -333,7 +338,9 @@
if (other.isEmpty) return other;
// A range and a Version just yields the version if it's in the range.
- if (other is Version) return allows(other) ? other : const _EmptyVersion();
+ if (other is Version) {
+ return allows(other) ? other : VersionConstraint.empty;
+ }
if (other is VersionRange) {
// Intersect the two ranges.
@@ -373,13 +380,13 @@
if (intersectIncludeMin && intersectIncludeMax) return intersectMin;
// Otherwise, no versions.
- return const _EmptyVersion();
+ return VersionConstraint.empty;
}
if (intersectMin != null && intersectMax != null &&
intersectMin > intersectMax) {
// Non-overlapping ranges, so empty.
- return const _EmptyVersion();
+ return VersionConstraint.empty;
}
// If we got here, there is an actual range.
diff --git a/utils/pub/version_solver.dart b/utils/pub/version_solver.dart
index 18b2be8..21f8cad 100644
--- a/utils/pub/version_solver.dart
+++ b/utils/pub/version_solver.dart
@@ -36,13 +36,13 @@
library version_solver;
import 'dart:async';
+import 'dart:collection' show Queue;
import 'dart:json' as json;
import 'dart:math';
import 'lock_file.dart';
import 'log.dart' as log;
import 'package.dart';
import 'pubspec.dart';
-import 'root_source.dart';
import 'source.dart';
import 'source_registry.dart';
import 'utils.dart';
@@ -90,8 +90,7 @@
Future<List<PackageId>> solve() {
// Kick off the work by adding the root package at its concrete version to
// the dependency graph.
- var ref = new PackageRef(
- _root.name, new RootSource(_root), _root.version, _root.name);
+ var ref = new PackageRef.root(_root);
enqueue(new AddConstraint('(entrypoint)', ref));
_pubspecs.cache(ref.atVersion(_root.version), _root.pubspec);
@@ -241,9 +240,7 @@
/// The new selected version.
final Version version;
- ChangeVersion(this.package, this.source, this.description, this.version) {
- if (source == null) throw "null source";
- }
+ ChangeVersion(this.package, this.source, this.description, this.version);
Future process(VersionSolver solver) {
log.fine("Changing $package to version $version.");
@@ -528,14 +525,14 @@
}
/// Return the PackageRef that has the canonical source and description for
- /// this package. If any dependency requires that this package come from a
- /// [RootSource], that will be used; otherwise, it will be the source and
- /// description that all dependencies agree upon.
+ /// this package. If any dependency is on the root package, that will be used;
+ /// otherwise, it will be the source and description that all dependencies
+ /// agree upon.
PackageRef _canonicalRef() {
if (_refs.isEmpty) return null;
var refs = _refs.values;
for (var ref in refs) {
- if (ref is RootSource) return ref;
+ if (ref.isRoot) return ref;
}
return refs.first;
}
@@ -581,7 +578,7 @@
var dependers = _refs.keys.toList();
if (dependers.length == 1) {
var depender = dependers[0];
- if (_refs[depender].source is RootSource) return null;
+ if (_refs[depender].isRoot) return null;
return depender;
}
diff --git a/utils/pub/yaml/yaml.dart b/utils/pub/yaml/yaml.dart
index 6ce890cc..a73736d 100644
--- a/utils/pub/yaml/yaml.dart
+++ b/utils/pub/yaml/yaml.dart
@@ -5,6 +5,7 @@
library yaml;
import 'dart:math' as Math;
+import 'dart:collection' show Queue;
import 'deep_equals.dart';
diff --git a/utils/template/uitest.dart b/utils/template/uitest.dart
index 96fe497..ead7770 100644
--- a/utils/template/uitest.dart
+++ b/utils/template/uitest.dart
@@ -324,7 +324,7 @@
</div>
}
-template Header(String company, Date date) {
+template Header(String company, DateTime date) {
css {
.header {
background-color: slateGray;
diff --git a/utils/testrunner/layout_test_controller.dart b/utils/testrunner/layout_test_controller.dart
index 986e668..ddaa0cf 100644
--- a/utils/testrunner/layout_test_controller.dart
+++ b/utils/testrunner/layout_test_controller.dart
@@ -42,7 +42,7 @@
// Variable below here are local to this file.
var passCount = 0, failCount = 0, errorCount = 0;
-Date start;
+DateTime start;
class Macros {
static const String testTime = '<TIME>';
@@ -79,7 +79,7 @@
}
var elapsed = '';
if (includeTime) {
- var end = new Date.now();
+ var end = new DateTime.now();
double duration = (end.difference(start)).inMilliseconds.toDouble();
duration /= 1000;
elapsed = '${duration.toStringAsFixed(3)}s ';
@@ -127,7 +127,7 @@
runTextLayoutTest(testNum) {
var url = '$baseUrl?test=$testNum';
var stdout = new List();
- start = new Date.now();
+ start = new DateTime.now();
Process.start(drt, [url]).then((process) {
// Drain stderr to not leak resources.
process.stderr.onData = process.stderr.read;
@@ -213,7 +213,7 @@
runPixelLayoutTest(int testNum) {
var url = '$baseUrl?test=$testNum';
var stdout = new List();
- start = new Date.now();
+ start = new DateTime.now();
Process.start(drt, ["$url'-p"]).then((process) {
// Drain stderr to not leak resources.
process.stderr.onData = process.stderr.read;
diff --git a/utils/testrunner/standard_test_runner.dart b/utils/testrunner/standard_test_runner.dart
index 1b4195c..0b1019d 100644
--- a/utils/testrunner/standard_test_runner.dart
+++ b/utils/testrunner/standard_test_runner.dart
@@ -222,7 +222,7 @@
runParentTest() {
var tests = unittest.testCases;
- tests[testNum].startTime = new Date.now();
+ tests[testNum].startTime = new DateTime.now();
SendPort childPort = spawnFunction(runChildTest);
childPort.call(tests[testNum].description).then((results) {
var result = results[0];
diff --git a/utils/tests/pub/command_line_config.dart b/utils/tests/pub/command_line_config.dart
index 6b61a45..1d4f7bf 100644
--- a/utils/tests/pub/command_line_config.dart
+++ b/utils/tests/pub/command_line_config.dart
@@ -17,6 +17,7 @@
/// Pretty Unicode characters!
const _CHECKBOX = '\u2713';
const _BALLOT_X = '\u2717';
+const _LAMBDA = '\u03bb';
/// A custom unittest configuration for running the pub tests from the
/// command-line and generating human-friendly output.
@@ -70,14 +71,10 @@
if (stackTrace == null || stackTrace == '') return;
// Parse out each stack entry.
- var regexp = new RegExp(r'#\d+\s+(.*) \(file:///([^)]+)\)');
var stack = [];
for (var line in stackTrace.split('\n')) {
if (line.trim() == '') continue;
-
- var match = regexp.firstMatch(line);
- if (match == null) throw "Couldn't clean up stack trace line '$line'.";
- stack.add(new Pair(match[2], match[1]));
+ stack.add(new _StackFrame(line));
}
if (stack.length == 0) return;
@@ -86,10 +83,12 @@
var common = 0;
while (true) {
var matching = true;
- // TODO(bob): Handle empty stack.
- var c = stack[0].first[common];
- for (var pair in stack) {
- if (pair.first.length <= common || pair.first[common] != c) {
+ var c;
+ for (var frame in stack) {
+ if (frame.isCore) continue;
+ if (c == null) c = frame.library[common];
+
+ if (frame.library.length <= common || frame.library[common] != c) {
matching = false;
break;
}
@@ -101,19 +100,18 @@
// Remove them.
if (common > 0) {
- for (var pair in stack) {
- pair.first = pair.first.substring(common);
+ for (var frame in stack) {
+ if (frame.isCore) continue;
+ frame.library = frame.library.substring(common);
}
}
// Figure out the longest path so we know how much to pad.
- int longest = stack.mappedBy((pair) => pair.first.length).max();
+ int longest = stack.mappedBy((frame) => frame.location.length).max();
// Print out the stack trace nicely formatted.
- for (var pair in stack) {
- var path = pair.first;
- path = path.replaceFirst(':', ' ');
- print(' ${_padLeft(path, longest)} ${pair.last}');
+ for (var frame in stack) {
+ print(' ${_padLeft(frame.location, longest)} ${frame.member}');
}
print('');
@@ -137,3 +135,44 @@
return Strings.join(str.split("\n").mappedBy((line) => " $line"), "\n");
}
}
+
+class _StackFrame {
+ static final fileRegExp = new RegExp(
+ r'#\d+\s+(.*) \((file:///.+):(\d+):(\d+)\)');
+ static final coreRegExp = new RegExp(r'#\d+\s+(.*) \((.+):(\d+):(\d+)\)');
+
+ /// If `true`, then this stack frame is for a library built into Dart and
+ /// not a regular file path.
+ final bool isCore;
+
+ /// The path to the library or the library name if a core library.
+ String library;
+
+ /// The line number.
+ final String line;
+
+ /// The column number.
+ final String column;
+
+ /// The member where the error occurred.
+ final String member;
+
+ /// A formatted description of the code location.
+ String get location => '$library $line:$column';
+
+ _StackFrame._(this.isCore, this.library, this.line, this.column, this.member);
+
+ factory _StackFrame(String text) {
+ var match = fileRegExp.firstMatch(text);
+ var isCore = false;
+
+ if (match == null) {
+ match = coreRegExp.firstMatch(text);
+ if (match == null) throw "Couldn't parse stack trace line '$text'.";
+ isCore = true;
+ }
+
+ var member = match[1].replaceAll("<anonymous closure>", _LAMBDA);
+ return new _StackFrame._(isCore, match[2], match[3], match[4], member);
+ }
+}
\ No newline at end of file
diff --git a/utils/tests/pub/curl_client_test.dart b/utils/tests/pub/curl_client_test.dart
index 372a331..ba57e21 100644
--- a/utils/tests/pub/curl_client_test.dart
+++ b/utils/tests/pub/curl_client_test.dart
@@ -52,10 +52,10 @@
HttpServer _server;
/// The URL for the current server instance.
-Uri get serverUrl => new Uri.fromString('http://localhost:${_server.port}');
+Uri get serverUrl => Uri.parse('http://localhost:${_server.port}');
/// A dummy URL for constructing requests that won't be sent.
-Uri get dummyUrl => new Uri.fromString('http://dartlang.org/');
+Uri get dummyUrl => Uri.parse('http://dartlang.org/');
/// Starts a new HTTP server.
void startServer() {
@@ -70,7 +70,7 @@
_server.addRequestHandler((request) => request.path == '/loop',
(request, response) {
- var n = int.parse(new Uri.fromString(request.uri).query);
+ var n = int.parse(Uri.parse(request.uri).query);
response.statusCode = 302;
response.headers.set('location',
serverUrl.resolve('/loop?${n + 1}').toString());
@@ -105,7 +105,7 @@
var content = {
'method': request.method,
'path': request.path,
- 'headers': <String>{}
+ 'headers': {}
};
if (requestBody != null) content['body'] = requestBody;
request.headers.forEach((name, values) {
diff --git a/utils/tests/pub/error_group_test.dart b/utils/tests/pub/error_group_test.dart
index e6f8769..9d2d59e0 100644
--- a/utils/tests/pub/error_group_test.dart
+++ b/utils/tests/pub/error_group_test.dart
@@ -202,7 +202,7 @@
setUp(() {
errorGroup = new ErrorGroup();
- controller = new StreamController.multiSubscription();
+ controller = new StreamController.broadcast();
stream = errorGroup.registerStream(controller.stream);
});
@@ -341,8 +341,8 @@
setUp(() {
errorGroup = new ErrorGroup();
- controller1 = new StreamController.multiSubscription();
- controller2 = new StreamController.multiSubscription();
+ controller1 = new StreamController.broadcast();
+ controller2 = new StreamController.broadcast();
stream1 = errorGroup.registerStream(controller1.stream);
stream2 = errorGroup.registerStream(controller2.stream);
});
@@ -396,7 +396,7 @@
setUp(() {
errorGroup = new ErrorGroup();
- controller = new StreamController.multiSubscription();
+ controller = new StreamController.broadcast();
stream = errorGroup.registerStream(controller.stream);
completer = new Completer();
future = errorGroup.registerFuture(completer.future);
diff --git a/utils/tests/pub/install/hosted/check_out_test.dart b/utils/tests/pub/install/hosted/install_test.dart
similarity index 90%
rename from utils/tests/pub/install/hosted/check_out_test.dart
rename to utils/tests/pub/install/hosted/install_test.dart
index ab8cab0..1ed4f40 100644
--- a/utils/tests/pub/install/hosted/check_out_test.dart
+++ b/utils/tests/pub/install/hosted/install_test.dart
@@ -9,7 +9,7 @@
import '../../test_pub.dart';
main() {
- integration('checks out a package from a pub server', () {
+ integration('installs a package from a pub server', () {
servePackages([package("foo", "1.2.3")]);
appDir([dependency("foo", "1.2.3")]).scheduleCreate();
diff --git a/utils/tests/pub/install/hosted/check_out_transitive_test.dart b/utils/tests/pub/install/hosted/install_transitive_test.dart
similarity index 91%
rename from utils/tests/pub/install/hosted/check_out_transitive_test.dart
rename to utils/tests/pub/install/hosted/install_transitive_test.dart
index dd5f01b..b111d79 100644
--- a/utils/tests/pub/install/hosted/check_out_transitive_test.dart
+++ b/utils/tests/pub/install/hosted/install_transitive_test.dart
@@ -9,7 +9,7 @@
import '../../test_pub.dart';
main() {
- integration('checks out packages transitively from a pub server', () {
+ integration('installs packages transitively from a pub server', () {
servePackages([
package("foo", "1.2.3", [dependency("bar", "2.0.4")]),
package("bar", "2.0.3"),
diff --git a/utils/tests/pub/install/pub_install_test.dart b/utils/tests/pub/install/pub_install_test.dart
index 7589bc5..72e379a 100644
--- a/utils/tests/pub/install/pub_install_test.dart
+++ b/utils/tests/pub/install/pub_install_test.dart
@@ -67,7 +67,7 @@
integration('does not add a package if it does not have a "lib" directory', () {
// Using an SDK source, but this should be true of all sources.
dir(sdkPath, [
- file('revision', '1234'),
+ file('version', '0.1.2.3'),
dir('pkg', [
dir('foo', [
libPubspec('foo', '0.0.0-not.used')
diff --git a/utils/tests/pub/install/sdk/check_out_test.dart b/utils/tests/pub/install/sdk/check_out_test.dart
index 0b658ac..0ee41a5 100644
--- a/utils/tests/pub/install/sdk/check_out_test.dart
+++ b/utils/tests/pub/install/sdk/check_out_test.dart
@@ -11,10 +11,10 @@
main() {
integration('checks out a package from the SDK', () {
dir(sdkPath, [
- file('revision', '1234'),
+ file('version', '0.1.2.3'),
dir('pkg', [
dir('foo', [
- libDir('foo', 'foo 0.0.1234'),
+ libDir('foo', 'foo 0.1.2+3'),
libPubspec('foo', '0.0.0-not.used')
])
])
@@ -27,6 +27,6 @@
schedulePub(args: ['install'],
output: new RegExp(r"Dependencies installed!$"));
- packagesDir({"foo": "0.0.1234"}).scheduleValidate();
+ packagesDir({"foo": "0.1.2+3"}).scheduleValidate();
});
}
diff --git a/utils/tests/pub/install/sdk/check_out_transitive_test.dart b/utils/tests/pub/install/sdk/check_out_transitive_test.dart
index 4a95147..5a3156e 100644
--- a/utils/tests/pub/install/sdk/check_out_transitive_test.dart
+++ b/utils/tests/pub/install/sdk/check_out_transitive_test.dart
@@ -11,14 +11,14 @@
main() {
integration('includes transitive dependencies', () {
dir(sdkPath, [
- file('revision', '1234'),
+ file('version', '0.1.2.3'),
dir('pkg', [
dir('foo', [
- libDir('foo', 'foo 0.0.1234'),
+ libDir('foo', 'foo 0.1.2+3'),
libPubspec('foo', '0.0.0-not.used', [{'sdk': 'bar'}])
]),
dir('bar', [
- libDir('bar', 'bar 0.0.1234'),
+ libDir('bar', 'bar 0.1.2+3'),
libPubspec('bar', '0.0.0-not.used')
])
])
@@ -32,8 +32,8 @@
output: new RegExp(r"Dependencies installed!$"));
packagesDir({
- 'foo': '0.0.1234',
- 'bar': '0.0.1234'
+ 'foo': '0.1.2+3',
+ 'bar': '0.1.2+3'
}).scheduleValidate();
});
}
diff --git a/utils/tests/pub/oauth2_test.dart b/utils/tests/pub/oauth2_test.dart
index 42be210..e5ff4bc 100644
--- a/utils/tests/pub/oauth2_test.dart
+++ b/utils/tests/pub/oauth2_test.dart
@@ -9,7 +9,6 @@
import 'dart:uri';
import 'test_pub.dart';
-import 'test_pub.dart';
import '../../../pkg/http/lib/http.dart' as http;
import '../../../pkg/unittest/lib/unittest.dart';
import '../../pub/io.dart';
@@ -58,7 +57,7 @@
var server = new ScheduledServer();
credentialsFile(server, 'access token',
refreshToken: 'refresh token',
- expiration: new Date.now().subtract(new Duration(hours: 1)))
+ expiration: new DateTime.now().subtract(new Duration(hours: 1)))
.scheduleCreate();
var pub = startPubLish(server);
@@ -96,7 +95,7 @@
'authenticates again and saves credentials.json', () {
var server = new ScheduledServer();
credentialsFile(server, 'access token',
- expiration: new Date.now().subtract(new Duration(hours: 1)))
+ expiration: new DateTime.now().subtract(new Duration(hours: 1)))
.scheduleCreate();
var pub = startPubLish(server);
@@ -185,7 +184,7 @@
.firstMatch(line);
expect(match, isNotNull);
- var redirectUrl = new Uri.fromString(decodeUriComponent(match.group(1)));
+ var redirectUrl = Uri.parse(decodeUriComponent(match.group(1)));
redirectUrl = addQueryParameters(redirectUrl, {'code': 'access code'});
return (new http.Request('GET', redirectUrl)..followRedirects = false)
.send();
diff --git a/utils/tests/pub/pub_lish_test.dart b/utils/tests/pub/pub_lish_test.dart
index b0faa95..e315fff 100644
--- a/utils/tests/pub/pub_lish_test.dart
+++ b/utils/tests/pub/pub_lish_test.dart
@@ -8,7 +8,6 @@
import 'dart:json' as json;
import 'test_pub.dart';
-import 'test_pub.dart';
import '../../../pkg/unittest/lib/unittest.dart';
import '../../pub/io.dart';
diff --git a/utils/tests/pub/pub_test.dart b/utils/tests/pub/pub_test.dart
index fd8e5c7..13426f1 100644
--- a/utils/tests/pub/pub_test.dart
+++ b/utils/tests/pub/pub_test.dart
@@ -38,24 +38,32 @@
""";
final VERSION_STRING = '''
- Pub 0.0.0
+ Pub 0.1.2+3
''';
main() {
- test('running pub with no command displays usage', () =>
- runPub(args: [], output: USAGE_STRING));
+ integration('running pub with no command displays usage', () {
+ schedulePub(args: [], output: USAGE_STRING);
+ });
- test('running pub with just --help displays usage', () =>
- runPub(args: ['--help'], output: USAGE_STRING));
+ integration('running pub with just --help displays usage', () {
+ schedulePub(args: ['--help'], output: USAGE_STRING);
+ });
- test('running pub with just -h displays usage', () =>
- runPub(args: ['-h'], output: USAGE_STRING));
+ integration('running pub with just -h displays usage', () {
+ schedulePub(args: ['-h'], output: USAGE_STRING);
+ });
- test('running pub with just --version displays version', () =>
- runPub(args: ['--version'], output: VERSION_STRING));
+ integration('running pub with just --version displays version', () {
+ dir(sdkPath, [
+ file('version', '0.1.2.3'),
+ ]).scheduleCreate();
- test('an unknown command displays an error message', () {
- runPub(args: ['quylthulg'],
+ schedulePub(args: ['--version'], output: VERSION_STRING);
+ });
+
+ integration('an unknown command displays an error message', () {
+ schedulePub(args: ['quylthulg'],
error: '''
Could not find a command named "quylthulg".
Run "pub help" to see available commands.
@@ -63,8 +71,8 @@
exitCode: 64);
});
- test('an unknown option displays an error message', () {
- runPub(args: ['--blorf'],
+ integration('an unknown option displays an error message', () {
+ schedulePub(args: ['--blorf'],
error: '''
Could not find an option named "blorf".
Run "pub help" to see available options.
@@ -72,10 +80,10 @@
exitCode: 64);
});
- test('an unknown command option displays an error message', () {
+ integration('an unknown command option displays an error message', () {
// TODO(rnystrom): When pub has command-specific options, a more precise
// error message would be good here.
- runPub(args: ['version', '--blorf'],
+ schedulePub(args: ['version', '--blorf'],
error: '''
Could not find an option named "blorf".
Use "pub help" for more information.
@@ -84,8 +92,8 @@
});
group('help', () {
- test('shows help for a command', () {
- runPub(args: ['help', 'install'],
+ integration('shows help for a command', () {
+ schedulePub(args: ['help', 'install'],
output: '''
Install the current package's dependencies.
@@ -93,8 +101,8 @@
''');
});
- test('shows help for a command', () {
- runPub(args: ['help', 'publish'],
+ integration('shows help for a command', () {
+ schedulePub(args: ['help', 'publish'],
output: '''
Publish the current package to pub.dartlang.org.
@@ -104,8 +112,8 @@
''');
});
- test('an unknown help command displays an error message', () {
- runPub(args: ['help', 'quylthulg'],
+ integration('an unknown help command displays an error message', () {
+ schedulePub(args: ['help', 'quylthulg'],
error: '''
Could not find a command named "quylthulg".
Run "pub help" to see available commands.
@@ -115,6 +123,11 @@
});
- test('displays the current version', () =>
- runPub(args: ['version'], output: VERSION_STRING));
+ integration('displays the current version', () {
+ dir(sdkPath, [
+ file('version', '0.1.2.3'),
+ ]).scheduleCreate();
+
+ schedulePub(args: ['version'], output: VERSION_STRING);
+ });
}
diff --git a/utils/tests/pub/pub_uploader_test.dart b/utils/tests/pub/pub_uploader_test.dart
index 2557845..fa585af 100644
--- a/utils/tests/pub/pub_uploader_test.dart
+++ b/utils/tests/pub/pub_uploader_test.dart
@@ -8,7 +8,6 @@
import 'dart:json' as json;
import 'test_pub.dart';
-import 'test_pub.dart';
import '../../../pkg/unittest/lib/unittest.dart';
import '../../pub/utils.dart';
import '../../pub/io.dart';
@@ -33,15 +32,20 @@
main() {
group('displays usage', () {
- test('when run with no arguments', () =>
- runPub(args: ['uploader'], output: USAGE_STRING, exitCode: 64));
+ integration('when run with no arguments', () {
+ schedulePub(args: ['uploader'],
+ output: USAGE_STRING, exitCode: 64);
+ });
- test('when run with only a command', () =>
- runPub(args: ['uploader', 'add'], output: USAGE_STRING, exitCode: 64));
+ integration('when run with only a command', () {
+ schedulePub(args: ['uploader', 'add'],
+ output: USAGE_STRING, exitCode: 64);
+ });
- test('when run with an invalid command', () => runPub(
- args: ['uploader', 'foo', 'email'],
- output: USAGE_STRING, exitCode: 64));
+ integration('when run with an invalid command', () {
+ schedulePub(args: ['uploader', 'foo', 'email'],
+ output: USAGE_STRING, exitCode: 64);
+ });
});
integration('adds an uploader', () {
diff --git a/utils/tests/pub/pubspec_test.dart b/utils/tests/pub/pubspec_test.dart
index dabb7dd..cb0402d 100644
--- a/utils/tests/pub/pubspec_test.dart
+++ b/utils/tests/pub/pubspec_test.dart
@@ -5,6 +5,7 @@
library pubspec_test;
import '../../../pkg/unittest/lib/unittest.dart';
+import 'test_pub.dart';
import '../../pub/pubspec.dart';
import '../../pub/source.dart';
import '../../pub/source_registry.dart';
@@ -112,6 +113,49 @@
expect(pubspec.version, equals(Version.none));
expect(pubspec.dependencies, isEmpty);
});
+
+ group("environment", () {
+ test("defaults to any SDK constraint if environment is omitted", () {
+ var pubspec = new Pubspec.parse('', sources);
+ expect(pubspec.environment.sdkVersion, equals(VersionConstraint.any));
+ });
+
+ test("allows an empty environment map", () {
+ var pubspec = new Pubspec.parse('''
+environment:
+''', sources);
+ expect(pubspec.environment.sdkVersion, equals(VersionConstraint.any));
+ });
+
+ test("throws if the environment value isn't a map", () {
+ expectFormatError('''
+environment: []
+''');
+ });
+
+ test("allows a version constraint for the sdk", () {
+ var pubspec = new Pubspec.parse('''
+environment:
+ sdk: ">=1.2.3 <2.3.4"
+''', sources);
+ expect(pubspec.environment.sdkVersion,
+ equals(new VersionConstraint.parse(">=1.2.3 <2.3.4")));
+ });
+
+ test("throws if the sdk isn't a string", () {
+ expectFormatError('''
+environment:
+ sdk: []
+''');
+ });
+
+ test("throws if the sdk isn't a valid version constraint", () {
+ expectFormatError('''
+environment:
+ sdk: "oopies"
+''');
+ });
+ });
});
});
}
diff --git a/utils/tests/pub/real_version_test.dart b/utils/tests/pub/real_version_test.dart
new file mode 100644
index 0000000..1688fa7
--- /dev/null
+++ b/utils/tests/pub/real_version_test.dart
@@ -0,0 +1,39 @@
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library pub_tests;
+
+import 'dart:io';
+
+import 'test_pub.dart';
+import '../../../pkg/path/lib/path.dart' as path;
+import '../../../pkg/unittest/lib/unittest.dart';
+
+main() {
+ initConfig();
+
+ // This test is a bit funny.
+ //
+ // Pub parses the "version" file that gets generated and shipped with the SDK.
+ // Most of the pub tests here generate a synthetic SDK directory so that we
+ // can tests against a known SDK state. But we want to make sure that the
+ // actual version file that gets created is also one pub can parse. If this
+ // test fails, it means the version file's format has changed in a way pub
+ // didn't expect.
+ //
+ // Note that this test expects to be invoked from a Dart executable that is
+ // in the built SDK's "bin" directory. Note also that this invokes pub from
+ // the built SDK directory, and not the live pub code directly in the repo.
+ test('Pub can parse the real SDK "version" file', () {
+ // Get the path to the pub binary in the SDK.
+ var dartPath = new Options().executable;
+ var pubPath = path.join(path.dirname(dartPath), "pub");
+ if (Platform.operatingSystem == "windows") pubPath = '$pubPath.bat';
+
+ Process.run(pubPath, ['version']).then(expectAsync1((result) {
+ expect(result.stdout, startsWith("Pub"));
+ expect(result.exitCode, equals(0));
+ }));
+ });
+}
diff --git a/utils/tests/pub/test_pub.dart b/utils/tests/pub/test_pub.dart
index f9bd96b..2ef2689 100644
--- a/utils/tests/pub/test_pub.dart
+++ b/utils/tests/pub/test_pub.dart
@@ -9,6 +9,7 @@
library test_pub;
import 'dart:async';
+import 'dart:collection' show Queue;
import 'dart:io';
import 'dart:json' as json;
import 'dart:math';
@@ -20,6 +21,10 @@
import '../../../pkg/http/lib/testing.dart';
import '../../lib/file_system.dart' as fs;
import '../../pub/entrypoint.dart';
+// TODO(rnystrom): Using "gitlib" as the prefix here is ugly, but "git" collides
+// with the git descriptor method. Maybe we should try to clean up the top level
+// scope a bit?
+import '../../pub/git.dart' as gitlib;
import '../../pub/git_source.dart';
import '../../pub/hosted_source.dart';
import '../../pub/http.dart';
@@ -351,7 +356,7 @@
ScheduledServer server,
String accessToken,
{String refreshToken,
- Date expiration}) {
+ DateTime expiration}) {
return async(server.url.then((url) {
return dir(cachePath, [
file('credentials.json', new oauth2.Credentials(
@@ -386,7 +391,7 @@
source = new HostedSource();
break;
case "sdk":
- source = new SdkSource('');
+ source = new SdkSource();
break;
default:
throw 'Unknown source "$sourceName"';
@@ -431,7 +436,7 @@
/// to the sandbox directory.
final String packagesPath = "$appPath/packages";
-/// The type for callbacks that will be fired during [runPub]. Takes the
+/// The type for callbacks that will be fired during [schedulePub]. Takes the
/// sandbox directory as a parameter.
typedef Future _ScheduledEvent(Directory parentDir);
@@ -455,7 +460,7 @@
/// Defines an integration test. The [body] should schedule a series of
/// operations which will be run asynchronously.
-integration(String description, body()) {
+void integration(String description, void body()) {
test(description, () {
body();
_run();
@@ -474,7 +479,6 @@
_scheduledCleanup = null;
_scheduledOnException = null;
if (createdSandboxDir != null) return deleteDir(createdSandboxDir);
- return new Future.immediate(null);
});
}
@@ -537,15 +541,6 @@
});
}
-/// A shorthand for [schedulePub] and [run] when no validation needs to be done
-/// after Pub has been run.
-///
-/// Any futures in [args] will be resolved before the process is started.
-void runPub({List args, Pattern output, Pattern error, int exitCode: 0}) {
- schedulePub(args: args, output: output, error: error, exitCode: exitCode);
- _run();
-}
-
/// Starts a Pub process and returns a [ScheduledProcess] that supports
/// interaction with that process.
///
@@ -637,7 +632,7 @@
/// about the pub git tests).
void ensureGit() {
_schedule((_) {
- return isGitInstalled.then((installed) {
+ return gitlib.isInstalled.then((installed) {
if (!installed &&
!Platform.environment.containsKey('BUILDBOT_BUILDERNAME')) {
_abortScheduled = true;
@@ -785,16 +780,18 @@
/// loads the contents of the descriptor itself.
InputStream load(List<String> path);
- /// Schedules the directory to be created before Pub is run with [runPub].
- /// The directory will be created relative to the sandbox directory.
+ /// Schedules the directory to be created before Pub is run with
+ /// [schedulePub]. The directory will be created relative to the sandbox
+ /// directory.
// TODO(nweiz): Use implicit closurization once issue 2984 is fixed.
void scheduleCreate() => _schedule((dir) => this.create(dir));
/// Schedules the file or directory to be deleted recursively.
void scheduleDelete() => _schedule((dir) => this.delete(dir));
- /// Schedules the directory to be validated after Pub is run with [runPub].
- /// The directory will be validated relative to the sandbox directory.
+ /// Schedules the directory to be validated after Pub is run with
+ /// [schedulePub]. The directory will be validated relative to the sandbox
+ /// directory.
void scheduleValidate() => _schedule((parentDir) => validate(parentDir.path));
/// Asserts that the name of the descriptor is a [String] and returns it.
@@ -1064,15 +1061,8 @@
'GIT_COMMITTER_EMAIL': 'pub@dartlang.org'
};
- return runGit(args, workingDir: workingDir.path,
- environment: environment).then((result) {
- if (!result.success) {
- throw "Error running: git ${Strings.join(args, ' ')}\n"
- "${Strings.join(result.stderr, '\n')}";
- }
-
- return result.stdout;
- });
+ return gitlib.run(args, workingDir: workingDir.path,
+ environment: environment);
}
}
@@ -1166,8 +1156,7 @@
ValidatorCreator fn) {
return _scheduleValue((sandboxDir) {
var cache = new SystemCache.withSources(
- join(sandboxDir, cachePath),
- join(sandboxDir, sdkPath));
+ join(sandboxDir, cachePath));
return Entrypoint.load(join(sandboxDir, appPath), cache)
.then((entrypoint) {
@@ -1447,7 +1436,7 @@
/// The base URL of the server, including its port.
Future<Uri> get url =>
- port.then((p) => new Uri.fromString("http://localhost:$p"));
+ port.then((p) => Uri.parse("http://localhost:$p"));
/// Assert that the next request has the given [method] and [path], and pass
/// it to [handler] to handle. If [handler] returns a [Future], wait until
@@ -1460,7 +1449,7 @@
handlerCompleter.complete((request, response) {
expect(request.method, equals(method));
// TODO(nweiz): Use request.path once issue 7464 is fixed.
- expect(new Uri.fromString(request.uri).path, equals(path));
+ expect(Uri.parse(request.uri).path, equals(path));
var future = handler(request, response);
if (future == null) future = new Future.immediate(null);
diff --git a/utils/tests/pub/update/pub_update_test.dart b/utils/tests/pub/update/pub_update_test.dart
index ef18e84..dee0074 100644
--- a/utils/tests/pub/update/pub_update_test.dart
+++ b/utils/tests/pub/update/pub_update_test.dart
@@ -69,7 +69,7 @@
'directory', () {
// Using an SDK source, but this should be true of all sources.
dir(sdkPath, [
- file('revision', '1234'),
+ file('version', '0.1.2.3'),
dir('pkg', [
dir('foo', [
libPubspec('foo', '0.0.0-not.used')
diff --git a/utils/tests/pub/version_solver_test.dart b/utils/tests/pub/version_solver_test.dart
index a48355f..97d7eb6 100644
--- a/utils/tests/pub/version_solver_test.dart
+++ b/utils/tests/pub/version_solver_test.dart
@@ -10,7 +10,6 @@
import '../../pub/lock_file.dart';
import '../../pub/package.dart';
import '../../pub/pubspec.dart';
-import '../../pub/root_source.dart';
import '../../pub/source.dart';
import '../../pub/source_registry.dart';
import '../../pub/system_cache.dart';
@@ -69,7 +68,6 @@
MockSource source1;
MockSource source2;
Source versionlessSource;
-Source rootSource;
main() {
testResolve('no dependencies', {
@@ -405,8 +403,6 @@
// doesn't try to look up information about the local package on the
// remote server.
root = package;
- rootSource = new RootSource(root);
- cache.register(rootSource);
} else {
source.addPackage(package);
}
@@ -495,7 +491,8 @@
});
var pubspec = new Pubspec(
- description, new Version.parse(version), dependencies);
+ description, new Version.parse(version), dependencies,
+ new PubspecEnvironment());
return new Package.inMemory(pubspec);
}
@@ -544,7 +541,7 @@
switch (match[2]) {
case 'mock1': return new Pair<String, Source>(match[1], source1);
case 'mock2': return new Pair<String, Source>(match[1], source2);
- case 'root': return new Pair<String, Source>(match[1], rootSource);
+ case 'root': return new Pair<String, Source>(match[1], null);
case 'versionless':
return new Pair<String, Source>(match[1], versionlessSource);
}
diff --git a/utils/tests/pub/version_test.dart b/utils/tests/pub/version_test.dart
index d3fa7e5..d5b1849 100644
--- a/utils/tests/pub/version_test.dart
+++ b/utils/tests/pub/version_test.dart
@@ -5,6 +5,7 @@
library version_test;
import '../../../pkg/unittest/lib/unittest.dart';
+import 'test_pub.dart';
import '../../pub/utils.dart';
import '../../pub/version.dart';
@@ -302,8 +303,20 @@
});
group('VersionConstraint', () {
+ test('any', () {
+ expect(VersionConstraint.any.isAny, isTrue);
+ expect(VersionConstraint.any, allows([
+ new Version.parse('0.0.0-blah'),
+ new Version.parse('1.2.3'),
+ new Version.parse('12345.678.90')]));
+ });
+
test('empty', () {
- expect(new VersionConstraint.empty().isEmpty, isTrue);
+ expect(VersionConstraint.empty.isEmpty, isTrue);
+ expect(VersionConstraint.empty, doesNotAllow([
+ new Version.parse('0.0.0-blah'),
+ new Version.parse('1.2.3'),
+ new Version.parse('12345.678.90')]));
});
group('parse()', () {
diff --git a/utils/tests/pub/yaml_test.dart b/utils/tests/pub/yaml_test.dart
index 889923e..50c0214 100644
--- a/utils/tests/pub/yaml_test.dart
+++ b/utils/tests/pub/yaml_test.dart
@@ -434,7 +434,7 @@
"Warning": "A slightly different error message."
},
{
- "Date": "2001-11-23 15:03:17 -5",
+ "DateTime": "2001-11-23 15:03:17 -5",
"User": "ed",
"Fatal": 'Unknown variable "bar"',
"Stack": [
@@ -461,7 +461,7 @@
A slightly different error
message.
---
- Date: 2001-11-23 15:03:17 -5
+ DateTime: 2001-11-23 15:03:17 -5
User: ed
Fatal:
Unknown variable "bar"
diff --git a/utils/tests/template/real_app.dart b/utils/tests/template/real_app.dart
index f732741..cd4a8f5 100644
--- a/utils/tests/template/real_app.dart
+++ b/utils/tests/template/real_app.dart
@@ -81,7 +81,7 @@
sales = [];
divisions.add(new Division("Search", 4, products));
- var header = new Header("Google World Wide", new Date.now());
+ var header = new Header("Google World Wide", new DateTime.now());
var listView = new DivisionSales(divisions);
document.body.elements.add(header.root); // Add top view.