mirror of
https://github.com/dart-lang/sdk
synced 2024-09-15 21:40:07 +00:00
Removed Dartium SDK libs
First stage remove the libraries that are no longer part of 1.25 and beyond.
R=alanknight@google.com, sigmund@google.com
Committed: a18908461a
Review-Url: https://codereview.chromium.org/3008563002 .
This commit is contained in:
parent
5534568ff1
commit
d96561af08
|
@ -52,9 +52,6 @@ class SummaryBuilder {
|
|||
//
|
||||
Set<String> uriSet =
|
||||
sdk.sdkLibraries.map((SdkLibrary library) => library.shortName).toSet();
|
||||
if (!strong) {
|
||||
uriSet.add('dart:html/nativewrappers.dart');
|
||||
}
|
||||
uriSet.add('dart:html_common/html_common_dart2js.dart');
|
||||
|
||||
Set<Source> librarySources = new HashSet<Source>();
|
||||
|
|
|
@ -61,20 +61,20 @@ const Map<String, LibraryInfo> libraries = const {
|
|||
categories: "Client,Server,Embedded",
|
||||
maturity: Maturity.UNSTABLE,
|
||||
dart2jsPatchPath: "_internal/js_runtime/lib/developer_patch.dart"),
|
||||
"html": const LibraryInfo("html/dartium/html_dartium.dart",
|
||||
"html": const LibraryInfo("html/dart2js/html_dart2js.dart",
|
||||
categories: "Client",
|
||||
maturity: Maturity.WEB_STABLE,
|
||||
dart2jsPath: "html/dart2js/html_dart2js.dart"),
|
||||
platforms: DART2JS_PLATFORM),
|
||||
"html_common": const LibraryInfo("html/html_common/html_common.dart",
|
||||
categories: "Client",
|
||||
maturity: Maturity.WEB_STABLE,
|
||||
dart2jsPath: "html/html_common/html_common_dart2js.dart",
|
||||
documented: false,
|
||||
implementation: true),
|
||||
"indexed_db": const LibraryInfo("indexed_db/dartium/indexed_db_dartium.dart",
|
||||
"indexed_db": const LibraryInfo("indexed_db/dart2js/indexed_db_dart2js.dart",
|
||||
categories: "Client",
|
||||
maturity: Maturity.WEB_STABLE,
|
||||
dart2jsPath: "indexed_db/dart2js/indexed_db_dart2js.dart"),
|
||||
platforms: DART2JS_PLATFORM),
|
||||
"io": const LibraryInfo("io/io.dart",
|
||||
categories: "Server",
|
||||
dart2jsPatchPath: "_internal/js_runtime/lib/io_patch.dart"),
|
||||
|
@ -82,14 +82,14 @@ const Map<String, LibraryInfo> libraries = const {
|
|||
categories: "Client,Server",
|
||||
maturity: Maturity.STABLE,
|
||||
dart2jsPatchPath: "_internal/js_runtime/lib/isolate_patch.dart"),
|
||||
"js": const LibraryInfo("js/dartium/js_dartium.dart",
|
||||
"js": const LibraryInfo("js/dart2js/js_dart2js.dart",
|
||||
categories: "Client",
|
||||
maturity: Maturity.STABLE,
|
||||
dart2jsPath: "js/dart2js/js_dart2js.dart"),
|
||||
"js_util": const LibraryInfo("js_util/dartium/js_util_dartium.dart",
|
||||
platforms: DART2JS_PLATFORM),
|
||||
"js_util": const LibraryInfo("js_util/dart2js/js_util_dart2js.dart",
|
||||
categories: "Client",
|
||||
maturity: Maturity.STABLE,
|
||||
dart2jsPath: "js_util/dart2js/js_util_dart2js.dart"),
|
||||
platforms: DART2JS_PLATFORM),
|
||||
"math": const LibraryInfo("math/math.dart",
|
||||
categories: "Client,Server,Embedded",
|
||||
maturity: Maturity.STABLE,
|
||||
|
@ -102,7 +102,7 @@ const Map<String, LibraryInfo> libraries = const {
|
|||
categories: "Client",
|
||||
implementation: true,
|
||||
documented: false,
|
||||
dart2jsPath: "html/dart2js/nativewrappers.dart"),
|
||||
platforms: DART2JS_PLATFORM),
|
||||
"typed_data": const LibraryInfo("typed_data/typed_data.dart",
|
||||
categories: "Client,Server,Embedded",
|
||||
maturity: Maturity.STABLE,
|
||||
|
@ -113,22 +113,22 @@ const Map<String, LibraryInfo> libraries = const {
|
|||
implementation: true,
|
||||
documented: false,
|
||||
platforms: DART2JS_PLATFORM),
|
||||
"svg": const LibraryInfo("svg/dartium/svg_dartium.dart",
|
||||
"svg": const LibraryInfo("svg/dart2js/svg_dart2js.dart.dart",
|
||||
categories: "Client",
|
||||
maturity: Maturity.WEB_STABLE,
|
||||
dart2jsPath: "svg/dart2js/svg_dart2js.dart"),
|
||||
"web_audio": const LibraryInfo("web_audio/dartium/web_audio_dartium.dart",
|
||||
platforms: DART2JS_PLATFORM),
|
||||
"web_audio": const LibraryInfo("web_audio/dart2js/web_audio_dart2js.dart",
|
||||
categories: "Client",
|
||||
maturity: Maturity.WEB_STABLE,
|
||||
dart2jsPath: "web_audio/dart2js/web_audio_dart2js.dart"),
|
||||
"web_gl": const LibraryInfo("web_gl/dartium/web_gl_dartium.dart",
|
||||
platforms: DART2JS_PLATFORM),
|
||||
"web_gl": const LibraryInfo("web_gl/dart2js/web_gl_dart2js.dart",
|
||||
categories: "Client",
|
||||
maturity: Maturity.WEB_STABLE,
|
||||
dart2jsPath: "web_gl/dart2js/web_gl_dart2js.dart"),
|
||||
"web_sql": const LibraryInfo("web_sql/dartium/web_sql_dartium.dart",
|
||||
platforms: DART2JS_PLATFORM),
|
||||
"web_sql": const LibraryInfo("web_sql/dart2js/web_sql_dart2js.dart",
|
||||
categories: "Client",
|
||||
maturity: Maturity.WEB_STABLE,
|
||||
dart2jsPath: "web_sql/dart2js/web_sql_dart2js.dart"),
|
||||
platforms: DART2JS_PLATFORM),
|
||||
"_internal": const LibraryInfo("internal/internal.dart",
|
||||
categories: "",
|
||||
documented: false,
|
||||
|
|
|
@ -104,21 +104,11 @@ gen_library_src_path("generate_io_patch_cc_file") {
|
|||
output = "$target_gen_dir/io_patch_gen.cc"
|
||||
}
|
||||
|
||||
gen_library_src_path("generate_html_cc_file") {
|
||||
name = "html"
|
||||
kind = "source"
|
||||
sources = [
|
||||
"../../sdk/lib/html/dartium/html_dartium.dart",
|
||||
]
|
||||
output = "$target_gen_dir/html_gen.cc"
|
||||
}
|
||||
|
||||
gen_library_src_path("generate_html_common_cc_file") {
|
||||
name = "html_common"
|
||||
kind = "source"
|
||||
sources = [
|
||||
"../../sdk/lib/html/html_common/conversions.dart",
|
||||
"../../sdk/lib/html/html_common/conversions_dartium.dart",
|
||||
"../../sdk/lib/html/html_common/css_class_set.dart",
|
||||
"../../sdk/lib/html/html_common/device.dart",
|
||||
"../../sdk/lib/html/html_common/filtered_element_list.dart",
|
||||
|
@ -128,61 +118,6 @@ gen_library_src_path("generate_html_common_cc_file") {
|
|||
output = "$target_gen_dir/html_common_gen.cc"
|
||||
}
|
||||
|
||||
gen_library_src_path("generate_js_cc_file") {
|
||||
name = "js"
|
||||
kind = "source"
|
||||
sources = [
|
||||
"../../sdk/lib/js/dartium/js_dartium.dart",
|
||||
]
|
||||
output = "$target_gen_dir/js_gen.cc"
|
||||
}
|
||||
|
||||
gen_library_src_path("generate_js_util_cc_file") {
|
||||
name = "js_util"
|
||||
kind = "source"
|
||||
sources = [
|
||||
"../../sdk/lib/js_util/dartium/js_util_dartium.dart",
|
||||
]
|
||||
output = "$target_gen_dir/js_util_gen.cc"
|
||||
}
|
||||
|
||||
gen_library_src_path("generate_blink_cc_file") {
|
||||
name = "_blink"
|
||||
kind = "source"
|
||||
sources = [
|
||||
"../../sdk/lib/_blink/dartium/_blink_dartium.dart",
|
||||
]
|
||||
output = "$target_gen_dir/blink_gen.cc"
|
||||
}
|
||||
|
||||
gen_library_src_path("generate_indexed_db_cc_file") {
|
||||
name = "indexed_db"
|
||||
kind = "source"
|
||||
sources = [
|
||||
"../../sdk/lib/indexed_db/dartium/indexed_db_dartium.dart",
|
||||
]
|
||||
output = "$target_gen_dir/indexed_db_gen.cc"
|
||||
}
|
||||
|
||||
gen_library_src_path("generate_cached_patches_cc_file") {
|
||||
name = "cached_patches"
|
||||
library_name = "cached_patches.dart"
|
||||
kind = "source"
|
||||
sources = [
|
||||
"../../sdk/lib/js/dartium/cached_patches.dart",
|
||||
]
|
||||
output = "$target_gen_dir/cached_patches_gen.cc"
|
||||
}
|
||||
|
||||
gen_library_src_path("generate_web_gl_cc_file") {
|
||||
name = "web_gl"
|
||||
kind = "source"
|
||||
sources = [
|
||||
"../../sdk/lib/web_gl/dartium/web_gl_dartium.dart",
|
||||
]
|
||||
output = "$target_gen_dir/web_gl_gen.cc"
|
||||
}
|
||||
|
||||
gen_library_src_path("generate_metadata_cc_file") {
|
||||
name = "metadata"
|
||||
library_name = "metadata.dart"
|
||||
|
@ -193,33 +128,6 @@ gen_library_src_path("generate_metadata_cc_file") {
|
|||
output = "$target_gen_dir/metadata_gen.cc"
|
||||
}
|
||||
|
||||
gen_library_src_path("generate_web_sql_cc_file") {
|
||||
name = "web_sql"
|
||||
kind = "source"
|
||||
sources = [
|
||||
"../../sdk/lib/web_sql/dartium/web_sql_dartium.dart",
|
||||
]
|
||||
output = "$target_gen_dir/web_sql_gen.cc"
|
||||
}
|
||||
|
||||
gen_library_src_path("generate_svg_cc_file") {
|
||||
name = "svg"
|
||||
kind = "source"
|
||||
sources = [
|
||||
"../../sdk/lib/svg/dartium/svg_dartium.dart",
|
||||
]
|
||||
output = "$target_gen_dir/svg_gen.cc"
|
||||
}
|
||||
|
||||
gen_library_src_path("generate_web_audio_cc_file") {
|
||||
name = "web_audio"
|
||||
kind = "source"
|
||||
sources = [
|
||||
"../../sdk/lib/web_audio/dartium/web_audio_dartium.dart",
|
||||
]
|
||||
output = "$target_gen_dir/web_audio_gen.cc"
|
||||
}
|
||||
|
||||
config("libdart_builtin_config") {
|
||||
if (!is_win) {
|
||||
libs = [ "dl" ]
|
||||
|
@ -244,21 +152,11 @@ template("build_libdart_builtin") {
|
|||
}
|
||||
public_configs = [ ":libdart_builtin_config" ]
|
||||
deps = [
|
||||
":generate_blink_cc_file",
|
||||
":generate_builtin_cc_file",
|
||||
":generate_cached_patches_cc_file",
|
||||
":generate_html_cc_file",
|
||||
":generate_html_common_cc_file",
|
||||
":generate_indexed_db_cc_file",
|
||||
":generate_io_cc_file",
|
||||
":generate_io_patch_cc_file",
|
||||
":generate_js_cc_file",
|
||||
":generate_js_util_cc_file",
|
||||
":generate_metadata_cc_file",
|
||||
":generate_svg_cc_file",
|
||||
":generate_web_audio_cc_file",
|
||||
":generate_web_gl_cc_file",
|
||||
":generate_web_sql_cc_file",
|
||||
]
|
||||
include_dirs = [ ".." ]
|
||||
set_sources_assignment_filter([
|
||||
|
@ -800,21 +698,11 @@ dart_executable("dart_bootstrap") {
|
|||
]
|
||||
extra_deps = [
|
||||
":gen_resources_cc",
|
||||
":generate_blink_cc_file",
|
||||
":generate_builtin_cc_file",
|
||||
":generate_cached_patches_cc_file",
|
||||
":generate_html_cc_file",
|
||||
":generate_html_common_cc_file",
|
||||
":generate_indexed_db_cc_file",
|
||||
":generate_io_cc_file",
|
||||
":generate_io_patch_cc_file",
|
||||
":generate_js_cc_file",
|
||||
":generate_js_util_cc_file",
|
||||
":generate_metadata_cc_file",
|
||||
":generate_svg_cc_file",
|
||||
":generate_web_audio_cc_file",
|
||||
":generate_web_gl_cc_file",
|
||||
":generate_web_sql_cc_file",
|
||||
"..:libdart_nosnapshot_with_precompiler",
|
||||
]
|
||||
extra_defines = [ "NO_OBSERVATORY" ]
|
||||
|
@ -831,22 +719,12 @@ dart_executable("dart_bootstrap") {
|
|||
"snapshot_empty.cc",
|
||||
|
||||
# Include generated source files.
|
||||
"$target_gen_dir/blink_gen.cc",
|
||||
"$target_gen_dir/builtin_gen.cc",
|
||||
"$target_gen_dir/cached_patches_gen.cc",
|
||||
"$target_gen_dir/html_common_gen.cc",
|
||||
"$target_gen_dir/html_gen.cc",
|
||||
"$target_gen_dir/indexed_db_gen.cc",
|
||||
"$target_gen_dir/io_gen.cc",
|
||||
"$target_gen_dir/io_patch_gen.cc",
|
||||
"$target_gen_dir/js_gen.cc",
|
||||
"$target_gen_dir/js_util_gen.cc",
|
||||
"$target_gen_dir/metadata_gen.cc",
|
||||
"$target_gen_dir/resources_gen.cc",
|
||||
"$target_gen_dir/svg_gen.cc",
|
||||
"$target_gen_dir/web_audio_gen.cc",
|
||||
"$target_gen_dir/web_gl_gen.cc",
|
||||
"$target_gen_dir/web_sql_gen.cc",
|
||||
]
|
||||
}
|
||||
|
||||
|
|
|
@ -21,18 +21,8 @@ Builtin::builtin_lib_props Builtin::builtin_libraries_[] = {
|
|||
|
||||
#if defined(DART_NO_SNAPSHOT)
|
||||
// Only include these libraries in the dart_bootstrap case for now.
|
||||
{"dart:html", html_source_paths_, NULL, NULL, true},
|
||||
{"dart:html_common", html_common_source_paths_, NULL, NULL, true},
|
||||
{"dart:js", js_source_paths_, NULL, NULL, true},
|
||||
{"dart:js_util", js_util_source_paths_, NULL, NULL, true},
|
||||
{"dart:_blink", _blink_source_paths_, NULL, NULL, true},
|
||||
{"dart:indexed_db", indexed_db_source_paths_, NULL, NULL, true},
|
||||
{"cached_patches.dart", cached_patches_source_paths_, NULL, NULL, true},
|
||||
{"dart:web_gl", web_gl_source_paths_, NULL, NULL, true},
|
||||
{"metadata.dart", metadata_source_paths_, NULL, NULL, true},
|
||||
{"dart:web_sql", web_sql_source_paths_, NULL, NULL, true},
|
||||
{"dart:svg", svg_source_paths_, NULL, NULL, true},
|
||||
{"dart:web_audio", web_audio_source_paths_, NULL, NULL, true},
|
||||
#endif // defined(DART_NO_SNAPSHOT)
|
||||
|
||||
// End marker.
|
||||
|
|
|
@ -69,18 +69,8 @@ class Builtin {
|
|||
static const char* _builtin_source_paths_[];
|
||||
static const char* io_source_paths_[];
|
||||
static const char* io_patch_paths_[];
|
||||
static const char* html_source_paths_[];
|
||||
static const char* html_common_source_paths_[];
|
||||
static const char* js_source_paths_[];
|
||||
static const char* js_util_source_paths_[];
|
||||
static const char* _blink_source_paths_[];
|
||||
static const char* indexed_db_source_paths_[];
|
||||
static const char* cached_patches_source_paths_[];
|
||||
static const char* web_gl_source_paths_[];
|
||||
static const char* metadata_source_paths_[];
|
||||
static const char* web_sql_source_paths_[];
|
||||
static const char* svg_source_paths_[];
|
||||
static const char* web_audio_source_paths_[];
|
||||
|
||||
static Dart_Port load_port_;
|
||||
static const int num_libs_;
|
||||
|
|
|
@ -349,7 +349,7 @@ static RawInstance* CreateLibraryMirror(Thread* thread, const Library& lib) {
|
|||
args.SetAt(1, str);
|
||||
str = lib.url();
|
||||
const char* censored_libraries[] = {
|
||||
"dart:_builtin", "dart:_blink", "dart:_vmservice", NULL,
|
||||
"dart:_builtin", "dart:_vmservice", NULL,
|
||||
};
|
||||
for (intptr_t i = 0; censored_libraries[i] != NULL; i++) {
|
||||
if (str.Equals(censored_libraries[i])) {
|
||||
|
|
|
@ -177,7 +177,6 @@ _platform_sdk_libraries = [
|
|||
]
|
||||
|
||||
_full_sdk_libraries = [
|
||||
"_blink",
|
||||
"_chrome",
|
||||
"_internal",
|
||||
"async",
|
||||
|
@ -185,21 +184,13 @@ _full_sdk_libraries = [
|
|||
"convert",
|
||||
"core",
|
||||
"developer",
|
||||
"html",
|
||||
"indexed_db",
|
||||
"internal",
|
||||
"io",
|
||||
"isolate",
|
||||
"js",
|
||||
"js_util",
|
||||
"math",
|
||||
"mirrors",
|
||||
"profiler",
|
||||
"svg",
|
||||
"typed_data",
|
||||
"web_audio",
|
||||
"web_gl",
|
||||
"web_sql",
|
||||
]
|
||||
|
||||
# Package sources copied to lib/
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,15 +0,0 @@
|
|||
/// Native wrappers for the Chrome Packaged App APIs.
|
||||
///
|
||||
/// These functions allow direct access to the Packaged App APIs, allowing
|
||||
/// Chrome Packaged Apps to be written using Dart.
|
||||
///
|
||||
/// For more information on these APIs, see the
|
||||
/// [Chrome APIs Documentation](http://developer.chrome.com/extensions/api_index.html)
|
||||
library _chrome;
|
||||
|
||||
// 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.
|
||||
|
||||
// DO NOT EDIT
|
||||
// Auto-generated dart:_chrome library.
|
|
@ -45,11 +45,6 @@ const Map<String, LibraryInfo> libraries = const {
|
|||
categories: "Client,Server",
|
||||
maturity: Maturity.STABLE,
|
||||
dart2jsPatchPath: "_internal/js_runtime/lib/async_patch.dart"),
|
||||
"_blink": const LibraryInfo("_blink/dartium/_blink_dartium.dart",
|
||||
categories: "Client",
|
||||
implementation: true,
|
||||
documented: false,
|
||||
platforms: VM_PLATFORM),
|
||||
"_chrome": const LibraryInfo("_chrome/dart2js/chrome_dart2js.dart",
|
||||
categories: "Client", documented: false),
|
||||
"collection": const LibraryInfo("collection/collection.dart",
|
||||
|
@ -68,20 +63,20 @@ const Map<String, LibraryInfo> libraries = const {
|
|||
categories: "Client,Server,Embedded",
|
||||
maturity: Maturity.UNSTABLE,
|
||||
dart2jsPatchPath: "_internal/js_runtime/lib/developer_patch.dart"),
|
||||
"html": const LibraryInfo("html/dartium/html_dartium.dart",
|
||||
"html": const LibraryInfo("html/dart2js/html_dart2js.dart",
|
||||
categories: "Client",
|
||||
maturity: Maturity.WEB_STABLE,
|
||||
dart2jsPath: "html/dart2js/html_dart2js.dart"),
|
||||
platforms: DART2JS_PLATFORM),
|
||||
"html_common": const LibraryInfo("html/html_common/html_common.dart",
|
||||
categories: "Client",
|
||||
maturity: Maturity.WEB_STABLE,
|
||||
dart2jsPath: "html/html_common/html_common_dart2js.dart",
|
||||
documented: false,
|
||||
implementation: true),
|
||||
"indexed_db": const LibraryInfo("indexed_db/dartium/indexed_db_dartium.dart",
|
||||
"indexed_db": const LibraryInfo("indexed_db/dart2js/indexed_db_dart2js.dart",
|
||||
categories: "Client",
|
||||
maturity: Maturity.WEB_STABLE,
|
||||
dart2jsPath: "indexed_db/dart2js/indexed_db_dart2js.dart"),
|
||||
platforms: DART2JS_PLATFORM),
|
||||
"io": const LibraryInfo("io/io.dart",
|
||||
categories: "Server",
|
||||
dart2jsPatchPath: "_internal/js_runtime/lib/io_patch.dart"),
|
||||
|
@ -89,14 +84,14 @@ const Map<String, LibraryInfo> libraries = const {
|
|||
categories: "Client,Server",
|
||||
maturity: Maturity.STABLE,
|
||||
dart2jsPatchPath: "_internal/js_runtime/lib/isolate_patch.dart"),
|
||||
"js": const LibraryInfo("js/dartium/js_dartium.dart",
|
||||
"js": const LibraryInfo("js/dart2js/js_dart2js.dart",
|
||||
categories: "Client",
|
||||
maturity: Maturity.STABLE,
|
||||
dart2jsPath: "js/dart2js/js_dart2js.dart"),
|
||||
"js_util": const LibraryInfo("js_util/dartium/js_util_dartium.dart",
|
||||
platforms: DART2JS_PLATFORM),
|
||||
"js_util": const LibraryInfo("js_util/dart2js/js_util_dart2js.dart",
|
||||
categories: "Client",
|
||||
maturity: Maturity.STABLE,
|
||||
dart2jsPath: "js_util/dart2js/js_util_dart2js.dart"),
|
||||
platforms: DART2JS_PLATFORM),
|
||||
"math": const LibraryInfo("math/math.dart",
|
||||
categories: "Client,Server,Embedded",
|
||||
maturity: Maturity.STABLE,
|
||||
|
@ -120,22 +115,22 @@ const Map<String, LibraryInfo> libraries = const {
|
|||
implementation: true,
|
||||
documented: false,
|
||||
platforms: DART2JS_PLATFORM),
|
||||
"svg": const LibraryInfo("svg/dartium/svg_dartium.dart",
|
||||
"svg": const LibraryInfo("svg/dart2js/svg_dart2js.dart",
|
||||
categories: "Client",
|
||||
maturity: Maturity.WEB_STABLE,
|
||||
dart2jsPath: "svg/dart2js/svg_dart2js.dart"),
|
||||
"web_audio": const LibraryInfo("web_audio/dartium/web_audio_dartium.dart",
|
||||
platforms: DART2JS_PLATFORM),
|
||||
"web_audio": const LibraryInfo("web_audio/dart2js/web_audio_dart2js.dart",
|
||||
categories: "Client",
|
||||
maturity: Maturity.WEB_STABLE,
|
||||
dart2jsPath: "web_audio/dart2js/web_audio_dart2js.dart"),
|
||||
"web_gl": const LibraryInfo("web_gl/dartium/web_gl_dartium.dart",
|
||||
platforms: DART2JS_PLATFORM),
|
||||
"web_gl": const LibraryInfo("web_gl/dart2js/web_gl_dart2js.dart",
|
||||
categories: "Client",
|
||||
maturity: Maturity.WEB_STABLE,
|
||||
dart2jsPath: "web_gl/dart2js/web_gl_dart2js.dart"),
|
||||
"web_sql": const LibraryInfo("web_sql/dartium/web_sql_dartium.dart",
|
||||
platforms: DART2JS_PLATFORM),
|
||||
"web_sql": const LibraryInfo("web_sql/dart2js/web_sql_dart2js.dart",
|
||||
categories: "Client",
|
||||
maturity: Maturity.WEB_STABLE,
|
||||
dart2jsPath: "web_sql/dart2js/web_sql_dart2js.dart"),
|
||||
platforms: DART2JS_PLATFORM),
|
||||
"_internal": const LibraryInfo("internal/internal.dart",
|
||||
categories: "",
|
||||
documented: false,
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,294 +0,0 @@
|
|||
part of html_common;
|
||||
|
||||
convertDartToNative_PrepareForStructuredClone(value) =>
|
||||
new _StructuredCloneDartium()
|
||||
.convertDartToNative_PrepareForStructuredClone(value);
|
||||
|
||||
convertNativeToDart_AcceptStructuredClone(object, {mustCopy: false}) =>
|
||||
new _AcceptStructuredCloneDartium()
|
||||
.convertNativeToDart_AcceptStructuredClone(object, mustCopy: mustCopy);
|
||||
|
||||
class _StructuredCloneDartium extends _StructuredClone {
|
||||
newJsMap() => js.JsNative.newObject();
|
||||
putIntoMap(map, key, value) => js.JsNative.setProperty(map, key, value);
|
||||
newJsList(length) => js.JsNative.newArray()..length = length;
|
||||
cloneNotRequired(e) => e is js.JSObject || e is TypedData || e is ByteBuffer;
|
||||
}
|
||||
|
||||
/// A version of _AcceptStructuredClone, but using a different algorithm
|
||||
/// so we can take advantage of an identity HashMap on Dartium without
|
||||
/// the bad side-effect of modifying the JS source objects if we do the same in
|
||||
/// dart2js.
|
||||
///
|
||||
/// This no longer inherits anything from _AcceptStructuredClone
|
||||
/// and is never used polymorphically with it, so it doesn't inherit.
|
||||
class _AcceptStructuredCloneDartium {
|
||||
newDartList(length) => new List(length);
|
||||
|
||||
// As long as we stick to JSObject instead of intermingling legacy JsObject,
|
||||
// we can simply use identical.
|
||||
bool identicalInJs(a, b) => identical(a, b);
|
||||
|
||||
void forEachJsField(jsObject, action) {
|
||||
var keys = js.JsNative.callMethod(_object, "keys", [jsObject]);
|
||||
for (var key in keys) {
|
||||
action(key, js.JsNative.getProperty(jsObject, key));
|
||||
}
|
||||
}
|
||||
|
||||
// Keep track of the clones, keyed by the original object. If we're
|
||||
// not copying, these may be the same.
|
||||
var clones = new HashMap.identity();
|
||||
bool mustCopy = false;
|
||||
|
||||
Object findSlot(value) {
|
||||
return clones.putIfAbsent(value, () => null);
|
||||
}
|
||||
|
||||
writeSlot(original, x) {
|
||||
clones[original] = x;
|
||||
}
|
||||
|
||||
walk(e) {
|
||||
if (e == null) return e;
|
||||
if (e is bool) return e;
|
||||
if (e is num) return e;
|
||||
if (e is String) return e;
|
||||
if (e is DateTime) return e;
|
||||
|
||||
if (isJavaScriptRegExp(e)) {
|
||||
// TODO(sra).
|
||||
throw new UnimplementedError('structured clone of RegExp');
|
||||
}
|
||||
|
||||
if (isJavaScriptPromise(e)) {
|
||||
return convertNativePromiseToDartFuture(e);
|
||||
}
|
||||
|
||||
if (isJavaScriptSimpleObject(e)) {
|
||||
// TODO(sra): If mustCopy is false, swizzle the prototype for one of a Map
|
||||
// implementation that uses the properies as storage.
|
||||
var copy = findSlot(e);
|
||||
if (copy != null) return copy;
|
||||
copy = {};
|
||||
|
||||
writeSlot(e, copy);
|
||||
forEachJsField(e, (key, value) => copy[key] = walk(value));
|
||||
return copy;
|
||||
}
|
||||
|
||||
if (isJavaScriptArray(e)) {
|
||||
var copy = findSlot(e);
|
||||
if (copy != null) return copy;
|
||||
|
||||
int length = e.length;
|
||||
// Since a JavaScript Array is an instance of Dart List, we can modify it
|
||||
// in-place unless we must copy.
|
||||
copy = mustCopy ? newDartList(length) : e;
|
||||
writeSlot(e, copy);
|
||||
|
||||
for (int i = 0; i < length; i++) {
|
||||
copy[i] = walk(e[i]);
|
||||
}
|
||||
return copy;
|
||||
}
|
||||
|
||||
// Assume anything else is already a valid Dart object, either by having
|
||||
// already been processed, or e.g. a clonable native class.
|
||||
return e;
|
||||
}
|
||||
|
||||
convertNativeToDart_AcceptStructuredClone(object, {mustCopy: false}) {
|
||||
this.mustCopy = mustCopy;
|
||||
var copy = walk(object);
|
||||
return copy;
|
||||
}
|
||||
}
|
||||
|
||||
final _dateConstructor = js.JsNative.getProperty(window, "Date");
|
||||
final _regexConstructor = js.JsNative.getProperty(window, "RegExp");
|
||||
|
||||
bool isJavaScriptDate(value) =>
|
||||
value is js.JSObject && js.JsNative.instanceof(value, _dateConstructor);
|
||||
bool isJavaScriptRegExp(value) =>
|
||||
value is js.JSObject && js.JsNative.instanceof(value, _regexConstructor);
|
||||
bool isJavaScriptArray(value) => value is js.JSArray;
|
||||
|
||||
final _object = js.JsNative.getProperty(window, "Object");
|
||||
final _getPrototypeOf = js.JsNative.getProperty(_object, "getPrototypeOf");
|
||||
_getProto(object) {
|
||||
return _getPrototypeOf(object);
|
||||
}
|
||||
|
||||
final _objectProto = js.JsNative.getProperty(_object, "prototype");
|
||||
|
||||
bool isJavaScriptSimpleObject(value) {
|
||||
if (value is! js.JSObject) return false;
|
||||
var proto = _getProto(value);
|
||||
return proto == _objectProto || proto == null;
|
||||
}
|
||||
|
||||
// TODO(jacobr): this makes little sense unless we are doing something
|
||||
// ambitious to make Dartium and Dart2Js interop well with each other.
|
||||
bool isImmutableJavaScriptArray(value) =>
|
||||
isJavaScriptArray(value) &&
|
||||
js.JsNative.getProperty(value, "immutable$list") != null;
|
||||
|
||||
final _promiseConstructor = js.JsNative.getProperty(window, 'Promise');
|
||||
bool isJavaScriptPromise(value) =>
|
||||
value is js.JSObject &&
|
||||
identical(
|
||||
js.JsNative.getProperty(value, 'constructor'), _promiseConstructor);
|
||||
|
||||
Future convertNativePromiseToDartFuture(js.JSObject promise) {
|
||||
var completer = new Completer();
|
||||
var newPromise = js.JsNative.callMethod(
|
||||
js.JsNative.callMethod(promise, "then",
|
||||
[js.allowInterop((result) => completer.complete(result))]),
|
||||
"catch",
|
||||
[js.allowInterop((result) => completer.completeError(result))]);
|
||||
return completer.future;
|
||||
}
|
||||
|
||||
convertDartToNative_DateTime(DateTime date) {
|
||||
return date;
|
||||
}
|
||||
|
||||
/// Creates a Dart Rectangle from a Javascript object with properties
|
||||
/// left, top, width and height or a 4 element array of integers. Used internally in Dartium.
|
||||
Rectangle make_dart_rectangle(r) {
|
||||
if (r == null) return null;
|
||||
if (r is List) {
|
||||
return new Rectangle(r[0], r[1], r[2], r[3]);
|
||||
}
|
||||
|
||||
return new Rectangle(
|
||||
js.JsNative.getProperty(r, 'left'),
|
||||
js.JsNative.getProperty(r, 'top'),
|
||||
js.JsNative.getProperty(r, 'width'),
|
||||
js.JsNative.getProperty(r, 'height'));
|
||||
}
|
||||
|
||||
// Converts a flat Dart map into a JavaScript object with properties this is
|
||||
// is the Dartium only version it uses dart:js.
|
||||
// TODO(alanknight): This could probably be unified with the dart2js conversions
|
||||
// code in html_common and be more general.
|
||||
convertDartToNative_Dictionary(Map dict) {
|
||||
if (dict == null) return null;
|
||||
var jsObject = js.JsNative.newObject();
|
||||
dict.forEach((String key, value) {
|
||||
if (value is List) {
|
||||
var jsArray = js.JsNative.newArray();
|
||||
value.forEach((elem) {
|
||||
jsArray.add(elem is Map ? convertDartToNative_Dictionary(elem) : elem);
|
||||
});
|
||||
js.JsNative.setProperty(jsObject, key, jsArray);
|
||||
} else {
|
||||
js.JsNative.setProperty(jsObject, key, value);
|
||||
}
|
||||
});
|
||||
return jsObject;
|
||||
}
|
||||
|
||||
// Creates a Dart class to allow members of the Map to be fetched (as if getters exist).
|
||||
// TODO(terry): Need to use package:js but that's a problem in dart:html. Talk to
|
||||
// Jacob about how to do this properly using dart:js.
|
||||
class _ReturnedDictionary {
|
||||
Map _values;
|
||||
|
||||
noSuchMethod(Invocation invocation) {
|
||||
var key = MirrorSystem.getName(invocation.memberName);
|
||||
if (invocation.isGetter) {
|
||||
return _values[key];
|
||||
} else if (invocation.isSetter && key.endsWith('=')) {
|
||||
key = key.substring(0, key.length - 1);
|
||||
_values[key] = invocation.positionalArguments[0];
|
||||
}
|
||||
}
|
||||
|
||||
Map get toMap => _values;
|
||||
|
||||
_ReturnedDictionary(Map value) : _values = value != null ? value : {};
|
||||
}
|
||||
|
||||
// Helper function to wrapped a returned dictionary from blink to a Dart looking
|
||||
// class.
|
||||
convertNativeDictionaryToDartDictionary(values) {
|
||||
if (values is! Map) {
|
||||
// TODO(jacobr): wish wwe didn't have to do this.
|
||||
values = convertNativeToDart_SerializedScriptValue(values);
|
||||
}
|
||||
return values != null ? new _ReturnedDictionary(values) : null;
|
||||
}
|
||||
|
||||
convertNativeToDart_Dictionary(values) =>
|
||||
convertNativeToDart_SerializedScriptValue(values);
|
||||
|
||||
// Conversion function place holder (currently not used in dart2js or dartium).
|
||||
List convertDartToNative_StringArray(List<String> input) => input;
|
||||
|
||||
// Converts a Dart list into a JsArray. For the Dartium version only.
|
||||
convertDartToNative_List(List input) => new js.JsArray()..addAll(input);
|
||||
|
||||
// Incredibly slow implementation to lookup the runtime type for an object.
|
||||
// Fortunately, performance doesn't matter much as the results are cached
|
||||
// as long as the object being looked up has a valid prototype.
|
||||
// TODO(jacobr): we should track the # of lookups to ensure that things aren't
|
||||
// going off the rails due to objects with null prototypes, etc.
|
||||
// Note: unlike all other methods in this class, here we intentionally use
|
||||
// the old JsObject types to bootstrap the new typed bindings.
|
||||
Type lookupType(js.JsObject jsObject, bool isElement) {
|
||||
try {
|
||||
// TODO(jacobr): add static methods that return the runtime type of the patch
|
||||
// class so that this code works as expected.
|
||||
if (jsObject is js.JsArray) {
|
||||
return js.JSArray.instanceRuntimeType;
|
||||
}
|
||||
if (jsObject is js.JsFunction) {
|
||||
return js.JSFunction.instanceRuntimeType;
|
||||
}
|
||||
|
||||
var constructor = js.JsNative.getProperty(jsObject, 'constructor');
|
||||
if (constructor == null) {
|
||||
// Perfectly valid case for JavaScript objects where __proto__ has
|
||||
// intentionally been set to null.
|
||||
// We should track and warn about this case as peformance will be poor.
|
||||
return js.JSObject.instanceRuntimeType;
|
||||
}
|
||||
var jsTypeName = js.JsNative.getProperty(constructor, 'name');
|
||||
if (jsTypeName is! String || jsTypeName.length == 0) {
|
||||
// Not an html type.
|
||||
return js.JSObject.instanceRuntimeType;
|
||||
}
|
||||
|
||||
var dartClass_instance;
|
||||
var customElementClass = null;
|
||||
var extendsTag = "";
|
||||
|
||||
Type type = getHtmlCreateType(jsTypeName);
|
||||
if (type != null) return type;
|
||||
|
||||
// Start walking the prototype chain looking for a JS class.
|
||||
var prototype = js.JsNative.getProperty(jsObject, '__proto__');
|
||||
while (prototype != null) {
|
||||
// We're a Dart class that's pointing to a JS class.
|
||||
var constructor = js.JsNative.getProperty(prototype, 'constructor');
|
||||
if (constructor != null) {
|
||||
jsTypeName = js.JsNative.getProperty(constructor, 'name');
|
||||
type = getHtmlCreateType(jsTypeName);
|
||||
if (type != null) return type;
|
||||
}
|
||||
prototype = js.JsNative.getProperty(prototype, '__proto__');
|
||||
}
|
||||
} catch (e) {
|
||||
// This case can happen for cross frame objects.
|
||||
if (js.JsNative.hasProperty(e, "postMessage")) {
|
||||
// assume this is a Window. To match Dart2JS, separate conversion code
|
||||
// in dart:html will switch the wrapper to a cross frame window as
|
||||
// required.
|
||||
// TODO(jacobr): we could consider removing this code completely.
|
||||
return Window.instanceRuntimeType;
|
||||
}
|
||||
}
|
||||
return js.JSObject.instanceRuntimeType;
|
||||
}
|
|
@ -13,6 +13,8 @@ import 'dart:nativewrappers';
|
|||
import 'dart:typed_data';
|
||||
import 'dart:web_gl' as gl;
|
||||
|
||||
import 'dart:_js_helper';
|
||||
|
||||
import 'metadata.dart';
|
||||
export 'metadata.dart';
|
||||
|
||||
|
@ -21,4 +23,3 @@ part 'device.dart';
|
|||
part 'filtered_element_list.dart';
|
||||
part 'lists.dart';
|
||||
part 'conversions.dart';
|
||||
part 'conversions_dartium.dart';
|
||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -1,40 +0,0 @@
|
|||
// Copyright (c) 2016, 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.
|
||||
|
||||
/// Utility methods to efficiently manipulate typed JSInterop objects in cases
|
||||
/// where the name to call is not known at runtime. You should only use these
|
||||
/// methods when the same effect cannot be achieved with @JS annotations.
|
||||
/// These methods would be extension methods on JSObject if Dart supported
|
||||
/// extension methods.
|
||||
library dart.js_util;
|
||||
|
||||
import 'dart:js';
|
||||
|
||||
/// WARNING: performance of this method is much worse than other util
|
||||
/// methods in this library. Only use this method as a last resort.
|
||||
///
|
||||
/// Recursively converts a JSON-like collection of Dart objects to a
|
||||
/// collection of JavaScript objects and returns a [JsObject] proxy to it.
|
||||
///
|
||||
/// [object] must be a [Map] or [Iterable], the contents of which are also
|
||||
/// converted. Maps and Iterables are copied to a new JavaScript object.
|
||||
/// Primitives and other transferable values are directly converted to their
|
||||
/// JavaScript type, and all other objects are proxied.
|
||||
jsify(object) {
|
||||
if ((object is! Map) && (object is! Iterable)) {
|
||||
throw new ArgumentError("object must be a Map or Iterable");
|
||||
}
|
||||
return JsNative.jsify(object);
|
||||
}
|
||||
|
||||
JSObject newObject() => JsNative.newObject();
|
||||
|
||||
hasProperty(JSObject o, name) => JsNative.hasProperty(o, name);
|
||||
getProperty(JSObject o, name) => JsNative.getProperty(o, name);
|
||||
setProperty(JSObject o, name, value) => JsNative.setProperty(o, name, value);
|
||||
callMethod(JSObject o, String method, List args) =>
|
||||
JsNative.callMethod(o, method, args);
|
||||
instanceof(JSObject o, Function type) => JsNative.instanceof(o, type);
|
||||
callConstructor(JSObject constructor, List args) =>
|
||||
JsNative.callConstructor(constructor, args);
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -1,392 +0,0 @@
|
|||
/**
|
||||
* An API for storing data in the browser that can be queried with SQL.
|
||||
*
|
||||
* **Caution:** this specification is no longer actively maintained by the Web
|
||||
* Applications Working Group and may be removed at any time.
|
||||
* See [the W3C Web SQL Database specification](http://www.w3.org/TR/webdatabase/)
|
||||
* for more information.
|
||||
*
|
||||
* The [dart:indexed_db] APIs is a recommended alternatives.
|
||||
*/
|
||||
library dart.dom.web_sql;
|
||||
|
||||
import 'dart:async';
|
||||
import 'dart:collection' hide LinkedList, LinkedListEntry;
|
||||
import 'dart:_internal';
|
||||
import 'dart:html';
|
||||
import 'dart:html_common';
|
||||
import 'dart:nativewrappers';
|
||||
import 'dart:_blink' as _blink;
|
||||
import 'dart:js' as js;
|
||||
|
||||
// DO NOT EDIT - unless you are editing documentation as per:
|
||||
// https://code.google.com/p/dart/wiki/ContributingHTMLDocumentation
|
||||
// Auto-generated dart:audio library.
|
||||
|
||||
// FIXME: Can we make this private?
|
||||
@Deprecated("Internal Use Only")
|
||||
final web_sqlBlinkMap = {
|
||||
'Database': () => SqlDatabase.instanceRuntimeType,
|
||||
'SQLError': () => SqlError.instanceRuntimeType,
|
||||
'SQLResultSet': () => SqlResultSet.instanceRuntimeType,
|
||||
'SQLResultSetRowList': () => SqlResultSetRowList.instanceRuntimeType,
|
||||
'SQLTransaction': () => SqlTransaction.instanceRuntimeType,
|
||||
};
|
||||
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
// WARNING: Do not edit - generated code.
|
||||
|
||||
@DomName('SQLStatementCallback')
|
||||
// http://www.w3.org/TR/webdatabase/#sqlstatementcallback
|
||||
@Experimental() // deprecated
|
||||
typedef void SqlStatementCallback(
|
||||
SqlTransaction transaction, SqlResultSet resultSet);
|
||||
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
// WARNING: Do not edit - generated code.
|
||||
|
||||
@DomName('SQLStatementErrorCallback')
|
||||
// http://www.w3.org/TR/webdatabase/#sqlstatementerrorcallback
|
||||
@Experimental() // deprecated
|
||||
typedef void SqlStatementErrorCallback(
|
||||
SqlTransaction transaction, SqlError error);
|
||||
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
// WARNING: Do not edit - generated code.
|
||||
|
||||
@DomName('SQLTransactionCallback')
|
||||
// http://www.w3.org/TR/webdatabase/#sqltransactioncallback
|
||||
@Experimental() // deprecated
|
||||
typedef void SqlTransactionCallback(SqlTransaction transaction);
|
||||
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
// WARNING: Do not edit - generated code.
|
||||
|
||||
@DomName('SQLTransactionErrorCallback')
|
||||
// http://www.w3.org/TR/webdatabase/#sqltransactionerrorcallback
|
||||
@Experimental() // deprecated
|
||||
typedef void SqlTransactionErrorCallback(SqlError error);
|
||||
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
// WARNING: Do not edit - generated code.
|
||||
|
||||
@DocsEditable()
|
||||
@DomName('Database')
|
||||
@SupportedBrowser(SupportedBrowser.CHROME)
|
||||
@SupportedBrowser(SupportedBrowser.SAFARI)
|
||||
@Experimental()
|
||||
// http://www.w3.org/TR/webdatabase/#asynchronous-database-api
|
||||
@Experimental() // deprecated
|
||||
class SqlDatabase extends DartHtmlDomObject {
|
||||
// To suppress missing implicit constructor warnings.
|
||||
factory SqlDatabase._() {
|
||||
throw new UnsupportedError("Not supported");
|
||||
}
|
||||
|
||||
@Deprecated("Internal Use Only")
|
||||
external static Type get instanceRuntimeType;
|
||||
|
||||
@Deprecated("Internal Use Only")
|
||||
SqlDatabase.internal_() {}
|
||||
|
||||
/// Checks if this type is supported on the current platform.
|
||||
static bool get supported => true;
|
||||
|
||||
@DomName('Database.version')
|
||||
@DocsEditable()
|
||||
String get version => _blink.BlinkDatabase.instance.version_Getter_(this);
|
||||
|
||||
void changeVersion(String oldVersion, String newVersion,
|
||||
[SqlTransactionCallback callback,
|
||||
SqlTransactionErrorCallback errorCallback,
|
||||
VoidCallback successCallback]) {
|
||||
if (successCallback != null) {
|
||||
_blink.BlinkDatabase.instance.changeVersion_Callback_5_(this, oldVersion,
|
||||
newVersion, callback, errorCallback, successCallback);
|
||||
return;
|
||||
}
|
||||
if (errorCallback != null) {
|
||||
_blink.BlinkDatabase.instance.changeVersion_Callback_4_(
|
||||
this, oldVersion, newVersion, callback, errorCallback);
|
||||
return;
|
||||
}
|
||||
if (callback != null) {
|
||||
_blink.BlinkDatabase.instance
|
||||
.changeVersion_Callback_3_(this, oldVersion, newVersion, callback);
|
||||
return;
|
||||
}
|
||||
_blink.BlinkDatabase.instance
|
||||
.changeVersion_Callback_2_(this, oldVersion, newVersion);
|
||||
return;
|
||||
}
|
||||
|
||||
void readTransaction(SqlTransactionCallback callback,
|
||||
[SqlTransactionErrorCallback errorCallback,
|
||||
VoidCallback successCallback]) {
|
||||
if (successCallback != null) {
|
||||
_blink.BlinkDatabase.instance.readTransaction_Callback_3_(
|
||||
this, callback, errorCallback, successCallback);
|
||||
return;
|
||||
}
|
||||
if (errorCallback != null) {
|
||||
_blink.BlinkDatabase.instance
|
||||
.readTransaction_Callback_2_(this, callback, errorCallback);
|
||||
return;
|
||||
}
|
||||
_blink.BlinkDatabase.instance.readTransaction_Callback_1_(this, callback);
|
||||
return;
|
||||
}
|
||||
|
||||
void transaction(SqlTransactionCallback callback,
|
||||
[SqlTransactionErrorCallback errorCallback,
|
||||
VoidCallback successCallback]) {
|
||||
if (successCallback != null) {
|
||||
_blink.BlinkDatabase.instance.transaction_Callback_3_(
|
||||
this, callback, errorCallback, successCallback);
|
||||
return;
|
||||
}
|
||||
if (errorCallback != null) {
|
||||
_blink.BlinkDatabase.instance
|
||||
.transaction_Callback_2_(this, callback, errorCallback);
|
||||
return;
|
||||
}
|
||||
_blink.BlinkDatabase.instance.transaction_Callback_1_(this, callback);
|
||||
return;
|
||||
}
|
||||
}
|
||||
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
// WARNING: Do not edit - generated code.
|
||||
|
||||
@DocsEditable()
|
||||
@DomName('SQLError')
|
||||
// http://www.w3.org/TR/webdatabase/#sqlerror
|
||||
@Experimental() // deprecated
|
||||
class SqlError extends DartHtmlDomObject {
|
||||
// To suppress missing implicit constructor warnings.
|
||||
factory SqlError._() {
|
||||
throw new UnsupportedError("Not supported");
|
||||
}
|
||||
|
||||
@Deprecated("Internal Use Only")
|
||||
external static Type get instanceRuntimeType;
|
||||
|
||||
@Deprecated("Internal Use Only")
|
||||
SqlError.internal_() {}
|
||||
|
||||
@DomName('SQLError.CONSTRAINT_ERR')
|
||||
@DocsEditable()
|
||||
static const int CONSTRAINT_ERR = 6;
|
||||
|
||||
@DomName('SQLError.DATABASE_ERR')
|
||||
@DocsEditable()
|
||||
static const int DATABASE_ERR = 1;
|
||||
|
||||
@DomName('SQLError.QUOTA_ERR')
|
||||
@DocsEditable()
|
||||
static const int QUOTA_ERR = 4;
|
||||
|
||||
@DomName('SQLError.SYNTAX_ERR')
|
||||
@DocsEditable()
|
||||
static const int SYNTAX_ERR = 5;
|
||||
|
||||
@DomName('SQLError.TIMEOUT_ERR')
|
||||
@DocsEditable()
|
||||
static const int TIMEOUT_ERR = 7;
|
||||
|
||||
@DomName('SQLError.TOO_LARGE_ERR')
|
||||
@DocsEditable()
|
||||
static const int TOO_LARGE_ERR = 3;
|
||||
|
||||
@DomName('SQLError.UNKNOWN_ERR')
|
||||
@DocsEditable()
|
||||
static const int UNKNOWN_ERR = 0;
|
||||
|
||||
@DomName('SQLError.VERSION_ERR')
|
||||
@DocsEditable()
|
||||
static const int VERSION_ERR = 2;
|
||||
|
||||
@DomName('SQLError.code')
|
||||
@DocsEditable()
|
||||
int get code => _blink.BlinkSQLError.instance.code_Getter_(this);
|
||||
|
||||
@DomName('SQLError.message')
|
||||
@DocsEditable()
|
||||
String get message => _blink.BlinkSQLError.instance.message_Getter_(this);
|
||||
}
|
||||
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
// WARNING: Do not edit - generated code.
|
||||
|
||||
@DocsEditable()
|
||||
@DomName('SQLResultSet')
|
||||
// http://www.w3.org/TR/webdatabase/#sqlresultset
|
||||
@Experimental() // deprecated
|
||||
class SqlResultSet extends DartHtmlDomObject {
|
||||
// To suppress missing implicit constructor warnings.
|
||||
factory SqlResultSet._() {
|
||||
throw new UnsupportedError("Not supported");
|
||||
}
|
||||
|
||||
@Deprecated("Internal Use Only")
|
||||
external static Type get instanceRuntimeType;
|
||||
|
||||
@Deprecated("Internal Use Only")
|
||||
SqlResultSet.internal_() {}
|
||||
|
||||
@DomName('SQLResultSet.insertId')
|
||||
@DocsEditable()
|
||||
int get insertId => _blink.BlinkSQLResultSet.instance.insertId_Getter_(this);
|
||||
|
||||
@DomName('SQLResultSet.rows')
|
||||
@DocsEditable()
|
||||
SqlResultSetRowList get rows =>
|
||||
_blink.BlinkSQLResultSet.instance.rows_Getter_(this);
|
||||
|
||||
@DomName('SQLResultSet.rowsAffected')
|
||||
@DocsEditable()
|
||||
int get rowsAffected =>
|
||||
_blink.BlinkSQLResultSet.instance.rowsAffected_Getter_(this);
|
||||
}
|
||||
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
// WARNING: Do not edit - generated code.
|
||||
|
||||
@DocsEditable()
|
||||
@DomName('SQLResultSetRowList')
|
||||
// http://www.w3.org/TR/webdatabase/#sqlresultsetrowlist
|
||||
@Experimental() // deprecated
|
||||
class SqlResultSetRowList extends DartHtmlDomObject
|
||||
with ListMixin<Map>, ImmutableListMixin<Map>
|
||||
implements List<Map> {
|
||||
// To suppress missing implicit constructor warnings.
|
||||
factory SqlResultSetRowList._() {
|
||||
throw new UnsupportedError("Not supported");
|
||||
}
|
||||
|
||||
@Deprecated("Internal Use Only")
|
||||
external static Type get instanceRuntimeType;
|
||||
|
||||
@Deprecated("Internal Use Only")
|
||||
SqlResultSetRowList.internal_() {}
|
||||
|
||||
@DomName('SQLResultSetRowList.length')
|
||||
@DocsEditable()
|
||||
int get length =>
|
||||
_blink.BlinkSQLResultSetRowList.instance.length_Getter_(this);
|
||||
|
||||
Map operator [](int index) {
|
||||
if (index < 0 || index >= length) throw new RangeError.index(index, this);
|
||||
return _nativeIndexedGetter(index);
|
||||
}
|
||||
|
||||
Map _nativeIndexedGetter(int index) => convertNativeToDart_Dictionary(
|
||||
_blink.BlinkSQLResultSetRowList.instance.item_Callback_1_(this, index));
|
||||
|
||||
void operator []=(int index, Map value) {
|
||||
throw new UnsupportedError("Cannot assign element of immutable List.");
|
||||
}
|
||||
// -- start List<Map> mixins.
|
||||
// Map is the element type.
|
||||
|
||||
set length(int value) {
|
||||
throw new UnsupportedError("Cannot resize immutable List.");
|
||||
}
|
||||
|
||||
Map get first {
|
||||
if (this.length > 0) {
|
||||
return _nativeIndexedGetter(0);
|
||||
}
|
||||
throw new StateError("No elements");
|
||||
}
|
||||
|
||||
Map get last {
|
||||
int len = this.length;
|
||||
if (len > 0) {
|
||||
return _nativeIndexedGetter(len - 1);
|
||||
}
|
||||
throw new StateError("No elements");
|
||||
}
|
||||
|
||||
Map get single {
|
||||
int len = this.length;
|
||||
if (len == 1) {
|
||||
return _nativeIndexedGetter(0);
|
||||
}
|
||||
if (len == 0) throw new StateError("No elements");
|
||||
throw new StateError("More than one element");
|
||||
}
|
||||
|
||||
Map elementAt(int index) => this[index];
|
||||
// -- end List<Map> mixins.
|
||||
|
||||
@DomName('SQLResultSetRowList.item')
|
||||
@DocsEditable()
|
||||
Object item(int index) => convertNativeToDart_Dictionary(
|
||||
_blink.BlinkSQLResultSetRowList.instance.item_Callback_1_(this, index));
|
||||
}
|
||||
// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
|
||||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
// WARNING: Do not edit - generated code.
|
||||
|
||||
@DocsEditable()
|
||||
@DomName('SQLTransaction')
|
||||
@SupportedBrowser(SupportedBrowser.CHROME)
|
||||
@SupportedBrowser(SupportedBrowser.SAFARI)
|
||||
@Experimental()
|
||||
// http://www.w3.org/TR/webdatabase/#sqltransaction
|
||||
@deprecated // deprecated
|
||||
class SqlTransaction extends DartHtmlDomObject {
|
||||
// To suppress missing implicit constructor warnings.
|
||||
factory SqlTransaction._() {
|
||||
throw new UnsupportedError("Not supported");
|
||||
}
|
||||
|
||||
@Deprecated("Internal Use Only")
|
||||
external static Type get instanceRuntimeType;
|
||||
|
||||
@Deprecated("Internal Use Only")
|
||||
SqlTransaction.internal_() {}
|
||||
|
||||
void executeSql(String sqlStatement,
|
||||
[List arguments,
|
||||
SqlStatementCallback callback,
|
||||
SqlStatementErrorCallback errorCallback]) {
|
||||
if (errorCallback != null) {
|
||||
_blink.BlinkSQLTransaction.instance.executeSql_Callback_4_(
|
||||
this, sqlStatement, arguments, callback, errorCallback);
|
||||
return;
|
||||
}
|
||||
if (callback != null) {
|
||||
_blink.BlinkSQLTransaction.instance
|
||||
.executeSql_Callback_3_(this, sqlStatement, arguments, callback);
|
||||
return;
|
||||
}
|
||||
if (arguments != null) {
|
||||
_blink.BlinkSQLTransaction.instance
|
||||
.executeSql_Callback_2_(this, sqlStatement, arguments);
|
||||
return;
|
||||
}
|
||||
_blink.BlinkSQLTransaction.instance
|
||||
.executeSql_Callback_1_(this, sqlStatement);
|
||||
return;
|
||||
}
|
||||
}
|
|
@ -196,7 +196,6 @@ LayoutTests/fast/mediastream/RTCPeerConnection-AddRemoveStream_t01: StaticWarnin
|
|||
LayoutTests/fast/multicol/vertical-lr/float-truncation_t01: StaticWarning # Please triage this failure.
|
||||
LayoutTests/fast/multicol/vertical-lr/image-inside-nested-blocks-with-border_t01: StaticWarning # Please triage this failure.
|
||||
LayoutTests/fast/multicol/vertical-rl/float-truncation_t01: StaticWarning # Please triage this failure.
|
||||
LayoutTests/fast/overflow/scroll-vertical-not-horizontal_t01: StaticWarning # Please triage this failure.
|
||||
LayoutTests/fast/ruby/after-doesnt-crash_t01: StaticWarning # Please triage this failure.
|
||||
LayoutTests/fast/shapes/shape-outside-floats/shape-outside-big-box-border-radius_t01: StaticWarning # Please triage this failure.
|
||||
LayoutTests/fast/shapes/shape-outside-floats/shape-outside-floats-diamond-margin-polygon_t01: StaticWarning # Please triage this failure.
|
||||
|
|
|
@ -18,7 +18,7 @@ main() {
|
|||
});
|
||||
|
||||
test("Access through dart:html", () {
|
||||
var dartPerformance = js.JsNative.toTypedObject(js.context['performance']);
|
||||
var dartPerformance = window.performance;
|
||||
var dartEntries = dartPerformance.getEntries();
|
||||
dartEntries.forEach((x) {
|
||||
expect(x is PerformanceEntry, isTrue);
|
||||
|
|
|
@ -23,7 +23,6 @@ lib/html/html_common/html_common_dart2js: CompileTimeError # Issue 16522
|
|||
lib/indexed_db/dart2js/indexed_db_dart2js: CompileTimeError # Issue 16522
|
||||
lib/indexed_db/dartium/indexed_db_dartium: Skip # TODO: Remove Dartium
|
||||
lib/js/dart2js/js_dart2js: CompileTimeError # Issue 16522
|
||||
lib/js_util/dart2js/js_util_dart2js: CompileTimeError # Issue 16522
|
||||
lib/svg/dart2js/svg_dart2js: CompileTimeError # Issue 16522
|
||||
lib/svg/dartium/svg_dartium: Skip # TODO: Remove Dartium
|
||||
lib/typed_data/dart2js/native_typed_data_dart2js: CompileTimeError # Issue 16522
|
||||
|
|
|
@ -43,7 +43,8 @@ final deps = new Set<Uri>();
|
|||
File getInputFile(String path, {canBeMissing: false}) {
|
||||
final file = new File(path);
|
||||
if (!file.existsSync()) {
|
||||
if (!canBeMissing) throw "patch_sdk.dart expects all inputs to exist";
|
||||
if (!canBeMissing)
|
||||
throw "patch_sdk.dart expects all inputs to exist, missing: $path";
|
||||
return null;
|
||||
}
|
||||
deps.add(Uri.base.resolveUri(file.uri));
|
||||
|
|
Loading…
Reference in a new issue